Class StyleMirror

java.lang.Object
org.immutables.value.processor.meta.StyleMirror
All Implemented Interfaces:
Annotation

public class StyleMirror extends 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:
  • Field Details

    • QUALIFIED_NAME

      public static final String QUALIFIED_NAME
      See Also:
    • MIRROR_QUALIFIED_NAME

      public static final String MIRROR_QUALIFIED_NAME
      See Also:
    • annotationMirror

      private final AnnotationMirror annotationMirror
    • get

      private final String[] get
    • init

      private final String init
    • with

      private final String with
    • withUnaryOperator

      private final String withUnaryOperator
    • add

      private final String add
    • addAll

      private final String addAll
    • put

      private final String put
    • putAll

      private final String putAll
    • copyOf

      private final String copyOf
    • of

      private final String of
    • instance

      private final String instance
    • builder

      private final String builder
    • newBuilder

      private final String newBuilder
    • from

      private final String from
    • build

      private final String build
    • buildOrThrow

      private final String buildOrThrow
    • canBuild

      private final String canBuild
    • toBuilder

      private final String toBuilder
    • underrideHashCode

      private final String underrideHashCode
    • underrideEquals

      private final String underrideEquals
    • underrideToString

      private final String underrideToString
    • delegateToString

      private final String delegateToString
    • includeHashCode

      private final String includeHashCode
    • isInitialized

      private final String isInitialized
    • isSet

      private final String isSet
    • set

      private final String set
    • unset

      private final String unset
    • clear

      private final String clear
    • create

      private final String create
    • toImmutable

      private final String toImmutable
    • typeBuilder

      private final String typeBuilder
    • typeInnerBuilder

      private final String typeInnerBuilder
    • typeAbstract

      private final String[] typeAbstract
    • typeImmutable

      private final String typeImmutable
    • typeImmutableEnclosing

      private final String typeImmutableEnclosing
    • typeImmutableNested

      private final String typeImmutableNested
    • typeModifiable

      private final String typeModifiable
    • typeInnerModifiable

      private final String typeInnerModifiable
    • typeWith

      private final String typeWith
    • packageGenerated

      private final String packageGenerated
    • defaults

      private final AnnotationMirror defaults
    • defaultsMirror

      private final ImmutableMirror defaultsMirror
    • strictBuilder

      private final boolean strictBuilder
    • strictModifiable

      private final boolean strictModifiable
    • validationMethod

      private final ValueMirrors.Style.ValidationMethod validationMethod
    • 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 TypeMirror[] passAnnotations
    • passAnnotationsName

      private final String[] passAnnotationsName
    • additionalJsonAnnotations

      private final TypeMirror[] additionalJsonAnnotations
    • additionalJsonAnnotationsName

      private final String[] additionalJsonAnnotationsName
    • visibility

    • visibilityString

      private final 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
    • builderVisibility

      private final ValueMirrors.Style.BuilderVisibility builderVisibility
    • builderVisibilityString

      private final String builderVisibilityString
    • throwForInvalidImmutableState

      private final TypeMirror throwForInvalidImmutableState
    • throwForInvalidImmutableStateName

      private final String throwForInvalidImmutableStateName
    • throwForNullPointer

      private final TypeMirror throwForNullPointer
    • throwForNullPointerName

      private final String throwForNullPointerName
    • depluralize

      private final boolean depluralize
    • depluralizeDictionary

      private final String[] depluralizeDictionary
    • immutableCopyOfRoutines

      private final TypeMirror[] immutableCopyOfRoutines
    • immutableCopyOfRoutinesName

      private final 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 String redactedMask
    • attributeBuilderDetection

      private final boolean attributeBuilderDetection
    • transientDerivedFields

      private final boolean transientDerivedFields
    • finalInstanceFields

      private final boolean finalInstanceFields
    • attributeBuilder

      private final String[] attributeBuilder
    • getBuilder

      private final String getBuilder
    • setBuilder

      private final String setBuilder
    • addBuilder

      private final String addBuilder
    • addAllBuilder

      private final String addAllBuilder
    • getBuilders

      private final String getBuilders
    • nullableAnnotation

      private final String nullableAnnotation
    • limitStringLengthInToString

      private final int limitStringLengthInToString
    • allowedClasspathAnnotations

      private final TypeMirror[] allowedClasspathAnnotations
    • allowedClasspathAnnotationsName

      private final String[] allowedClasspathAnnotationsName
    • fallbackNullableAnnotation

      private final TypeMirror fallbackNullableAnnotation
    • fallbackNullableAnnotationName

      private final String fallbackNullableAnnotationName
    • jakarta

      private final boolean jakarta
  • Constructor Details

    • StyleMirror

      private StyleMirror(TypeElement defaultAnnotationElement)
    • StyleMirror

      private StyleMirror(AnnotationMirror annotationMirror)
  • Method Details

    • mirrorQualifiedName

      public static String mirrorQualifiedName()
    • qualifiedName

      public static String qualifiedName()
    • simpleName

      public static String simpleName()
    • isPresent

      public static boolean isPresent(Element annotatedElement)
    • find

      public static com.google.common.base.Optional<StyleMirror> find(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(Iterable<? extends 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(Iterable<? extends 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(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(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 String[] get()
      Returns:
      value of attribute get
    • init

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

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

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

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

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

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

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

      public String copyOf()
      Returns:
      value of attribute copyOf
    • of

      public String of()
      Returns:
      value of attribute of
    • instance

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public AnnotationMirror defaultsMirror()
      Returns:
      annotation mirror for value of attribute defaults
    • defaults

      public ImmutableMirror defaults()
      Returns:
      reified annotation mirror for ValueMirrors.Immutable
    • strictBuilder

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

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

      public ValueMirrors.Style.ValidationMethod validationMethod()
      Returns:
      value of attribute validationMethod
    • 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 String[] passAnnotationsName()
      Returns:
      type name for value of attribute passAnnotations
    • passAnnotationsMirror

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

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

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

      public TypeMirror[] additionalJsonAnnotationsMirror()
      Returns:
      type mirror for value of attribute additionalJsonAnnotations
    • additionalJsonAnnotations

      @Deprecated public Class<? extends Annotation>[] additionalJsonAnnotations()
      Deprecated.
      Always throws UnsupportedOperationException. Use additionalJsonAnnotationsMirror() or additionalJsonAnnotationsName.
    • visibility

      Returns:
      value of attribute visibility
    • visibilityString

      public 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
    • builderVisibility

      public ValueMirrors.Style.BuilderVisibility builderVisibility()
      Returns:
      value of attribute builderVisibility
    • builderVisibilityString

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

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

      public TypeMirror throwForInvalidImmutableStateMirror()
      Returns:
      type mirror for value of attribute throwForInvalidImmutableState
    • throwForInvalidImmutableState

      @Deprecated public Class<? extends Exception> throwForInvalidImmutableState()
      Deprecated.
      Always throws UnsupportedOperationException. Use throwForInvalidImmutableStateMirror() or throwForInvalidImmutableStateName.
    • throwForNullPointerName

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

      public TypeMirror throwForNullPointerMirror()
      Returns:
      type mirror for value of attribute throwForNullPointer
    • throwForNullPointer

      @Deprecated public Class<? extends Exception> throwForNullPointer()
      Deprecated.
      Always throws UnsupportedOperationException. Use throwForNullPointerMirror() or throwForNullPointerName.
    • depluralize

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

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

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

      public TypeMirror[] immutableCopyOfRoutinesMirror()
      Returns:
      type mirror for value of attribute immutableCopyOfRoutines
    • immutableCopyOfRoutines

      @Deprecated public Class<?>[] immutableCopyOfRoutines()
      Deprecated.
      Always throws UnsupportedOperationException. Use immutableCopyOfRoutinesMirror() or immutableCopyOfRoutinesName.
    • 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 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 String[] attributeBuilder()
      Returns:
      value of attribute attributeBuilder
    • getBuilder

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

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

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

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

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

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

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

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

      public TypeMirror[] allowedClasspathAnnotationsMirror()
      Returns:
      type mirror for value of attribute allowedClasspathAnnotations
    • allowedClasspathAnnotations

      @Deprecated public Class<? extends Annotation>[] allowedClasspathAnnotations()
      Deprecated.
      Always throws UnsupportedOperationException. Use allowedClasspathAnnotationsMirror() or allowedClasspathAnnotationsName.
    • fallbackNullableAnnotationName

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

      public TypeMirror fallbackNullableAnnotationMirror()
      Returns:
      type mirror for value of attribute fallbackNullableAnnotation
    • fallbackNullableAnnotation

      @Deprecated public Class<? extends Annotation> fallbackNullableAnnotation()
      Deprecated.
      Always throws UnsupportedOperationException. Use fallbackNullableAnnotationMirror() or fallbackNullableAnnotationName.
    • jakarta

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

      public AnnotationMirror getAnnotationMirror()
      Returns:
      underlying annotation mirror
    • annotationType

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

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

      public boolean equals(Object other)
      Specified by:
      equals in interface Annotation
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Specified by:
      toString in interface Annotation
      Overrides:
      toString in class Object