SlideShare ist ein Scribd-Unternehmen logo
1 von 33
AspectJ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.
a simple figure editor p.  operations that move elements Display * 2 Point -x: int -y: int +getX() +getY() +setX(int) +setY(int) Line -p1:Point -p2: Point +getP1() +getP2() +setP1(Point) +setP2(Point) factory methods Figure <<factory>> +makePoint(..) +makeLine(..) FigureElement +setXY(int, int) +draw()
a simple figure editor p.  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  setXY( int  x,  int  y) {…} } 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  setXY( int  x,  int  y){…} }
join points p.  a Line a Point returning or throwing dispatch dispatch key points in dynamic call graph returning or throwing returning or throwing imagine  l.setXY(2, 2) a method call a method execution a method execution
join point terminology ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.  a Line dispatch method call join points method execution join points
join point terminology: p.  all join points on this slide are within the control flow of this join point imagine  l.setXY(2, 2) a Point a Line a Point
primitive pointcuts ,[object Object],[object Object],[object Object],[object Object],p.  “ a means of identifying join points” matches if the join point is a method call with this signature
pointcut composition p.  whenever a Line receives a    “ void  setP1(Point)” or “ void  setP2(Point)” method call call( void  Line.setP1(Point)) ||  call( void  Line.setP2(Point)); pointcuts compose like predicates, using &&, || and ! or a “void Line.setP2(Point)” call a “void Line.setP1(Point)” call
Pointcuts ,[object Object],[object Object],[object Object],[object Object],[object Object],p.  This pointcut captures all the join points where a  FigureElement moves ,[object Object],[object Object]
named pointcuts ,[object Object],[object Object],p.  pointcut move():  call(void FigureElement.setXY(int,int)) ||  call(void Point.setX(int))  ||  call(void Point.setY(int))  ||  call(void Line.setP1(Point))  ||  call(void Line.setP2(Point )); name parameters more on parameters and how pointcut can expose values at join points in a few slides
Name-based and property-based pointcuts ,[object Object],[object Object],p.  call(void Figure.make*(..)) call(public * Figure.* (..)) cflow(move()) wildcard special primitive pointcut
Example primitive pointcuts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.
Example pointcuts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.
Advice ,[object Object],[object Object],[object Object],[object Object],[object Object],p.  before(): move() {  System.out.println(&quot;about to move&quot;); } after() returning: move() {  System.out.println(&quot;just successfully moved&quot;); }
Exposing context in pointcuts ,[object Object],[object Object],p.  after(FigureElement  fe , int  x , int  y ) returning:  ...SomePointcut... {  System.out.println(fe + &quot; moved to (&quot; + x + &quot;, &quot; + y + &quot;)&quot;);} after(FigureElement fe, int x, int y) returning:  call(void FigureElement.setXY(int, int))  &&  target (fe)  &&  args (x, y) {  System.out.println(fe + &quot; moved to (&quot; + x + &quot;, &quot; + y + &quot;)&quot;);} Advice declares and use parameter list Pointcuts publish values
Exposing context in named pointcuts ,[object Object],[object Object],p.  pointcut setXY(FigureElement fe, int x, int y):  call(void FigureElement.setXY(int, int))  && target(fe)  && args(x, y); after(FigureElement fe, int x, int y) returning:  setXY(fe, x, y) {  System.out.println(fe + &quot; moved to (&quot; + x + &quot;, &quot; + y +  &quot;).&quot;);} pointcut parameter list Pointcuts publish context
explaining parameters… ,[object Object],[object Object],[object Object],[object Object],p.  pointcut  move(Line l):    target(l) && (call( void  Line.setP1(Point)) ||  call( void  Line.setP2(Point))); after (Line line): move(line) {   <line is bound to the line> }
Aspects ,[object Object],[object Object],[object Object],[object Object],p.  aspect Logging {  OutputStream logStream = System.err;  before(): move() {  logStream.println(&quot;about to move&quot;);  } }
Inter-type declarations ,[object Object],p.  aspect PointObserving {  private Vector Point.observers = new Vector();   public static void addObserver(Point p, Screen s) {  p.observers.add(s);  }  public static void removeObserver(Point p, Screen s) {  p.observers.remove(s);  }  pointcut changes(Point p):  target(p) && call(void Point.set*(int));  after(Point p): changes(p) {  Iterator iter = p.observers.iterator();  while ( iter.hasNext() ) {  updateObserver(p, (Screen)iter.next());  }}  static void updateObserver(Point p, Screen s) {  s.display(p);  }}
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.
Tracing ,[object Object],[object Object],p.  aspect SimpleTracing {  pointcut tracedCall():  call(void FigureElement.draw(GraphicsContext));  before(): tracedCall() {  System.out.println(&quot;Entering: &quot; +  thisJoinPoint );  } }
Profiling and Logging ,[object Object],[object Object],p.  aspect SetsInRotateCounting {  int rotateCount = 0;  int setCount = 0;  before(): call(void Line.rotate(double)) {  rotateCount++;  }  before(): call(void Point.set*(int))  && cflow(call(void Line.rotate(double))) {  setCount++; } }
Pre- and post- conditions ,[object Object],p.  aspect PointBoundsChecking {  pointcut setX(int x):  (call(void FigureElement.setXY(int, int)) && args(x, *))  || (call(void Point.setX(int)) && args(x));  pointcut setY(int y):  (call(void FigureElement.setXY(int, int)) && args(*, y))  || (call(void Point.setY(int)) && args(y));  before(int x): setX(x) {  if ( x < MIN_X || x > MAX_X )  throw new IllegalArgumentException(&quot;x is out of bounds.&quot;);  }  before(int y): setY(y) {  if ( y < MIN_Y || y > MAX_Y )  throw new IllegalArgumentException(&quot;y is out of   bounds.&quot;);  }}
Contract enforcement ,[object Object],[object Object],p.  aspect RegistrationProtection {  pointcut register():  call(void Registry.register(FigureElement));  pointcut canRegister():  withincode(static * FigureElement.make*(..));  before(): register() && !canRegister() {  throw new IllegalAccessException(&quot;Illegal call &quot; + thisJoinPoint); } }
Contract enforcement ,[object Object],p.  aspect RegistrationProtection {  pointcut register():  call(void Registry.register(FigureElement));  pointcut canRegister():  withincode(static * FigureElement.make*(..));  declare error : register() && !canRegister(): &quot;Illegal call&quot;} }
Change monitoring ,[object Object],[object Object],p.  aspect MoveTracking {  private static boolean dirty = false;  public static boolean testAndClear() {  boolean result = dirty;  dirty = false;  return result;  }  pointcut move():  call(void FigureElement.setXY(int, int)) ||  call(void Line.setP1(Point))  ||  call(void Line.setP2(Point))  ||  call(void Point.setX(int))  ||  call(void Point.setY(int));  after() returning: move() {  dirty = true; } }
Context passing ,[object Object],[object Object],p.  aspect ColorControl {  pointcut CCClientCflow(ColorControllingClient client):  cflow(call(* * (..)) && target(client));  pointcut make(): call(FigureElement Figure.make*(..));  after (ColorControllingClient c) returning  (FigureElement fe):  make() && CCClientCflow(c) {  fe.setColor(c.colorFor(fe)); } }
Providing consistent behavior ,[object Object],[object Object],p.  aspect PublicErrorLogging {  Log log = new Log();  pointcut publicMethodCall():  call(public * com.bigboxco.*.*(..));  after() throwing (Error e): publicMethodCall() {  log.write(e); } } after() throwing (Error e):  publicMethodCall() && !cflow(publicMethodCall()) {  log.write(e); }
wildcarding in pointcuts p.  target(Point) target(graphics.geom.Point) target(graphics.geom.*) any type in graphics.geom target(graphics..*) any type in any sub-package of graphics call( void  Point.setX( int )) call( public  * Point.*(..)) any public method on Point call( public  * *(..)) any public method on any type call( void  Point.getX()) call( void  Point.getY()) call( void  Point.get*()) call( void  get*())  any getter call(Point. new ( int, int )) call( new (..)) any constructor “ *” is wild card “ ..” is multi-part wild card
other primitive pointcuts p.  this(<type name>) within(<type name>) withincode(<method/constructor signature>) any join point at which currently executing object is an instance of type name currently executing code is contained within type name   currently executing code is specified method or constructor get( int  Point.x) set( int  Point.x) field reference or assignment join points
other primitive pointcuts p.  execution(void Point.setX(int)) method/constructor execution join points (actual running method) initialization(Point) object initialization join points staticinitialization(Point) class initialization join points (as the class is loaded) cflow( pointcut designator ) all join points within the dynamic control flow of any join point in  pointcut designator   cflowbelow( pointcut designator ) all join points within the dynamic control flow below any join point in  pointcut designator
Inheritance ,[object Object],[object Object],[object Object],[object Object],p.
Aspect Reuse ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],p.

