[Java] Class MethodNodeUtils
- org.apache.groovy.ast.tools.MethodNodeUtils
Utility class for working with MethodNodes
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
static String |
getPropertyName(MethodNode mNode) For a method node potentially representing a property, returns the name of the property. | |
static String |
methodDescriptor(MethodNode mNode) Return the method node's descriptor which includes its return type, name and parameter types without generics. | |
static String |
methodDescriptorWithoutReturnType(MethodNode mNode) Return the method node's descriptor including its name and parameter types without generics. |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail
public static String getPropertyName(MethodNode mNode)
For a method node potentially representing a property, returns the name of the property.
- Parameters:
-
mNode
- a MethodNode
- Returns:
- the property name without the get/set/is prefix if a property or null
public static String methodDescriptor(MethodNode mNode)
Return the method node's descriptor which includes its return type, name and parameter types without generics.
- Parameters:
-
mNode
- the method node
- Returns:
- the method node's descriptor
public static String methodDescriptorWithoutReturnType(MethodNode mNode)
Return the method node's descriptor including its name and parameter types without generics.
- Parameters:
-
mNode
- the method node
- Returns:
- the method node's abbreviated descriptor excluding the return type
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/org/apache/groovy/ast/tools/MethodNodeUtils.html