@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(ClassNode domainClassNode, MethodNode abstractMethodNode, MethodNode newMethodNode, ClassNode targetClassNode) |
|
abstract void |
doImplement(ClassNode domainClassNode, ClassNode targetClassNode, MethodNode abstractMethodNode, MethodNode newMethodNode, boolean isArray)Implement the method for the given arguments |
|
protected boolean |
isCompatibleReturnType(ClassNode domainClass, MethodNode methodNode, ClassNode returnType, String prefix)Return true if the provided return type is compatible with this implementor. |
|
protected ClassNode |
resolveDomainClassForReturnType(ClassNode currentDomainClass, boolean isArray, 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 type