|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.classgen.Verifier
public class Verifier extends java.lang.Object
Verifies the AST node and adds any defaulted AST code before bytecode generation occurs.
Nested Class Summary | |
---|---|
interface |
Verifier.DefaultArgsAction
Creates a new helper method for each combination of default parameter expressions |
Field Summary | |
---|---|
static java.lang.String |
STATIC_METACLASS_BOOL
|
static java.lang.String |
SWAP_INIT
|
static java.lang.String |
__TIMESTAMP
|
static java.lang.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
|
addDefaultConstructor(ClassNode node)
|
protected void
|
addDefaultParameterConstructors(ClassNode node)
Creates a new helper method for each combination of default parameter expressions |
protected void
|
addDefaultParameterMethods(ClassNode node)
|
protected void
|
addDefaultParameters(java.util.List methods, Verifier.DefaultArgsAction action)
|
protected void
|
addDefaultParameters(Verifier.DefaultArgsAction action, MethodNode method)
|
protected void
|
addFieldInitialization(java.util.List list, java.util.List staticList, FieldNode fieldNode, boolean isEnumClassNode, java.util.List initStmtsAfterEnumValuesInit, java.util.Set explicitStaticPropsInEnum)
|
protected void
|
addGroovyObjectInterfaceAndMethods(ClassNode node, java.lang.String classInternalName)
|
protected void
|
addInitialization(ClassNode node)
|
protected void
|
addInitialization(ClassNode node, ConstructorNode constructorNode)
|
protected void
|
addMethod(ClassNode node, boolean shouldBeSynthetic, java.lang.String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)
the code is: if (this.metaClass==null) { this.metaClass = this. |
protected void
|
addPropertyMethod(MethodNode method)
|
protected void
|
addReturnIfNeeded(MethodNode node)
|
protected void
|
addTimeStamp(ClassNode node)
|
static java.lang.String
|
capitalize(java.lang.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(java.lang.Class clazz)
|
static ConstantExpression
|
transformToPrimitiveConstantIfPossible(ConstantExpression constantExpression)
|
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 java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), 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() |
Field Detail |
---|
public static final java.lang.String STATIC_METACLASS_BOOL
public static final java.lang.String SWAP_INIT
public static final java.lang.String __TIMESTAMP
public static final java.lang.String __TIMESTAMP__
Method Detail |
---|
protected void addClosureCode(InnerClassNode node)
protected void addConstructor(Parameter[] newParams, ConstructorNode ctor, Statement code, ClassNode node)
protected void addCovariantMethods(ClassNode classNode)
protected void addDefaultConstructor(ClassNode node)
protected void addDefaultParameterConstructors(ClassNode node)
protected void addDefaultParameterMethods(ClassNode node)
protected void addDefaultParameters(java.util.List methods, Verifier.DefaultArgsAction action)
protected void addDefaultParameters(Verifier.DefaultArgsAction action, MethodNode method)
protected void addFieldInitialization(java.util.List list, java.util.List staticList, FieldNode fieldNode, boolean isEnumClassNode, java.util.List initStmtsAfterEnumValuesInit, java.util.Set explicitStaticPropsInEnum)
protected void addGroovyObjectInterfaceAndMethods(ClassNode node, java.lang.String classInternalName)
protected void addInitialization(ClassNode node)
protected void addInitialization(ClassNode node, ConstructorNode constructorNode)
protected void addMethod(ClassNode node, boolean shouldBeSynthetic, java.lang.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)
public static java.lang.String capitalize(java.lang.String name)
protected Statement createGetterBlock(PropertyNode propertyNode, FieldNode field)
protected Statement createSetterBlock(PropertyNode propertyNode, FieldNode field)
public ClassNode getClassNode()
public MethodNode getMethodNode()
public static long getTimestamp(java.lang.Class clazz)
public static ConstantExpression transformToPrimitiveConstantIfPossible(ConstantExpression constantExpression)
public void visitClass(ClassNode node)
public void visitConstructor(ConstructorNode node)
public void visitField(FieldNode node)
public void visitGenericType(GenericsType genericsType)
public void visitMethod(MethodNode node)
public void visitProperty(PropertyNode node)
Groovy Documentation