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.
java.lang.reflect.Member , java.util.logging.Logger
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: the class, interface or aspect that declared this memberReturns a |
| public String | Returns: the fully qualified name of the declaring typeThis is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency. |
| public int | Returns: the modifiers on this signature represented as an intReturns 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.
|
| public String | |
| public String | |
| public String |
| getDeclaringType | back to summary |
|---|---|
| public Class Returns a For consistency with
| |
| getDeclaringTypeName | back to summary |
|---|---|
| public String getDeclaringTypeName() This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.
| |
| getModifiers | back to summary |
|---|---|
| public int getModifiers() Returns the modifiers on this signature represented as an int. Use
the constants and helper methods defined on
// check if this signature is public
java.lang.reflect.Modifier.isPublic(sig.getModifiers());
// print out the modifiers
java.lang.reflect.Modifier.toString(sig.getModifiers());
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| toLongString | back to summary |
|---|---|
public String toLongString()
| |
| toShortString | back to summary |
|---|---|
public String toShortString()
| |
| toString | back to summary |
|---|---|
| public String toString() | |