|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mozilla.javascript.optimizer.ClassCompiler
public class ClassCompiler
Generates class files from script sources. since 1.5 Release 5
Constructor Summary | |
---|---|
ClassCompiler(CompilerEnvirons compilerEnv)
Construct ClassCompiler that uses the specified compiler environment when generating classes. |
Method Summary | |
---|---|
java.lang.Object[] |
compileToClassFiles(java.lang.String source,
java.lang.String sourceLocation,
int lineno,
java.lang.String mainClassName)
Compile JavaScript source into one or more Java class files. |
CompilerEnvirons |
getCompilerEnv()
Get the compiler environment the compiler uses. |
java.lang.String |
getMainMethodClass()
Get the name of the class for main method implementation. |
java.lang.Class |
getTargetExtends()
Get the class that the generated target will extend. |
java.lang.Class[] |
getTargetImplements()
Get the interfaces that the generated target will implement. |
protected java.lang.String |
makeAuxiliaryClassName(java.lang.String mainClassName,
java.lang.String auxMarker)
Build class name for a auxiliary class generated by compiler. |
void |
setMainMethodClass(java.lang.String className)
Set the class name to use for main method implementation. |
void |
setTargetExtends(java.lang.Class extendsClass)
Set the class that the generated target will extend. |
void |
setTargetImplements(java.lang.Class[] implementsClasses)
Set the interfaces that the generated target will implement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassCompiler(CompilerEnvirons compilerEnv)
Method Detail |
---|
public void setMainMethodClass(java.lang.String className)
public java.lang.String getMainMethodClass()
setMainMethodClass(String)
public CompilerEnvirons getCompilerEnv()
public java.lang.Class getTargetExtends()
public void setTargetExtends(java.lang.Class extendsClass)
extendsClass
- the class it extendspublic java.lang.Class[] getTargetImplements()
public void setTargetImplements(java.lang.Class[] implementsClasses)
implementsClasses
- an array of Class objects, one for each
interface the target will extendprotected java.lang.String makeAuxiliaryClassName(java.lang.String mainClassName, java.lang.String auxMarker)
public java.lang.Object[] compileToClassFiles(java.lang.String source, java.lang.String sourceLocation, int lineno, java.lang.String mainClassName)
getTargetExtends()
or
getTargetImplements()
are not null, then the first compiled
class will extend the specified super class and implement
specified interfaces.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |