|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.refactor.PUB
public class PUB
The API for "Parse Unit Binary" files, which are a persistent store for syntax trees.
Nested Class Summary | |
---|---|
class |
PUB.SymbolRef
A record of symbol type and name, for import/export tables. |
Field Summary | |
---|---|
static int |
AST
loadTo(AST) - just loads the node types - you almost certainly need STRINGS as well. |
static int |
END
loadTo(END) - all binary file segments will be loaded. |
static int |
EXPORTS
loadTo(EXPORTS) |
static int |
FILES
loadTo(FILES) - the index of include files referenced by this parse unit. |
static int |
HEADER
loadTo(HEADER) Gets all the segments necessary for checking if the binary is up to date or not. |
static int |
IMPORTS
loadTo(IMPORTS) |
static int |
LAYOUT_VERSION
This is like a "schema version" for .pub files. |
static int |
PUBFILE_TIMESTAMP
loadTo(PUBFILE_TIMESTAMP) - just check if the binary exists and check that it is newer than the compile unit file. |
static int |
SCHEMA
loadTo(SCHEMA) - the schema tables and fields referenced by this parse unit. |
static int |
STRINGS
loadTo(STRINGS) - load the strings into the syntax tree. |
Constructor Summary | |
---|---|
PUB(java.lang.String fullPath)
Create a PUB for a compile unit fully qualified path/name. |
Method Summary | |
---|---|
ParseUnit |
build()
Update the PUB. |
void |
build(TP01Support support)
This is called by TreeParser01, and should not be called directly. |
void |
copySchemaFieldLowercaseNamesInto(java.util.Collection c,
java.lang.String fromTableName)
Copies the lower case names of all schema fields for one table into your collection. |
void |
copySchemaTableLowercaseNamesInto(java.util.Collection c)
Copies the lower case names of all schema tables into your collection. |
java.lang.String |
getClassName()
|
PUB.SymbolRef[] |
getExportTable()
Get the array of exported symbols, in no particular order. |
PUB.SymbolRef[] |
getImportTable()
Get the array of imported symbols, in no particular order. |
ParseUnit |
getParseUnit()
|
java.lang.String |
getSuperClassName()
|
long |
getTimestamp()
Get the time stamp (File.lastModified()) of the PUB file. |
ProgramRootNode |
getTree()
Return the JPNode syntax tree that was loaded with load() |
boolean |
isChecked()
Has the PUB been checked to see if it's current? i.e. |
boolean |
isCurrent()
Is the PUB current? You should have used isChecked() or loaded the PUB to HEADER before checking isCurrent(). |
boolean |
load()
Same as loadTo(PUB.END) |
boolean |
loadTo(int lastSegmentToLoad)
Load the PUB file to the end of the specified segment. |
static java.lang.String |
pubDirFileName(java.lang.String fullPath)
Returns the path to the .pub file but without the .pub extension. |
void |
setParseUnit(ParseUnit pu)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LAYOUT_VERSION
public static final int PUBFILE_TIMESTAMP
public static final int FILES
public static final int HEADER
public static final int SCHEMA
public static final int IMPORTS
SymbolI.isImported()
,
Constant Field Valuespublic static final int EXPORTS
SymbolI.isExported()
,
Constant Field Valuespublic static final int AST
public static final int STRINGS
public static final int END
Constructor Detail |
---|
public PUB(java.lang.String fullPath)
fullPath
- The full path to the compile unit's source file.Method Detail |
---|
public ParseUnit build() throws java.io.IOException, RefactorException
RefactorException
java.io.IOException
public void build(TP01Support support) throws java.io.IOException, RefactorException
java.io.IOException
RefactorException
public void copySchemaTableLowercaseNamesInto(java.util.Collection c)
c
- public void copySchemaFieldLowercaseNamesInto(java.util.Collection c, java.lang.String fromTableName)
fromTableName
- Your table name. Case insenstitive. Must be of the format
"database.table".public java.lang.String getClassName()
public PUB.SymbolRef[] getExportTable()
public PUB.SymbolRef[] getImportTable()
public ParseUnit getParseUnit()
public java.lang.String getSuperClassName()
public long getTimestamp()
public ProgramRootNode getTree()
public boolean isChecked()
public boolean isCurrent()
isChecked()
public boolean load()
public boolean loadTo(int lastSegmentToLoad)
public static java.lang.String pubDirFileName(java.lang.String fullPath)
public void setParseUnit(ParseUnit pu)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |