Class Property

java.lang.Object
org.inferred.freebuilder.processor.property.Property
Direct Known Subclasses:
Property_Builder.Rebuildable

public abstract class Property extends Object
Datatype about a property of a Datatype.
  • Constructor Details

    • Property

      public Property()
  • Method Details

    • getType

      public abstract TypeMirror getType()
      Returns the type of the property.
    • getBoxedType

      public abstract Optional<TypeMirror> getBoxedType()
      Returns the boxed form of getType(), or null if type is not primitive.
    • getName

      public abstract String getName()
      Returns the name of the property, e.g. myProperty.
    • getField

      public FieldAccess getField()
      Returns the field name that stores the property, e.g. myProperty.
    • getCapitalizedName

      public abstract String getCapitalizedName()
      Returns the capitalized name of the property, e.g. MyProperty.
    • getAllCapsName

      public abstract String getAllCapsName()
      Returns the name of the property in all-caps with underscores, e.g. MY_PROPERTY.
    • isUsingBeanConvention

      public abstract boolean isUsingBeanConvention()
      Returns true if getters start with "get"; setters should follow suit with "set".
    • isInToString

      public abstract boolean isInToString()
      Returns true if the field is to appear in the toString.
    • isInEqualsAndHashCode

      public abstract boolean isInEqualsAndHashCode()
      Returns true if the field is to be used in equals and hashCode.
    • getGetterName

      public abstract String getGetterName()
      Returns the name of the getter for the property, e.g. getMyProperty, or isSomethingTrue.
    • isFullyCheckedCast

      public abstract boolean isFullyCheckedCast()
      Returns true if a cast to this property type is guaranteed to be fully checked at runtime. This is true for any type that is non-generic, raw, or parameterized with unbounded wildcards, such as Integer, List or Map<?, ?>.
    • getAccessorAnnotations

      public abstract com.google.common.collect.ImmutableList<Excerpt> getAccessorAnnotations()
      Returns a list of annotations that should be applied to the accessor methods of this property; that is, the getter method, and a single setter method that will accept the result of the getter method as its argument. For a list, for example, that would be getX() and addAllX().
    • getGetterAnnotations

      public abstract com.google.common.collect.ImmutableList<Excerpt> getGetterAnnotations()
      Returns a list of annotations that should be applied to the getter method of this property.
    • getPutAnnotations

      public abstract com.google.common.collect.ImmutableList<Excerpt> getPutAnnotations()
      Returns a list of annotations that should be applied to the put method of this property. This only applies to map properties. Annotation will be added to put(key, value) method.
    • toBuilder

      public Property.Builder toBuilder()