public interface ISourceFileHandler
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 priority,
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. |
String[] getExtensions()
Caller should not modify returned array.
boolean needCompilationUnit(CompilerProject project, String path, String qname, String locale)
ICompilationUnit
should be created
for the specified file, qualified name, and locale.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.ICompilationUnit createCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority priority, int order, String qname, String locale)
ICompilationUnit
instance for the specified project
and file.project
- CompilerProject
the new ICompilationUnit
will be added to.path
- Path of the file which should be parsed by the new
ICompilationUnit
.priority
- 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
.boolean canCreateInvisibleCompilationUnit()
Copyright © 2016 The Apache Software Foundation. All rights reserved.