public class SWCCompilationUnit extends CompilationUnitBase
A SWCCompilationUnit
is similar to ABCCompilationUnit
that
they both deal with ABC byte code. The difference is that
ABCCompilationUnit
requires ABC byte code when created, while
SWCCompilationUnit
only need a pointer to the script location.
SWCCompilationUnit
does not request or digest the ABC byte code until
any of the handlers is called.
ICompilationUnit.Operation, ICompilationUnit.UnitType
abc, DEFAULT_DO_ABC_TAG_NAME, fileScopeRequest, problems, syntaxTreeRequest
Constructor and Description |
---|
SWCCompilationUnit(CompilerProject project,
ISWC swc,
ISWCLibrary library,
ISWCScript script,
List<String> qnames,
int order)
Create a compilation unit from ABC byte code in a SWF tag.
|
Modifier and Type | Method and Description |
---|---|
ICompilationUnit.UnitType |
getCompilationUnitType() |
protected static String |
getLinkReportName(ICompilationUnit cu) |
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.
|
protected IABCBytesRequestResult |
handleABCBytesRequest()
Find the
DoABC tag from SWFCache by script name and
extract the ABC bytes. |
protected void |
handleClean(boolean cleanFileScope,
Map<ICompilerProject,Set<File>> invalidatedSWCFiles)
This method is overriden by base classes to
clean additional processing results not cleaned by
the clean method above.
|
protected IFileScopeRequestResult |
handleFileScopeRequest()
Builds a
IFileScopeRequestResult . |
protected IOutgoingDependenciesRequestResult |
handleOutgoingDependenciesRequest()
Builds a IOutgoingDependenciesRequestResult.
|
protected ISWFTagsRequestResult |
handleSWFTagsRequest()
Add a DoABC tag for the definition of this compilation unit and its asset
tags to the SWF.
|
protected ISyntaxTreeRequestResult |
handleSyntaxTreeRequest()
Builds a
ISyntaxTreeRequestResult . |
boolean |
isANE()
Test if this compilation unit comes from an ANE File.
|
String |
toString()
For debugging.
|
addScopeToProjectScope, clean, clearIncludedFilesFromWorkspace, clearProject, getABCBytesRequest, getAbsoluteFilename, getDefinitionPriority, getDefinitionPromises, getEmbeddedFilenames, getEncodedDebugFiles, getFilenameNoPath, getFileScopeRequest, getFileSpecificationGetter, getOutgoingDependenciesRequest, getProject, getQualifiedNames, getRootFileSpecification, getShortNames, getSWFTagsRequest, getSyntaxTreeRequest, isInvisible, makeInvisible, operationsCompleted, removeAST, setFileSpecificationGetter, startBuildAsync, startParsingImports, startProfile, stopProfile, updateEmbedCompilationUnitDependencies, updateStyleCompilationUnitDependencies, verifyAST, waitForBuildFinish
public SWCCompilationUnit(CompilerProject project, ISWC swc, ISWCLibrary library, ISWCScript script, List<String> qnames, int order)
SWCCompilationUnit
.project
- compiler projectscript
- script informationqnames
- of qnames within this swcorder
- the order the SWC was added to the project. The lower the
order the higher the priority of the compilation unit. The order is
compared only if the timestamps of two compilation units are equal.public ICompilationUnit.UnitType getCompilationUnitType()
protected ISyntaxTreeRequestResult handleSyntaxTreeRequest() throws InterruptedException
CompilationUnitBase
ISyntaxTreeRequestResult
. In many cases the ISyntaxTreeRequestResult
is built by parsing a source file into a syntax tree.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleSyntaxTreeRequest
in class CompilationUnitBase
ISyntaxTreeRequestResult
for this compilation unit.InterruptedException
protected IFileScopeRequestResult handleFileScopeRequest() throws InterruptedException
CompilationUnitBase
IFileScopeRequestResult
. In many cases the
IFileScopeRequestResult
is built by walking an AST produced by a parser.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleFileScopeRequest
in class CompilationUnitBase
IFileScopeRequestResult
for this compilation unit.InterruptedException
protected IABCBytesRequestResult handleABCBytesRequest() throws InterruptedException
DoABC
tag from SWFCache
by script name and
extract the ABC bytes.handleABCBytesRequest
in class CompilationUnitBase
InterruptedException
protected ISWFTagsRequestResult handleSWFTagsRequest() throws InterruptedException
AssetTagCache
.handleSWFTagsRequest
in class CompilationUnitBase
InterruptedException
protected IOutgoingDependenciesRequestResult handleOutgoingDependenciesRequest() throws InterruptedException
CompilationUnitBase
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleOutgoingDependenciesRequest
in class CompilationUnitBase
InterruptedException
public boolean isANE()
public String getName()
ICompilationUnit
getName
in interface ICompilationUnit
getName
in class CompilationUnitBase
protected void handleClean(boolean cleanFileScope, Map<ICompilerProject,Set<File>> invalidatedSWCFiles)
CompilationUnitBase
handleClean
in class CompilationUnitBase
protected static String getLinkReportName(ICompilationUnit cu)
public String toString()
toString
in class CompilationUnitBase
Copyright © 2016 The Apache Software Foundation. All rights reserved.