Class MemberAttributeExtension.ForField

    • Constructor Detail

      • ForField

        public ForField()
        Creates a field attribute extension that appends default values of annotations.
      • ForField

        public ForField​(AnnotationValueFilter.Factory annotationValueFilterFactory)
        Creates a field attribute extension.
        Parameters:
        annotationValueFilterFactory - The annotation value filter factory to apply.
      • ForField

        protected ForField​(AnnotationValueFilter.Factory annotationValueFilterFactory,
                           FieldAttributeAppender.Factory attributeAppenderFactory)
        Creates a field attribute extension.
        Parameters:
        annotationValueFilterFactory - The annotation value filter factory to apply.
        attributeAppenderFactory - The field attribute appender factory to use.
    • Method Detail

      • annotate

        public MemberAttributeExtension.ForField annotate​(java.lang.annotation.Annotation... annotation)
        Appends the supplied annotations.
        Parameters:
        annotation - The annotations to append.
        Returns:
        A new field attribute extension that appends any previously registered attributes and the supplied annotations.
      • annotate

        public MemberAttributeExtension.ForField annotate​(java.util.List<? extends java.lang.annotation.Annotation> annotations)
        Appends the supplied annotations.
        Parameters:
        annotations - The annotations to append.
        Returns:
        A new field attribute extension that appends any previously registered attributes and the supplied annotations.
      • annotate

        public MemberAttributeExtension.ForField annotate​(AnnotationDescription... annotation)
        Appends the supplied annotations.
        Parameters:
        annotation - The annotations to append.
        Returns:
        A new field attribute extension that appends any previously registered attributes and the supplied annotations.
      • annotate

        public MemberAttributeExtension.ForField annotate​(java.util.Collection<? extends AnnotationDescription> annotations)
        Appends the supplied annotations.
        Parameters:
        annotations - The annotations to append.
        Returns:
        A new field attribute extension that appends any previously registered attributes and the supplied annotations.
      • attribute

        public MemberAttributeExtension.ForField attribute​(FieldAttributeAppender.Factory attributeAppenderFactory)
        Appends the supplied attribute appender factory.
        Parameters:
        attributeAppenderFactory - The attribute appender factory to append.
        Returns:
        A new field attribute extension that appends any previously registered attributes and the supplied annotations.
      • on

        public AsmVisitorWrapper on​(ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
        Applies this attribute extension on any field that matches the supplied matcher.
        Parameters:
        matcher - The matcher that decides what fields the represented extension is applied to.
        Returns:
        An appropriate ASM visitor wrapper.