|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActionScriptProject
A container for a set of ActionScript files.
An ActionScriptProject helps deal with groups of source files. You can use the project object to create a bunch of compilation units by calling newClass() and newInterface() from disparate points in your code, and then call writeAll() to save everything to your output location in one go when you're done.
writeAll()
performs postprocessing steps on the generated code.
At the moment this is not configurable.
Method Summary | |
---|---|
void |
addCompilationUnit(ASCompilationUnit cu)
|
java.util.List |
getCompilationUnits()
|
java.lang.String |
getOutputLocation()
|
ASCompilationUnit |
newClass(java.lang.String qualifiedClassName)
Shortcut for ActionScriptFactory.newClass(String) that also
adds the resulting CompilationUnit to the list managed by this
project. |
ASCompilationUnit |
newInterface(java.lang.String qualifiedClassName)
Shortcut for ActionScriptFactory.newInterface(String) that also
adds the resulting CompilationUnit to the list managed by this
project. |
void |
removeCompilationUnit(ASCompilationUnit cu)
|
void |
setOutputLocation(java.lang.String outputLocation)
|
void |
writeAll()
Writes all CompilationUnits that have been added to this project to the output location. |
Method Detail |
---|
void setOutputLocation(java.lang.String outputLocation)
java.lang.String getOutputLocation()
void addCompilationUnit(ASCompilationUnit cu)
void removeCompilationUnit(ASCompilationUnit cu)
java.util.List getCompilationUnits()
ASCompilationUnit newClass(java.lang.String qualifiedClassName)
ActionScriptFactory.newClass(String)
that also
adds the resulting CompilationUnit to the list managed by this
project.
ASCompilationUnit newInterface(java.lang.String qualifiedClassName)
ActionScriptFactory.newInterface(String)
that also
adds the resulting CompilationUnit to the list managed by this
project.
void writeAll() throws java.io.IOException
Some processing is performed on the code before it is written to make it look nicer. This is not customisable, and the behaviour is likely to become part of a seperate API in a later metaas release. The code in each compilation unit is analysed to find fully-qualified references to other types defined within this project. Where the unqualified names of these types are unambiguous, the code is altered to use an unqualified named; all suspected type references are also added to the list of package-level imports in the compilation unit, if not already there.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |