Utility class for working with ClassNodes
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | static void | addDeclaredMethodsFromAllInterfaces(ClassNode cNode, Map<String, MethodNode> methodsMap)Adds methods from interfaces and parent interfaces. | 
|  | static void | addDeclaredMethodsFromInterfaces(ClassNode cNode, Map<String, MethodNode> methodsMap)Add in methods from all interfaces. | 
|  | static String | formatTypeName(ClassNode cNode)Formats a type name into a human readable version. | 
|  | static Map<String, MethodNode> | getDeclaredMethodsFromInterfaces(ClassNode cNode)Get methods from all interfaces. | 
|  | static Map<String, MethodNode> | getDeclaredMethodsFromSuper(ClassNode cNode)Add methods from the super class. | 
|  | static String | getPropNameForAccessor(String accessorName)Returns the property name, e.g. age, given an accessor name, e.g. getAge. | 
|  | static PropertyNode | getStaticProperty(ClassNode cNode, String propName)Detect whether a static property with the given name is within the class or a super class. | 
|  | static boolean | hasExplicitConstructor(AbstractASTTransformation xform, ClassNode cNode)Determine if an explicit (non-generated) constructor is in the class. | 
|  | static boolean | hasNoArgConstructor(ClassNode cNode) | 
|  | static boolean | hasPossibleStaticMethod(ClassNode cNode, String name, Expression arguments, boolean trySpread)Returns true if the given method has a possibly matching static method with the given name and arguments. | 
|  | static boolean | hasPossibleStaticProperty(ClassNode cNode, String methodName)Return true if we have a static accessor | 
|  | static boolean | hasStaticProperty(ClassNode cNode, String propName) | 
|  | static boolean | isInnerClass(ClassNode cNode)Detect whether a given ClassNode is a inner class (non-static). | 
|  | static boolean | isValidAccessorName(String accessorName)Detect whether the given accessor name starts with "get", "set" or "is" followed by at least one character. | 
|  | static boolean | samePackageName(ClassNode first, ClassNode second)Determine if the given ClassNode values have the same package name. | 
Adds methods from interfaces and parent interfaces. Existing entries in the methods map take precedence. Methods from interfaces visited early take precedence over later ones.
cNode -  The ClassNodemethodsMap -  A map of existing methods to alterAdd in methods from all interfaces. Existing entries in the methods map take precedence. Methods from interfaces visited early take precedence over later ones.
cNode -  The ClassNodemethodsMap -  A map of existing methods to alterFormats a type name into a human readable version. For arrays, appends "[]" to the formatted type name of the component. For unit class nodes, uses the class node name.
cNode -  the type to formatGet methods from all interfaces. Methods from interfaces visited early will be overwritten by later ones.
cNode -  The ClassNodeAdd methods from the super class.
cNode -  The ClassNodeReturns the property name, e.g. age, given an accessor name, e.g. getAge. Returns the original if a valid prefix cannot be removed.
accessorName -  the accessor name of interest, e.g. getAgeDetect whether a static property with the given name is within the class or a super class.
cNode -  the ClassNode of interestpropName -  the property nameDetermine if an explicit (non-generated) constructor is in the class.
xform -  if non null, add an error if an explicit constructor is foundcNode -  the type of the containing classReturns true if the given method has a possibly matching static method with the given name and arguments. Handles default arguments and optionally spread expressions.
cNode -      the ClassNode of interestname -       the name of the method of interestarguments -  the arguments to match againsttrySpread -  whether to try to account for SpreadExpressions within the argumentsReturn true if we have a static accessor
Detect whether a given ClassNode is a inner class (non-static).
cNode -  the ClassNode of interestDetect whether the given accessor name starts with "get", "set" or "is" followed by at least one character.
accessorName -  the accessor name of interest, e.g. getAgeDetermine if the given ClassNode values have the same package name.
first -  a ClassNodesecond -  a ClassNode