public interface ICompilationUnit
Modifier and Type | Interface and Description |
---|---|
static class |
ICompilationUnit.Operation
An enumeration with an entry for each ICompilationUnit operation.
|
static class |
ICompilationUnit.UnitType
An enumeration with an entry for each ICompilationUnit source type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
clean(Map<ICompilerProject,Set<File>> invalidatedSWCFiles,
Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate,
boolean clearFileScope)
Removes all data created during a compile Clients should not call this
method directly, as it can potentially leave the ICompilationUnit in an
invalid state.
|
void |
clearProject()
Called by
ICompilerProject 's when an ICompilationUnit
is removed from a project. |
IRequest<IABCBytesRequestResult,ICompilationUnit> |
getABCBytesRequest()
Gets the request object from which the caller can extract the abc bytes
generated for this ICompilationUnit.
|
String |
getAbsoluteFilename()
Gets the path to the compilation unit instance.
|
ICompilationUnit.UnitType |
getCompilationUnitType() |
IDefinitionPriority |
getDefinitionPriority()
Gets the definition priority for definitions defined by the compilation
unit.
|
List<IDefinition> |
getDefinitionPromises() |
Collection<String> |
getEmbeddedFilenames() |
IRequest<IFileScopeRequestResult,ICompilationUnit> |
getFileScopeRequest()
Gets the request object from which the caller can extract the root scope,
AST, and any parsing ICompilerProblems, for the CompilationUnit.
|
String |
getName()
Gets a string that is unique to the compilation unit instance and can be
used to produce an ordering of compilation units that is stable across
different compilation runs.
|
IRequest<IOutgoingDependenciesRequestResult,ICompilationUnit> |
getOutgoingDependenciesRequest()
Gets the request object from which the caller cause the dependency graph to be updated
with all the dependencies from this compilation unit.
|
ICompilerProject |
getProject() |
List<String> |
getQualifiedNames() |
List<String> |
getShortNames() |
IRequest<ISWFTagsRequestResult,ICompilationUnit> |
getSWFTagsRequest()
Gets the request object with which the caller can add the SWF tags
generated for this ICompilationUnit to a ISWF.
|
IRequest<ISyntaxTreeRequestResult,ICompilationUnit> |
getSyntaxTreeRequest()
Gets the request object from which the caller can extract the syntax tree
and any source file parsing
ICompilerProblem 's
for this ICompilationUnit . |
boolean |
isInvisible() |
void |
startBuildAsync(ITarget.TargetType targetType)
This method starts to build the compilation unit asynchronously.
|
void |
waitForBuildFinish(Collection<ICompilerProblem> problems,
ITarget.TargetType targetType)
Wait till the compilation unit finishes building, and collect compiler
problems.
|
ICompilerProject getProject()
IRequest<ISyntaxTreeRequestResult,ICompilationUnit> getSyntaxTreeRequest()
ICompilerProblem
's
for this ICompilationUnit
. Implementations may update the dependency
graph in the project as a side
affect of this operation.IRequest<IFileScopeRequestResult,ICompilationUnit> getFileScopeRequest()
IRequest<IOutgoingDependenciesRequestResult,ICompilationUnit> getOutgoingDependenciesRequest()
IRequest<IABCBytesRequestResult,ICompilationUnit> getABCBytesRequest()
IRequest<ISWFTagsRequestResult,ICompilationUnit> getSWFTagsRequest()
List<String> getShortNames() throws InterruptedException
InterruptedException
List<String> getQualifiedNames() throws InterruptedException
InterruptedException
String getName()
String getAbsoluteFilename()
List<IDefinition> getDefinitionPromises()
ICompilationUnit.UnitType getCompilationUnitType()
boolean clean(Map<ICompilerProject,Set<File>> invalidatedSWCFiles, Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate, boolean clearFileScope)
invalidatedSWCFiles
- Map of SWC filenames and depending projects
which have been invalidated by this callcusToUpdate
- Map
from ICompilerProject
to
Set
of ICompilationUnit
s in the project whose externally
visible symbols need to be re-registered with the symbol table of the
containing ICompilerProject
when cleaning is complete.clearFileScope
- Whether to clear the file scopeIDefinitionPriority getDefinitionPriority()
void clearProject()
ICompilerProject
's when an ICompilationUnit
is removed from a project. Implementations should clear an references
to the containing project when this method is called. After this
method is called getProject()
should return null.void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
problems
- Problems from executing the requests.targetType
- type of the active Target
InterruptedException
- Concurrency error.startBuildAsync(org.apache.flex.compiler.targets.ITarget.TargetType)
void startBuildAsync(ITarget.TargetType targetType)
targetType
- type of the active Target
boolean isInvisible()
ICompilationUnit
does *not*
put its global definitions in the ICompilerProject
's
symbol table, false otherwise.Collection<String> getEmbeddedFilenames()
ICompilationUnit
through Embed metadata. This
will never return null.Copyright © 2016 The Apache Software Foundation. All rights reserved.