Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Implicit call to java method

878133Nov 16 2011 — edited Nov 21 2011
Hi,

I have a class composed by some methods, I want to find a way on for implicitly call a method in start and end of every method of my class without coding it.

example

this is my class :

public class MyClass {

public void a(){
...
}

public void b(){
...
}

}

call :
MyClass class = new MyClass();
class.a();


i want that when i do like below the execution will be like :

implicitCall();
a();
implicitCall();

is that possible?
Do you have any idea, on how to do that.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2011
Added on Nov 16 2011
11 comments
461 views