Logo Search packages:      
Sourcecode: aspectj version File versions  Download package

org::aspectj::weaver::UnresolvedType Class Reference

Inheritance diagram for org::aspectj::weaver::UnresolvedType:

org::aspectj::weaver::TypeVariableDeclaringElement org::aspectj::weaver::UnresolvedTypeVariableReferenceType org::aspectj::weaver::WildcardedUnresolvedType org::aspectj::weaver::MissingResolvedTypeWithKnownSignature org::aspectj::weaver::ReferenceType org::aspectj::weaver::ArrayReferenceType org::aspectj::weaver::BoundedReferenceType org::aspectj::weaver::TypeVariableReferenceType

List of all members.


Detailed Description

A UnresolvedType represents a type to the weaver. It has a basic signature that knows nothing about type variables, type parameters, etc.. UnresolvedTypes are resolved in some World (a repository of types). 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 (currently either BCEL or an EclipseSourceType, but in the future we probably need to support java.lang.reflect based delegates too).

Every UnresolvedType has a signature, the unique key for the type in the world.

TypeXs are fully aware of their complete type information (there is no erasure in the UnresolvedType world). To achieve this, the signature of TypeXs combines the basic Java signature and the generic signature information into one complete signature.

The format of a UnresolvedType signature is as follows:

a simple (non-generic, non-parameterized) type has the as its signature the Java signature. e.g. Ljava/lang/String;

a generic type has signature: TypeParamsOpt ClassSig SuperClassSig SuperIntfListOpt

following the Generic signature grammar in the JVM spec., but with the addition of the ClassSignature (which is not in the generic signature). In addition type variable names are replaced by a simple number which represents their declaration order in the type declaration.

e.g. public class Foo<T extends Number> would have signature: <1:Ljava/lang/Number>Lorg.xyz.Foo;Ljava/lang/Object;

A parameterized type is a distinct type in the world with its own signature following the grammar:

TypeParamsOpt ClassSig<ParamSigList>;

but with the L for the class sig replaced by "P". For example List<String> has signature

Pjava/util/List<Ljava/lang/String>;

and List<T> in the following class : class Foo<T> { List<T> lt; }

has signature: <1:>Pjava/util/List<T1;>;

A typex that represents a type variable has its own unique signature, following the grammar for a FormalTypeParameter in the JVM spec.

A generic typex has its true signature and also an erasure signature. Both of these are keys pointing to the same UnresolvedType in the world. For example List has signature:

<1:>Ljava/util/List;Ljava/lang/Object;

and the erasure signature

Ljava/util/List;

Generics wildcards introduce their own special signatures for type parameters. The wildcard ? has signature * The wildcard ? extends Foo has signature +LFoo; The wildcard ? super Foo has signature -LFoo;

Definition at line 80 of file UnresolvedType.java.


Public Member Functions

boolean equals (Object other)
String getBaseName ()
String getClassName ()
UnresolvedType getComponentType ()
String getErasureSignature ()
String getName ()
String getNameAsIdentifier ()
UnresolvedType getOutermostType ()
String getPackageName ()
String getPackageNameAsIdentifier ()
String getRawName ()
UnresolvedType getRawType ()
String getSignature ()
String getSimpleBaseName ()
String getSimpleName ()
int getSize ()
TypeKind getTypekind ()
UnresolvedType[] getTypeParameters ()
TypeVariable getTypeVariableNamed (String name)
TypeVariable[] getTypeVariables ()
final int hashCode ()
final boolean isArray ()
boolean isGenericType ()
boolean isGenericWildcard ()
boolean isParameterizedType ()
boolean isPrimitiveType ()
boolean isRawType ()
boolean isSimpleType ()
boolean isTypeVariableReference ()
boolean needsModifiableDelegate ()
UnresolvedType parameterize (Map typeBindings)
ResolvedType resolve (World world)
void setNeedsModifiableDelegate (boolean b)
String toDebugString ()
String toString ()
String toTraceString ()
 UnresolvedType (String signature, String signatureErasure, UnresolvedType[] typeParams)
void write (DataOutputStream s) throws IOException

