| Modifier and Type | Field and Description |
|---|---|
| private CompilationUnit | |
| private static final String | |
| private static final ClassNode | |
| public static final String | |
| private static final String | |
| private static final Class | |
| public static final ClassNode | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | adjustPropertyForImmutability(PropertyNode pNode, List<PropertyNode> newNodes, PropertyHandler handler)
|
| 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. |
| public static Object | checkImmutable(Class<?> clazz, String fieldName, Object field)
For compatibility with pre 2.5 compiled classes |
| public static Object | |
| public static void | |
| private static Statement | |
| private static void | |
| private void | |
| private static void | |
| private static Annotation | |
| public String | getAnnotationName()
Overrides org. |
| pack-priv static boolean | |
| private static void | |
| pack-priv static boolean | |
| public void | |
| private boolean | |
| public void | visit(ASTNode[]
The ASTnodes when the call was triggered. Element 0 is the AnnotationNode that triggered this
annotation to be activated. Element 1 is the AnnotatedNode decorated, such as a MethodNode or ClassNode. For
global transformations it is usually safe to ignore this parameter. nodes, SourceUnit The source unit being compiled. The source unit may contain several classes. For global transformations,
information about the AST can be retrieved from this object. source)Implements org. |
| compilationUnit | back to summary |
|---|---|
| private CompilationUnit compilationUnit | |
| COPY_WITH_METHOD | back to summary |
|---|---|
| private static final String COPY_WITH_METHOD | |
| HMAP_TYPE | back to summary |
|---|---|
| private static final ClassNode HMAP_TYPE | |
| IMMUTABLE_BREADCRUMB | back to summary |
|---|---|
| public static final String IMMUTABLE_BREADCRUMB | |
| MEMBER_ADD_COPY_WITH | back to summary |
|---|---|
| private static final String MEMBER_ADD_COPY_WITH | |
| MY_CLASS | back to summary |
|---|---|
| private static final Class<? extends Annotation> MY_CLASS | |
| MY_TYPE | back to summary |
|---|---|
| public static final ClassNode MY_TYPE | |
| MY_TYPE_NAME | back to summary |
|---|---|
| private static final String MY_TYPE_NAME | |
| ImmutableASTTransformation | back to summary |
|---|---|
| public ImmutableASTTransformation() | |
| addProperty | back to summary |
|---|---|
| private static void addProperty(ClassNode cNode, PropertyNode pNode) | |
| adjustPropertyForImmutability | back to summary |
|---|---|
| private static void adjustPropertyForImmutability(PropertyNode pNode, List<PropertyNode> newNodes, PropertyHandler handler) | |
| checkImmutable | back to summary |
|---|---|
| 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.
| |
| checkImmutable | back to summary |
|---|---|
| public static Object checkImmutable(Class<?> clazz, String fieldName, Object field) For compatibility with pre 2.5 compiled classes
| |
| checkImmutable | back to summary |
|---|---|
public static Object checkImmutable(Class<?> clazz, String fieldName, Object field, List<String> knownImmutableFieldNames, List<Class<T>> knownImmutableClasses)
| |
| checkPropNames | back to summary |
|---|---|
| public static void checkPropNames(Object instance, Map<String, Object> args) | |
| createCheckForProperty | back to summary |
|---|---|
| private static Statement createCheckForProperty(final PropertyNode pNode) | |
| createCopyWith | back to summary |
|---|---|
| private static void createCopyWith(final ClassNode cNode, final List<PropertyNode> pList) | |
| doMakeImmutable | back to summary |
|---|---|
| private void doMakeImmutable(ClassNode cNode, AnnotationNode node, PropertyHandler handler) | |
| ensureNotPublic | back to summary |
|---|---|
| private static void ensureNotPublic(AbstractASTTransformation xform, String cNode, FieldNode fNode) | |
| getAnnotationByName | back to summary |
|---|---|
| private static Annotation getAnnotationByName(Object field, String name) | |
| getAnnotationName | back to summary |
|---|---|
| public String getAnnotationName() Overrides org. Doc from org. If the transform is associated with a single annotation, returns a name suitable for displaying in error messages. | |
| isSpecialNamedArgCase | back to summary |
|---|---|
| pack-priv static boolean isSpecialNamedArgCase(List<PropertyNode> list, boolean checkSize) | |
| makeClassFinal | back to summary |
|---|---|
| private static void makeClassFinal(AbstractASTTransformation xform, ClassNode cNode) | |
| makeImmutable | back to summary |
|---|---|
| pack-priv static boolean makeImmutable(ClassNode cNode) | |
| setCompilationUnit | back to summary |
|---|---|
| public void setCompilationUnit(CompilationUnit unit) Implements groovy.
| |
| unsupportedTupleAttribute | back to summary |
|---|---|
| private boolean unsupportedTupleAttribute(AnnotationNode anno, String memberName) | |
| visit | back to summary |
|---|---|
| public void visit(ASTNode[] nodes, SourceUnit source) Implements org. Doc from org. The method is invoked when an AST Transformation is active. For local transformations, it is invoked once each time the local annotation is encountered. For global transformations, it is invoked once for every source unit, which is typically a source file.
| |