@groovy.transform.CompileStatic @org.codehaus.groovy.transform.GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) class GormEntityTransformation extends org.codehaus.groovy.transform.AbstractASTTransformation
An AST transformation that adds the following features:
- An id and version (if not already present)
- A toString() method (if not already present)
- Associations and association methods (addTo*, removeFrom*) etc.
- Association id getter methods ('userId' for 'user' association)
- Adds the GormEntity and GormValidateable traits
- Named query methods
Modifiers | Name | Description |
---|---|---|
static org.codehaus.groovy.ast.Parameter[] |
ADD_TO_PARAMETERS |
|
static org.codehaus.groovy.ast.AnnotationNode |
JPA_ENTITY_ANNOTATION_NODE |
|
protected static org.codehaus.groovy.ast.ClassNode |
JPA_ENTITY_CLASS_NODE |
|
static org.codehaus.groovy.ast.AnnotationNode |
JPA_ID_ANNOTATION_NODE |
|
static org.codehaus.groovy.ast.AnnotationNode |
JPA_TRANSIENT_ANNOTATION_NODE |
|
static org.codehaus.groovy.ast.AnnotationNode |
JPA_VERSION_ANNOTATION_NODE |
|
static org.codehaus.groovy.ast.ClassNode |
SERIALIZABLE_CLASS_NODE |
|
protected org.codehaus.groovy.control.CompilationUnit |
compilationUnit |
Fields inherited from class | Fields |
---|---|
class org.codehaus.groovy.transform.AbstractASTTransformation |
RETENTION_CLASSNODE, ASM4, ASM5, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8, ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SUPER, ACC_SYNCHRONIZED, ACC_VOLATILE, ACC_BRIDGE, ACC_VARARGS, ACC_TRANSIENT, ACC_NATIVE, ACC_INTERFACE, ACC_ABSTRACT, ACC_STRICT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MANDATED, ACC_DEPRECATED, T_BOOLEAN, T_CHAR, T_FLOAT, T_DOUBLE, T_BYTE, T_SHORT, T_INT, T_LONG, H_GETFIELD, H_GETSTATIC, H_PUTFIELD, H_PUTSTATIC, H_INVOKEVIRTUAL, H_INVOKESTATIC, H_INVOKESPECIAL, H_NEWINVOKESPECIAL, H_INVOKEINTERFACE, F_NEW, F_FULL, F_APPEND, F_CHOP, F_SAME, F_SAME1, TOP, INTEGER, FLOAT, DOUBLE, LONG, NULL, UNINITIALIZED_THIS, NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, BIPUSH, SIPUSH, LDC, ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE, IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, IINC, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, RET, TABLESWITCH, LOOKUPSWITCH, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN, GETSTATIC, PUTSTATIC, GETFIELD, PUTFIELD, INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC, INVOKEINTERFACE, INVOKEDYNAMIC, NEW, NEWARRAY, ANEWARRAY, ARRAYLENGTH, ATHROW, CHECKCAST, INSTANCEOF, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, IFNULL, IFNONNULL |
Type Params | Return Type | Name and description |
---|---|---|
|
org.codehaus.groovy.ast.expr.ListExpression |
getOrCreateListProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String name) |
|
protected void |
injectIdProperty(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected void |
injectVersionProperty(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected java.lang.Class |
pickGormEntityTrait(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit source) |
|
void |
setCompilationUnit(org.codehaus.groovy.control.CompilationUnit compilationUnit) |
|
void |
visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit sourceUnit) |
|
void |
visit(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit sourceUnit) |
Methods inherited from class | Name |
---|---|
class org.codehaus.groovy.transform.AbstractASTTransformation |
org.codehaus.groovy.transform.AbstractASTTransformation#tokenize(java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberList(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getClassList(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#hasAnnotation(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.ClassNode), org.codehaus.groovy.transform.AbstractASTTransformation#deemedInternalName(java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#shouldSkip(java.lang.String, java.util.List, java.util.List), org.codehaus.groovy.transform.AbstractASTTransformation#shouldSkipOnDescriptor(boolean, java.util.Map, org.codehaus.groovy.ast.MethodNode, java.util.List, java.util.List), org.codehaus.groovy.transform.AbstractASTTransformation#nonGeneric(org.codehaus.groovy.ast.ClassNode), org.codehaus.groovy.transform.AbstractASTTransformation#memberHasValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String, java.lang.Object), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberStringValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberStringValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberIntValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberClassValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String), org.codehaus.groovy.transform.AbstractASTTransformation#getMemberClassValue(org.codehaus.groovy.ast.AnnotationNode, java.lang.String, org.codehaus.groovy.ast.ClassNode), org.codehaus.groovy.transform.AbstractASTTransformation#addError(java.lang.String, org.codehaus.groovy.ast.ASTNode), org.codehaus.groovy.transform.AbstractASTTransformation#wait(long, int), org.codehaus.groovy.transform.AbstractASTTransformation#wait(long), org.codehaus.groovy.transform.AbstractASTTransformation#wait(), org.codehaus.groovy.transform.AbstractASTTransformation#equals(java.lang.Object), org.codehaus.groovy.transform.AbstractASTTransformation#toString(), org.codehaus.groovy.transform.AbstractASTTransformation#hashCode(), org.codehaus.groovy.transform.AbstractASTTransformation#getClass(), org.codehaus.groovy.transform.AbstractASTTransformation#notify(), org.codehaus.groovy.transform.AbstractASTTransformation#notifyAll(), org.codehaus.groovy.transform.AbstractASTTransformation#visit([Lorg.codehaus.groovy.ast.ASTNode;, org.codehaus.groovy.control.SourceUnit) |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |