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

## org.codehaus.groovy.classgen
[Java] Class Verifier

    java.lang.Object
      org.codehaus.groovy.classgen.Verifier

All Implemented Interfaces:
  GroovyClassVisitor, org.objectweb.asm.Opcodes

    public class Verifier
    extends Object

Verifies the AST node and adds any defaulted AST code before bytecode generation occurs.

Authors:
  James Strachan

Version:
  \$Revision: 21553 \$

Nested Class Summary
`interface` | `Verifier.DefaultArgsAction`

Field Summary
`static String` | `SWAP_INIT`
`static String` | `__TIMESTAMP`
`static String` | `__TIMESTAMP__`

Method Summary
`protected void` | `addClosureCode(InnerClassNode node)`
`protected void` | `addConstructor(Parameter[] newParams, ConstructorNode ctor, Statement code, ClassNode node)`
`protected void` | `addCovariantMethods(ClassNode classNode)`
`protected void` | `addDefaultParameterConstructors(ClassNode node)`
`protected void` | `addDefaultParameterMethods(ClassNode node)` Creates a new helper method for each combination of default parameter expressions
`protected void` | `addDefaultParameters(List methods, Verifier.DefaultArgsAction action)` Creates a new helper method for each combination of default parameter expressions
`protected void` | `addDefaultParameters(Verifier.DefaultArgsAction action, MethodNode method)`
`protected void` | `addFieldInitialization(List list, List staticList, FieldNode fieldNode, boolean isEnumClassNode, List initStmtsAfterEnumValuesInit, Set explicitStaticPropsInEnum)`
`protected void` | `addGroovyObjectInterfaceAndMethods(ClassNode node, String classInternalName)`
`protected void` | `addInitialization(ClassNode node)`
`protected void` | `addInitialization(ClassNode node, ConstructorNode constructorNode)`
`protected void` | `addMethod(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)` Helper method to add a new method to a ClassNode.
`protected void` | `addPropertyMethod(MethodNode method)`
`protected void` | `addReturnIfNeeded(MethodNode node)`
`protected void` | `addTimeStamp(ClassNode node)`
`static String` | `capitalize(String name)` Capitalizes the start of the given bean property name
`protected Statement` | `createGetterBlock(PropertyNode propertyNode, FieldNode field)`
`protected Statement` | `createSetterBlock(PropertyNode propertyNode, FieldNode field)`
`ClassNode` | `getClassNode()`
`MethodNode` | `getMethodNode()`
`static long` | `getTimestamp(Class clazz)`
`void` | `visitClass(ClassNode node)` add code to implement GroovyObject
`void` | `visitConstructor(ConstructorNode node)`
`void` | `visitField(FieldNode node)`
`void` | `visitGenericType(GenericsType genericsType)`
`void` | `visitMethod(MethodNode node)`
`void` | `visitProperty(PropertyNode node)`

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### SWAP_INIT

    public static final String SWAP_INIT

### __TIMESTAMP

    public static final String __TIMESTAMP

### __TIMESTAMP__

    public static final String __TIMESTAMP__

Method Detail

### addClosureCode

    protected void addClosureCode(InnerClassNode node)

### addConstructor

    protected void addConstructor(Parameter[] newParams, ConstructorNode ctor, Statement code, ClassNode node)

### addCovariantMethods

    protected void addCovariantMethods(ClassNode classNode)

### addDefaultParameterConstructors

    protected void addDefaultParameterConstructors(ClassNode node)

### addDefaultParameterMethods

    protected void addDefaultParameterMethods(ClassNode node)

  Creates a new helper method for each combination of default parameter expressions

### addDefaultParameters

    protected void addDefaultParameters(List methods, Verifier.DefaultArgsAction action)

  Creates a new helper method for each combination of default parameter expressions

### addDefaultParameters

    protected void addDefaultParameters(Verifier.DefaultArgsAction action, MethodNode method)

### addFieldInitialization

    protected void addFieldInitialization(List list, List staticList, FieldNode fieldNode, boolean isEnumClassNode, List initStmtsAfterEnumValuesInit, Set explicitStaticPropsInEnum)

### addGroovyObjectInterfaceAndMethods

    protected void addGroovyObjectInterfaceAndMethods(ClassNode node, String classInternalName)

### addInitialization

    protected void addInitialization(ClassNode node)

### addInitialization

    protected void addInitialization(ClassNode node, ConstructorNode constructorNode)

### addMethod

    protected void addMethod(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)

  Helper method to add a new method to a ClassNode. Depending on the shouldBeSynthetic flag the call will either be made to ClassNode.addSyntheticMethod() or ClassNode.addMethod(). If a non-synthetic method is to be added the ACC_SYNTHETIC modifier is removed if it has been accidentally supplied.

### addPropertyMethod

    protected void addPropertyMethod(MethodNode method)

### addReturnIfNeeded

    protected void addReturnIfNeeded(MethodNode node)

### addTimeStamp

    protected void addTimeStamp(ClassNode node)

### capitalize

    public static String capitalize(String name)

  Capitalizes the start of the given bean property name

### createGetterBlock

    protected Statement createGetterBlock(PropertyNode propertyNode, FieldNode field)

### createSetterBlock

    protected Statement createSetterBlock(PropertyNode propertyNode, FieldNode field)

### getClassNode

    public ClassNode getClassNode()

### getMethodNode

    public MethodNode getMethodNode()

### getTimestamp

    public static long getTimestamp(Class clazz)

### visitClass

    public void visitClass(ClassNode node)

  add code to implement GroovyObject
  Parameters:
    node

### visitConstructor

    public void visitConstructor(ConstructorNode node)

### visitField

    public void visitField(FieldNode node)

### visitGenericType

    public void visitGenericType(GenericsType genericsType)

### visitMethod

    public void visitMethod(MethodNode node)

### visitProperty

    public void visitProperty(PropertyNode node)

Copyright © 2003-2010 The Codehaus. All rights reserved.