Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pointcut
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Expressions == Following are some important pointcut expressions supported by [[AspectJ]]. These expressions can be combined using logical operators.<ref>{{Cite web|url=https://eclipse.org/aspectj/doc/next/progguide/language-joinPoints.html|title=Join Points and Pointcuts|last=|first=|date=|website=|publisher=|access-date=14 September 2016}}</ref> <syntaxhighlight lang="java"> execution(void User.setPassword(password)) </syntaxhighlight> This pointcut matches execution of the User.setPassword method. <syntaxhighlight lang="java"> call(void User.getPassword()) </syntaxhighlight> When User.getPassword is called, this pointcut is matched. <syntaxhighlight lang="java"> handler(ArrayIndexOutOfBounds) </syntaxhighlight> Pointcut will match when there is an ArrayIndexOutOfBounds exception <syntaxhighlight lang="java"> this(UserType) </syntaxhighlight> Pointcut will match when the object currently executing is of UserType. <syntaxhighlight lang="java"> target(UserType) </syntaxhighlight> Pointcut will match when the target object is of UserType. <syntaxhighlight lang="java"> within(UserType) </syntaxhighlight> Pointcut will match when the code executing belongs to UserType.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)