private String getKeyPrefix ( Class targetClass ) { String prefix = ( ( ConfigBundle ) targetClass . getAnnotation ( ConfigBundle . class ) ) . value ( ) ; if ( prefix . isEmpty ( ) ) { prefix = StringUtils . camelCaseToHyphenCase ( targetClass . getSimpleName ( ) ) ; } if ( "." . equals ( prefix ) ) { prefix = "" ; } return prefix ; }
Generate a key prefix from annotation class name or parent prefix in case of nested classes .