SlideShare a Scribd company logo
Aspect-Oriented Software Development  Course 2011 Technologies for Aspect-Oriented Software   Development Eng. Esteban S. Abait ISISTAN – UNCPBA Universidad Nacional del Centro de la Provincia de Buenos Aires
Agenda ,[object Object]
Aspect-Oriented Languages ,[object Object],[object Object],[object Object]
JAC
JBoss AOP ,[object Object]
Current Limitations
Agenda ,[object Object]
Aspect-Oriented Languages ,[object Object],[object Object],[object Object]
JAC
JBoss AOP ,[object Object]
Current Limitations
AOP Definitions Obliviousness + Quantification (1) ,[object Object]
What makes a language “AO”? ,[object Object]
“ AOP = obliviousness + quantification” ,[object Object],Class  BankAccount Aspect  SecurityPolicies Developer A is oblivious with respect to the applied security policies on the bank account Developer A Developer B
AOP Definitions Obliviousness + Quantification (2) ,[object Object]
Interface. How do the actions interact with the programs and with each other?
Weaving. How will the system arrange to intermix the execution of the programs with the action?
Agenda ,[object Object]
Aspect-Oriented Languages ,[object Object],[object Object],[object Object]
JAC
JBoss AOP ,[object Object]
Current Limitations
AspectJ:  Introduction ,[object Object]
This compatibility means: ,[object Object]
Platform compatibility: all legal AspectJ programs must run on standar Java virtual machines
Tool compatibility: it must be possible to extend existing tools to support AspectJ in a natural way
Programmers compatibility: Programming with AspectJ must feel like a natural extension of programming with Java Tool compatibility : AJDT provides tool support for AOSD with AspectJ in eclipse. AJDT is consistent with JDT.
AspectJ:  Basic concepts ,[object Object]
A set of constructors: ,[object Object]
advice
inter-type declarations
aspects
[object Object]
AspectJ supports a dynamic join point model ,[object Object],AspectJ:  Join Point Model (1) a Line Method execution Method call a Point Method execution l.moveBy(2, 2) Dispatch Dispatch
AspectJ:  Join Point Model (2) ,[object Object],Join point Code snippet Method call l.moveBy(2, 2) Method execution void moveBy (int x, int y) { ... } Constructor call new Point(2, 2) Constructor execution public Point (int x, int y) Field get System.out.print(x) Field set this.x = 3 Pre-initialization Next slide Initialization Next slide Static initialization class A { static { … } } Handler catch (NumberFormatException nfe) { … } Advice execution Other aspects execution
AspectJ:  Join Point Model (3) ,[object Object],* Example from  Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools ,[object Object]
encompasses the period from the
entry of the first-called constructor
to the call to the super constructor ,[object Object]
AspectJ Learning by example:  Display update (1) ,[object Object]
Problem:  Each time a figure moves the
display must be updated
Variants:  a) one Display
b) many Displays Display Display * 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) Figure makePoint(..) makeLine(..) FigureElement moveBy(int, int)
AspectJ Learning by example:  Display update (2) ,[object Object],class  Point  implements  FigureElement { private   int  x = 0, y = 0; int  getX() {  return  x; } int  getY() {  return  y; } void  setX( int  x) {  this .x = x;  Display.update() } void  setY( int  y) {  this .y = y; Display.update();  } void  moveBy( int  dx,  int  dy) { ... } } class  Line  implements  FigureElement{ private  Point p1, p2; Point getP1() {  return  p1; } Point getP2() {  return  p2; } void  setP1(Point p1) {  this .p1 = p1;  Display.update(); } void  setP2(Point p2) { this .p2 = p2;  Display.update();  } void  moveBy( int  dx,  int  dy) { ... } }
AspectJ Learning by example:  Display update (3) ,[object Object]
Hard to evolve and maintain ,[object Object],[object Object]
Changes:  all FigureElement subclasses Developer
AspectJ Learning by example:  Identifying join points ,[object Object]
We need a way to express all the relevant join point to our problem ,[object Object],call  ( void  Point.setX( int )) Pick out each join point that is a call to a  method  setX  whose class is  Point , return type is  void  and has only one parameter  int pointcut  move: call  ( void  Point.setX( int )) ||  call  ( void  Point.setY( int ))  pointcut  move: call  ( void  Point.set * ( int )) A pointcut can have a name and can be built out of other pointcut descriptors
AspectJ Learning by example:  Implementing the behavior ,[object Object]
AspectJ defines three kinds of advices ,[object Object]
After advice: runs after the program proceeds with the join point
Around advice: runs as the join point is reached, and has explicit control over whether the program proceeds with the join point pointcut  move: call (void  FigureElement.moveBy( int ,  int )) || call  ( void  Point.setX( int ))  || call  ( void  Point.setY( int ))  || call  ( void  Line.setP1( Point ))  || call  ( void  Line.setP2( Point ));   after ()  returning : move() { Display.update(); }
AspectJ Learning by example:  Putting all together ,[object Object]
Aspects can also have methods, fields and initializers public aspect  DisplayUpdating { pointcut  move: call (void  FigureElement.moveBy( int ,  int )) || call  ( void  Point.setX( int ))  || call  ( void  Point.setY( int ))  || call  ( void  Line.setP1( Point ))  || call  ( void  Line.setP2( Point ));   after ()  returning : move() { Display.update(); } }
AspectJ Learning by example:  Comparing both versions class  Point  implements  FigureElement { private   int  x = 0, y = 0; int  getX() {  return  x; } int  getY() {  return  y; } void  setX( int  x) {  this .x = x;  Display.update() } void  setY( int  y) {  this .y = y; Display.update();   } void  moveBy( int  dx,  int  dy) { ... } } class  Line  implements  FigureElement{ private  Point p1, p2; Point getP1() {  return  p1; } Point getP2() {  return  p2; } void  setP1(Point p1) {  this .p1 = p1;  Display.update(); } void  setP2(Point p2) { this .p2 = p2;  Display.update();  } void  moveBy( int  dx,  int  dy) { ... } } Non-AOP version Scattered calls to Display.update() method class  Point  implements  FigureElement { private   int  x = 0, y = 0; int  getX() {  return  x; } int  getY() {  return  y; } void  setX( int  x) {  this .x = x;  } void  setY( int  y) {  this .y = y;  } void  moveBy( int  dx,  int  dy) { ... } } class  Line  implements  FigureElement{ private  Point p1, p2; Point getP1() {  return  p1; } Point getP2() {  return  p2; } void  setP1(Point p1) {  this .p1 = p1;  } void  setP2(Point p2) { this .p2 = p2;  } void  moveBy( int  dx,  int  dy) { ... } } AOP version The “update display” concern is located in one unit. No more code scattering public aspect  DisplayUpdating { pointcut  move: call (void  FigureElement.moveBy( int ,  int )) || call  ( void  Point.setX( int ))  || call  ( void  Point.setY( int ))  || call  ( void  Line.setP1( Point ))  || call  ( void  Line.setP2( Point ));   after ()  returning : move() { Display.update(); } }
AspectJ:  Pointcuts (1) ,[object Object]
A pointcut based on explicit enumeration of a set of method signatures is known as  name-based
Pointcuts expressed in terms of properties of methods other than its exact name are known as  property-based pointcut  move: call (void  FigureElement.moveBy( int ,  int )) || call  ( void  Point.setX( int ))  || call  ( void  Point.setY( int ))  || call  ( void  Line.setP1( Point ))  || call  ( void  Line.setP2( Point ));   pointcut  move: call (void  FigureElement.moveBy( int ,  int )) || call  ( void  Point.set * ( int ))  || call  ( void  Line.set * ( Point ));   Name-based Property-based
AspectJ:  Pointcuts (2) ,[object Object]
Without exposing:
Exposing the context:
Extracting the values pointcut  move ( Point p ,  int newX ): call  ( void  set X (..))  && target  (Point) && args  ( int );   pointcut  move:  call  ( void  Point.set X ( int )); before  ( Point p ,  int newX ) : move ( p ,  newX ) { System.out.println (“The point ” + p +  “  moved to: ” + newX); } Now the advice can use the data of the join point Dispatch a Point Join point: setX execution
AspectJ:  Advice precedence (1) ,[object Object]
AspectJ:  Advice precedence (2) ,[object Object]
The aspects on the left dominates the aspects on the right
More examples: declare precedence  : AuthenticationAspect, AuthorizationAspect; declare precedence  : Auth*, PoolingAspect, LoggingAspect; declare precedence  : AuthenticationAspect, *; declare precedence  : *, CachingAspect;
AspectJ:  Advice precedence (3) ,[object Object],public   aspect  InterAdvicePrecedenceAspect { public   pointcut  performCall() :  call (* TestPrecedence.perform()); after ()  returning  : performCall() { System.out.println(&quot;<after1/>&quot;); } before () : performCall() { System.out.println(&quot;<before1/>&quot;); } void around () : performCall() { System.out.println(&quot;<around>&quot;); proceed (); System.out.println(&quot;</around>&quot;); } before () : performCall() { System.out.println(&quot;<before2/>&quot;); } } Output: <before1/> <around> <before2/> <performing/> <after1/> </around>

