public class Attribute extends ASTNode implements java.lang.Comparable
final or
abstract) as well as user-defined attributes, including both
singletons, or key-value pairs.
Built-in varieties are assumed to have an implicit key with a leading
underscore for instance nonblocking, oneway,
local are all mutually exclusive values on the key
_communication. Use getVisibleKey if you
prefer not to be bothered with this implementation detail.
User defined varieties such as %attrib{blue} are assigned to
keys with the value of null. Note that keys tend to be
mutually exclusive... so %attrib{color,color=blue} will cause
a compilation error.
ILLEGAL_NODEID| Constructor and Description |
|---|
Attribute(ParseTreeNode src) |
Attribute(ParseTreeNode src,
ASTNode parent) |
Attribute(java.lang.String key,
java.lang.String value) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
accept(Visitor v,
java.lang.Object data)
implements "Visitor Pattern"
|
int |
compareTo(java.lang.Object o) |
java.lang.String |
getKey() |
java.lang.String |
getValue() |
boolean |
isBuiltin() |
java.lang.String |
toString() |
getFilename, getFirstToken, getLastToken, getNodeId, getParent, getParseTreeNode, getSymbolTableEntry, setFirstToken, setLastToken, setNodeId, setParent, setParseTreeNode, setSymbolTableEntrypublic Attribute(ParseTreeNode src)
public Attribute(java.lang.String key,
java.lang.String value)
public Attribute(ParseTreeNode src, ASTNode parent)
public boolean isBuiltin()
public java.lang.String getKey()
public java.lang.String getValue()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Object