public class FXGSourceFileHandler extends Object implements ISourceFileHandler
FXGCompilationUnit
'sModifier and Type | Field and Description |
---|---|
static String |
EXTENSION |
static FXGSourceFileHandler |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateInvisibleCompilationUnit()
Determines if the handler can create invisible compilation units.
|
ICompilationUnit |
createCompilationUnit(CompilerProject project,
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 FXGSourceFileHandler INSTANCE
public String[] getExtensions()
ISourceFileHandler
Caller should not modify returned array.
getExtensions
in interface ISourceFileHandler
public ICompilationUnit createCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority basePriority, int order, String qname, String locale)
ISourceFileHandler
ICompilationUnit
instance for the specified project
and file.createCompilationUnit
in interface ISourceFileHandler
project
- 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 ICompilationUnit
s.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)
ISourceFileHandler
ICompilationUnit
should be created
for the specified file, qualified name, and locale.needCompilationUnit
in interface ISourceFileHandler
project
- 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()
ISourceFileHandler
canCreateInvisibleCompilationUnit
in interface ISourceFileHandler
Copyright © 2016 The Apache Software Foundation. All rights reserved.