@ Override public < E extends Enum < ? > > String getMessage ( E key , Object ... args ) throws MessageConveyorException { String declararingClassName = key . getDeclaringClass ( ) . getName ( ) ; CAL10NResourceBundle rb = cache . get ( declararingClassName ) ; if ( rb == null || rb . hasChanged ( ) ) { rb = lookup ( key ) ; cache . put ( declararingClassName , rb ) ; } String keyAsStr = key . toString ( ) ; String value = rb . getString ( keyAsStr ) ; if ( value == null ) { return "?" + keyAsStr + "?" ; } else { if ( args == null || args . length == 0 ) { return value ; } else { return format ( value , args ) ; } } }
Given an enum as key find the corresponding resource bundle and return the corresponding internationalized .