Метод | Описание | |
---|---|---|
ClassCompiler ( |
Construct ClassCompiler that uses the specified compiler environment when generating classes. Construct ClassCompiler that uses the specified compiler environment when generating classes. |
|
CompileToClassFiles ( string source, string sourceLocation, int lineno, string mainClassName ) : object[] |
Compile JavaScript source into one or more Java class files. Compile JavaScript source into one or more Java class files. The first compiled class will have name mainClassName. If the results of |
|
GetCompilerEnv ( ) : |
Get the compiler environment the compiler uses. Get the compiler environment the compiler uses. |
|
GetMainMethodClass ( ) : string |
Get the name of the class for main method implementation. Get the name of the class for main method implementation. |
|
GetTargetExtends ( ) : |
Get the class that the generated target will extend. Get the class that the generated target will extend. |
|
GetTargetImplements ( ) : System.Type[] |
Get the interfaces that the generated target will implement. Get the interfaces that the generated target will implement. |
|
SetMainMethodClass ( string className ) : void |
Set the class name to use for main method implementation. Set the class name to use for main method implementation. The class must have a method matching public static void main(Script sc, String[] args), it will be called when main(String[] args) is called in the generated class. The class name should be fully qulified name and include the package name like in org.foo.Bar. |
|
SetTargetExtends ( |
Set the class that the generated target will extend. Set the class that the generated target will extend. |
|
SetTargetImplements ( |
Set the interfaces that the generated target will implement. Set the interfaces that the generated target will implement. |
Метод | Описание | |
---|---|---|
MakeAuxiliaryClassName ( string mainClassName, string auxMarker ) : string |
Build class name for a auxiliary class generated by compiler. Build class name for a auxiliary class generated by compiler. If the compiler needs to generate extra classes beyond the main class, it will call this function to build the auxiliary class name. The default implementation simply appends auxMarker to mainClassName but this can be overridden. |
public ClassCompiler ( |
||
compilerEnv | ||
Результат | System |
public CompileToClassFiles ( string source, string sourceLocation, int lineno, string mainClassName ) : object[] | ||
source | string | |
sourceLocation | string | |
lineno | int | |
mainClassName | string | |
Результат | object[] |
public GetCompilerEnv ( ) : |
||
Результат |
public GetTargetImplements ( ) : System.Type[] | ||
Результат | System.Type[] |
protected MakeAuxiliaryClassName ( string mainClassName, string auxMarker ) : string | ||
mainClassName | string | |
auxMarker | string | |
Результат | string |
public SetMainMethodClass ( string className ) : void | ||
className | string | |
Результат | void |
public SetTargetExtends ( |
||
extendsClass | the class it extends | |
Результат | void |
public SetTargetImplements ( |
||
implementsClasses | /// an array of Class objects, one for each /// interface the target will extend /// | |
Результат | void |