org.aspectbench.eaj.runtime.reflect
Class SignatureImpl

java.lang.Object
  extended by org.aspectbench.eaj.runtime.reflect.SignatureImpl
All Implemented Interfaces:
Signature

abstract class SignatureImpl
extends Object
implements Signature


Field Summary
(package private)  Class declaringType
           
(package private)  String declaringTypeName
           
(package private) static Class[] EMPTY_CLASS_ARRAY
           
(package private) static String[] EMPTY_STRING_ARRAY
           
(package private) static String INNER_SEP
           
(package private)  ClassLoader lookupClassLoader
           
(package private)  int modifiers
           
(package private)  String name
           
(package private) static Hashtable prims
           
(package private) static char SEP
           
(package private)  String stringRep
           
 
Constructor Summary
SignatureImpl(int modifiers, String name, Class declaringType)
           
SignatureImpl(String stringRep)
           
 
Method Summary
(package private)  void addFullTypeNames(StringBuffer buf, Class[] types)
           
(package private)  void addShortTypeNames(StringBuffer buf, Class[] types)
           
(package private)  void addTypeArray(StringBuffer buf, Class[] types)
           
(package private)  int extractInt(int n)
           
(package private)  String extractString(int n)
           
(package private)  String[] extractStrings(int n)
           
(package private)  Class extractType(int n)
           
(package private)  Class[] extractTypes(int n)
           
(package private)  String fullTypeName(Class type)
           
 Class getDeclaringType()
          Returns a java.lang.Class object representing the class, interface, or aspect that declared this member.
 String getDeclaringTypeName()
          Returns the fully-qualified name of the declaring type.
private  ClassLoader getLookupClassLoader()
           
 int getModifiers()
          Returns the modifiers on this signature represented as an int.
 String getName()
          Returns the identifier part of this signature; i.e.
(package private)  Class makeClass(String s)
           
 void setLookupClassLoader(ClassLoader loader)
           
(package private)  String shortTypeName(Class type)
           
(package private)  String stripPackageName(String name)
           
 String toLongString()
          Returns an extended string representation of this signature.
 String toShortString()
          Returns an abbreviated string representation of this signature.
 String toString()
           
(package private) abstract  String toString(StringMaker sm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modifiers

int modifiers

name

String name

declaringTypeName

String declaringTypeName

declaringType

Class declaringType

stringRep

String stringRep

lookupClassLoader

ClassLoader lookupClassLoader

SEP

static final char SEP
See Also:
Constant Field Values

prims

static Hashtable prims

EMPTY_STRING_ARRAY

static String[] EMPTY_STRING_ARRAY

EMPTY_CLASS_ARRAY

static Class[] EMPTY_CLASS_ARRAY

INNER_SEP

static final String INNER_SEP
See Also:
Constant Field Values
Constructor Detail

SignatureImpl

SignatureImpl(int modifiers,
              String name,
              Class declaringType)

SignatureImpl

public SignatureImpl(String stringRep)
Method Detail

toString

abstract String toString(StringMaker sm)

toString

public final String toString()
Specified by:
toString in interface Signature
Overrides:
toString in class Object

toShortString

public final String toShortString()
Description copied from interface: Signature
Returns an abbreviated string representation of this signature.

Specified by:
toShortString in interface Signature

toLongString

public final String toLongString()
Description copied from interface: Signature
Returns an extended string representation of this signature.

Specified by:
toLongString in interface Signature

getModifiers

public int getModifiers()
Description copied from interface: Signature
Returns the modifiers on this signature represented as an int. Use the constants and helper methods defined on java.lang.reflect.Modifier to manipulate this, i.e.
     // check if this signature is public
     java.lang.reflect.Modifier.isPublic(sig.getModifiers());
 
     // print out the modifiers
     java.lang.reflect.Modifier.toString(sig.getModifiers());
 

Specified by:
getModifiers in interface Signature
See Also:
Member.getModifiers(), Modifier

getName

public String getName()
Description copied from interface: Signature
Returns the identifier part of this signature; i.e. for methods this will return the method name.

Specified by:
getName in interface Signature
See Also:
Member.getName()

getDeclaringType

public Class getDeclaringType()
Description copied from interface: Signature

Returns a java.lang.Class object representing the class, interface, or aspect that declared this member. For intra-member declarations, this will be the type on which the member is declared, not the type where the declaration is lexically written. Use SourceLocation.getWithinType() to get the type in which the declaration occurs lexically.

For consistency with java.lang.reflect.Member, this method should have been named getDeclaringClass().

Specified by:
getDeclaringType in interface Signature
See Also:
Member.getDeclaringClass()

getDeclaringTypeName

public String getDeclaringTypeName()
Description copied from interface: Signature
Returns the fully-qualified name of the declaring type. This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.

Specified by:
getDeclaringTypeName in interface Signature

fullTypeName

String fullTypeName(Class type)

stripPackageName

String stripPackageName(String name)

shortTypeName

String shortTypeName(Class type)

addFullTypeNames

void addFullTypeNames(StringBuffer buf,
                      Class[] types)

addShortTypeNames

void addShortTypeNames(StringBuffer buf,
                       Class[] types)

addTypeArray

void addTypeArray(StringBuffer buf,
                  Class[] types)

setLookupClassLoader

public void setLookupClassLoader(ClassLoader loader)

getLookupClassLoader

private ClassLoader getLookupClassLoader()

extractString

String extractString(int n)

extractInt

int extractInt(int n)

extractType

Class extractType(int n)

makeClass

Class makeClass(String s)

extractStrings

String[] extractStrings(int n)

extractTypes

Class[] extractTypes(int n)