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 |
|---|---|
static boolean |
arrayEquals(org.jboss.jandex.Interned[] a,
org.jboss.jandex.Interned[] b) |
static int |
arrayHashCode(org.jboss.jandex.Interned[] array) |
PrimitiveType |
asPrimitiveType()
Casts this type to a
PrimitiveType and returns it if the kind is
Type.Kind.PRIMITIVE. |
boolean |
equals(Object o)
Compares this
Type with another type. |
int |
hashCode()
Computes a hash code representing this type.
|
boolean |
internEquals(Object o) |
int |
internHashCode() |
Type.Kind |
kind()
Returns the kind of Type this is.
|
PrimitiveType.Primitive |
primitive()
The type of primitive this primitive type represents
|
annotation, annotations, annotationsWithRepeatable, asArrayType, asClassType, asParameterizedType, asTypeVariable, asTypeVariableReference, asUnresolvedTypeVariable, asVoidType, asWildcardType, create, createWithAnnotations, hasAnnotation, name, toStringpublic 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()
TypePrimitiveType and returns it if the kind is
Type.Kind.PRIMITIVE. Throws an exception otherwise.asPrimitiveType in class TypePrimitiveTypepublic boolean equals(Object o)
TypeType with another type. A type is equal to another type
if it is of the same kind, and all of their fields are equal. This includes
annotations, which must be equal as well.equals in class Typeo - the type to compare toObject.equals(Object)public int hashCode()
Typepublic boolean internEquals(Object o)
internEquals in class Typepublic int internHashCode()
internHashCode in class Typepublic static boolean arrayEquals(org.jboss.jandex.Interned[] a,
org.jboss.jandex.Interned[] b)
public static int arrayHashCode(org.jboss.jandex.Interned[] array)
Copyright © 2018–2022. All rights reserved.