Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.compiler.injection
[Java] Class GrailsASTUtils

    java.lang.Object
      org.codehaus.groovy.grails.compiler.injection.GrailsASTUtils

    public class GrailsASTUtils

Helper methods for working with Groovy AST trees.

Authors:
  Graeme Rocher

Since:
  0.3

Method Summary
`static java.lang.String` | `getFullName(org.codehaus.groovy.ast.ClassNode classNode)` Gets the full name of a ClassNode.
`static org.codehaus.groovy.ast.ClassNode` | `getFurthestParent(org.codehaus.groovy.ast.ClassNode classNode)`
`static org.codehaus.groovy.ast.ClassNode` | `getFurthestUnresolvedParent(org.codehaus.groovy.ast.ClassNode classNode)`
`static boolean` | `hasOrInheritsProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String propertyName)`
`static boolean` | `hasProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String propertyName)` Returns whether a classNode has the specified property or not
`static boolean` | `implementsOrInheritsZeroArgMethod(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String methodName, java.util.List ignoreClasses)`
`static boolean` | `implementsZeroArgMethod(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String methodName)` Tests whether the ClasNode implements the specified method name.

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Method Detail

### getFullName

    public static java.lang.String getFullName(org.codehaus.groovy.ast.ClassNode classNode)

  Gets the full name of a ClassNode.
  Parameters:
    `classNode` - The class node
  Returns:
    The full name

### getFurthestParent

    public static org.codehaus.groovy.ast.ClassNode getFurthestParent(org.codehaus.groovy.ast.ClassNode classNode)

### getFurthestUnresolvedParent

    public static org.codehaus.groovy.ast.ClassNode getFurthestUnresolvedParent(org.codehaus.groovy.ast.ClassNode classNode)

### hasOrInheritsProperty

    public static boolean hasOrInheritsProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String propertyName)

### hasProperty

    public static boolean hasProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String propertyName)

  Returns whether a classNode has the specified property or not
  Parameters:
    `classNode` - The ClassNode
    `propertyName` - The name of the property
  Returns:
    True if the property exists in the ClassNode

### implementsOrInheritsZeroArgMethod

    @SuppressWarnings("rawtypes")
    public static boolean implementsOrInheritsZeroArgMethod(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String methodName, java.util.List ignoreClasses)

### implementsZeroArgMethod

    public static boolean implementsZeroArgMethod(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String methodName)

  Tests whether the ClasNode implements the specified method name.
  Parameters:
    `classNode` - The ClassNode
    `methodName` - The method name
  Returns:
    True if it does implement the method

Groovy Documentation