protected Field findPropertySetField(String propertyValue,Class propertySetClass) throws Exception {
  Field[] fields=propertySetClass.getFields();
  for (  Field field : fields) {
    String value=(String)field.get(null);
    if (value.equals(propertyValue)) {
      return field;
    }
  }
  return null;
}

protected Field findPropertySetField ( String propertyValue , Class propertySetClass ) throws Exception { Field [ ] fields = propertySetClass . getFields ( ) ; for ( Field field : fields ) { String value = ( String ) field . get ( null ) ; if ( value . equals ( propertyValue ) ) { return field ; } } return null ; }
find the property set field name for a given value on a given class .
