CodeSignature aspectJ

What is CodeSignature in Aspect J? I tried to find JavaDocs but did not find anything useful. For the instance, your next signature is CodeSignature:

pointcut log() : execution(@Log * *(..)); before() : log() { String[] names = ((CodeSignature) thisJoinPoint.getSignature()).getParameterNames(); } 

Is there a JoinPoint connection such that thisJoinPoint.getSignature() , which is not CodeSignature ?

+5
source share
1 answer

CodeSignature is a block of code captured by a join point. This can be a method, constructor, initializer (static or non-static), or advice. There are connection points where the signature is not CodeSignature . For example, join points for a set of fields and fields get where the signature is FieldSignature , and the join point for the catch clause has CatchClauseSignature .

Signatures provide access to the information on which the connection point is called.

+2
source

All Articles