|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.types.TypeReference
public final class TypeReference
A class to represent the reference in a class file to some type (class, primitive or array). A type reference is uniquely defined by
| Constructor Summary | |
|---|---|
protected |
TypeReference(ClassLoaderReference cl,
TypeName tn)
NB: All type names should use '/' and not '.' as a separator. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
TypeReferences are canonical. |
static TypeReference |
findOrCreate(ClassLoaderReference cl,
java.lang.String typeName)
Find or create the canonical TypeReference instance for the given pair. |
static TypeReference |
findOrCreate(ClassLoaderReference cl,
TypeName typeName)
Find or create the canonical TypeReference instance for the given pair. |
static TypeReference |
findOrCreateArrayOf(TypeReference t)
|
static TypeReference |
findOrCreateClass(ClassLoaderReference loader,
java.lang.String packageName,
java.lang.String className)
|
TypeReference |
getArrayElementType()
TODO: specialized form of TypeReference for arrays, please. |
TypeReference |
getArrayTypeForElementType()
Get array type corresponding to "this" array element type. |
ClassLoaderReference |
getClassLoader()
|
int |
getDimensionality()
Return the dimensionality of the type. |
TypeReference |
getInnermostElementType()
Return the innermost element type reference for an array |
TypeName |
getName()
|
int |
hashCode()
|
boolean |
isArrayType()
Does 'this' refer to an array? |
boolean |
isClassType()
Does 'this' refer to a class? |
boolean |
isPrimitiveType()
Does 'this' refer to a primitive type |
static boolean |
isPrimitiveType(TypeName name)
Could name a represent a primitive type? |
boolean |
isReferenceType()
Does 'this' refer to a reference type |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TypeName BooleanName
public static final byte BooleanTypeCode
public static final TypeReference Boolean
public static final TypeName ByteName
public static final byte ByteTypeCode
public static final TypeReference Byte
public static final TypeName CharName
public static final byte CharTypeCode
public static final TypeReference Char
public static final TypeName DoubleName
public static final byte DoubleTypeCode
public static final TypeReference Double
public static final TypeName FloatName
public static final byte FloatTypeCode
public static final TypeReference Float
public static final TypeName IntName
public static final byte IntTypeCode
public static final TypeReference Int
public static final TypeName LongName
public static final byte LongTypeCode
public static final TypeReference Long
public static final TypeName ShortName
public static final byte ShortTypeCode
public static final TypeReference Short
public static final TypeName VoidName
public static final byte VoidTypeCode
public static final TypeReference Void
public static final TypeReference BooleanArray
public static final TypeReference ByteArray
public static final TypeReference CharArray
public static final TypeReference DoubleArray
public static final TypeReference FloatArray
public static final TypeReference IntArray
public static final TypeReference LongArray
public static final TypeReference ShortArray
public static final TypeReference JavaLangArithmeticException
public static final TypeReference JavaLangArrayStoreException
public static final TypeReference JavaLangArrayIndexOutOfBoundsException
public static final TypeReference JavaLangClass
public static final TypeReference JavaLangClassCastException
public static final TypeReference JavaLangComparable
public static final TypeReference JavaLangReflectConstructor
public static final TypeReference JavaLangError
public static final TypeReference JavaLangException
public static final TypeReference JavaLangNegativeArraySizeException
public static final TypeReference JavaLangNullPointerException
public static final TypeReference JavaLangRuntimeException
public static final TypeReference JavaLangClassNotFoundException
public static final TypeReference JavaLangOutOfMemoryError
public static final TypeReference JavaLangExceptionInInitializerError
public static final TypeReference JavaLangObject
public static final TypeReference JavaLangStackTraceElement
public static final TypeReference JavaLangString
public static final TypeReference JavaLangThread
public static final TypeReference JavaLangThrowable
public static final TypeReference JavaLangCloneable
public static final TypeReference JavaLangSystem
public static final TypeReference JavaLangInteger
public static final TypeReference JavaIoSerializable
public static final TypeReference JavaUtilCollection
public static final TypeReference JavaUtilMap
public static final TypeReference JavaUtilHashSet
public static final TypeReference JavaUtilSet
public static final TypeReference JavaUtilEnum
public static final TypeReference JavaUtilIterator
public static final TypeReference JavaUtilVector
public static final TypeName[] array_interfaces
public static final byte ClassTypeCode
public static final byte ArrayTypeCode
public static final TypeReference Null
public static final TypeReference Unknown
| Constructor Detail |
|---|
protected TypeReference(ClassLoaderReference cl,
TypeName tn)
cl - the classloadertn - the type name| Method Detail |
|---|
public static boolean isPrimitiveType(TypeName name)
public static TypeReference findOrCreate(ClassLoaderReference cl,
TypeName typeName)
cl - the classloader (defining/initiating depending on usage)
public static TypeReference findOrCreate(ClassLoaderReference cl,
java.lang.String typeName)
cl - the classloader (defining/initiating depending on usage)public static TypeReference findOrCreateArrayOf(TypeReference t)
public final ClassLoaderReference getClassLoader()
public final TypeName getName()
public final TypeReference getArrayElementType()
public final TypeReference getArrayTypeForElementType()
public final int getDimensionality()
public final TypeReference getInnermostElementType()
public final boolean isClassType()
public final boolean isArrayType()
public final boolean isPrimitiveType()
public final boolean isReferenceType()
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Object
public static TypeReference findOrCreateClass(ClassLoaderReference loader,
java.lang.String packageName,
java.lang.String className)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||