Static Public Member Functions

static UnresolvedType[] add (UnresolvedType[] types, UnresolvedType end)
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 forName (String name)
static UnresolvedType[] forNames (String[] names)
static UnresolvedType forRawTypeName (String name)
static UnresolvedType forSignature (String signature)
static UnresolvedType[] forSignatures (String[] sigs)
static String[] getNames (UnresolvedType[] types)
static UnresolvedType[] insert (UnresolvedType start, UnresolvedType[] types)
static UnresolvedType makeArray (UnresolvedType base, int dims)
static UnresolvedType read (DataInputStream s) throws IOException
static UnresolvedType[] readArray (DataInputStream s) throws IOException
static void writeArray (UnresolvedType[] types, DataOutputStream s) throws IOException

Static Public Attributes

static final UnresolvedType ANNOTATION = forSignature("Ljava/lang/annotation/Annotation;")
static final UnresolvedType[] ARRAY_WITH_JUST_OBJECT = new UnresolvedType[] { OBJECT }
static final UnresolvedType AT_INHERITED = forSignature("Ljava/lang/annotation/Inherited;")
static final UnresolvedType AT_RETENTION = forSignature("Ljava/lang/annotation/Retention;")
static final UnresolvedType AT_TARGET = forSignature("Ljava/lang/annotation/Target;")
static final UnresolvedType CLONEABLE = forSignature("Ljava/lang/Cloneable;")
static final UnresolvedType ENUM = forSignature("Ljava/lang/Enum;")
static final UnresolvedType ERROR = forSignature("Ljava/lang/Error;")
static final UnresolvedType JAVA_LANG_ANNOTATION = forSignature("Ljava/lang/annotation/Annotation;")
static final UnresolvedType JAVA_LANG_CLASS = forSignature("Ljava/lang/Class;")
static final UnresolvedType JAVA_LANG_CLASS_ARRAY = forSignature("[Ljava/lang/Class;")
static final UnresolvedType JAVA_LANG_EXCEPTION = forSignature("Ljava/lang/Exception;")
static final UnresolvedType JAVA_LANG_REFLECT_CONSTRUCTOR = forSignature("Ljava/lang/reflect/Constructor;")
static final UnresolvedType JAVA_LANG_REFLECT_FIELD = forSignature("Ljava/lang/reflect/Field;")
static final UnresolvedType JAVA_LANG_REFLECT_METHOD = forSignature("Ljava/lang/reflect/Method;")
static final UnresolvedType JAVA_LANG_STRING = forSignature("Ljava/lang/String;")
static final UnresolvedType JOINPOINT_ENCLOSINGSTATICPART = forSignature("Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;")
static final UnresolvedType JOINPOINT_STATICPART = forSignature("Lorg/aspectj/lang/JoinPoint$StaticPart;")
static final String MISSING_NAME = "@missing@"
static final UnresolvedType[] NONE = new UnresolvedType[0]
static final UnresolvedType OBJECT = forSignature("Ljava/lang/Object;")
static final UnresolvedType OBJECTARRAY = forSignature("[Ljava/lang/Object;")
static final UnresolvedType RUNTIME_EXCEPTION = forSignature("Ljava/lang/RuntimeException;")
static final UnresolvedType SERIALIZABLE = forSignature("Ljava/io/Serializable;")
static final UnresolvedType SOMETHING = new UnresolvedType("?")
static final UnresolvedType SUPPRESS_AJ_WARNINGS = forSignature("Lorg/aspectj/lang/annotation/SuppressAjWarnings;")
static final UnresolvedType THROWABLE = forSignature("Ljava/lang/Throwable;")

Protected Member Functions

 UnresolvedType (String signature, String signatureErasure)
 UnresolvedType (String signature)

Protected Attributes

String signature
String signatureErasure
TypeKind typeKind = TypeKind.SIMPLE
UnresolvedType[] typeParameters
TypeVariable[] typeVariables

Static Private Member Functions

static String nameToSignature (String name)
static String signatureToName (String signature)

Private Attributes

String className
boolean needsModifiableDelegate = false
String packageName

Classes

class  TypeKind

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index