aspose file tools*
The moose likes Java in General and the fly likes Reflection on self Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Reflection on self

Jay Richards
Ranch Hand

Joined: Jan 16, 2003
Posts: 58
Hi. I need to call a method from the class it self i.e.

public class Demo{

//call a method with parameter
public void execute(String methodName,HashMap params){
//example methodName=sampleMethod1
//i need to call the sampleMethod1 method from this class
}

//call a method without a parameter
public void execute(String methodName){
//example methodName=sampleMethod2
//i need to call the sampleMethod2 method from this class
}

//method to be called
public void sampleMethod1(HashMap params){
}

//method to be called2
public void sampleMethod2(){
}
}

Hope someone could show me. thanks a lot in advance.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Please don't post the same question if multiple forums. We want to see the discussion take place in one place so people don't waste time replying without seeing what others have already said. Followups go here. Thanks.
[ May 02, 2005: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reflection on self