Skip to main content

What about "triggers" in Java?

1 reply [Last post]
Joined: 2003-06-12

In declarative mode, things like:
after NullPointerException(e) - throws MyException("error");
before return *String ('all String methods) -
before NullPointerException - objectX = new Object() and continue;
i thought about several declarations... I'd like to know if you think that something like this could be useful one day. After all java is in constant evolution.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-01-20

Can you describe a scenario in which "triggers" would provide a compelling advantage over an comparable solution without them? What you're desribing sounds a lot like Aspect-Oriented-Programming (unless I'm totally misunderstanding you). Are you familiar with AspectJ?