|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aspectbench.runtime.reflect.SignatureImpl
public abstract class SignatureImpl
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 | |
---|---|
protected |
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)
|
String |
extractString(int n)
|
(package private) String[] |
extractStrings(int n)
|
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()
|
abstract String |
toString(StringMaker sm)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int modifiers
String name
String declaringTypeName
Class declaringType
String stringRep
ClassLoader lookupClassLoader
static final char SEP
static Hashtable prims
static String[] EMPTY_STRING_ARRAY
static Class[] EMPTY_CLASS_ARRAY
static final String INNER_SEP
Constructor Detail |
---|
protected SignatureImpl(int modifiers, String name, Class declaringType)
public SignatureImpl(String stringRep)
Method Detail |
---|
public abstract String toString(StringMaker sm)
public final String toString()
toString
in interface Signature
toString
in class Object
public final String toShortString()
Signature
toShortString
in interface Signature
public final String toLongString()
Signature
toLongString
in interface Signature
public int getModifiers()
Signature
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());
getModifiers
in interface Signature
Member.getModifiers()
,
Modifier
public String getName()
Signature
getName
in interface Signature
Member.getName()
public Class getDeclaringType()
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()
.
getDeclaringType
in interface Signature
Member.getDeclaringClass()
public String getDeclaringTypeName()
Signature
getDeclaringTypeName
in interface Signature
String fullTypeName(Class type)
String stripPackageName(String name)
String shortTypeName(Class type)
void addFullTypeNames(StringBuffer buf, Class[] types)
void addShortTypeNames(StringBuffer buf, Class[] types)
void addTypeArray(StringBuffer buf, Class[] types)
public void setLookupClassLoader(ClassLoader loader)
private ClassLoader getLookupClassLoader()
public String extractString(int n)
int extractInt(int n)
public Class extractType(int n)
Class makeClass(String s)
String[] extractStrings(int n)
Class[] extractTypes(int n)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |