public final class ArrayType extends java.lang.Object implements FieldType
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
boolean |
equals(java.lang.Object object) |
ComponentType |
getComponentType() |
int |
getDimensions() |
java.lang.String |
getTerm() |
java.lang.String |
getType() |
int |
hashCode() |
static ArrayType |
parseArrayType(java.lang.String string) |
java.lang.String |
toExternalForm() |
java.lang.String |
toInternalForm() |
java.lang.String |
toString() |
static ArrayType |
valueOf(ComponentType componentType) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
parseFieldType
parseComponentType
parseFieldDescriptor, parseFieldDescriptor, parseFieldDescriptor, parseFieldDescriptors
parseParameterDescriptor
parseReturnDescriptor
public ComponentType getComponentType()
public java.lang.String getTerm()
getTerm
in interface ReturnDescriptor
public java.lang.String getType()
getType
in interface ReturnDescriptor
public java.lang.String toExternalForm()
toExternalForm
in interface ComponentType
toExternalForm
in interface FieldDescriptor
toExternalForm
in interface ParameterDescriptor
toExternalForm
in interface ReturnDescriptor
public java.lang.String toInternalForm()
toInternalForm
in interface ComponentType
toInternalForm
in interface FieldDescriptor
toInternalForm
in interface ParameterDescriptor
toInternalForm
in interface ReturnDescriptor
public java.lang.String toString()
toString
in class java.lang.Object
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 getDimensions()
public int hashCode()
hashCode
in class java.lang.Object
public static ArrayType parseArrayType(java.lang.String string)
public static ArrayType valueOf(ComponentType componentType)