What is the CodeSignature in aspectJ? I tried to find JavaDocs but didn't find anything useful. For Instance, thy is the following signature is a CodeSignature:
pointcut log() : execution(@Log * *(..));
before() : log() {
String[] names = ((CodeSignature) thisJoinPoint.getSignature()).getParameterNames();
}
Is there a JoinPoint such that thisJoinPoint.getSignature()
that is not a CodeSignature
?
CodeSignature represents a code block captured by a join point. It may be a method, constructor, initializer (static or non-static) or an advise. There are join points where the signature is not a CodeSignature
. For example join points for field set and field get where the signature is a FieldSignature and join point for a catch clause has a CatchClauseSignature.
Signatures provide access to information on which join point is called upon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With