/** * This method returns a PropertyDescriptor for the given class and property name using a Map * lookup (using getPropertyDescriptorsMap()). */ public static PropertyDescriptor getPropertyDescriptor(Class targetClass, String propertyName) throws IntrospectionException, OgnlException { if (targetClass == null) return null; return (PropertyDescriptor) getPropertyDescriptors(targetClass).get(propertyName); }
/** This method returns a PropertyDescriptor for the given class and property name using a Map lookup (using getPropertyDescriptorsMap()). */ public static final PropertyDescriptor getPropertyDescriptor(Class targetClass, String propertyName) throws IntrospectionException, OgnlException { return (targetClass == null) ? null : (PropertyDescriptor)getPropertyDescriptors(targetClass).get(propertyName); }
/** * This method returns a PropertyDescriptor for the given class and property name using a Map * lookup (using getPropertyDescriptorsMap()). */ public static PropertyDescriptor getPropertyDescriptor(Class targetClass, String propertyName) throws IntrospectionException, OgnlException { if (targetClass == null) return null; return (PropertyDescriptor) getPropertyDescriptors(targetClass).get(propertyName); }
Map<String, PropertyDescriptor> descriptors = OgnlRuntime.getPropertyDescriptors(v.getClass());
public String execute() throws Exception { super.execute(); config = ConfigurationHelper.getActionConfig(namespace, actionName); actionNames = new TreeSet(ConfigurationHelper.getActionNames(namespace)); try { Class clazz = ObjectFactory.getObjectFactory().getClassInstance(getConfig().getClassName()); java.util.Collection pds = OgnlRuntime.getPropertyDescriptors(clazz).values(); properties = (PropertyDescriptor[]) pds.toArray(PDSAT); } catch (Exception e) { log.error("Unable to get properties for action " + actionName, e); addActionError("Unable to retrieve action properties: " + e.toString()); } if (hasErrors()) //super might have set some :) return ERROR; else return SUCCESS; } }