/** * <p>Get thing for given class and thing name.</p> * @param pClass a Class * @param pFieldName Thing Name * @return a thing **/ @Override public final Field getFor(final Class<?> pClass, final String pFieldName) { Map<String, Field> fldMap = this.rapiFieldsMap.get(pClass); if (fldMap == null) { // There is no way to get from Map partially initialized bean // in this double-checked locking implementation // cause putting to the Map fully initialized bean synchronized (this.rapiFieldsMap) { fldMap = this.rapiFieldsMap.get(pClass); if (fldMap == null) { fldMap = new HashMap<String, Field>(); Field[] fields = getUtlReflection().retrieveFields(pClass); for (Field field : fields) { fldMap.put(field.getName(), field); } this.rapiFieldsMap.put(pClass, fldMap); } } } return fldMap.get(pFieldName); }