[Java] Class ImmutableASTTransformation

  • org.codehaus.groovy.transform.ImmutableASTTransformation

Handles generation of code for the

Immutable:
annotation.
Authors:
Paul King
Andre Steingress
Tim Yates

Field Summary

Fields
Modifiers Name Description
static String IMMUTABLE_SAFE_FLAG
static ClassNode MY_TYPE
Inherited fields
Fields inherited from class Fields
class AbstractASTTransformation RETENTION_CLASSNODE, sourceUnit

Methods Summary

Methods
Type Params Return Type Name and description
static Object checkImmutable(String className, String fieldName, Object field)
This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.
static Object checkImmutable(Class<?> clazz, String fieldName, Object field)
static void checkPropNames(Object instance, Map<String, Object> args)
void visit(ASTNode[] nodes, SourceUnit source)

Inherited Methods Summary

Inherited Methods
Methods inherited from class Name
class AbstractASTTransformation addError, checkIncludeExclude, checkIncludeExclude, checkNotInterface, copyAnnotatedNodeAnnotations, deemedInternalName, getClassList, getMemberClassValue, getMemberClassValue, getMemberIntValue, getMemberList, getMemberStringValue, getMemberStringValue, getMemberValue, hasAnnotation, init, memberHasValue, nonGeneric, shouldSkip, shouldSkipOnDescriptor, tokenize
class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

public static final String IMMUTABLE_SAFE_FLAG

public static final ClassNode MY_TYPE

Method Detail

@SuppressWarnings("Unchecked") public static Object checkImmutable(String className, String fieldName, Object field)

This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.

@SuppressWarnings("Unchecked") public static Object checkImmutable(Class<?> clazz, String fieldName, Object field)

public static void checkPropNames(Object instance, Map<String, Object> args)

public void visit(ASTNode[] nodes, SourceUnit source)

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/transform/ImmutableASTTransformation.html