More Related Content

What's hot

MATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi SharmaMATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi Sharma
Abee Sharma
 
Python workshop session 6
Python workshop session 6Python workshop session 6
Python workshop session 6
Abdul Haseeb
 
EST 102 Programming in C-MODULE 4
EST 102 Programming in C-MODULE 4EST 102 Programming in C-MODULE 4
EST 102 Programming in C-MODULE 4
NIMMYRAJU
 
Python programming workshop session 2
Python programming workshop session 2Python programming workshop session 2
Python programming workshop session 2
Abdul Haseeb
 
graphics programming in java
graphics programming in javagraphics programming in java
graphics programming in java
Abinaya B
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Bhavesh Shah
 
MATLAB guide
MATLAB guideMATLAB guide
MATLAB guide
Prerna Rathore
 
Control Structures: Part 2
Control Structures: Part 2Control Structures: Part 2
Control Structures: Part 2
Andy Juan Sarango Veliz
 
Categories for the Working C++ Programmer
Categories for the Working C++ ProgrammerCategories for the Working C++ Programmer
Categories for the Working C++ ProgrammerPlatonov Sergey
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Ashish Meshram
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
Abdul Haseeb
 
02. functions & introduction to class
02. functions & introduction to class02. functions & introduction to class
02. functions & introduction to class
Haresh Jaiswal
 
Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]Palak Sanghani
 
