Top Description Methods
org.aspectj.lang

public Interface Signature

Known Direct Subinterfaces
org.aspectj.lang.reflect.CatchClauseSignature, org.aspectj.lang.reflect.LockSignature, org.aspectj.lang.reflect.MemberSignature, org.aspectj.lang.reflect.UnlockSignature
Known Direct Implementers
org.aspectj.runtime.reflect.SignatureImpl

Represents the signature at a join point. This interface parallels java.lang.reflect.Member.

This interface is typically used for tracing or logging applications to obtain reflective information about the join point, i.e. using the j2se 1.4 java.util.logging API

aspect Logging {
    Logger logger = Logger.getLogger("MethodEntries");

    before(): within(com.bigboxco..*) && execution(public * *(..)) {
        Signature sig = thisJoinPoint.getSignature();
        logger.entering(sig.getDeclaringType().getName(),
                        sig.getName());
    }
}

More detailed information about a specific kind of signature can be obtained by casting this Signature object into one of its more specific sub-types available in org.aspectj.lang.reflect.

See Also
java.lang.reflect.Member, java.util.logging.Logger

Method Summary

Modifier and TypeMethod and Description
public Class<T>

Returns:

the class, interface or aspect that declared this member
getDeclaringType
()

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

public String

Returns:

the fully qualified name of the declaring type
getDeclaringTypeName
()

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

public int

Returns:

the modifiers on this signature represented as an int
getModifiers
()

Returns the modifiers on this signature represented as an int.

public String

Returns:

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

public String

Returns:

an extended string representation of this signature.
toLongString
()

public String

Returns:

an abbreviated string representation of this signature.
toShortString
()

public String

Method Detail

getDeclaringTypeback to summary
public Class<T> 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

See Also
java.lang.reflect.Member#getDeclaringClass
getDeclaringTypeNameback to summary
public String 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

getModifiersback to summary
public int 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

See Also
java.lang.reflect.Member#getModifiers, java.lang.reflect.Modifier
getNameback to summary
public String getName()
Returns:String

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

See Also
java.lang.reflect.Member#getName
toLongStringback to summary
public String toLongString()
Returns:String

an extended string representation of this signature.

toShortStringback to summary
public String toShortString()
Returns:String

an abbreviated string representation of this signature.

toStringback to summary
public String toString()