Class BuilderSpec.PropertySetter

  • Enclosing class:
    BuilderSpec

    public static class BuilderSpec.PropertySetter
    extends java.lang.Object
    Information about a property setter, referenced from the autovalue.vm template. A property called foo (defined by a method T foo() or T getFoo()) can have a setter method foo(T) or setFoo(T) that returns the builder type. Additionally, it can have a setter with a type that can be copied to T through a copyOf method; for example a property foo of type ImmutableSet<String> can be set with a method setFoo(Collection<String> foos). And, if T is Optional, it can have a setter with a type that can be copied to T through Optional.of.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertySetter​(javax.lang.model.element.ExecutableElement setter, javax.lang.model.type.TypeMirror propertyType, javax.lang.model.util.Types typeUtils)  
    • Field Detail

      • access

        private final java.lang.String access
      • name

        private final java.lang.String name
      • parameterTypeString

        private final java.lang.String parameterTypeString
      • primitiveParameter

        private final boolean primitiveParameter
      • nullableAnnotation

        private final java.lang.String nullableAnnotation
      • copyOf

        private final java.lang.String copyOf
    • Constructor Detail

      • PropertySetter

        PropertySetter​(javax.lang.model.element.ExecutableElement setter,
                       javax.lang.model.type.TypeMirror propertyType,
                       javax.lang.model.util.Types typeUtils)
    • Method Detail

      • parameterTypeString

        private static java.lang.String parameterTypeString​(javax.lang.model.element.ExecutableElement setter,
                                                            javax.lang.model.type.TypeMirror parameterType)
      • copyOfString

        private static java.lang.String copyOfString​(javax.lang.model.type.TypeMirror propertyType,
                                                     javax.lang.model.type.TypeMirror parameterType,
                                                     javax.lang.model.util.Types typeUtils,
                                                     boolean nullable)
      • getAccess

        public java.lang.String getAccess()
      • getName

        public java.lang.String getName()
      • getParameterType

        public java.lang.String getParameterType()
      • getPrimitiveParameter

        public boolean getPrimitiveParameter()
      • getNullableAnnotation

        public java.lang.String getNullableAnnotation()