Package net.aifusion.asn
Class AsnModule
java.lang.Object
net.aifusion.asn.AsnNode
net.aifusion.asn.AsnModule
Class to represent an ASN.1 Module
- Author:
- Sharad Singhal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a type to known typesvoid
Add a value to known valuesGet the node where a type is definedgetTypes()
get a hashmap containing all know types in this moduleGet the node where a value is definedGet a hashmap containing all known values in this moduleboolean
Check if a given type name is known to this moduleboolean
Check if a given value is known to this moduleMethods inherited from class net.aifusion.asn.AsnNode
addChild, getAsnValue, getChild, getChildren, getFullName, getName, getNameToken, getProduction, getValue, getValueToken, hasChildren, isBuiltInType, locate, locateType, reduce, search, toString, toString
-
Constructor Details
-
AsnModule
Create a Module definition- Parameters:
token
- - token containing the name of the module
-
-
Method Details
-
getTypes
get a hashmap containing all know types in this module- Returns:
- - map containing {typeName, definingAstNode} pairs
-
getValues
Get a hashmap containing all known values in this module- Returns:
- - map containing {valueName, definingAstNode} pairs
-
getType
Get the node where a type is defined- Parameters:
typeName
- - name of the type- Returns:
- - node containing type definition. Null if none currently defined
-
getValue
Get the node where a value is defined- Parameters:
valueName
- - name of the value- Returns:
- - node containing value definition. Null if none currently defined
-
addType
Add a type to known types- Parameters:
typeName
- - name of the type to be addedtypeNode
- - node at which the type is defined
-
addValue
Add a value to known values- Parameters:
valueName
- - name of the value to be addedvalueNode
- - node at which the value is defined
-
hasType
Check if a given type name is known to this module- Parameters:
typeName
- - name of the type- Returns:
- true if the type is known to this module, false otherwise
-
hasValue
Check if a given value is known to this module- Parameters:
valueName
- - name of the value- Returns:
- - true if the name is known to the module, false otherwise
-