Package org.aspectj.weaver
Klasse UnresolvedType
java.lang.Object
org.aspectj.weaver.UnresolvedType
- Alle implementierten Schnittstellen:
Traceable
,TypeVariableDeclaringElement
- Bekannte direkte Unterklassen:
ResolvedType
,UnresolvedTypeVariableReferenceType
,WildcardedUnresolvedType
A UnresolvedType represents a type to the weaver. UnresolvedTypes are resolved in some World (a type repository). When a
UnresolvedType is resolved it turns into a ResolvedType which may be a primitive type, or a ReferenceType. ReferenceTypes may
refer to simple, generic, parameterized or type-variable based reference types. A ReferenceType is backed by a delegate that
provides information about the type based on some repository (for example an Eclipse based delegate, a bytecode based delegate or
a reflection based delegate).
Every UnresolvedType has a signature, the unique key for the type in the world.
-
Verschachtelte Klassen - Übersicht
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final UnresolvedType
static final UnresolvedType
static final UnresolvedType[]
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final String
static final UnresolvedType[]
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
protected String
protected String
The erasure of the signature.static final UnresolvedType
static final UnresolvedType
static final UnresolvedType
protected UnresolvedType.TypeKind
protected UnresolvedType[]
Iff isParameterized(), then these are the type parametersprotected TypeVariable[]
Iff isGeneric(), then these are the type variables declared on the type Iff isParameterized(), then these are the type variables bound as parameters in the typestatic final UnresolvedType
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
UnresolvedType
(String signature) protected
UnresolvedType
(String signature, String signatureErasure) UnresolvedType
(String signature, String signatureErasure, UnresolvedType[] typeParams) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic UnresolvedType[]
add
(UnresolvedType[] types, UnresolvedType end) Creates a new type array with a fresh type appended to the end.boolean
Equality is checked based on the underlying signature.static UnresolvedType
forGenericType
(String name, TypeVariable[] tvbs, String genericSig) static UnresolvedType
forGenericTypeSignature
(String sig, String declaredGenericSig) static UnresolvedType
forGenericTypeVariables
(String sig, TypeVariable[] tVars) static UnresolvedType
NOTE: Use forSignature() if you can, it'll be cheaper !static UnresolvedType[]
Constructs a UnresolvedType for each java language type name in an incoming array.static UnresolvedType
forPrimitiveType
(String signature) static UnresolvedType
forRawTypeName
(String name) static UnresolvedType
forSignature
(String signature) Constructs a Type for a JVM bytecode signature string.static UnresolvedType[]
forSignatures
(String[] sigs) Constructs a UnresolvedType for each JVM bytecode type signature in an incoming array.Returns a UnresolvedType object representing the component type of this array, or null if this type does not represent an array type.For parameterized types, return the signature for the raw typegetName()
Returns the name of this type in java language form (e.g. java.lang.Thread or boolean[]).static String[]
getNames
(UnresolvedType[] types) Returns an array of strings representing the java langauge names of an array of types.Returns a UnresolvedType object representing the effective outermost enclosing type for a name type.Returns the name of this type in JVM signature form.int
getSize()
This is the size of this type as used in JVM.getTypeVariableNamed
(String name) int
hashCode()
Equality is checked based on the underlying signature, so the hash code of a particular type is the hash code of its signature string.static UnresolvedType[]
insert
(UnresolvedType start, UnresolvedType[] types) Creates a new type array with a fresh type inserted at the beginning.final boolean
isArray()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isVoid()
static UnresolvedType
makeArray
(UnresolvedType base, int dims) boolean
parameterize
(Map<String, UnresolvedType> typeBindings) Return a version of this parameterized type in which any type parameters that are type variable references are replaced by their matching type variable binding.static UnresolvedType
Read in an UnresolvedType - just read the signature and rebuild the UnresolvedType.static UnresolvedType[]
Returns a resolved version of this type according to a particular world.void
setNeedsModifiableDelegate
(boolean b) toString()
Returns a java language string representation of this type.final void
Write out an UnresolvedType - the signature should be enough.static void
writeArray
(UnresolvedType[] types, CompressingDataOutputStream stream)
-
Felddetails
-
NONE
-
OBJECT
-
OBJECTARRAY
-
CLONEABLE
-
SERIALIZABLE
-
THROWABLE
-
RUNTIME_EXCEPTION
-
ERROR
-
AT_INHERITED
-
AT_RETENTION
-
ENUM
-
ANNOTATION
-
JL_CLASS
-
JAVA_LANG_CLASS_ARRAY
-
JL_STRING
-
JL_EXCEPTION
-
JAVA_LANG_REFLECT_METHOD
-
JAVA_LANG_REFLECT_FIELD
-
JAVA_LANG_REFLECT_CONSTRUCTOR
-
JAVA_LANG_ANNOTATION
-
SUPPRESS_AJ_WARNINGS
-
AT_TARGET
-
SOMETHING
-
ARRAY_WITH_JUST_OBJECT
-
JOINPOINT_STATICPART
-
JOINPOINT_ENCLOSINGSTATICPART
-
AJC_PRIVILEGED
-
PROCEEDING_JOINPOINT
-
BOOLEAN
-
BYTE
-
CHAR
-
DOUBLE
-
FLOAT
-
INT
-
LONG
-
SHORT
-
VOID
-
MISSING_NAME
- Siehe auch:
-
typeKind
-
signature
-
signatureErasure
The erasure of the signature. Contains only the Java signature of the type with all supertype, superinterface, type variable, and parameter information removed. -
typeParameters
Iff isParameterized(), then these are the type parameters -
typeVariables
Iff isGeneric(), then these are the type variables declared on the type Iff isParameterized(), then these are the type variables bound as parameters in the type
-
-
Konstruktordetails
-
UnresolvedType
-
UnresolvedType
-
UnresolvedType
-
-
Methodendetails
-
isPrimitiveType
public boolean isPrimitiveType() -
isVoid
public boolean isVoid() -
isSimpleType
public boolean isSimpleType() -
isRawType
public boolean isRawType() -
isGenericType
public boolean isGenericType() -
isParameterizedType
public boolean isParameterizedType() -
isParameterizedOrGenericType
public boolean isParameterizedOrGenericType() -
isParameterizedOrRawType
public boolean isParameterizedOrRawType() -
isTypeVariableReference
public boolean isTypeVariableReference() -
isGenericWildcard
public boolean isGenericWildcard() -
getTypekind
-
isArray
public final boolean isArray() -
equals
Equality is checked based on the underlying signature. -
hashCode
public int hashCode()Equality is checked based on the underlying signature, so the hash code of a particular type is the hash code of its signature string. -
getSize
public int getSize()This is the size of this type as used in JVM. -
forName
NOTE: Use forSignature() if you can, it'll be cheaper ! Constructs a UnresolvedType for a java language type name. For example:UnresolvedType.forName("java.lang.Thread[]") UnresolvedType.forName("int")
forSignature(String)
.UnresolvedType.forName("java.lang.Thread[]").equals(Type.forSignature("[Ljava/lang/Thread;") UnresolvedType.forName("int").equals(Type.forSignature("I"))
- Parameter:
name
- the java language type name in question.- Gibt zurück:
- a type object representing that java language type.
-
forNames
Constructs a UnresolvedType for each java language type name in an incoming array.- Parameter:
names
- an array of java language type names.- Gibt zurück:
- an array of UnresolvedType objects.
- Siehe auch:
-
forGenericType
-
forGenericTypeSignature
-
forGenericTypeVariables
-
forRawTypeName
-
forPrimitiveType
-
add
Creates a new type array with a fresh type appended to the end.- Parameter:
types
- the left hand side of the new arrayend
- the right hand side of the new array
-
insert
Creates a new type array with a fresh type inserted at the beginning.- Parameter:
start
- the left hand side of the new arraytypes
- the right hand side of the new array
-
forSignature
Constructs a Type for a JVM bytecode signature string. For example:UnresolvedType.forSignature("[Ljava/lang/Thread;") UnresolvedType.forSignature("I");
forName(String)
. This method should not be passed P signatures.UnresolvedType.forName("java.lang.Thread[]").equals(Type.forSignature("[Ljava/lang/Thread;") UnresolvedType.forName("int").equals(Type.forSignature("I"))
- Parameter:
signature
- the JVM bytecode signature string for the desired type.- Gibt zurück:
- a type object represnting that JVM bytecode signature.
-
forSignatures
Constructs a UnresolvedType for each JVM bytecode type signature in an incoming array.- Parameter:
sigs
- an array of JVM bytecode type signatures- Gibt zurück:
- an array of UnresolvedType objects.
- Siehe auch:
-
getName
Returns the name of this type in java language form (e.g. java.lang.Thread or boolean[]). This produces a more aesthetically pleasing string thanClass.getName()
.- Gibt zurück:
- the java language name of this type.
-
getSimpleName
-
getRawName
-
getBaseName
-
getSimpleBaseName
-
getNames
Returns an array of strings representing the java langauge names of an array of types.- Parameter:
types
- an array of UnresolvedType objects- Gibt zurück:
- an array of Strings fo the java language names of types.
- Siehe auch:
-
getSignature
Returns the name of this type in JVM signature form. For all UnresolvedType t:UnresolvedType.forSignature(t.getSignature()).equals(t)
UnresolvedType.forSignature(s).getSignature().equals(s)
- Gibt zurück:
- the java JVM signature string for this type.
-
getErasureSignature
For parameterized types, return the signature for the raw type -
needsModifiableDelegate
public boolean needsModifiableDelegate() -
setNeedsModifiableDelegate
public void setNeedsModifiableDelegate(boolean b) -
getRawType
-
getOutermostType
Returns a UnresolvedType object representing the effective outermost enclosing type for a name type. For all other types, this will return the type itself. The only guarantee is given in JLS 13.1 where code generated according to those rules will have type names that can be split apart in this way.- Gibt zurück:
- the outermost enclosing UnresolvedType object or this.
-
getComponentType
Returns a UnresolvedType object representing the component type of this array, or null if this type does not represent an array type.- Gibt zurück:
- the component UnresolvedType object, or null.
-
toString
Returns a java language string representation of this type. -
toDebugString
-
resolve
Returns a resolved version of this type according to a particular world.- Parameter:
world
- theWorld
within which to resolve.- Gibt zurück:
- a resolved type representing this type in the appropriate world.
-
write
Write out an UnresolvedType - the signature should be enough.- Löst aus:
IOException
-
read
Read in an UnresolvedType - just read the signature and rebuild the UnresolvedType.- Löst aus:
IOException
-
getNameAsIdentifier
-
getPackageNameAsIdentifier
-
getTypeParameters
-
getTypeVariables
-
getTypeVariableNamed
- Angegeben von:
getTypeVariableNamed
in SchnittstelleTypeVariableDeclaringElement
-
toTraceString
- Angegeben von:
toTraceString
in SchnittstelleTraceable
-
parameterize
Return a version of this parameterized type in which any type parameters that are type variable references are replaced by their matching type variable binding. -
getClassName
- Gibt zurück:
- the class name (does not include the package name)
-
getPackageName
- Gibt zurück:
- the package name (no class name included)
-
writeArray
public static void writeArray(UnresolvedType[] types, CompressingDataOutputStream stream) throws IOException - Löst aus:
IOException
-
readArray
- Löst aus:
IOException
-
makeArray
-