Package net.emustudio.edigen.nodes
Class Value
- java.lang.Object
-
- net.emustudio.edigen.nodes.TreeNode
-
- net.emustudio.edigen.nodes.Value
-
public class Value extends TreeNode
The disassembler value node - bound to an instruction decoder rule name.
-
-
Constructor Summary
Constructors Constructor Description Value(java.lang.String name)Constructs the value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)Accepts the visitor.booleanequals(java.lang.Object o)java.lang.StringgetFieldName()Returns the field name which should be generated for this value.java.lang.StringgetName()Returns the name, as obtained from the input.RulegetRule()Returns the rule associated with this value.java.util.List<java.lang.String>getStrategies()Returns the constant decoding strategies.voidsetRule(Rule rule)Sets the rule associated with this value.voidsetStrategies(java.util.List<java.lang.String> strategies)Sets the constant decoding strategy.TreeNodeshallowCopy()java.lang.StringtoString()Returns a string representation of the object.-
Methods inherited from class net.emustudio.edigen.nodes.TreeNode
acceptChildren, addChild, addChildren, addChildren, childCount, copy, dump, getChild, getChildren, getLine, getParent, hashCode, remove, setLine
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name, as obtained from the input.- Returns:
- the name
-
getRule
public Rule getRule()
Returns the rule associated with this value.- Returns:
- the rule object
-
setRule
public void setRule(Rule rule)
Sets the rule associated with this value.- Parameters:
rule- the rule object
-
getFieldName
public java.lang.String getFieldName()
Returns the field name which should be generated for this value.- Returns:
- the field name
-
getStrategies
public java.util.List<java.lang.String> getStrategies()
Returns the constant decoding strategies.- Returns:
- list of strategy names - e.g., "little_endian"
-
setStrategies
public void setStrategies(java.util.List<java.lang.String> strategies)
Sets the constant decoding strategy.- Parameters:
strategies- the strategy name - e.g., "big_endian"
-
accept
public void accept(Visitor visitor) throws SemanticException
Accepts the visitor.- Overrides:
acceptin classTreeNode- Parameters:
visitor- the visitor object- Throws:
SemanticException- depends on the specific visitor
-
toString
public java.lang.String toString()
Returns a string representation of the object.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
shallowCopy
public TreeNode shallowCopy()
- Specified by:
shallowCopyin classTreeNode
-
-