public final class JSSourceFileHandler extends Object implements ISourceFileHandler
ASCompilationUnit's. JSSourceFileHandler is the SourceFileHandler
that provides JSCompilationUnit for *.as files. JSDriver registers
JSSourceFileHandler at FlexApplicationProject. This implementation is part of
FalconJS. For more details on FalconJS see org.apache.flex.compiler.JSDriver| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION |
static JSSourceFileHandler |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateInvisibleCompilationUnit()
Determines if the handler can create invisible compilation units.
|
ICompilationUnit |
createCompilationUnit(CompilerProject proj,
String path,
DefinitionPriority.BasePriority basePriority,
int order,
String qname,
String locale)
Creates a new
ICompilationUnit instance for the specified project
and file. |
String[] |
getExtensions()
Gets an array of Strings containing the file extensions that handler
supports.
|
boolean |
needCompilationUnit(CompilerProject project,
String path,
String qname,
String locale)
Determines if a new
ICompilationUnit should be created
for the specified file, qualified name, and locale. |
public static final String EXTENSION
public static final JSSourceFileHandler INSTANCE
public String[] getExtensions()
Caller should not modify returned array.
getExtensions in interface ISourceFileHandlerpublic ICompilationUnit createCompilationUnit(CompilerProject proj, String path, DefinitionPriority.BasePriority basePriority, int order, String qname, String locale)
ICompilationUnit instance for the specified project
and file.createCompilationUnit in interface ISourceFileHandlerproj - CompilerProject the new ICompilationUnit
will be added to.path - Path of the file which should be parsed by the new
ICompilationUnit.basePriority - DefinitionPriority.BasePriority used to determine
if definitions defined by the new ICompilationUnit shadow
definitions defined by other ICompilationUnits.order - The index of the entry in the source path or source list
that is causing this method to be called.qname - The fully-qualified name of the one externally-visible
definition expected to be found in this compilation unit, or null if none
is expected. This name is determined from the name of the file and the
file's location relative to the source path.locale - locale of the file if the file is locale dependent or
null if the file is not locale dependent.ICompilationUnit.public boolean needCompilationUnit(CompilerProject project, String path, String qname, String locale)
ICompilationUnit should be created
for the specified file, qualified name, and locale.needCompilationUnit in interface ISourceFileHandlerproject - CompilerProject For which a ICompilationUnit would be needed.path - Absolute file name for which a ICompilationUnit would be needed.locale - locale of the file if the file is locale dependent or
null if the file is not locale dependent.ICompilationUnit should be created, false otherwise.public boolean canCreateInvisibleCompilationUnit()
canCreateInvisibleCompilationUnit in interface ISourceFileHandlerCopyright © 2016 The Apache Software Foundation. All rights reserved.