*/
public Object getMethodProperty(final String name) {
if (!hasMethodProperty(name)) {
throw new JemmyException("No \"" + name + "\" method property specified on " + getClass().getName());
}
GetAction action = new GetAction() {
@Override
public void run(Object... parameters) throws Exception {
setResult(getControl().getClass().getMethod(name).invoke(getControl()));
}
@Override
public String toString() {
return "Getting property \"" + name + "\" on " + getClass().getName();
}
};
Object result = action.dispatch(env);
if (action.getThrowable() != null) {
throw new JemmyException("Unable to obtain property \"" + name + "\"", action.getThrowable(), this);
}
return result;
}