Package grails.validation
Class DefaultASTValidateableHelper
- java.lang.Object
-
- grails.validation.DefaultASTValidateableHelper
-
- All Implemented Interfaces:
ASTValidateableHelper
public class DefaultASTValidateableHelper extends java.lang.Object implements ASTValidateableHelper
-
-
Constructor Summary
Constructors Constructor Description DefaultASTValidateableHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddConstraintsField(org.codehaus.groovy.ast.ClassNode classNode)protected voidaddGetConstraintsMethod(org.codehaus.groovy.ast.ClassNode classNode, boolean defaultNullable)protected voidaddValidateMethod(org.codehaus.groovy.ast.ClassNode classNode)protected java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode>getPropertiesToEnsureConstraintsFor(org.codehaus.groovy.ast.ClassNode classNode)Retrieves a Map describing all of the properties which need to be constrained for the class represented by classNode.voidinjectValidateableCode(org.codehaus.groovy.ast.ClassNode classNode, boolean defaultNullable)
-
-
-
Method Detail
-
injectValidateableCode
public void injectValidateableCode(org.codehaus.groovy.ast.ClassNode classNode, boolean defaultNullable)- Specified by:
injectValidateableCodein interfaceASTValidateableHelper
-
addConstraintsField
protected void addConstraintsField(org.codehaus.groovy.ast.ClassNode classNode)
-
addGetConstraintsMethod
protected void addGetConstraintsMethod(org.codehaus.groovy.ast.ClassNode classNode, boolean defaultNullable)
-
getPropertiesToEnsureConstraintsFor
protected java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> getPropertiesToEnsureConstraintsFor(org.codehaus.groovy.ast.ClassNode classNode)
Retrieves a Map describing all of the properties which need to be constrained for the class represented by classNode. The keys in the Map will be property names and the values are the type of the corresponding property.- Parameters:
classNode- the class to inspect- Returns:
- a Map describing all of the properties which need to be constrained
-
addValidateMethod
protected void addValidateMethod(org.codehaus.groovy.ast.ClassNode classNode)
-
-