Package io.micronaut.ast.groovy
Class GroovyNativeElementHelper
java.lang.Object
io.micronaut.inject.utils.NativeElementsHelper<org.codehaus.groovy.ast.ClassNode,org.codehaus.groovy.ast.MethodNode>
io.micronaut.ast.groovy.GroovyNativeElementHelper
@Internal
public final class GroovyNativeElementHelper
extends NativeElementsHelper<org.codehaus.groovy.ast.ClassNode,org.codehaus.groovy.ast.MethodNode>
The Groovy native element helper.
- Since:
- 4.3.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.inject.utils.NativeElementsHelper
NativeElementsHelper.MethodElement<N>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
excludeClass
(org.codehaus.groovy.ast.ClassNode classNode) Checks if the class needs to be excluded.protected @NonNull Collection<org.codehaus.groovy.ast.ClassNode>
getInterfaces
(org.codehaus.groovy.ast.ClassNode classNode) Extracts the interfaces of the class.getMethodName
(org.codehaus.groovy.ast.MethodNode element) Gets the element name.getMethods
(org.codehaus.groovy.ast.ClassNode classNode) Extracts the enclosed elements of the class.protected org.codehaus.groovy.ast.ClassNode
getSuperClass
(org.codehaus.groovy.ast.ClassNode classNode) Extracts the super class.protected boolean
isInterface
(org.codehaus.groovy.ast.ClassNode classNode) Is interface.protected boolean
overrides
(org.codehaus.groovy.ast.MethodNode subMethod, org.codehaus.groovy.ast.MethodNode superMethod, org.codehaus.groovy.ast.ClassNode owner) Check if one method overrides another.Methods inherited from class io.micronaut.inject.utils.NativeElementsHelper
findOverriddenMethods, getClassCacheKey, getMethodCacheKey, populateTypeHierarchy
-
Constructor Details
-
GroovyNativeElementHelper
public GroovyNativeElementHelper()
-
-
Method Details
-
overrides
protected boolean overrides(org.codehaus.groovy.ast.MethodNode subMethod, org.codehaus.groovy.ast.MethodNode superMethod, org.codehaus.groovy.ast.ClassNode owner) Description copied from class:NativeElementsHelper
Check if one method overrides another.- Specified by:
overrides
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
subMethod
- The override methodsuperMethod
- The overridden methodowner
- The class owner of the methods- Returns:
- true if overridden
-
getMethodName
Description copied from class:NativeElementsHelper
Gets the element name.- Specified by:
getMethodName
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
element
- The element- Returns:
- The name
-
getSuperClass
protected org.codehaus.groovy.ast.ClassNode getSuperClass(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:NativeElementsHelper
Extracts the super class.- Specified by:
getSuperClass
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode
- The class- Returns:
- The super calss
-
getInterfaces
@NonNull protected @NonNull Collection<org.codehaus.groovy.ast.ClassNode> getInterfaces(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:NativeElementsHelper
Extracts the interfaces of the class.- Specified by:
getInterfaces
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode
- The class- Returns:
- The interfaces
-
getMethods
@NonNull protected @NonNull List<org.codehaus.groovy.ast.MethodNode> getMethods(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:NativeElementsHelper
Extracts the enclosed elements of the class.- Specified by:
getMethods
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode
- The class- Returns:
- The enclosed elements
-
excludeClass
protected boolean excludeClass(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:NativeElementsHelper
Checks if the class needs to be excluded.- Specified by:
excludeClass
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode
- The class- Returns:
- true if to exclude
-
isInterface
protected boolean isInterface(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:NativeElementsHelper
Is interface.- Specified by:
isInterface
in classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,
org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode
- The class node- Returns:
- true if interface
-