use this
[quote:3nbeijbj]package com.soapuitutorial.propertie;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class reflection_api {
public static void main(String[] args) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
String x = "SampleTest";
Method method = reflection_api.class.getMethod(x, String.class);
method.invoke(method, "hello");
}
public static void SampleTest(String x) {
System.out.println("In Sample Methode :" + x);
}
}[/quote:3nbeijbj]