@ Override protected Annotation [ ] createParameterAnnotations ( String parmName , MethodInfo methodInfo , java . lang . annotation . Annotation [ ] annotations , ConstPool parameterConstPool ) throws IllegalArgumentException , IllegalAccessException , InvocationTargetException { List < Annotation > ctParmAnnotations = new LinkedList < Annotation > ( ) ; for ( java . lang . annotation . Annotation annotation : annotations ) { Annotation clone = cloneAnnotation ( parameterConstPool , annotation ) ; // Special case: since Javaassist doesn't allow me to set the name of the parameter, // I need to ensure that RequestParam's value is set to the parm name if there isn't already // a value set // if ( RequestParam . class . isAssignableFrom ( annotation . annotationType ( ) ) ) { if ( "" . equals ( ( ( RequestParam ) annotation ) . value ( ) ) && ! StringUtils . isEmpty ( parmName ) ) { MemberValue value = createMemberValue ( parameterConstPool , parmName ) ; clone . addMemberValue ( "value" , value ) ; } } ctParmAnnotations . add ( clone ) ; } return ctParmAnnotations . toArray ( new Annotation [ ] { } ) ; }
Clone all the parameter Annotations from the StatefulController to the Proxy