public class Verifier extends Object
Verifies the AST node and adds any default AST code before bytecode generation occurs. Checks include:
| Modifiers | Name | Description | 
|---|---|---|
interface  | 
                            Verifier.DefaultArgsAction | 
                            
| Modifiers | Name | Description | 
|---|---|---|
static String  | 
                            DEFAULT_PARAMETER_GENERATED | 
                            |
static String  | 
                            INITIAL_EXPRESSION | 
                            |
static String  | 
                            STATIC_METACLASS_BOOL | 
                            |
static String  | 
                            SWAP_INIT | 
                            |
static String  | 
                            __TIMESTAMP | 
                            |
static String  | 
                            __TIMESTAMP__ | 
                            
| Type Params | Return Type | Name and description | 
|---|---|---|
 | 
                            protected void | 
                            addClosureCode(InnerClassNode node) | 
                        
 | 
                            protected void | 
                            addConstructor(Parameter[] newParams, ConstructorNode ctor, Statement code, ClassNode type) | 
                        
 | 
                            protected void | 
                            addCovariantMethods(ClassNode classNode) | 
                        
 | 
                            protected void | 
                            addDefaultConstructor(ClassNode node) | 
                        
 | 
                            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 MethodNode | 
                            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 | 
                            addMethod$$bridge(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code) | 
                        
 | 
                            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() | 
                        
 | 
                            protected VariableNotFinalCallback | 
                            getFinalVariablesCallback() | 
                        
 | 
                            MethodNode | 
                            getMethodNode() | 
                        
 | 
                            static long | 
                            getTimestamp(Class clazz) | 
                        
 | 
                            static Long | 
                            getTimestampFromFieldName(String fieldName) | 
                        
 | 
                            protected void | 
                            setClassNode(ClassNode classNode) | 
                        
 | 
                            static ConstantExpression | 
                            transformToPrimitiveConstantIfPossible(ConstantExpression constantExpression)When constant expressions are created, the value is always wrapped to a non primitive type.  | 
                        
 | 
                            void | 
                            visitClass(ClassNode node)walk the class  | 
                        
 | 
                            void | 
                            visitConstructor(ConstructorNode node) | 
                        
 | 
                            void | 
                            visitField(FieldNode node) | 
                        
 | 
                            void | 
                            visitGenericType(GenericsType genericsType) | 
                        
 | 
                            void | 
                            visitMethod(MethodNode node) | 
                        
 | 
                            void | 
                            visitProperty(PropertyNode node) | 
                        
Creates a new helper method for each combination of default parameter expressions
Creates a new helper method for each combination of default parameter expressions
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.
When constant expressions are created, the value is always wrapped to a non primitive type. Some constant expressions are optimized to return primitive types, but not all primitives are handled. This method guarantees to return a similar constant expression but with a primitive type instead of a boxed type.
Additionally, single char strings are converted to 'char' types.constantExpression -  a constant expressionwalk the class
node -  the node to visit