/** * Creates a type annotation appender for type annotations of a method's return type. * * @param annotationAppender The annotation appender to write any type annotation to. * @param annotationValueFilter The annotation value filter to apply. * @return A visitor for appending type annotations of a method's return type. */ public static TypeDescription.Generic.Visitor<AnnotationAppender> ofMethodReturnType( AnnotationAppender annotationAppender, AnnotationValueFilter annotationValueFilter) { return new ForTypeAnnotations( annotationAppender, annotationValueFilter, TypeReference.newTypeReference(TypeReference.METHOD_RETURN)); }
/** * Creates a type annotation appender for type annotations of a method's receiver type. * * @param annotationAppender The annotation appender to write any type annotation to. * @param annotationValueFilter The annotation value filter to apply. * @return A visitor for appending type annotations of a method's receiver type. */ public static TypeDescription.Generic.Visitor<AnnotationAppender> ofReceiverType( AnnotationAppender annotationAppender, AnnotationValueFilter annotationValueFilter) { return new ForTypeAnnotations( annotationAppender, annotationValueFilter, TypeReference.newTypeReference(TypeReference.METHOD_RECEIVER)); }
/** * Creates a type annotation appender for type annotations of a field's type. * * @param annotationAppender The annotation appender to write any type annotation to. * @param annotationValueFilter The annotation value filter to apply. * @return A visitor for appending type annotations of a field's type. */ public static TypeDescription.Generic.Visitor<AnnotationAppender> ofFieldType( AnnotationAppender annotationAppender, AnnotationValueFilter annotationValueFilter) { return new ForTypeAnnotations( annotationAppender, annotationValueFilter, TypeReference.newTypeReference(TypeReference.FIELD)); }