- Provides access to the target object, proxy object, method parameter, and other data for the currently notified method
Package Org.aspectj.lang;Import org.aspectj.lang.reflect.SourceLocation;PublicInterfaceJoinpoint {StringTostring();Information about where the connection point is locatedStringToshortstring();Brief information about where the connection point is locatedStringTolongstring();All relevant information about where the connection point is locatedObjectGetthis();//return AOP proxy object object getTarget< Span class= "Hljs-params" > (); //return to target object object[] Getargs (); //returns the list of methods parameters that are notified signature Getsignature (); //returns the current connection point signature sourcelocation Getsourcelocationstring getkind (); //connection point type staticpart getStaticPart (); //return connection point static part}
- For wrapping notifications, use the proceed () method to execute the target method
public interface ProceedingJoinPoint extends JoinPoint { public Object proceed() throws Throwable; public Object proceed(Object[] args) throws Throwable;}
- Access static parts of a connection point, such as the notification method signature, connection point type, and so on
PublicInterfaceStaticpart {Signaturegetsignature (); //returns the current connection point signature string getKind (); //connection point type int getid (); //unique identity string toString (); //information about the location of the connection point string Toshortstring (); //A brief information about the location of the connection point string Tolongstring (); //all relevant information about where the connection point is located}
Special Note: Joinpoint must be the first parameter
Use Joinpoint to get Notified method parameters and pass to notification methods