|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
A project is a set of source files from which the AST model is built. It also contains some additional information such as classpath required to build the project.
This interface is not intended to be implemented by clients.
| Method Summary | |
void |
addSourceBase(ISourceBase sourceBase)
Adds a source file location. |
void |
deepUpdate(AstCompilationUnit file)
Builds the deep AST model for the types containing in the specified file. |
void |
enableAssert(boolean enabled)
Specifies whether the assertion statements introduced in JDK 1.4 will be recognized. |
java.lang.String |
getClasspath()
Returns class path string for the project. |
long |
getFileSize(java.lang.String filename)
Returns the size (in bytes) of the file with the specified name. |
ILog |
getLog()
Returns the log object for this project. |
AstModel |
getModel()
Returns the AST model of this project. |
java.lang.String |
getProjectName()
Returns the name of this project. |
ISourceBase[] |
getSourceBases()
Returns an array of source file locations. |
java.lang.String[] |
getSourceFiles()
Returns an array of files in the project. |
int |
getTabSize()
Returns the tab size for source files in this project. |
long |
getTimestamp(java.lang.String filename)
Returns the timestamp for the specified file. |
boolean |
isAssertEnabled()
Indicates whether the assertion statements introduced in JDK 1.4 are recognized. |
java.io.Reader |
openFile(java.lang.String filename)
Returns the reader for the specified file. |
void |
setClasspath(java.lang.String classpath)
Sets classpath for the project. |
void |
setProjectName(java.lang.String projectName)
Sets the name of this project. |
void |
setTabSize(int tabSize)
Sets the tab size for source files in this project. |
void |
update(boolean shallowModel,
JobControl jobControl)
Processes the source files and builds the AST model. |
void |
write()
Saves the current AST model on a disk. |
| Method Detail |
public void addSourceBase(ISourceBase sourceBase)
public void deepUpdate(AstCompilationUnit file)
file - specifies whether shallow AST model will be built.public void enableAssert(boolean enabled)
enabled - if true, then assert will be
recognized as a keyword.public java.lang.String getClasspath()
getClasspath
returns null, the default class path is used.public long getFileSize(java.lang.String filename)
-1 if the file does not exist, or I/O error has occurred.public ILog getLog()
public AstModel getModel()
update was not called
for the project, getModel will return null.public java.lang.String getProjectName()
public ISourceBase[] getSourceBases()
public java.lang.String[] getSourceFiles()
public int getTabSize()
public long getTimestamp(java.lang.String filename)
-1,
if the file with the specified name does not exist.public boolean isAssertEnabled()
public java.io.Reader openFile(java.lang.String filename)
Returns null, if the file with the specified name does not exist.
ISourceBasepublic void setClasspath(java.lang.String classpath)
.;d:/jdk1.3/jre/lib/rt.jar;d:/antlr/lib/antlrall.jar.public void setProjectName(java.lang.String projectName)
public void setTabSize(int tabSize)
public void update(boolean shallowModel,
JobControl jobControl)
Depending on the shallowModel parameter value, shallow
or deep AST model will be built. Shallow AST model contains the top-level
declarations only. The top-level declarations are top-level and nested types
and their members. Deep AST model includes method, constructor, and
class initializer bodies as well.
As opposed to shallow model, deep model provides full information about language constructs. However, it requires more memory and CPU time to build.
The main concern of selection between deep and shallow model is
performance issues. Regardless of the value of the shallowModel
parameter, the AST model users have full access to the entire model
since deep model is built on demand in a transparent manner.
However, building both shallow and deep models will introduce additional
overhead. Thus, only code inspectors that do not analyze method bodies
should request shallow model.
shallowModel - specifies whether shallow AST model will be built.public void write()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||