|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.compiler.injection.AbstractGrailsArtefactTransformer
@SuppressWarnings("rawtypes") public abstract class AbstractGrailsArtefactTransformer extends java.lang.Object
Abstract transformer that takes an implementation class and creates methods in a target ClassNode that delegate to that implementation class. Subclasses should override to provide the implementation class details
Field Summary | |
---|---|
static java.lang.String |
CURRENT_PREFIX
|
static java.lang.String |
METHOD_MISSING_METHOD_NAME
|
protected static org.codehaus.groovy.ast.ClassNode |
OBJECT_CLASS
|
static int |
PUBLIC_STATIC_MODIFIER
|
static java.lang.String |
STATIC_METHOD_MISSING_METHOD_NAME
|
protected static org.codehaus.groovy.ast.expr.VariableExpression |
THIS_EXPRESSION
|
Method Summary | |
---|---|
int
|
compareTo(java.lang.Object o)
Used for ordering not equality. |
protected java.lang.String
|
getArtefactType()
|
java.lang.String[]
|
getArtefactTypes()
|
java.lang.Class
|
getInstanceImplementation()
The class that provides the implementation of all instance methods and properties |
java.lang.Class
|
getStaticImplementation()
The class that provides static methods |
protected boolean
|
isCandidateInstanceMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode declaredMethod)
|
protected boolean
|
isStaticCandidateMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode declaredMethod)
|
void
|
performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)
|
void
|
performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
|
protected void
|
performInjectionInternal(java.lang.String apiInstanceProperty, org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
Subclasses can override to provide additional transformation |
protected org.codehaus.groovy.ast.MethodNode
|
populateAutowiredApiLookupMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.ClassNode implementationNode, java.lang.String apiInstanceProperty, java.lang.String methodName, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)
|
protected org.codehaus.groovy.ast.MethodNode
|
populateDefaultApiLookupMethod(org.codehaus.groovy.ast.ClassNode implementationNode, java.lang.String apiInstanceProperty, java.lang.String methodName, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)
|
protected boolean
|
requiresAutowiring()
If the API requires autowiring then a
|
protected boolean
|
requiresStaticLookupMethod()
Subclasses should override in the instance API requires a static lookup method instead of autowiring. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Field Detail |
---|
public static final java.lang.String CURRENT_PREFIX
public static final java.lang.String METHOD_MISSING_METHOD_NAME
protected static final org.codehaus.groovy.ast.ClassNode OBJECT_CLASS
public static final int PUBLIC_STATIC_MODIFIER
public static final java.lang.String STATIC_METHOD_MISSING_METHOD_NAME
protected static final org.codehaus.groovy.ast.expr.VariableExpression THIS_EXPRESSION
Method Detail |
---|
public int compareTo(java.lang.Object o)
protected java.lang.String getArtefactType()
public java.lang.String[] getArtefactTypes()
public java.lang.Class getInstanceImplementation()
public java.lang.Class getStaticImplementation()
protected boolean isCandidateInstanceMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode declaredMethod)
protected boolean isStaticCandidateMethod(@SuppressWarnings("unused") org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode declaredMethod)
public void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)
public void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
@SuppressWarnings("unused") protected void performInjectionInternal(java.lang.String apiInstanceProperty, org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
source
- The sourceclassNode
- The class node
protected org.codehaus.groovy.ast.MethodNode populateAutowiredApiLookupMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.ClassNode implementationNode, @SuppressWarnings("unused") java.lang.String apiInstanceProperty, java.lang.String methodName, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)
protected org.codehaus.groovy.ast.MethodNode populateDefaultApiLookupMethod(org.codehaus.groovy.ast.ClassNode implementationNode, java.lang.String apiInstanceProperty, java.lang.String methodName, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)
protected boolean requiresAutowiring()
protected boolean requiresStaticLookupMethod()
Groovy Documentation