public static final class Annotations.Annotation extends java.lang.Object implements Node
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
void |
addElementValuePair(Annotations.ElementValuePair elementValuePair) |
Annotations.Annotation |
copy() |
boolean |
equals(java.lang.Object object) |
java.util.List<Annotations.ElementValuePair> |
getElementValuePairs() |
int |
getLength() |
int |
getNumElementValuePairs() |
int |
getTypeIndex() |
int |
hashCode() |
static Annotations.Annotation |
newInstance(int typeIndex) |
void |
removeElementValuePair(Annotations.ElementValuePair elementValuePair) |
void |
setTypeIndex(int typeIndex) |
void |
write(java.io.DataOutput dataOutput) |
public Annotations.Annotation copy()
public java.util.List<Annotations.ElementValuePair> getElementValuePairs()
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 getLength()
public int getNumElementValuePairs()
public int getTypeIndex()
public int hashCode()
hashCode
in class java.lang.Object
public void addElementValuePair(Annotations.ElementValuePair elementValuePair)
public void removeElementValuePair(Annotations.ElementValuePair elementValuePair)
public void setTypeIndex(int typeIndex)
public void write(java.io.DataOutput dataOutput)
public static Annotations.Annotation newInstance(int typeIndex)