Schnittstelle JoinPoint.StaticPart

Alle bekannten Unterschnittstellen:
JoinPoint.EnclosingStaticPart
Umschließende Schnittstelle:
JoinPoint

public static interface JoinPoint.StaticPart

This helper object contains only the static information about a join point. It is available from the JoinPoint.getStaticPart() method, and can be accessed separately within advice using the special form thisJoinPointStaticPart.

If you are only interested in the static information about a join point, you should access it through this type for the best performance. This is particularly useful for library methods that want to do serious manipulations of this information, i.e.

 public class LoggingUtils {
     public static void prettyPrint(JoinPoint.StaticPart jp) {
         ...
     }
 }

 aspect Logging {
     before(): ... { LoggingUtils.prettyPrint(thisJoinPointStaticPart); }
 }
 
Siehe auch:
  • Methodendetails

    • getSignature

      Signature getSignature()
      Gibt zurück:
      the signature at the join point.
    • getSourceLocation

      SourceLocation getSourceLocation()
      Returns the source location corresponding to the join point. If there is no source location available, returns null.
      Gibt zurück:
      the SourceLocation of the defining class for default constructors
    • getKind

      String getKind()
      Gibt zurück:
      a string representing the kind of join point. This String is guaranteed to be interned
    • getId

      int getId()
      Return the id for this JoinPoint.StaticPart. All JoinPoint.StaticPart instances are assigned an id number upon creation. For each advised type the id numbers start at 0.
      The id is guaranteed to remain constant across repeated executions of a program but may change if the code is recompiled.
      The benefit of having an id is that it can be used for array index purposes which can be quicker than using the JoinPoint.StaticPart object itself in a map lookup.
      Since two JoinPoint.StaticPart instances in different advised types may have the same id, then if the id is being used to index some joinpoint specific state then that state must be maintained on a pertype basis - either by using pertypewithin() or an ITD.
      Gibt zurück:
      the id of this joinpoint
    • toString

      String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • toShortString

      String toShortString()
      Gibt zurück:
      an abbreviated string representation of the join point
    • toLongString

      String toLongString()
      Gibt zurück:
      an extended string representation of the join point