question: public static Object valueFromClassConstant ( String key , Object defaultValue ) { Configuration conf = instance ( ) ; String val = valueFor ( key ) ; if ( val == null ) { return defaultValue ; } int idx = val . lastIndexOf ( "." ) ; String klassname ; String cnst ; try { klassname = val . substring ( 0 , idx ) ; cnst = val . substring ( idx + 1 ) ; } catch ( IndexOutOfBoundsException e ) { conf . warning ( "Property key " + key + " for object value constant is not properly formatted; " + "should be FQN<dot>constant, is " + val ) ; return defaultValue ; } Class klass ; try { klass = Class . forName ( klassname ) ; } catch ( ClassNotFoundException e ) { conf . warning ( "Property for object value constant " + key + " is not a FQN: " + klassname ) ; return defaultValue ; } Object cnstVal ; try { Field fld = klass . getDeclaredField ( cnst ) ; try { cnstVal = fld . get ( klass ) ; } catch ( IllegalAccessException e ) { conf . warning ( "Property for object value constant " + key + ", field is not public: " + klassname + "." + cnst ) ; return defaultValue ; } } catch ( NoSuchFieldException e ) { conf . warning ( "Property for object value constant " + key + " is not a FQN: " + klassname ) ; return defaultValue ; } return cnstVal ; }
target:  Given a property, resolves the value to a public constant field on some class, where the field is of type Object. The property value must the the FQN of the class and field, e.g. aKey=java.awt.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR will return the value of the VALUE_INTERPOLATION_NEAREST_NEIGHBOR constant on the RendingHints class.