public final class ArrayType extends Type
EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
ArrayType |
asArrayType()
Casts this type to an
ArrayType and returns it if the kind is
Type.Kind.ARRAY
Throws an exception otherwise. |
Type |
component()
Returns the component type of the array.
|
int |
dimensions()
The number of dimensions this array type has.
|
boolean |
equals(Object o)
Compares this Type with another type, and returns true if they are equivalent.
|
int |
hashCode()
Computes a hash code representing this type.
|
Type.Kind |
kind()
Returns the kind of Type this is.
|
DotName |
name()
Returns the raw name of this type.
|
String |
toString()
Returns a string representation for this type.
|
annotations, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asUnresolvedTypeVariable, asVoidType, asWildcardType, createpublic Type component()
String[]
has a component type of Stringpublic DotName name()
TypeDotName.
Generic values are returned as the underlying raw value. For example,
a wildcard such as ? extends Number, has a raw type of
Number
public String toString()
Typepublic int dimensions()
String[][], would return a value
of 2.public ArrayType asArrayType()
TypeArrayType and returns it if the kind is
Type.Kind.ARRAY
Throws an exception otherwise.asArrayType in class TypeClassTypepublic boolean equals(Object o)
Typeequals in class Typeo - the type to compare toObject.equals(Object)Copyright © 2022 JBoss by Red Hat. All rights reserved.