Weitere ähnliche Inhalte

Was ist angesagt?

Programming Fundamentals Decisions
Programming Fundamentals  Decisions Programming Fundamentals  Decisions
Programming Fundamentals Decisions imtiazalijoono
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]vikram mahendra
 
Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++NUST Stuff
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribdAmit Kapoor
 
An imperative study of c
An imperative study of cAn imperative study of c
An imperative study of cTushar B Kute
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONvikram mahendra
 
Lecture#9 Arrays in c++
Lecture#9 Arrays in c++Lecture#9 Arrays in c++
Lecture#9 Arrays in c++NUST Stuff
 
46630497 fun-pointer-1
46630497 fun-pointer-146630497 fun-pointer-1
46630497 fun-pointer-1AmIt Prasad
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]vikram mahendra
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Dharma Kshetri
 
Unit 5 Foc
Unit 5 FocUnit 5 Foc
Unit 5 FocJAYA
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3Abdul Haseeb
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTsKevlin Henney
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALVivek Kumar Sinha
 

Was ist angesagt? (20)

Programming Fundamentals Decisions
Programming Fundamentals  Decisions Programming Fundamentals  Decisions
Programming Fundamentals Decisions
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
 
Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribd
 
An imperative study of c
An imperative study of cAn imperative study of c
An imperative study of c
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
 