Actors and functional_reactive_programming
Actors and functional_reactive_programmingActors and functional_reactive_programming
Actors and functional_reactive_programming
Diego Alonso
 
Intro to Functional Reactive Programming In Scala
Intro to Functional Reactive Programming In ScalaIntro to Functional Reactive Programming In Scala
Intro to Functional Reactive Programming In Scala
Diego Alonso
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
Anil Bishnoi
 
The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++
Alexander Granin
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics PracticalNeha Sharma
 
C++ functions
C++ functionsC++ functions
C++ functions
Dawood Jutt
 
Functions
FunctionsFunctions
Functions
Mitali Chugh
 

What's hot (20)

MATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi SharmaMATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi Sharma
 
Python workshop session 6
Python workshop session 6Python workshop session 6
Python workshop session 6
 
EST 102 Programming in C-MODULE 4
EST 102 Programming in C-MODULE 4EST 102 Programming in C-MODULE 4
EST 102 Programming in C-MODULE 4
 
Python programming workshop session 2
Python programming workshop session 2Python programming workshop session 2
Python programming workshop session 2
 
graphics programming in java
graphics programming in javagraphics programming in java
graphics programming in java
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
MATLAB guide
MATLAB guideMATLAB guide
MATLAB guide
 
Control Structures: Part 2
Control Structures: Part 2Control Structures: Part 2
Control Structures: Part 2
 
Categories for the Working C++ Programmer
Categories for the Working C++ ProgrammerCategories for the Working C++ Programmer
Categories for the Working C++ Programmer
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
 
02. functions & introduction to class
02. functions & introduction to class02. functions & introduction to class
02. functions & introduction to class
 
Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]
 
Actors and functional_reactive_programming
Actors and functional_reactive_programmingActors and functional_reactive_programming
Actors and functional_reactive_programming
 
Intro to Functional Reactive Programming In Scala
Intro to Functional Reactive Programming In ScalaIntro to Functional Reactive Programming In Scala
Intro to Functional Reactive Programming In Scala
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics Practical
 
C++ functions
C++ functionsC++ functions
C++ functions
 
Functions
FunctionsFunctions
Functions
 

Viewers also liked

UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented Design
Edison Lascano
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/Aop
ESUG
 
AOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گراAOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گرا
Omid Rajabi
 
Aspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use CasesAspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use Cases
www.myassignmenthelp.net
 
