Package net.aifusion.asn
Class Symbol
java.lang.Object
net.aifusion.asn.Symbol
Class to manage a symbol
- Author:
- Sharad Singhal
-
Constructor Summary
ConstructorDescriptionSymbol
(String name, AsnProduction type, Symbol parent, String definingType) Create a symbol -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the defining type, if anyGet the definition for this symbolGet the fully qualified name of this symbolgetName()
Get the name of this symbolGet the parent of this symbol, if anyGet the production associated with this symbolvoid
setDefinition
(AsnNode definition) Set the definition for this symboltoString()
-
Constructor Details
-
Symbol
Create a symbol- Parameters:
name
- - name of the symbol (must not be null)type
- - type of this symbolparent
- - enclosing symbol, if anydefiningType
- - name of the defining type, if not a built-in type
-
-
Method Details
-
getName
Get the name of this symbol- Returns:
- - name of this symbol
-
getFullName
Get the fully qualified name of this symbol- Returns:
- - fully qualified name in the form "@" moduleName ( "." symbol)*
-
getProduction
Get the production associated with this symbol- Returns:
- - AST Production associated with the symbol
-
getParent
Get the parent of this symbol, if any- Returns:
- - parent of this symbol. Null if none defined
-
getDefiningType
Get the name of the defining type, if any- Returns:
- - name of the defining type. Null if none exists
-
setDefinition
Set the definition for this symbol- Parameters:
definition
- - AST node defining this symbol
-
getDefinition
Get the definition for this symbol- Returns:
- - definition. Null if the symbol is not yet defined
-
toString
-