|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--coins.driver.SuffixFactory
A factory of Suffix object.
SuffixFactory reads a suffix database file and creates
Suffix objects representing each suffix appeared in the file. The
file consists of any number of record lines following a header line.
Format of a header line is as following:
#SRD, 2, any string``#SRD'' represents that this file is a suffix database file. ``2'' means the format version number (i.e., version 2). You can supply any string to explain the contents. Format of a record line is as following:
suffixspec, language name, description, afterpreprocess, aftercompile, afterassembleWhere suffixspecs is a suffixspec, or '/' separated suffixspecs to show more than one suffix represent a same kind of file. A suffixspec is a suffix string may be followed by a (option). The option is called as a suffix option. More than one record can specify a same suffix as long as a suffix option is supplied to all record lines but one. The suffix options for a same suffix must differ each other. If a suffix option is given when getting a Suffix object from the SuffixFactory, an object corresponding the record which has the suffix option is returned. A suffixspec without a suffix option is a default record of the suffix. language name is a name of a programming language in which the file of the suffix is written. The language name can be used to distinguish the programming language in compilation process when more than one programming language is used to build a program. description is a description of this suffix. Do not include commas in the description. afterpreprocess, aftercompile and afterassemble are suffix strings of output files of preprocessing, compilation and assemble. A `-' can be specified when corresponding pass is not required for files with this suffix. Following is a sample suffix database file:
#SRD, 2, Suffix rule DB file, format version 2 c, C, C source, i,s,o i, C, preprocessed C source, -,s,o cc/cpp/cxx/C,C++, C++ source, ii,s,o ii, C++, preprocessed C++ source, -,s,o java, Java, Java source, -,class,- java(native),Java, Java source (native compile), -,s,o f, FORTRAN, FORTRAN source, -,s,o S, Assembler, assembly source (need preprocess), s,-,o s, Assembler, assembly source, -,-,oThe third record line tells that there are four different suffixes which represent C++ source file and preprocess, compilation and assemble are required to process it. The sixth record line tells that when native option is given, a .java file is compiled into an assembler source file.
フィールドの概要 | |
static java.lang.String |
DEFAULT_SUFFIX_FILE
A default suffix database file name. |
コンストラクタの概要 | |
SuffixFactory()
|
メソッドの概要 | |
(パッケージプライベート) static void |
defaultInitialize(CompileSpecification pSpec)
|
static Suffix |
getSuffix(java.io.File file)
Returns a Suffix object representing a suffix of a specified file name. |
static Suffix |
getSuffix(java.io.File file,
java.lang.String option)
Returns a Suffix object representing a suffix of a specified file name. |
static Suffix |
getSuffix(java.lang.String suffixString)
Returns a Suffix object representing a specified suffix string. |
static Suffix |
getSuffix(java.lang.String suffixString,
java.lang.String option)
Returns a Suffix object representing a specified suffix string. |
(パッケージプライベート) static void |
initialize()
|
(パッケージプライベート) static boolean |
initialize(java.io.BufferedReader pReader,
java.lang.String pFile,
CompileSpecification pSpec)
|
(パッケージプライベート) static void |
initialize(CompileSpecification pSpec)
|
(パッケージプライベート) static void |
initialize(java.io.File pFile,
CompileSpecification pSpec)
|
(パッケージプライベート) static void |
initialize(java.io.InputStream pIn,
java.lang.String pFile,
CompileSpecification pSpec)
|
(パッケージプライベート) static void |
initialize(java.lang.String pString,
CompileSpecification pSpec)
|
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
public static final java.lang.String DEFAULT_SUFFIX_FILE
コンストラクタの詳細 |
public SuffixFactory()
メソッドの詳細 |
static void defaultInitialize(CompileSpecification pSpec)
static void initialize(CompileSpecification pSpec)
static void initialize()
static boolean initialize(java.io.BufferedReader pReader, java.lang.String pFile, CompileSpecification pSpec) throws java.io.IOException
java.io.IOException
static void initialize(java.io.File pFile, CompileSpecification pSpec)
static void initialize(java.lang.String pString, CompileSpecification pSpec)
static void initialize(java.io.InputStream pIn, java.lang.String pFile, CompileSpecification pSpec)
public static Suffix getSuffix(java.io.File file)
file
- a file name.
public static Suffix getSuffix(java.io.File file, java.lang.String option)
file
- a file name.
public static Suffix getSuffix(java.lang.String suffixString)
suffixString
- a suffix string.
public static Suffix getSuffix(java.lang.String suffixString, java.lang.String option)
suffixString
- a suffix string.option
- a suffix option string.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |