|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.prorefactor.treeparser.Symbol
public abstract class Symbol
Base class for any type of symbol which needs to be kept track of when parsing a 4gl compile unit's AST.
| Field Summary |
|---|
| Fields inherited from interface org.prorefactor.treeparser.SymbolI |
|---|
NAME_ORDER |
| Constructor Summary | |
|---|---|
protected |
Symbol()
Only to be used for persistence/serialization. |
protected |
Symbol(int allRefsCount,
JPNode asNode,
JPNode defNode,
JPNode likeNode,
java.lang.String name,
int numReads,
int numWrites,
SymbolScope scope)
|
| Method Summary | |
|---|---|
abstract Symbol |
copyBare(SymbolScope intoScope)
Generate a bare-bones copy of this symbol. |
abstract java.lang.String |
fullName()
Get the "full" name for this symbol. |
int |
getAllRefsCount()
|
JPNode |
getAsNode()
If this was defined AS something, then we have an AS node |
JPNode |
getDefineNode()
If this symbol was defined directly by a DEFINE syntax, then this returns the DEFINE node, otherwise null. |
JPNode |
getIndirectDefineIdNode()
If this symbol was defined with syntax other than a direct DEFINE, then this returns the ID node, otherwise null. |
JPNode |
getLikeNode()
If this was defined LIKE something, then we have a LIKE node |
java.lang.String |
getName()
|
int |
getNumReads()
|
int |
getNumWrites()
|
abstract int |
getProgressType()
From TokenTypes: VARIABLE, FRAME, MENU, MENUITEM, etc. |
SymbolScope |
getScope()
|
boolean |
isExported()
Is the symbol newly defined here and visible to other compile units? This includes PROTECTED members visible to subclasses. |
boolean |
isImported()
Defined as SHARED? |
void |
noteReference(int contextQualifier)
Take note of a symbol reference (read, write, reference by name). |
void |
setAsNode(JPNode asNode)
|
void |
setDefOrIdNode(JPNode node)
We store the DEFINE|FUNCTION|METHOD|PROCEDURE node if available and sensible. |
void |
setLikeNode(JPNode likeNode)
|
void |
setName(java.lang.String name)
|
java.lang.String |
toString()
|
void |
writeXferBytes(DataXferStream out)
Implement Xferable |
void |
writeXferSchema(DataXferStream out)
Implement Xferable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Symbol()
protected Symbol(int allRefsCount,
JPNode asNode,
JPNode defNode,
JPNode likeNode,
java.lang.String name,
int numReads,
int numWrites,
SymbolScope scope)
| Method Detail |
|---|
public abstract Symbol copyBare(SymbolScope intoScope)
public abstract java.lang.String fullName()
SymbolI
fullName in interface SymbolIpublic int getAllRefsCount()
getAllRefsCount in interface SymbolIpublic int getNumReads()
getNumReads in interface SymbolIpublic int getNumWrites()
getNumWrites in interface SymbolIpublic JPNode getAsNode()
SymbolI
getAsNode in interface SymbolIpublic JPNode getDefineNode()
SymbolI
getDefineNode in interface SymbolIpublic JPNode getIndirectDefineIdNode()
SymbolI
getIndirectDefineIdNode in interface SymbolIpublic JPNode getLikeNode()
SymbolI
getLikeNode in interface SymbolIpublic java.lang.String getName()
getName in interface SymbolIpublic abstract int getProgressType()
SymbolI
getProgressType in interface SymbolIpublic SymbolScope getScope()
getScope in interface SymbolIpublic boolean isExported()
SymbolI
isExported in interface SymbolIpublic boolean isImported()
SymbolI
isImported in interface SymbolIpublic void noteReference(int contextQualifier)
SymbolI
noteReference in interface SymbolIpublic void setAsNode(JPNode asNode)
setAsNode in interface SymbolISymbolI.getAsNode()public void setDefOrIdNode(JPNode node)
SymbolI
setDefOrIdNode in interface SymbolIpublic void setLikeNode(JPNode likeNode)
setLikeNode in interface SymbolISymbolI.getLikeNode()public void setName(java.lang.String name)
setName in interface SymbolIpublic java.lang.String toString()
toString in class java.lang.Object
public void writeXferBytes(DataXferStream out)
throws java.io.IOException
writeXferBytes in interface Xferablejava.io.IOException
public void writeXferSchema(DataXferStream out)
throws java.io.IOException
writeXferSchema in interface Xferablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||