public final class PrimitiveType extends Type
equals(Object)
should be used.
A primitive is considered equal to another primitive if it specifies the same primitive enumeration value, and contains an equal set of annotation instances.
Modifier and Type | Class and Description |
---|---|
static class |
PrimitiveType.Primitive
Specifies the underlying Java primitive type for a
PrimitiveType |
Modifier and Type | Field and Description |
---|---|
static PrimitiveType |
BOOLEAN |
static PrimitiveType |
BYTE |
static PrimitiveType |
CHAR |
static PrimitiveType |
DOUBLE |
static PrimitiveType |
FLOAT |
static PrimitiveType |
INT |
static PrimitiveType |
LONG |
static PrimitiveType |
SHORT |
EMPTY_ARRAY
Modifier and Type | Method and Description |
---|---|
PrimitiveType |
asPrimitiveType()
Casts this type to a
PrimitiveType and returns it if the kind is
Type.Kind.PRIMITIVE
Throws an exception otherwise. |
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.
|
PrimitiveType.Primitive |
primitive()
The type of primitive this primitive type represents
|
annotations, asArrayType, asClassType, asParameterizedType, asTypeVariable, asUnresolvedTypeVariable, asVoidType, asWildcardType, create, name, toString
public static final PrimitiveType BYTE
public static final PrimitiveType CHAR
public static final PrimitiveType DOUBLE
public static final PrimitiveType FLOAT
public static final PrimitiveType INT
public static final PrimitiveType LONG
public static final PrimitiveType SHORT
public static final PrimitiveType BOOLEAN
public PrimitiveType.Primitive primitive()
public PrimitiveType asPrimitiveType()
Type
PrimitiveType
and returns it if the kind is
Type.Kind.PRIMITIVE
Throws an exception otherwise.asPrimitiveType
in class Type
ClassType
public boolean equals(Object o)
Type
equals
in class Type
o
- the type to compare toObject.equals(Object)
Copyright © 2018 JBoss by Red Hat. All rights reserved.