@ Override public void visitEnum ( String targetMethodName , String enumerationTypeDescription , String enumerationLiteral ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "visitEnum [ {0} ] Name [ {1} ] Description [ {2} ] Value [ {3} ]" , getHashText ( ) , targetMethodName , enumerationTypeDescription , enumerationLiteral ) ) ; } Type enumerationType = Type . getType ( enumerationTypeDescription ) ; String enumerationClassName = enumerationType . getClassName ( ) ; // TODO: The value stored as the class name, not as an info object. // For now, let the caller obtain the value as a class info. // // Whether to allow resolution of class values as class info // objects is an open question. No particular value is known // at this time for adding a class info type access API. // // See the similar code in 'InfoVisitor_DefaultValue.visit(String, Object)'. // value = infoStore.getDelayableClassInfo( valueAsType.getClassName() ); AnnotationValueImpl newAnnotationValue = new AnnotationValueImpl ( enumerationClassName , enumerationLiteral ) ; storeAnnotationValue ( targetMethodName , newAnnotationValue ) ; }
Visit an enumeration value of an annotation occurrence .