Advanced C - Part 2
Advanced C - Part 2Advanced C - Part 2
Advanced C - Part 2
 
C programs
C programsC programs
C programs
 
Lecture#9 Arrays in c++
Lecture#9 Arrays in c++Lecture#9 Arrays in c++
Lecture#9 Arrays in c++
 
46630497 fun-pointer-1
46630497 fun-pointer-146630497 fun-pointer-1
46630497 fun-pointer-1
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
 
Pointers
PointersPointers
Pointers
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)
 
C++ Pointers
C++ PointersC++ Pointers
C++ Pointers
 
Unit 5 Foc
Unit 5 FocUnit 5 Foc
Unit 5 Foc
 
functions
functionsfunctions
functions
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTs
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUAL
 

Ähnlich wie Introduction to AspectJ

Aspect-Oriented Technologies
Aspect-Oriented TechnologiesAspect-Oriented Technologies
Aspect-Oriented TechnologiesEsteban Abait
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programmingdaotuan85
 
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
 
Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]Abhishek Sinha
 
Boost.Interfaces
Boost.InterfacesBoost.Interfaces
Boost.Interfacesmelpon
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxhappycocoman
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04hassaanciit
 
Function recap
Function recapFunction recap
Function recapalish sha
 
Function recap
Function recapFunction recap
Function recapalish sha
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Ismar Silveira
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Juan Pablo
 
