Top Fields Constructors Methods
groovy.transform.options

public Class DefaultPropertyHandler

extends PropertyHandler
Class Inheritance
Imports
org.codehaus.groovy.ast.AnnotationNode, .ClassNode, .FieldNode, .Parameter, .PropertyNode, org.codehaus.groovy.ast.expr.ArgumentListExpression, .Expression, .MapExpression, .MethodCallExpression, org.codehaus.groovy.ast.stmt.BlockStatement, .Statement, org.codehaus.groovy.transform.AbstractASTTransformation, .ImmutableASTTransformation, .MapConstructorASTTransformation, java.util.List

Field Summary

Modifier and TypeField and Description
private static final ClassNode
Inherited from groovy.transform.options.PropertyHandler:
PROPERTY_OPTIONS_TYPE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Statement
assignFieldS(boolean useSetters, Parameter map, String name)

private static Statement
public Statement
createPropInit(AbstractASTTransformation
the transform being processed
xform
,
AnnotationNode
the '@ImmutableBase' annotation node
anno
,
ClassNode
the classnode containing the property
cNode
,
PropertyNode
the property node to initialize
pNode
,
Parameter
an "args" Map if the property value should come from a named arg map or null if not
namedArgsMap
)

Implements abstract groovy.transform.options.PropertyHandler.createPropInit.

Create a statement that will initialize the property including any defensive copying.
private static Statement
public boolean
public boolean
Inherited from groovy.transform.options.PropertyHandler:
createPropertyHandlercreatePropGettercreatePropSetterisValidAttribute

Field Detail

IMMUTABLE_XFORM_TYPEback to summary
private static final ClassNode IMMUTABLE_XFORM_TYPE

Constructor Detail

DefaultPropertyHandlerback to summary
public DefaultPropertyHandler()

Method Detail

assignFieldSback to summary
private static Statement assignFieldS(boolean useSetters, Parameter map, String name)
assignToFieldSback to summary
private static Statement assignToFieldS(String name, Expression var)
createPropInitback to summary
public Statement createPropInit(AbstractASTTransformation xform, AnnotationNode anno, ClassNode cNode, PropertyNode pNode, Parameter namedArgsMap)

Implements abstract groovy.transform.options.PropertyHandler.createPropInit.

Doc from groovy.transform.options.PropertyHandler.createPropInit.

Create a statement that will initialize the property including any defensive copying. Null if no statement should be added.

Parameters
xform:AbstractASTTransformation

the transform being processed

anno:AnnotationNode

the '@ImmutableBase' annotation node

cNode:ClassNode

the classnode containing the property

pNode:PropertyNode

the property node to initialize

namedArgsMap:Parameter

an "args" Map if the property value should come from a named arg map or null if not

Annotations
@Override
setViaSetterSback to summary
private static Statement setViaSetterS(String name, Expression var)
validateAttributesback to summary
public boolean validateAttributes(AbstractASTTransformation xform, AnnotationNode anno)

Implements abstract groovy.transform.options.PropertyHandler.validateAttributes.

Annotations
@Override
validatePropertiesback to summary
public boolean validateProperties(AbstractASTTransformation xform, BlockStatement body, ClassNode cNode, List<PropertyNode> props)

Overrides groovy.transform.options.PropertyHandler.validateProperties.

Annotations
@Override