public interface ICompilerProject
Modifier and Type | Method and Description |
---|---|
void |
clean()
Removes all data created during a compile
|
ISWFTarget |
createSWFTarget(ITargetSettings targetSettings,
ITargetProgressMonitor progressMonitor)
Create a SWF target
|
void |
delete()
Called before a project is deleted.
|
IDefinition |
doubleCheckAmbiguousDefinition(ASScope scope,
String name,
IDefinition def1,
IDefinition def2)
Override this to do try harder to disambiguate between two ambiguous definitions
|
String |
getActualPackageName(String packageName)
Override this to permit package aliasing on imports and elsewhere
|
ITypeDefinition |
getBuiltinType(IASLanguageConstants.BuiltinType type)
Helper method to get some of the built-in types (*, String, Number, etc).
|
Collection<ICompilationUnit> |
getCompilationUnits() |
Collection<ICompilationUnit> |
getCompilationUnits(String filename)
Get all compilation units from the filename
|
Set<ICompilationUnit> |
getDirectDependencies(ICompilationUnit cu)
Gets the set of compilation units depended on directly
by the specified compilation unit.
|
Set<ICompilationUnit> |
getDirectReverseDependencies(ICompilationUnit cu,
DependencyTypeSet types)
Gets the set of compilation units that directly depend on the specified compilation unit.
|
Collection<ICompilationUnit> |
getIncludingCompilationUnits(String filename)
Get all compilation units from which the filename is included.
|
Collection<ICompilerProblem> |
getProblems() |
List<ICompilationUnit> |
getReachableCompilationUnitsInSWFOrder(Collection<ICompilationUnit> roots)
Given a set of roots node in the dependency graph, compute a list of
ICompilationUnit 's that are reachable from the specified roots. |
IASScope |
getScope() |
IDefinition |
getUndefinedValue()
Helper method to get the only built-in value (undefined).
|
IWorkspace |
getWorkspace() |
boolean |
isAssetEmbeddingSupported()
Test whether the project supports the embedding of assets.
|
boolean |
isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition,
ITypeDefinition baseDefinition) |
boolean |
isInliningEnabled()
Test whether the project supports function inlining
|
boolean |
isValidTypeConversion(IASNode node,
IDefinition actualDefinition,
IDefinition expectedDefinition,
FunctionDefinition func) |
ICompilationUnit |
resolveQNameToCompilationUnit(String qName)
Resolve a QName such as
mx.controls.Button to the containing
ICompilationUnit |
IDefinition |
resolveQNameToDefinition(String qName)
Resolve a QName such as
mx.controls.Button to a class definition. |
void |
setProblems(Collection<ICompilerProblem> problems) |
void |
setUseParallelCodeGeneration(boolean useParallelCodeGeneration)
Enables or disables parallel code generation of method bodies.
|
IWorkspace getWorkspace()
IASScope getScope()
Collection<ICompilationUnit> getCompilationUnits()
Collection<ICompilationUnit> getCompilationUnits(String filename)
filename
- path to source fileCollection<ICompilationUnit> getIncludingCompilationUnits(String filename)
The returned collection does not include invisible compilation units.
filename
- path to source filevoid clean()
void delete()
ISWFTarget createSWFTarget(ITargetSettings targetSettings, ITargetProgressMonitor progressMonitor) throws InterruptedException
targetSettings
- The settings to use for this targetprogressMonitor
- to collect progress information, can be null
InterruptedException
List<ICompilationUnit> getReachableCompilationUnitsInSWFOrder(Collection<ICompilationUnit> roots)
ICompilationUnit
's that are reachable from the specified roots.
The returned list of ICompilationUnit
's is in the order in which
the ICompilationUnit
's should be added to a SWF.roots
- The roots of the dependency graph that is walked to compute
which CompilationUnits to include in the return value.ICompilationUnit
's reachable from the specified roots
in the order the ICompilationUnit
's should be added to a SWF.IDefinition resolveQNameToDefinition(String qName)
mx.controls.Button
to a class definition.qName
- Qualified name.IDefinition
corresponds to the given QName; Null if
the name can't be resolved.ICompilationUnit resolveQNameToCompilationUnit(String qName)
mx.controls.Button
to the containing
ICompilationUnitqName
- Qualified name.ICompilationUnit
corresponds to the given QName; Null if
the name can't be resolved.ITypeDefinition getBuiltinType(IASLanguageConstants.BuiltinType type)
IDefinition getUndefinedValue()
boolean isAssetEmbeddingSupported()
void setUseParallelCodeGeneration(boolean useParallelCodeGeneration)
useParallelCodeGeneration
- If true, method bodies will be generated
in parallel.Set<ICompilationUnit> getDirectDependencies(ICompilationUnit cu)
cu
- The ICompilationUnit
whose set of direct dependencies
will be returned.Set<ICompilationUnit> getDirectReverseDependencies(ICompilationUnit cu, DependencyTypeSet types)
cu
- An ICompilationUnit
.types
- A DependencyTypeSet
of dependency types used to filter
the returned set of compilation units.boolean isInliningEnabled()
String getActualPackageName(String packageName)
packageName
- The imported classIDefinition doubleCheckAmbiguousDefinition(ASScope scope, String name, IDefinition def1, IDefinition def2)
scope
- The current scope.name
- Definition name.def1
- One possibility.def2
- The other possibility.Collection<ICompilerProblem> getProblems()
void setProblems(Collection<ICompilerProblem> problems)
problems
- All the problems collected so far.
Set this to the main collection so parts of the compiler
can add a problem if they don't have another place to add them.boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition)
overrideDefinition
- The definition overriding the base definition.baseDefinition
- The definition being overridden.boolean isValidTypeConversion(IASNode node, IDefinition actualDefinition, IDefinition expectedDefinition, FunctionDefinition func)
node
- The node being converted.actualDefinition
- The actual definition.expectedDefinition
- The expected definition.func
- The function being called.Copyright © 2016 The Apache Software Foundation. All rights reserved.