Top Inners Fields Constructors Methods
org.aspectj.runtime.reflect

pack-priv abstract Class SignatureImpl

extends Object
implements Signature
Class Inheritance
All Implemented Interfaces
org.aspectj.lang.Signature
Known Direct Subclasses
org.aspectj.runtime.reflect.UnlockSignatureImpl, org.aspectj.runtime.reflect.CatchClauseSignatureImpl, org.aspectj.runtime.reflect.LockSignatureImpl, org.aspectj.runtime.reflect.MemberSignatureImpl
Imports
org.aspectj.lang.Signature, java.util.StringTokenizer

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface
private static class

Field Summary

Modifier and TypeField and Description
pack-priv Class<?>
pack-priv String
pack-priv static Class<T>[]
pack-priv static String[]
pack-priv static final String
pack-priv ClassLoader
pack-priv int
pack-priv String
pack-priv static final char
pack-priv SignatureImpl.Cache
private String
private static boolean

Constructor Summary

AccessConstructor and Description
pack-priv
SignatureImpl(int modifiers, String name, Class<?> declaringType)

public
SignatureImpl(String stringRep)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
addTypeArray(StringBuffer buf, Class<T>[] types)

protected abstract String
pack-priv int
extractInt(int n)

pack-priv String
pack-priv String[]
pack-priv Class<?>
extractType(int n)

pack-priv Class<T>[]
extractTypes(int n)

pack-priv String
public Class<T>
getDeclaringType()

Implements org.aspectj.lang.Signature.getDeclaringType.

Returns a java.lang.Class object representing the class, interface, or aspect that declared this member.

public String
getDeclaringTypeName()

Implements org.aspectj.lang.Signature.getDeclaringTypeName.

This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.
private ClassLoader
public int
getModifiers()

Implements org.aspectj.lang.Signature.getModifiers.

Returns the modifiers on this signature represented as an int.
public String
pack-priv static boolean
public void
pack-priv static void
setUseCache(boolean b)

pack-priv String
pack-priv String
public final String
public final String
pack-priv String
public final String
toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.Signature.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

declaringTypeback to summary
pack-priv Class<?> declaringType
declaringTypeNameback to summary
pack-priv String declaringTypeName
EMPTY_CLASS_ARRAYback to summary
pack-priv static Class<T>[] EMPTY_CLASS_ARRAY
EMPTY_STRING_ARRAYback to summary
pack-priv static String[] EMPTY_STRING_ARRAY
INNER_SEPback to summary
pack-priv static final String INNER_SEP
lookupClassLoaderback to summary
pack-priv ClassLoader lookupClassLoader
modifiersback to summary
pack-priv int modifiers
nameback to summary
pack-priv String name
SEPback to summary
pack-priv static final char SEP
stringCacheback to summary
pack-priv SignatureImpl.Cache stringCache
stringRepback to summary
private String stringRep
useCacheback to summary
private static boolean useCache

Constructor Detail

SignatureImplback to summary
pack-priv SignatureImpl(int modifiers, String name, Class<?> declaringType)
SignatureImplback to summary
public SignatureImpl(String stringRep)

Method Detail

addFullTypeNamesback to summary
pack-priv void addFullTypeNames(StringBuffer buf, Class<T>[] types)
addShortTypeNamesback to summary
pack-priv void addShortTypeNames(StringBuffer buf, Class<T>[] types)
addTypeArrayback to summary
pack-priv void addTypeArray(StringBuffer buf, Class<T>[] types)
createToStringback to summary
protected abstract String createToString(StringMaker sm)
extractIntback to summary
pack-priv int extractInt(int n)
extractStringback to summary
pack-priv String extractString(int n)
extractStringsback to summary
pack-priv String[] extractStrings(int n)
extractTypeback to summary
pack-priv Class<?> extractType(int n)
extractTypesback to summary
pack-priv Class<T>[] extractTypes(int n)
fullTypeNameback to summary
pack-priv String fullTypeName(Class<?> type)
getDeclaringTypeback to summary
public Class<T> getDeclaringType()

Implements org.aspectj.lang.Signature.getDeclaringType.

Doc from org.aspectj.lang.Signature.getDeclaringType.

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().

Returns:Class<T>

the class, interface or aspect that declared this member

getDeclaringTypeNameback to summary
public String getDeclaringTypeName()

Implements org.aspectj.lang.Signature.getDeclaringTypeName.

Doc from org.aspectj.lang.Signature.getDeclaringTypeName.

This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.

Returns:String

the fully qualified name of the declaring type

getLookupClassLoaderback to summary
private ClassLoader getLookupClassLoader()
getModifiersback to summary
public int getModifiers()

Implements org.aspectj.lang.Signature.getModifiers.

Doc from org.aspectj.lang.Signature.getModifiers.

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());
Returns:int

the modifiers on this signature represented as an int

getNameback to summary
public String getName()

Implements org.aspectj.lang.Signature.getName.

Returns:String

Doc from org.aspectj.lang.Signature.getName.

the identifier part of this signature. For methods this will return the method name.

getUseCacheback to summary
pack-priv static boolean getUseCache()
setLookupClassLoaderback to summary
public void setLookupClassLoader(ClassLoader loader)
setUseCacheback to summary
pack-priv static void setUseCache(boolean b)
shortTypeNameback to summary
pack-priv String shortTypeName(Class<?> type)
stripPackageNameback to summary
pack-priv String stripPackageName(String name)
toLongStringback to summary
public final String toLongString()

Implements org.aspectj.lang.Signature.toLongString.

Returns:String

Doc from org.aspectj.lang.Signature.toLongString.

an extended string representation of this signature.

toShortStringback to summary
public final String toShortString()

Implements org.aspectj.lang.Signature.toShortString.

Returns:String

Doc from org.aspectj.lang.Signature.toShortString.

an abbreviated string representation of this signature.

toStringback to summary
pack-priv String toString(StringMaker sm)
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.Signature.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

org.aspectj.runtime.reflect back to summary

private Interface SignatureImpl.Cache

Known Direct Implementers
org.aspectj.runtime.reflect.SignatureImpl.CacheImpl

Method Summary

Modifier and TypeMethod and Description
public String
get(int cacheOffset)

public void
set(int cacheOffset, String result)

Method Detail

getback to summary
public String get(int cacheOffset)
setback to summary
public void set(int cacheOffset, String result)
org.aspectj.runtime.reflect back to summary

private final Class SignatureImpl.CacheImpl

extends Object
implements Cache
Class Inheritance
All Implemented Interfaces
org.aspectj.runtime.reflect.SignatureImpl.Cache

Field Summary

Modifier and TypeField and Description
private SoftReference<String[]>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String[]
public String
private String[]
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

toStringCacheRefback to summary
private SoftReference<String[]> toStringCacheRef

Constructor Detail

CacheImplback to summary
public CacheImpl()

Method Detail

arrayback to summary
private String[] array()
getback to summary
public String get(int cacheOffset)

Implements org.aspectj.runtime.reflect.SignatureImpl.Cache.get.

makeCacheback to summary
private String[] makeCache()
setback to summary
public void set(int cacheOffset, String result)

Implements org.aspectj.runtime.reflect.SignatureImpl.Cache.set.