public static final class Annotations.ElementValuePair extends java.lang.Object implements Node
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
Annotations.ElementValuePair |
copy() |
boolean |
equals(java.lang.Object object) |
int |
getElementNameIndex() |
int |
getLength() |
Annotations.ElementValue |
getValue() |
int |
hashCode() |
static Annotations.ElementValuePair |
newInstance(int elementNameIndex,
Annotations.ElementValue value) |
void |
write(java.io.DataOutput dataOutput) |
public Annotations.ElementValue getValue()
public Annotations.ElementValuePair copy()
public boolean accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Node
NodeHierarchicalVisitor
.
Returns the result of nodeHierarchicalVisitor.visitLeave(this)
.
If nodeHierarchicalVisitor
is null
, a NullPointerException
may be thrown. But no guarantees can be made for all implementations.
If a RuntimeException
is thrown by the current NodeHierarchicalVisitor
, a NodeTraversalException
may be thrown with the RuntimeException
wrapped. But no guarantees can be made for all implementations.
To implement this method, consider the following example:
if(nodeHierarchicalVisitor.visitEnter(this)) {
for(Node childNode : childNodes) {
if(!childNode.accept(nodeHierarchicalVisitor)) {
break;
}
}
}
return nodeHierarchicalVisitor.visitLeave(this);
The default implementation will:
NullPointerException
if nodeHierarchicalVisitor
is null
.NodeTraversalException
if nodeHierarchicalVisitor
throws a RuntimeException
.Node
s, because it does not have any.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int getElementNameIndex()
public int getLength()
public int hashCode()
hashCode
in class java.lang.Object
public void write(java.io.DataOutput dataOutput)
public static Annotations.ElementValuePair newInstance(int elementNameIndex, Annotations.ElementValue value)