Ch6 pointers (latest)
Ch6 pointers (latest)Ch6 pointers (latest)
Ch6 pointers (latest)Hattori Sidek
 

Ähnlich wie Introduction to AspectJ (20)

Aspect-Oriented Technologies
Aspect-Oriented TechnologiesAspect-Oriented Technologies
Aspect-Oriented Technologies
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programming
 
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
 
Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]
 
Boost.Interfaces
Boost.InterfacesBoost.Interfaces
Boost.Interfaces
 
Pointers [compatibility mode]
Pointers [compatibility mode]Pointers [compatibility mode]
Pointers [compatibility mode]
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
 
C programming
C programmingC programming
C programming
 
Array Cont
Array ContArray Cont
Array Cont
 
Managing console
Managing consoleManaging console
Managing console
 
CSE240 Pointers
CSE240 PointersCSE240 Pointers
CSE240 Pointers
 
Pointers+(2)
Pointers+(2)Pointers+(2)
Pointers+(2)
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
 
C++ L11-Polymorphism
C++ L11-PolymorphismC++ L11-Polymorphism
C++ L11-Polymorphism
 
Function recap
Function recapFunction recap
Function recap
 
Function recap
Function recapFunction recap
Function recap
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
Qprgs
QprgsQprgs
Qprgs
 
Ch6 pointers (latest)
Ch6 pointers (latest)Ch6 pointers (latest)
Ch6 pointers (latest)
 

Kürzlich hochgeladen

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Kürzlich hochgeladen (20)

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

Introduction to AspectJ

  • 1.
  • 2. a simple figure editor p. operations that move elements Display * 2 Point -x: int -y: int +getX() +getY() +setX(int) +setY(int) Line -p1:Point -p2: Point +getP1() +getP2() +setP1(Point) +setP2(Point) factory methods Figure <<factory>> +makePoint(..) +makeLine(..) FigureElement +setXY(int, int) +draw()
  • 3. a simple figure editor p. 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 setXY( int x, int y) {…} } 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 setXY( int x, int y){…} }
  • 4. join points p. a Line a Point returning or throwing dispatch dispatch key points in dynamic call graph returning or throwing returning or throwing imagine l.setXY(2, 2) a method call a method execution a method execution
  • 5.
  • 6. join point terminology: p. all join points on this slide are within the control flow of this join point imagine l.setXY(2, 2) a Point a Line a Point
  • 7.
  • 8. pointcut composition p. whenever a Line receives a “ void setP1(Point)” or “ void setP2(Point)” method call call( void Line.setP1(Point)) || call( void Line.setP2(Point)); pointcuts compose like predicates, using &&, || and ! or a “void Line.setP2(Point)” call a “void Line.setP1(Point)” call
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. wildcarding in pointcuts p. target(Point) target(graphics.geom.Point) target(graphics.geom.*) any type in graphics.geom target(graphics..*) any type in any sub-package of graphics call( void Point.setX( int )) call( public * Point.*(..)) any public method on Point call( public * *(..)) any public method on any type call( void Point.getX()) call( void Point.getY()) call( void Point.get*()) call( void get*()) any getter call(Point. new ( int, int )) call( new (..)) any constructor “ *” is wild card “ ..” is multi-part wild card
  • 30. other primitive pointcuts p. this(<type name>) within(<type name>) withincode(<method/constructor signature>) any join point at which currently executing object is an instance of type name currently executing code is contained within type name currently executing code is specified method or constructor get( int Point.x) set( int Point.x) field reference or assignment join points
  • 31. other primitive pointcuts p. execution(void Point.setX(int)) method/constructor execution join points (actual running method) initialization(Point) object initialization join points staticinitialization(Point) class initialization join points (as the class is loaded) cflow( pointcut designator ) all join points within the dynamic control flow of any join point in pointcut designator cflowbelow( pointcut designator ) all join points within the dynamic control flow below any join point in pointcut designator
  • 32.
  • 33.