Scrum doc
Scrum docScrum doc
Evolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software DevelopmentEvolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software Development
kim.mens
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentOtavio Ferreira
 
Aspect Mining Techniques
Aspect Mining TechniquesAspect Mining Techniques
Aspect Mining Techniques
Esteban Abait
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
mukhtarhudaya
 
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
amirbabol
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentJignesh Patel
 
Aspect oriented software development
Aspect oriented software developmentAspect oriented software development
Aspect oriented software developmentMaryam Malekzad
 
Ch21-Software Engineering 9
Ch21-Software Engineering 9Ch21-Software Engineering 9
Ch21-Software Engineering 9Ian Sommerville
 

Viewers also liked (13)

UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented Design
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/Aop
 
AOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گراAOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گرا
 
Aspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use CasesAspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use Cases
 
Scrum doc
Scrum docScrum doc
Scrum doc
 
Evolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software DevelopmentEvolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software Development
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Aspect Mining Techniques
Aspect Mining TechniquesAspect Mining Techniques
Aspect Mining Techniques
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
 
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Aspect oriented software development
Aspect oriented software developmentAspect oriented software development
Aspect oriented software development
 
Ch21-Software Engineering 9
Ch21-Software Engineering 9Ch21-Software Engineering 9
Ch21-Software Engineering 9
 

Similar to Aspect-Oriented Technologies

45 aop-programming
45 aop-programming45 aop-programming
45 aop-programmingdaotuan85
 
Introduction to AspectJ
Introduction to AspectJIntroduction to AspectJ
Introduction to AspectJmukhtarhudaya
 
Machine-level Composition of Modularized Crosscutting Concerns
Machine-level Composition of Modularized Crosscutting ConcernsMachine-level Composition of Modularized Crosscutting Concerns
Machine-level Composition of Modularized Crosscutting Concerns
saintiss
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simple
Ateji Px
 
Implementing the IO Monad in Scala
Implementing the IO Monad in ScalaImplementing the IO Monad in Scala
Implementing the IO Monad in Scala
Hermann Hueck
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
vrickens
 
Preprocessor directives
Preprocessor directivesPreprocessor directives
Preprocessor directives
Vikash Dhal
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
Umesh Nikam
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
Roel Hartman
 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | Interpreters
Eelco Visser
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
SankarTerli
 
APSEC2020 Keynote
APSEC2020 KeynoteAPSEC2020 Keynote
APSEC2020 Keynote
Abhik Roychoudhury
 
CorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. ProgrammingCorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. Programming
Slide_N
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJTed Leung
 
U5 JAVA.pptx
U5 JAVA.pptxU5 JAVA.pptx
U5 JAVA.pptx
madan r
 
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured LightingBuild Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
Douglas Lanman
 

Similar to Aspect-Oriented Technologies (20)

45 aop-programming
45 aop-programming45 aop-programming
45 aop-programming
 
Introduction to AspectJ
Introduction to AspectJIntroduction to AspectJ
Introduction to AspectJ
 
functions
functionsfunctions
functions
 
Machine-level Composition of Modularized Crosscutting Concerns
Machine-level Composition of Modularized Crosscutting ConcernsMachine-level Composition of Modularized Crosscutting Concerns
Machine-level Composition of Modularized Crosscutting Concerns
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simple
 
Implementing the IO Monad in Scala
Implementing the IO Monad in ScalaImplementing the IO Monad in Scala
Implementing the IO Monad in Scala
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
 
Preprocessor directives
Preprocessor directivesPreprocessor directives
Preprocessor directives
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | Interpreters
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operator
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
APSEC2020 Keynote
APSEC2020 KeynoteAPSEC2020 Keynote
APSEC2020 Keynote
 
CorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. ProgrammingCorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. Programming
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
 
