Class Property
java.lang.Object
org.inferred.freebuilder.processor.property.Property
- Direct Known Subclasses:
Property_Builder.Rebuildable
Datatype about a property of a
Datatype.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract com.google.common.collect.ImmutableList<Excerpt> 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 StringReturns the name of the property in all-caps with underscores, e.g.abstract Optional<TypeMirror> Returns the boxed form ofgetType(), or null if type is not primitive.abstract StringReturns the capitalized name of the property, e.g.getField()Returns the field name that stores the property, e.g.abstract com.google.common.collect.ImmutableList<Excerpt> Returns a list of annotations that should be applied to the getter method of this property.abstract StringReturns the name of the getter for the property, e.g.abstract StringgetName()Returns the name of the property, e.g.abstract com.google.common.collect.ImmutableList<Excerpt> Returns a list of annotations that should be applied to the put method of this property.abstract TypeMirrorgetType()Returns the type of the property.abstract booleanReturns true if a cast to this property type is guaranteed to be fully checked at runtime.abstract booleanReturns true if the field is to be used in equals and hashCode.abstract booleanReturns true if the field is to appear in the toString.abstract booleanReturns true if getters start with "get"; setters should follow suit with "set".
-
Constructor Details
-
Property
public Property()
-
-
Method Details
-
getType
Returns the type of the property. -
getBoxedType
Returns the boxed form ofgetType(), or null if type is not primitive. -
getName
Returns the name of the property, e.g. myProperty. -
getField
Returns the field name that stores the property, e.g. myProperty. -
getCapitalizedName
Returns the capitalized name of the property, e.g. MyProperty. -
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
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
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
Returns a list of annotations that should be applied to the getter method of this property. -
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
-