|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 SymbolI
public int getAllRefsCount()
getAllRefsCount
in interface SymbolI
public int getNumReads()
getNumReads
in interface SymbolI
public int getNumWrites()
getNumWrites
in interface SymbolI
public JPNode getAsNode()
SymbolI
getAsNode
in interface SymbolI
public JPNode getDefineNode()
SymbolI
getDefineNode
in interface SymbolI
public JPNode getIndirectDefineIdNode()
SymbolI
getIndirectDefineIdNode
in interface SymbolI
public JPNode getLikeNode()
SymbolI
getLikeNode
in interface SymbolI
public java.lang.String getName()
getName
in interface SymbolI
public abstract int getProgressType()
SymbolI
getProgressType
in interface SymbolI
public SymbolScope getScope()
getScope
in interface SymbolI
public boolean isExported()
SymbolI
isExported
in interface SymbolI
public boolean isImported()
SymbolI
isImported
in interface SymbolI
public void noteReference(int contextQualifier)
SymbolI
noteReference
in interface SymbolI
public void setAsNode(JPNode asNode)
setAsNode
in interface SymbolI
SymbolI.getAsNode()
public void setDefOrIdNode(JPNode node)
SymbolI
setDefOrIdNode
in interface SymbolI
public void setLikeNode(JPNode likeNode)
setLikeNode
in interface SymbolI
SymbolI.getLikeNode()
public void setName(java.lang.String name)
setName
in interface SymbolI
public java.lang.String toString()
toString
in class java.lang.Object
public void writeXferBytes(DataXferStream out) throws java.io.IOException
writeXferBytes
in interface Xferable
java.io.IOException
public void writeXferSchema(DataXferStream out) throws java.io.IOException
writeXferSchema
in interface Xferable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |