AspectJ of Android AOP (1)

Andorid --> AOP related concepts

One: Relevant information 

  • http://www.eclipse.org/aspectj/    <=AspectJ official website
  • http://www.eclipse.org/aspectj/doc/released/runtime-api/index.html   <=AspectJ class library reference document, the content is very small
  • http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/index.html   <=@AspectJ document , we will use Annotation most in the future
  • l http://fernandocejas.com/2014/08/03/aspect-oriented-programming-in-android <==@ Programming tutorial English information
  • http://blog.csdn.net/innost/article/details/49387395 <== @ csdn last good article link to understand AOP of Android deeply
  • https://github.com/android10/Android-AOPExample            <==@Simple Demo 
  • l android -->aop <==@environment construction. 
  • l android -->Annotation <==@Write your own annotation class.
  • l andorid -->log <==@log module implementation.
  • l android -->aop log <===@statistical module code implementation.
  • |android -->aop <===@ annotation confusion configuration

Two: Concept introduction

  • Joinpoint: <====@ Before the system runs, AOP functional modules need to be woven into OOP functional modules. So, to do this weaving process, we need to know at which execution points in the system to weave. These system execution points on which weaving operations will be performed are called Joinpoints.
  • Pointcut :   <====@ Pointcut specifies a group of Joinpoints that meet the conditions in the system . It represents the expression of Joinpoint . In the process of weaving cross-cutting logic into the current system, it is necessary to refer to the Joinpoint information specified by Pointcut to know which Joinpoints in the system should weave cross-cutting logic into.
  • Advice : <====@ is the carrier of a single cross-cutting concern logic, which represents the cross-cutting logic that will be woven into the Joinpoint . According to the difference in the execution timing of the Advice at the Joinpoint or the difference in the completion of the function, the Advice can be divided into the following Specific form: Before Advice, After Advice (Afterreturning Advice , AfterThrowing Advice , AfterFinally Advice), Around Advice, Introduction .
  • Aspect : <====@ is an AOP conceptual entitythat modularly encapsulates the cross-cutting concern logic in the systemAspect can contain multiple Pointcuts and corresponding Advice definitions.

  •  Weaving:       <====@ Complete the process of cross-cutting concern logic ( cross-cutting concern modularized by Aspect ) into the OOP system.



Guess you like

Origin blog.csdn.net/shaohuazuo/article/details/51822592