public class ImmutablePropertyHandler extends PropertyHandler
PROPERTY_OPTIONS_TYPE| Constructor and Description | 
|---|
| ImmutablePropertyHandler() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Statement | checkFinalArgNotOverridden(ClassNode cNode,
                          FieldNode fNode) | 
| protected Expression | cloneCollectionExpr(Expression fieldExpr,
                   ClassNode type) | 
| protected Expression | createAsImmutableX(Expression expr,
                  ClassNode type) | 
| protected Statement | createConstructorStatement(AbstractASTTransformation xform,
                          ClassNode cNode,
                          PropertyNode pNode,
                          boolean namedArgs) | 
| Statement | createPropGetter(PropertyNode pNode)Create the getter block used when reading the property including any defensive copying. | 
| Statement | createPropInit(AbstractASTTransformation xform,
              AnnotationNode anno,
              ClassNode cNode,
              PropertyNode pNode,
              Parameter namedArgsMap)Create a statement that will initialize the property including any defensive copying. | 
| Statement | createPropSetter(PropertyNode pNode)Create the setter block used when setting the property. | 
| boolean | validateAttributes(AbstractASTTransformation xform,
                  AnnotationNode anno) | 
| boolean | validateProperties(AbstractASTTransformation xform,
                  BlockStatement body,
                  ClassNode cNode,
                  java.util.List<PropertyNode> props) | 
createPropertyHandler, isValidAttributepublic Statement createPropGetter(PropertyNode pNode)
PropertyHandlercreatePropGetter in class PropertyHandlerpNode - the property nodepublic Statement createPropSetter(PropertyNode pNode)
PropertyHandlercreatePropSetter in class PropertyHandlerpNode - the property nodepublic boolean validateAttributes(AbstractASTTransformation xform, AnnotationNode anno)
validateAttributes in class PropertyHandlerpublic boolean validateProperties(AbstractASTTransformation xform, BlockStatement body, ClassNode cNode, java.util.List<PropertyNode> props)
validateProperties in class PropertyHandlerpublic Statement createPropInit(AbstractASTTransformation xform, AnnotationNode anno, ClassNode cNode, PropertyNode pNode, Parameter namedArgsMap)
PropertyHandlercreatePropInit in class PropertyHandlerxform - the transform being processedanno - the '@ImmutableBase' annotation nodecNode - the classnode containing the propertypNode - the property node to initializenamedArgsMap - an "args" Map if the property value should come from a named arg map or null if notprotected Expression cloneCollectionExpr(Expression fieldExpr, ClassNode type)
protected Expression createAsImmutableX(Expression expr, ClassNode type)
protected Statement createConstructorStatement(AbstractASTTransformation xform, ClassNode cNode, PropertyNode pNode, boolean namedArgs)