public static Map<String, FieldAccess> getPropertyFieldAccessors( Class<? extends Object> theClass ) { Map<String, FieldAccess> fields = getPropertyAccessorFieldsFromCache( theClass ); if ( fields == null ) { Map<String, Pair<Method, Method>> methods = getPropertySetterGetterMethods( theClass ); fields = new LinkedHashMap<>(); for ( Map.Entry<String, Pair<Method, Method>> entry : methods.entrySet() ) { final Pair<Method, Method> methodPair = entry.getValue(); final String key = entry.getKey(); PropertyField pf = new PropertyField( key, methodPair.getFirst(), methodPair.getSecond() ); fields.put( pf.alias(), pf ); } setPropertyAccessorFieldsInCache( theClass, fields ); } return fields; }
public static Map<String, FieldAccess> getPropertyFieldAccessors( Class<? extends Object> theClass ) { Map<String, FieldAccess> fields = getPropertyAccessorFieldsFromCache( theClass ); if ( fields == null ) { Map<String, Pair<Method, Method>> methods = getPropertySetterGetterMethods( theClass ); fields = new LinkedHashMap<>(); for ( Map.Entry<String, Pair<Method, Method>> entry : methods.entrySet() ) { final Pair<Method, Method> methodPair = entry.getValue(); final String key = entry.getKey(); PropertyField pf = new PropertyField( key, methodPair.getFirst(), methodPair.getSecond() ); fields.put( pf.alias(), pf ); } setPropertyAccessorFieldsInCache( theClass, fields ); } return fields; }