U5 JAVA.pptx
U5 JAVA.pptxU5 JAVA.pptx
U5 JAVA.pptx
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured LightingBuild Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Aspect-Oriented Technologies

  • 1. Aspect-Oriented Software Development Course 2011 Technologies for Aspect-Oriented Software Development Eng. Esteban S. Abait ISISTAN – UNCPBA Universidad Nacional del Centro de la Provincia de Buenos Aires
  • 2.
  • 3.
  • 4. JAC
  • 5.
  • 7.
  • 8.
  • 9. JAC
  • 10.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Interface. How do the actions interact with the programs and with each other?
  • 17. Weaving. How will the system arrange to intermix the execution of the programs with the action?
  • 18.
  • 19.
  • 20. JAC
  • 21.
  • 23.
  • 24.
  • 25. Platform compatibility: all legal AspectJ programs must run on standar Java virtual machines
  • 26. Tool compatibility: it must be possible to extend existing tools to support AspectJ in a natural way
  • 27. Programmers compatibility: Programming with AspectJ must feel like a natural extension of programming with Java Tool compatibility : AJDT provides tool support for AOSD with AspectJ in eclipse. AJDT is consistent with JDT.
  • 28.
  • 29.
  • 33.
  • 34.
  • 35.
  • 36.
  • 38. entry of the first-called constructor
  • 39.
  • 40.
  • 41. Problem: Each time a figure moves the
  • 42. display must be updated
  • 43. Variants: a) one Display
  • 44. b) many Displays Display Display * 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) Figure makePoint(..) makeLine(..) FigureElement moveBy(int, int)
  • 45.
  • 46.
  • 47.
  • 48. Changes: all FigureElement subclasses Developer
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. After advice: runs after the program proceeds with the join point
  • 54. Around advice: runs as the join point is reached, and has explicit control over whether the program proceeds with the join point pointcut move: call (void FigureElement.moveBy( int , int )) || call ( void Point.setX( int )) || call ( void Point.setY( int )) || call ( void Line.setP1( Point )) || call ( void Line.setP2( Point )); after () returning : move() { Display.update(); }
  • 55.
  • 56. Aspects can also have methods, fields and initializers public aspect DisplayUpdating { pointcut move: call (void FigureElement.moveBy( int , int )) || call ( void Point.setX( int )) || call ( void Point.setY( int )) || call ( void Line.setP1( Point )) || call ( void Line.setP2( Point )); after () returning : move() { Display.update(); } }
  • 57. AspectJ Learning by example: Comparing both versions class Point implements FigureElement { private int x = 0, y = 0; int getX() { return x; } int getY() { return y; } void setX( int x) { this .x = x; Display.update() } void setY( int y) { this .y = y; Display.update(); } void moveBy( int dx, int dy) { ... } } class Line implements FigureElement{ private Point p1, p2; Point getP1() { return p1; } Point getP2() { return p2; } void setP1(Point p1) { this .p1 = p1; Display.update(); } void setP2(Point p2) { this .p2 = p2; Display.update(); } void moveBy( int dx, int dy) { ... } } Non-AOP version Scattered calls to Display.update() method class Point implements FigureElement { private int x = 0, y = 0; int getX() { return x; } int getY() { return y; } void setX( int x) { this .x = x; } void setY( int y) { this .y = y; } void moveBy( int dx, int dy) { ... } } class Line implements FigureElement{ private Point p1, p2; Point getP1() { return p1; } Point getP2() { return p2; } void setP1(Point p1) { this .p1 = p1; } void setP2(Point p2) { this .p2 = p2; } void moveBy( int dx, int dy) { ... } } AOP version The “update display” concern is located in one unit. No more code scattering public aspect DisplayUpdating { pointcut move: call (void FigureElement.moveBy( int , int )) || call ( void Point.setX( int )) || call ( void Point.setY( int )) || call ( void Line.setP1( Point )) || call ( void Line.setP2( Point )); after () returning : move() { Display.update(); } }
  • 58.
  • 59. A pointcut based on explicit enumeration of a set of method signatures is known as name-based
  • 60. Pointcuts expressed in terms of properties of methods other than its exact name are known as property-based pointcut move: call (void FigureElement.moveBy( int , int )) || call ( void Point.setX( int )) || call ( void Point.setY( int )) || call ( void Line.setP1( Point )) || call ( void Line.setP2( Point )); pointcut move: call (void FigureElement.moveBy( int , int )) || call ( void Point.set * ( int )) || call ( void Line.set * ( Point )); Name-based Property-based
  • 61.
  • 64. Extracting the values pointcut move ( Point p , int newX ): call ( void set X (..)) && target (Point) && args ( int ); pointcut move: call ( void Point.set X ( int )); before ( Point p , int newX ) : move ( p , newX ) { System.out.println (“The point ” + p + “ moved to: ” + newX); } Now the advice can use the data of the join point Dispatch a Point Join point: setX execution
  • 65.
  • 66.
  • 67. The aspects on the left dominates the aspects on the right
  • 68. More examples: declare precedence : AuthenticationAspect, AuthorizationAspect; declare precedence : Auth*, PoolingAspect, LoggingAspect; declare precedence : AuthenticationAspect, *; declare precedence : *, CachingAspect;
  • 69.
  • 70.
  • 71.
  • 72. implement interfaces and to declare super-types declare parents : banking..entities.* implements Identifiable; The declaration of parents must follow the regular Java object hierarchy rules. For example, you cannot declare a class to be the parent of an interface. Similarly, you cannot declare parents in such a way that it will result in multiple inheritance
  • 73.
  • 74.
  • 75. The notify action gets scattered through all the hierachy of FigureElements void setP1(Point p1) { this .p1 = p1; super.setChanged(); super.notifyObservers(); } void setX( int x) { this .x = x; super.setChanged(); super.notifyObservers(); }
  • 76. AspectJ Learning by example: Observer design pattern (1)
  • 77.
  • 78. AspectJ Learning by example: ObserverProtocol aspect public abstract aspect ObserverProtocol { protected interface Subject {} protected interface Observer {} private WeakHashMap perSubjectObservers; protected List getObservers(Subject subject) { if (perSubjectObservers == null ) { perSubjectObservers = new WeakHashMap(); } List observers = (List)perSubjectObservers.get(subject); if ( observers == null ) { observers = new LinkedList(); perSubjectObservers.put(subject, observers); } return observers; } public void addObserver(Subject subject, Observer observer) { getObservers(subject).add(observer); } public void removeObserver(Subject subject, Observer observer) {...} protected abstract pointcut subjectChange(Subject s); protected abstract void updateObserver(Subject subject, Observer observer); after (Subject subject): subjectChange(subject) { Iterator iter = getObservers(subject).iterator(); while ( iter.hasNext() ) { updateObserver(subject, ((Observer)iter.next())); } } }
  • 79. AspectJ Learning by example: ScreenObserver aspect public aspect ScreenObserver extends ObserverProtocol{ declare parents: Screen implements Subject; declare parents: Screen implements Observer; protected pointcut subjectChange(Subject subject): call (void Screen.display(String)) && target (subject); protected void updateObserver(Subject subject, Observer observer) { ((Screen)observer).display(&quot;Screen updated &quot; + &quot;(screen subject displayed message).&quot;); } }
  • 80.
  • 81.
  • 82.
  • 84.
  • 85.
  • 87. Load-time weaving – since AspectJ 1.5 * More information about how AspectJ's weaving works in “Advice Weaving in AspectJ” Hilsdale and Hugunin [5]
  • 88.
  • 89. Each file may declare a list of aspects to be used for weaving, type patterns describing which types should woven, and a set of options to be passed to the weaver
  • 90. Additionally AspectJ 5 supports the definition of concrete aspects in XML
  • 91. AspectJ: Load-time weaving (2) <aspectj> <aspects> <aspect name=&quot;com.MyAspect&quot;/> <aspect name=&quot;com.MyAspect.Inner&quot;/> <concrete-aspect name=&quot;com.xyz.tracing.MyTracing&quot; extends=&quot;tracing.AbstractTracing&quot; precedence=&quot;com.xyz.first, *&quot;> <pointcut name=&quot;tracingScope&quot; expression=&quot;within(org.maw.*)&quot;/> </concrete-aspect> <include within=&quot;com..*&quot;/> <exclude within=&quot;@CoolAspect *&quot;/> </aspects> <weaver options=&quot;-verbose&quot;> <include within=&quot;javax.*&quot;/> <include within=&quot;org.aspectj.*&quot;/> <include within=&quot;(!@NoWeave foo.*) AND foo.*&quot;/> <exclude within=&quot;bar.*&quot;/> <dump within=&quot;com.foo.bar.*&quot;/> <dump within=&quot;com.foo.bar..*&quot; beforeandafter=&quot;true&quot;/> </weaver> </aspectj>
  • 92.
  • 93.
  • 94. JAC
  • 95.
  • 97.
  • 98.
  • 99. Because it is based on dynamic proxies, Spring only supports method join points Dynamic-weaving
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106. There is no dependency on the AspectJ compiler or weaver @Aspect public class TracingAspect { public TracingAspect() {} @Pointcut(&quot;execution(* *.set*(..)) && args(x) && !within(TracingAspect)&quot;) public void setters( int x) {} @Before (&quot;setters(x)&quot;) public void traceBefore( int x) { System.out.println(&quot;Object's state change to: &quot; + x); } }
  • 107.
  • 108.
  • 109. JAC
  • 110.
  • 112.
  • 113.
  • 119.
  • 120. Configuration level : customize existing aspects to work with existing applications public class MyAspect extends AspectComponent { public void synchro(ClassItem cl, String method) { cl.getMethod(method).setAttribute(synchronized, new Boolean( true )); pointcut (ALL,ALL,ALL,MyWrapper.class,wrappingMethod,true); } } synchro C m1; synchro C m2;
  • 121.
  • 122.
  • 123.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128.
  • 129.
  • 130. The aspect-configuration file provides the current value for the definition of the pointcut
  • 131. These values can be changed without recompiling the aspect trace &quot;.*&quot; &quot;aop.jac.Order&quot; &quot;addItem(java.lang.String,int):void&quot;
  • 132.
  • 133.
  • 134.
  • 135. s0 initial centralized server //deployment.acc Replicate “document0” “.*[1-2]” //consistency.acc AddStrongConsistency “document0” “.*[1-2]”
  • 136. JAC – A load-balancing aspect (2) public class LoadBalancingAC extends AspectComponent { LoadBalancingAC() { pointcut(&quot;document0&quot;, &quot;Document&quot;, &quot;.*&quot;, LoadBalancingWrapper.class, &quot;loadBalance&quot;,&quot;s0&quot;); } class LoadBalancingWrapper extends Wrapper { int count = 0; public Object loadBalance() { if ( replicaRefs.length == 0 ) return proceed(); if ( count >= replicaRefs.length ) { count = 0; } return replicaRefs[count++].invoke(method(),args()); } } Host / Container name
  • 137.
  • 138.
  • 139. JAC
  • 140.
  • 142.
  • 143.
  • 146.
  • 147.
  • 148.
  • 149.
  • 150.
  • 151. JAC
  • 152.
  • 154.
  • 155.
  • 156.
  • 157.
  • 158. JAC
  • 159.
  • 161.
  • 162. Particularly, the fragile pointcut [12] and the aspect composition [13] problems are the most common
  • 163.
  • 165. Add/Delete method/field/class Add a new method incX(int) Rename setXY to resetXY Evolution scenarios
  • 166.
  • 167. Do the synchronization aspect synchronize the logging code? For complex aspects, constructs like precedence of AspectJ do not suffice [14]
  • 168. Questions & Answers
  • 169.
  • 170. G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold, &quot;An Overview of AspectJ,&quot; in ECOOP, ser. Lecture Notes in Computer Science, J. L. Knudsen and J. L. Knudsen, Eds., vol. 2072. Springer, 2001, pp. 327-353.
  • 171. R. Pawlak, J.-P. Retaillé, and L. Seinturier, Foundations of AOP for J2EE Development. Apress, September 2005
  • 172. E. Gamma, R. Helm, R. Johnson, and J. M. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing Series), illustrated edition ed. Addison-Wesley Professional, November 1994.
  • 173. E. Hilsdale and J. Hugunin, &quot;Advice weaving in aspectj,&quot; in AOSD '04: Proceedings of the 3rd international conference on Aspect-oriented software development. New York, NY, USA: ACM, 2004, pp. 26-35.
  • 174.
  • 176.
  • 177. W. K. Havinga, I. Nagy, and L. M. J. Bergmans, &quot;An analysis of aspect composition problems,&quot; in Proceedings of the Third European Workshop on Aspects in Software, 2006, Enschede, Netherlands.
  • 178. T. Mens and T. Tourwé, &quot;Evolution issues in aspect-oriented programming,&quot; 2008, pp. 203-232.

Editor's Notes

  1. At most join points, there is contextual information available that you might want to use in any advice you write. For example, on a method call join point, you might want to know the parameters for that call; for an exception-handling join point, you might want to know the exception being handled. AspectJ defines a number of pointcut designators that enable a pointcut to provide this information to advice. The args designator is the first of these we are going to look at. Args Pointcut Designator (Context designator) args(Type,..) Matchs a join point where the arguments are instances of the specified types. Target Pointcut Designator (Context Designator) target(Type) Matches a join point where the target object is an instance of Type.