@groovy.transform.CompileStatic abstract class AbstractArrayOrIterableResultImplementer extends AbstractReadOperationImplementer
Abstract implementation of a finder that handles Array and Iterables of domain classes
Constructor and description |
---|
AbstractArrayOrIterableResultImplementer() |
Type Params | Return Type | Name and description |
---|---|---|
|
final void |
doImplement(org.codehaus.groovy.ast.ClassNode domainClassNode, org.codehaus.groovy.ast.MethodNode abstractMethodNode, org.codehaus.groovy.ast.MethodNode newMethodNode, org.codehaus.groovy.ast.ClassNode targetClassNode) |
|
abstract void |
doImplement(org.codehaus.groovy.ast.ClassNode domainClassNode, org.codehaus.groovy.ast.ClassNode targetClassNode, org.codehaus.groovy.ast.MethodNode abstractMethodNode, org.codehaus.groovy.ast.MethodNode newMethodNode, boolean isArray) Implement the method for the given arguments |
|
protected boolean |
isCompatibleReturnType(org.codehaus.groovy.ast.ClassNode domainClass, org.codehaus.groovy.ast.MethodNode methodNode, org.codehaus.groovy.ast.ClassNode returnType, java.lang.String prefix) Return true if the provided return type is compatible with this implementor. |
|
protected org.codehaus.groovy.ast.ClassNode |
resolveDomainClassForReturnType(org.codehaus.groovy.ast.ClassNode currentDomainClass, boolean isArray, org.codehaus.groovy.ast.ClassNode returnType) Resolves the domain class type for the return type |
Implement the method for the given arguments
domainClassNode
- The domain class being queriedtargetClassNode
- The target class node being transformedabstractMethodNode
- The abstract methodnewMethodNode
- The new method being addedisArray
- Whether the return type is an arrayReturn true if the provided return type is compatible with this implementor. By default returns true of Iterable and Arrays of domain classes
returnType
- The return typeResolves the domain class type for the return type
returnType
- The return typeisArray
- Whether the return type is an array