Class Property
- java.lang.Object
-
- org.inferred.freebuilder.processor.property.Property
-
- Direct Known Subclasses:
Property_Builder.Rebuildable
public abstract class Property extends java.lang.ObjectDatatype about a property of aDatatype.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProperty.BuilderBuilder forProperty.
-
Constructor Summary
Constructors Constructor Description Property()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.abstract java.lang.StringgetAllCapsName()Returns the name of the property in all-caps with underscores, e.g.abstract java.util.Optional<javax.lang.model.type.TypeMirror>getBoxedType()Returns the boxed form ofgetType(), or null if type is not primitive.abstract java.lang.StringgetCapitalizedName()Returns the capitalized name of the property, e.g.FieldAccessgetField()Returns the field name that stores the property, e.g.abstract com.google.common.collect.ImmutableList<Excerpt>getGetterAnnotations()Returns a list of annotations that should be applied to the getter method of this property.abstract java.lang.StringgetGetterName()Returns the name of the getter for the property, e.g.abstract java.lang.StringgetName()Returns the name of the property, e.g.abstract com.google.common.collect.ImmutableList<Excerpt>getPutAnnotations()Returns a list of annotations that should be applied to the put method of this property.abstract javax.lang.model.type.TypeMirrorgetType()Returns the type of the property.abstract booleanisFullyCheckedCast()Returns true if a cast to this property type is guaranteed to be fully checked at runtime.abstract booleanisInEqualsAndHashCode()Returns true if the field is to be used in equals and hashCode.abstract booleanisInToString()Returns true if the field is to appear in the toString.abstract booleanisUsingBeanConvention()Returns true if getters start with "get"; setters should follow suit with "set".Property.BuildertoBuilder()
-
-
-
Method Detail
-
getType
public abstract javax.lang.model.type.TypeMirror getType()
Returns the type of the property.
-
getBoxedType
public abstract java.util.Optional<javax.lang.model.type.TypeMirror> getBoxedType()
Returns the boxed form ofgetType(), or null if type is not primitive.
-
getName
public abstract java.lang.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 java.lang.String getCapitalizedName()
Returns the capitalized name of the property, e.g. MyProperty.
-
getAllCapsName
public abstract java.lang.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 java.lang.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 asInteger,ListorMap<?, ?>.
-
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()
-
-