Class StyleMirror

  • All Implemented Interfaces:
    java.lang.annotation.Annotation

    public class StyleMirror
    extends java.lang.Object
    implements ValueMirrors.Style
    StyleMirror used to parse data of AnnotationMirror for original annotation org.immutables.value.Value.Style during annotation processing. Interface is being described using ValueMirrors.Style annotation, which should be structurally compatible to the annotation being modelled.
    See Also:
    find(Iterable), from(AnnotationMirror)
    • Field Detail

      • MIRROR_QUALIFIED_NAME

        public static final java.lang.String MIRROR_QUALIFIED_NAME
        See Also:
        Constant Field Values
      • annotationMirror

        private final javax.lang.model.element.AnnotationMirror annotationMirror
      • get

        private final java.lang.String[] get
      • init

        private final java.lang.String init
      • with

        private final java.lang.String with
      • withUnaryOperator

        private final java.lang.String withUnaryOperator
      • add

        private final java.lang.String add
      • addAll

        private final java.lang.String addAll
      • put

        private final java.lang.String put
      • putAll

        private final java.lang.String putAll
      • copyOf

        private final java.lang.String copyOf
      • of

        private final java.lang.String of
      • instance

        private final java.lang.String instance
      • builder

        private final java.lang.String builder
      • newBuilder

        private final java.lang.String newBuilder
      • from

        private final java.lang.String from
      • build

        private final java.lang.String build
      • buildOrThrow

        private final java.lang.String buildOrThrow
      • canBuild

        private final java.lang.String canBuild
      • toBuilder

        private final java.lang.String toBuilder
      • underrideHashCode

        private final java.lang.String underrideHashCode
      • underrideEquals

        private final java.lang.String underrideEquals
      • underrideToString

        private final java.lang.String underrideToString
      • delegateToString

        private final java.lang.String delegateToString
      • includeHashCode

        private final java.lang.String includeHashCode
      • isInitialized

        private final java.lang.String isInitialized
      • isSet

        private final java.lang.String isSet
      • set

        private final java.lang.String set
      • unset

        private final java.lang.String unset
      • clear

        private final java.lang.String clear
      • create

        private final java.lang.String create
      • toImmutable

        private final java.lang.String toImmutable
      • typeBuilder

        private final java.lang.String typeBuilder
      • typeInnerBuilder

        private final java.lang.String typeInnerBuilder
      • typeAbstract

        private final java.lang.String[] typeAbstract
      • typeImmutable

        private final java.lang.String typeImmutable
      • typeImmutableEnclosing

        private final java.lang.String typeImmutableEnclosing
      • typeImmutableNested

        private final java.lang.String typeImmutableNested
      • typeModifiable

        private final java.lang.String typeModifiable
      • typeInnerModifiable

        private final java.lang.String typeInnerModifiable
      • typeWith

        private final java.lang.String typeWith
      • packageGenerated

        private final java.lang.String packageGenerated
      • defaults

        private final javax.lang.model.element.AnnotationMirror defaults
      • strictBuilder

        private final boolean strictBuilder
      • strictModifiable

        private final boolean strictModifiable
      • allParameters

        private final boolean allParameters
      • defaultAsDefault

        private final boolean defaultAsDefault
      • headerComments

        private final boolean headerComments
      • jdkOnly

        private final boolean jdkOnly
      • jdk9Collections

        private final boolean jdk9Collections
      • passAnnotations

        private final javax.lang.model.type.TypeMirror[] passAnnotations
      • passAnnotationsName

        private final java.lang.String[] passAnnotationsName
      • additionalJsonAnnotations

        private final javax.lang.model.type.TypeMirror[] additionalJsonAnnotations
      • additionalJsonAnnotationsName

        private final java.lang.String[] additionalJsonAnnotationsName
      • visibilityString

        private final java.lang.String visibilityString
      • optionalAcceptNullable

        private final boolean optionalAcceptNullable
      • generateSuppressAllWarnings

        private final boolean generateSuppressAllWarnings
      • privateNoargConstructor

        private final boolean privateNoargConstructor
      • protectedNoargConstructor

        private final boolean protectedNoargConstructor
      • attributelessSingleton

        private final boolean attributelessSingleton
      • unsafeDefaultAndDerived

        private final boolean unsafeDefaultAndDerived
      • clearBuilder

        private final boolean clearBuilder
      • deferCollectionAllocation

        private final boolean deferCollectionAllocation
      • deepImmutablesDetection

        private final boolean deepImmutablesDetection
      • overshadowImplementation

        private final boolean overshadowImplementation
      • implementationNestedInBuilder

        private final boolean implementationNestedInBuilder
      • forceJacksonPropertyNames

        private final boolean forceJacksonPropertyNames
      • forceJacksonIgnoreFields

        private final boolean forceJacksonIgnoreFields
      • forceEqualsInWithers

        private final boolean forceEqualsInWithers
      • jacksonIntegration

        private final boolean jacksonIntegration
      • weakInterning

        private final boolean weakInterning
      • alwaysPublicInitializers

        private final boolean alwaysPublicInitializers
      • builderVisibilityString

        private final java.lang.String builderVisibilityString
      • throwForInvalidImmutableState

        private final javax.lang.model.type.TypeMirror throwForInvalidImmutableState
      • throwForInvalidImmutableStateName

        private final java.lang.String throwForInvalidImmutableStateName
      • throwForNullPointer

        private final javax.lang.model.type.TypeMirror throwForNullPointer
      • throwForNullPointerName

        private final java.lang.String throwForNullPointerName
      • depluralize

        private final boolean depluralize
      • depluralizeDictionary

        private final java.lang.String[] depluralizeDictionary
      • immutableCopyOfRoutines

        private final javax.lang.model.type.TypeMirror[] immutableCopyOfRoutines
      • immutableCopyOfRoutinesName

        private final java.lang.String[] immutableCopyOfRoutinesName
      • stagedBuilder

        private final boolean stagedBuilder
      • builtinContainerAttributes

        private final boolean builtinContainerAttributes
      • beanFriendlyModifiables

        private final boolean beanFriendlyModifiables
      • allMandatoryParameters

        private final boolean allMandatoryParameters
      • redactedMask

        private final java.lang.String redactedMask
      • attributeBuilderDetection

        private final boolean attributeBuilderDetection
      • transientDerivedFields

        private final boolean transientDerivedFields
      • finalInstanceFields

        private final boolean finalInstanceFields
      • attributeBuilder

        private final java.lang.String[] attributeBuilder
      • getBuilder

        private final java.lang.String getBuilder
      • setBuilder

        private final java.lang.String setBuilder
      • addBuilder

        private final java.lang.String addBuilder
      • addAllBuilder

        private final java.lang.String addAllBuilder
      • getBuilders

        private final java.lang.String getBuilders
      • nullableAnnotation

        private final java.lang.String nullableAnnotation
      • limitStringLengthInToString

        private final int limitStringLengthInToString
      • allowedClasspathAnnotations

        private final javax.lang.model.type.TypeMirror[] allowedClasspathAnnotations
      • allowedClasspathAnnotationsName

        private final java.lang.String[] allowedClasspathAnnotationsName
      • fallbackNullableAnnotation

        private final javax.lang.model.type.TypeMirror fallbackNullableAnnotation
      • fallbackNullableAnnotationName

        private final java.lang.String fallbackNullableAnnotationName
      • jakarta

        private final boolean jakarta
    • Constructor Detail

      • StyleMirror

        private StyleMirror​(javax.lang.model.element.TypeElement defaultAnnotationElement)
      • StyleMirror

        private StyleMirror​(javax.lang.model.element.AnnotationMirror annotationMirror)
    • Method Detail

      • mirrorQualifiedName

        public static java.lang.String mirrorQualifiedName()
      • qualifiedName

        public static java.lang.String qualifiedName()
      • simpleName

        public static java.lang.String simpleName()
      • isPresent

        public static boolean isPresent​(javax.lang.model.element.Element annotatedElement)
      • find

        public static com.google.common.base.Optional<StyleMirror> find​(javax.lang.model.element.Element element)
        Finds first annotation of this type on the element.
        Parameters:
        element - annotated element
        Returns:
        optional StyleMirror, present if this annotation found
      • find

        public static com.google.common.base.Optional<StyleMirror> find​(java.lang.Iterable<? extends javax.lang.model.element.AnnotationMirror> mirrors)
        Finds first annotation of this type in an iterable of annotation mirrors.
        Parameters:
        mirrors - annotation mirrors
        Returns:
        optional StyleMirror, present if this annotation found
      • fromAll

        public static com.google.common.collect.ImmutableList<StyleMirror> fromAll​(java.lang.Iterable<? extends javax.lang.model.element.AnnotationMirror> mirrors)
        Converts iterable of annotation mirrors where all annotation are of this type. Otherwise it fails
        Parameters:
        mirrors - of this annotation type.
        Returns:
        list of converted StyleMirrors
      • from

        public static StyleMirror from​(javax.lang.model.element.TypeElement element)
        Creates mirror with default values using annotation element (i.e. declaration, not usage).
        Parameters:
        element - annotation type element
        Returns:
        StyleMirror
      • from

        public static com.google.common.base.Optional<StyleMirror> from​(javax.lang.model.element.AnnotationMirror mirror)
        Tries to convert annotation mirror to this annotation type.
        Parameters:
        mirror - annotation mirror
        Returns:
        optional StyleMirror, present if mirror matched this annotation type
      • get

        public java.lang.String[] get()
        Returns:
        value of attribute get
      • init

        public java.lang.String init()
        Returns:
        value of attribute init
      • with

        public java.lang.String with()
        Returns:
        value of attribute with
      • withUnaryOperator

        public java.lang.String withUnaryOperator()
        Returns:
        value of attribute withUnaryOperator
      • add

        public java.lang.String add()
        Returns:
        value of attribute add
      • addAll

        public java.lang.String addAll()
        Returns:
        value of attribute addAll
      • put

        public java.lang.String put()
        Returns:
        value of attribute put
      • putAll

        public java.lang.String putAll()
        Returns:
        value of attribute putAll
      • copyOf

        public java.lang.String copyOf()
        Returns:
        value of attribute copyOf
      • of

        public java.lang.String of()
        Returns:
        value of attribute of
      • instance

        public java.lang.String instance()
        Returns:
        value of attribute instance
      • builder

        public java.lang.String builder()
        Returns:
        value of attribute builder
      • newBuilder

        public java.lang.String newBuilder()
        Returns:
        value of attribute newBuilder
      • from

        public java.lang.String from()
        Returns:
        value of attribute from
      • build

        public java.lang.String build()
        Returns:
        value of attribute build
      • buildOrThrow

        public java.lang.String buildOrThrow()
        Returns:
        value of attribute buildOrThrow
      • canBuild

        public java.lang.String canBuild()
        Returns:
        value of attribute canBuild
      • toBuilder

        public java.lang.String toBuilder()
        Returns:
        value of attribute toBuilder
      • underrideHashCode

        public java.lang.String underrideHashCode()
        Returns:
        value of attribute underrideHashCode
      • underrideEquals

        public java.lang.String underrideEquals()
        Returns:
        value of attribute underrideEquals
      • underrideToString

        public java.lang.String underrideToString()
        Returns:
        value of attribute underrideToString
      • delegateToString

        public java.lang.String delegateToString()
        Returns:
        value of attribute delegateToString
      • includeHashCode

        public java.lang.String includeHashCode()
        Returns:
        value of attribute includeHashCode
      • isInitialized

        public java.lang.String isInitialized()
        Returns:
        value of attribute isInitialized
      • isSet

        public java.lang.String isSet()
        Returns:
        value of attribute isSet
      • set

        public java.lang.String set()
        Returns:
        value of attribute set
      • unset

        public java.lang.String unset()
        Returns:
        value of attribute unset
      • clear

        public java.lang.String clear()
        Returns:
        value of attribute clear
      • create

        public java.lang.String create()
        Returns:
        value of attribute create
      • toImmutable

        public java.lang.String toImmutable()
        Returns:
        value of attribute toImmutable
      • typeBuilder

        public java.lang.String typeBuilder()
        Returns:
        value of attribute typeBuilder
      • typeInnerBuilder

        public java.lang.String typeInnerBuilder()
        Returns:
        value of attribute typeInnerBuilder
      • typeAbstract

        public java.lang.String[] typeAbstract()
        Returns:
        value of attribute typeAbstract
      • typeImmutable

        public java.lang.String typeImmutable()
        Returns:
        value of attribute typeImmutable
      • typeImmutableEnclosing

        public java.lang.String typeImmutableEnclosing()
        Returns:
        value of attribute typeImmutableEnclosing
      • typeImmutableNested

        public java.lang.String typeImmutableNested()
        Returns:
        value of attribute typeImmutableNested
      • typeModifiable

        public java.lang.String typeModifiable()
        Returns:
        value of attribute typeModifiable
      • typeInnerModifiable

        public java.lang.String typeInnerModifiable()
        Returns:
        value of attribute typeInnerModifiable
      • typeWith

        public java.lang.String typeWith()
        Returns:
        value of attribute typeWith
      • packageGenerated

        public java.lang.String packageGenerated()
        Returns:
        value of attribute packageGenerated
      • defaultsMirror

        public javax.lang.model.element.AnnotationMirror defaultsMirror()
        Returns:
        annotation mirror for value of attribute defaults
      • strictBuilder

        public boolean strictBuilder()
        Returns:
        value of attribute strictBuilder
      • strictModifiable

        public boolean strictModifiable()
        Returns:
        value of attribute strictModifiable
      • allParameters

        public boolean allParameters()
        Returns:
        value of attribute allParameters
      • defaultAsDefault

        public boolean defaultAsDefault()
        Returns:
        value of attribute defaultAsDefault
      • headerComments

        public boolean headerComments()
        Returns:
        value of attribute headerComments
      • jdkOnly

        public boolean jdkOnly()
        Returns:
        value of attribute jdkOnly
      • jdk9Collections

        public boolean jdk9Collections()
        Returns:
        value of attribute jdk9Collections
      • passAnnotationsName

        public java.lang.String[] passAnnotationsName()
        Returns:
        type name for value of attribute passAnnotations
      • passAnnotationsMirror

        public javax.lang.model.type.TypeMirror[] passAnnotationsMirror()
        Returns:
        type mirror for value of attribute passAnnotations
      • passAnnotations

        @Deprecated
        public java.lang.Class<? extends java.lang.annotation.Annotation>[] passAnnotations()
        Deprecated.
        Always throws UnsupportedOperationException. Use passAnnotationsMirror() or passAnnotationsName.
      • additionalJsonAnnotationsName

        public java.lang.String[] additionalJsonAnnotationsName()
        Returns:
        type name for value of attribute additionalJsonAnnotations
      • additionalJsonAnnotationsMirror

        public javax.lang.model.type.TypeMirror[] additionalJsonAnnotationsMirror()
        Returns:
        type mirror for value of attribute additionalJsonAnnotations
      • visibilityString

        public java.lang.String visibilityString()
        Returns:
        value of attribute visibilityString
      • optionalAcceptNullable

        public boolean optionalAcceptNullable()
        Returns:
        value of attribute optionalAcceptNullable
      • generateSuppressAllWarnings

        public boolean generateSuppressAllWarnings()
        Returns:
        value of attribute generateSuppressAllWarnings
      • privateNoargConstructor

        public boolean privateNoargConstructor()
        Returns:
        value of attribute privateNoargConstructor
      • protectedNoargConstructor

        public boolean protectedNoargConstructor()
        Returns:
        value of attribute protectedNoargConstructor
      • attributelessSingleton

        public boolean attributelessSingleton()
        Returns:
        value of attribute attributelessSingleton
      • unsafeDefaultAndDerived

        public boolean unsafeDefaultAndDerived()
        Returns:
        value of attribute unsafeDefaultAndDerived
      • clearBuilder

        public boolean clearBuilder()
        Returns:
        value of attribute clearBuilder
      • deferCollectionAllocation

        public boolean deferCollectionAllocation()
        Returns:
        value of attribute deferCollectionAllocation
      • deepImmutablesDetection

        public boolean deepImmutablesDetection()
        Returns:
        value of attribute deepImmutablesDetection
      • overshadowImplementation

        public boolean overshadowImplementation()
        Returns:
        value of attribute overshadowImplementation
      • implementationNestedInBuilder

        public boolean implementationNestedInBuilder()
        Returns:
        value of attribute implementationNestedInBuilder
      • forceJacksonPropertyNames

        public boolean forceJacksonPropertyNames()
        Returns:
        value of attribute forceJacksonPropertyNames
      • forceJacksonIgnoreFields

        public boolean forceJacksonIgnoreFields()
        Returns:
        value of attribute forceJacksonIgnoreFields
      • forceEqualsInWithers

        public boolean forceEqualsInWithers()
        Returns:
        value of attribute forceEqualsInWithers
      • jacksonIntegration

        public boolean jacksonIntegration()
        Returns:
        value of attribute jacksonIntegration
      • weakInterning

        public boolean weakInterning()
        Returns:
        value of attribute weakInterning
      • alwaysPublicInitializers

        public boolean alwaysPublicInitializers()
        Returns:
        value of attribute alwaysPublicInitializers
      • builderVisibilityString

        public java.lang.String builderVisibilityString()
        Returns:
        value of attribute builderVisibilityString
      • throwForInvalidImmutableStateName

        public java.lang.String throwForInvalidImmutableStateName()
        Returns:
        type name for value of attribute throwForInvalidImmutableState
      • throwForInvalidImmutableStateMirror

        public javax.lang.model.type.TypeMirror throwForInvalidImmutableStateMirror()
        Returns:
        type mirror for value of attribute throwForInvalidImmutableState
      • throwForNullPointerName

        public java.lang.String throwForNullPointerName()
        Returns:
        type name for value of attribute throwForNullPointer
      • throwForNullPointerMirror

        public javax.lang.model.type.TypeMirror throwForNullPointerMirror()
        Returns:
        type mirror for value of attribute throwForNullPointer
      • depluralize

        public boolean depluralize()
        Returns:
        value of attribute depluralize
      • depluralizeDictionary

        public java.lang.String[] depluralizeDictionary()
        Returns:
        value of attribute depluralizeDictionary
      • immutableCopyOfRoutinesName

        public java.lang.String[] immutableCopyOfRoutinesName()
        Returns:
        type name for value of attribute immutableCopyOfRoutines
      • immutableCopyOfRoutinesMirror

        public javax.lang.model.type.TypeMirror[] immutableCopyOfRoutinesMirror()
        Returns:
        type mirror for value of attribute immutableCopyOfRoutines
      • stagedBuilder

        public boolean stagedBuilder()
        Returns:
        value of attribute stagedBuilder
      • builtinContainerAttributes

        public boolean builtinContainerAttributes()
        Returns:
        value of attribute builtinContainerAttributes
      • beanFriendlyModifiables

        public boolean beanFriendlyModifiables()
        Returns:
        value of attribute beanFriendlyModifiables
      • allMandatoryParameters

        public boolean allMandatoryParameters()
        Returns:
        value of attribute allMandatoryParameters
      • redactedMask

        public java.lang.String redactedMask()
        Returns:
        value of attribute redactedMask
      • attributeBuilderDetection

        public boolean attributeBuilderDetection()
        Returns:
        value of attribute attributeBuilderDetection
      • transientDerivedFields

        public boolean transientDerivedFields()
        Returns:
        value of attribute transientDerivedFields
      • finalInstanceFields

        public boolean finalInstanceFields()
        Returns:
        value of attribute finalInstanceFields
      • attributeBuilder

        public java.lang.String[] attributeBuilder()
        Returns:
        value of attribute attributeBuilder
      • getBuilder

        public java.lang.String getBuilder()
        Returns:
        value of attribute getBuilder
      • setBuilder

        public java.lang.String setBuilder()
        Returns:
        value of attribute setBuilder
      • addBuilder

        public java.lang.String addBuilder()
        Returns:
        value of attribute addBuilder
      • addAllBuilder

        public java.lang.String addAllBuilder()
        Returns:
        value of attribute addAllBuilder
      • getBuilders

        public java.lang.String getBuilders()
        Returns:
        value of attribute getBuilders
      • nullableAnnotation

        public java.lang.String nullableAnnotation()
        Returns:
        value of attribute nullableAnnotation
      • limitStringLengthInToString

        public int limitStringLengthInToString()
        Returns:
        value of attribute limitStringLengthInToString
      • allowedClasspathAnnotationsName

        public java.lang.String[] allowedClasspathAnnotationsName()
        Returns:
        type name for value of attribute allowedClasspathAnnotations
      • allowedClasspathAnnotationsMirror

        public javax.lang.model.type.TypeMirror[] allowedClasspathAnnotationsMirror()
        Returns:
        type mirror for value of attribute allowedClasspathAnnotations
      • fallbackNullableAnnotationName

        public java.lang.String fallbackNullableAnnotationName()
        Returns:
        type name for value of attribute fallbackNullableAnnotation
      • fallbackNullableAnnotationMirror

        public javax.lang.model.type.TypeMirror fallbackNullableAnnotationMirror()
        Returns:
        type mirror for value of attribute fallbackNullableAnnotation
      • jakarta

        public boolean jakarta()
        Returns:
        value of attribute jakarta
      • getAnnotationMirror

        public javax.lang.model.element.AnnotationMirror getAnnotationMirror()
        Returns:
        underlying annotation mirror
      • annotationType

        public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
        Specified by:
        annotationType in interface java.lang.annotation.Annotation
        Returns:
        Style.class
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.lang.annotation.Annotation
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Specified by:
        equals in interface java.lang.annotation.Annotation
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.annotation.Annotation
        Overrides:
        toString in class java.lang.Object