public class JSCompilationUnit extends ASCompilationUnit
JSCompilationUnit is derived from ASCompilationUnit and overrides the parts that generate the code.
ICompilationUnit.Operation, ICompilationUnit.UnitType
abc, DEFAULT_DO_ABC_TAG_NAME, fileScopeRequest, problems, syntaxTreeRequest
Constructor and Description |
---|
JSCompilationUnit(CompilerProject project,
String path)
Create a compilation unit from an ABC file.
|
JSCompilationUnit(CompilerProject project,
String path,
DefinitionPriority.BasePriority basePriority) |
JSCompilationUnit(CompilerProject project,
String path,
DefinitionPriority.BasePriority basePriority,
String qname) |
Modifier and Type | Method and Description |
---|---|
Boolean |
addDependency(String className,
DependencyType dt) |
protected IOutgoingDependenciesRequestResult |
handleOutgoingDependenciesRequest()
Builds a IOutgoingDependenciesRequestResult.
|
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.
|
addProblemsToProject, createFileNode, createMainCompilationUnitForASC, getCompilationUnitType, getRootClassName, handleABCBytesRequest, handleFileScopeRequest, handleSWFTagsRequest, handleSyntaxTreeRequest, removeAST
addScopeToProjectScope, clean, clearIncludedFilesFromWorkspace, clearProject, getABCBytesRequest, getAbsoluteFilename, getDefinitionPriority, getDefinitionPromises, getEmbeddedFilenames, getEncodedDebugFiles, getFilenameNoPath, getFileScopeRequest, getFileSpecificationGetter, getName, getOutgoingDependenciesRequest, getProject, getQualifiedNames, getRootFileSpecification, getShortNames, getSWFTagsRequest, getSyntaxTreeRequest, handleClean, isInvisible, makeInvisible, operationsCompleted, setFileSpecificationGetter, startParsingImports, startProfile, stopProfile, toString, updateEmbedCompilationUnitDependencies, updateStyleCompilationUnitDependencies, verifyAST
public JSCompilationUnit(CompilerProject project, String path) throws IOException
project
- compiler projectpath
- ABC file pathIOException
- errorpublic JSCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority basePriority)
public JSCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority basePriority, String qname)
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 ASCompilationUnit
InterruptedException
public Boolean addDependency(String className, DependencyType dt)
public void startBuildAsync(ITarget.TargetType targetType)
ICompilationUnit
startBuildAsync
in interface ICompilationUnit
startBuildAsync
in class CompilationUnitBase
targetType
- type of the active Target
public void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
ICompilationUnit
waitForBuildFinish
in interface ICompilationUnit
waitForBuildFinish
in class CompilationUnitBase
problems
- Problems from executing the requests.targetType
- type of the active Target
InterruptedException
- Concurrency error.ICompilationUnit.startBuildAsync(org.apache.flex.compiler.targets.ITarget.TargetType)
Copyright © 2016 The Apache Software Foundation. All rights reserved.