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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanexcludeClass(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.ClassNodegetSuperClass(org.codehaus.groovy.ast.ClassNode classNode) Extracts the super class.protected booleanisInterface(org.codehaus.groovy.ast.ClassNode classNode) Is interface.protected booleanoverrides(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
cleanupForClass, 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:NativeElementsHelperCheck if one method overrides another.- Specified by:
overridesin 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:NativeElementsHelperGets the element name.- Specified by:
getMethodNamein 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:NativeElementsHelperExtracts the super class.- Specified by:
getSuperClassin 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:NativeElementsHelperExtracts the interfaces of the class.- Specified by:
getInterfacesin 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:NativeElementsHelperExtracts the enclosed elements of the class.- Specified by:
getMethodsin 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:NativeElementsHelperChecks if the class needs to be excluded.- Specified by:
excludeClassin 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:NativeElementsHelperIs interface.- Specified by:
isInterfacein classNativeElementsHelper<org.codehaus.groovy.ast.ClassNode,org.codehaus.groovy.ast.MethodNode> - Parameters:
classNode- The class node- Returns:
- true if interface
-