public OptionInvocationHandler(Map<String, Object> getterMap) {
this.getterMap=getterMap;
}
public Object invoke(Object proxy, Method method, Object[] args) {
String attributeName = new Attribute(method.getName()).getName();
if ( !getterMap.containsKey(attributeName) ) {
throw new IllegalStateException("No value provided in getterMap for \""+attributeName+"\" attribute.");
}
Object value = getterMap.get(attributeName);
return value;