|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.dexmaker.TypeId<T>
public final class TypeId<T>
A primitive type, interface or class.
Warning: Use care when dealing with boxed primitive
types. Java's lack of support for parameterized primitive types means that
a primitive type like int
and its boxed type java.lang.Integer
have the same type parameter: TypeId<Integer>
.
These types are different and it will be a runtime error if the boxed type
java.lang.Integer
is used where the primitive type int
is
expected.
Field Summary | |
---|---|
static TypeId<Boolean> |
BOOLEAN
The boolean primitive type. |
static TypeId<Byte> |
BYTE
The byte primitive type. |
static TypeId<Character> |
CHAR
The char primitive type. |
static TypeId<Double> |
DOUBLE
The double primitive type. |
static TypeId<Float> |
FLOAT
The float primitive type. |
static TypeId<Integer> |
INT
The int primitive type. |
static TypeId<Long> |
LONG
The long primitive type. |
static TypeId<Object> |
OBJECT
The Object type. |
static TypeId<Short> |
SHORT
The short primitive type. |
static TypeId<String> |
STRING
The String type. |
static TypeId<Void> |
VOID
The void primitive type. |
Method Summary | ||
---|---|---|
boolean |
equals(Object o)
|
|
static
|
get(Class<T> type)
|
|
static
|
get(String name)
|
|
MethodId<T,Void> |
getConstructor(TypeId<?>... parameters)
|
|
|
getField(TypeId<V> type,
String name)
|
|
|
getMethod(TypeId<R> returnType,
String name,
TypeId<?>... parameters)
|
|
String |
getName()
|
|
int |
hashCode()
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TypeId<Boolean> BOOLEAN
boolean
primitive type.
public static final TypeId<Byte> BYTE
byte
primitive type.
public static final TypeId<Character> CHAR
char
primitive type.
public static final TypeId<Double> DOUBLE
double
primitive type.
public static final TypeId<Float> FLOAT
float
primitive type.
public static final TypeId<Integer> INT
int
primitive type.
public static final TypeId<Long> LONG
long
primitive type.
public static final TypeId<Short> SHORT
short
primitive type.
public static final TypeId<Void> VOID
void
primitive type. Only used as a return type.
public static final TypeId<Object> OBJECT
Object
type.
public static final TypeId<String> STRING
String
type.
Method Detail |
---|
public static <T> TypeId<T> get(String name)
name
- a descriptor like "Ljava/lang/Class;".public static <T> TypeId<T> get(Class<T> type)
public <V> FieldId<T,V> getField(TypeId<V> type, String name)
public MethodId<T,Void> getConstructor(TypeId<?>... parameters)
public <R> MethodId<T,R> getMethod(TypeId<R> returnType, String name, TypeId<?>... parameters)
public String getName()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |