|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bval.jsr303.Jsr303MetaBeanFactory
public class Jsr303MetaBeanFactory
Description: process the class annotations for JSR303 constraint validations
to build the MetaBean with information from annotations and JSR303 constraint
mappings (defined in xml)
| Field Summary | |
|---|---|
static String |
ANNOTATION_GROUPS
|
static String |
ANNOTATION_MESSAGE
|
static String |
ANNOTATION_PAYLOAD
|
protected static String |
ANNOTATION_VALUE
Constant for the "value" annotation attribute specified in JSR303 |
protected ApacheFactoryContext |
factoryContext
ApacheFactoryContext used |
protected static org.slf4j.Logger |
log
Shared log instance |
| Constructor Summary | |
|---|---|
Jsr303MetaBeanFactory(ApacheFactoryContext factoryContext)
Create a new Jsr303MetaBeanFactory instance. |
|
| Method Summary | ||
|---|---|---|
protected
|
applyConstraint(A annotation,
Class<? extends ConstraintValidator<A,?>>[] constraintClasses,
MetaProperty prop,
Class<?> owner,
AccessStrategy access,
AppendValidation appender)
Apply a constraint to the specified appender. |
|
void |
buildMetaBean(MetaBean metabean)
Add the validation features to the metabean that come from JSR303 annotations in the beanClass. |
|
protected
|
findConstraintValidatorClasses(A annotation,
Constraint vcAnno)
Find available ConstraintValidation classes for a given constraint annotation. |
|
protected boolean |
hasValidationConstraintsDefined(Method method)
Learn whether a given Method has validation constraints defined via JSR303 annotations. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger log
protected static final String ANNOTATION_VALUE
public static final String ANNOTATION_PAYLOAD
public static final String ANNOTATION_GROUPS
public static final String ANNOTATION_MESSAGE
protected final ApacheFactoryContext factoryContext
ApacheFactoryContext used
| Constructor Detail |
|---|
public Jsr303MetaBeanFactory(ApacheFactoryContext factoryContext)
factoryContext - | Method Detail |
|---|
public void buildMetaBean(MetaBean metabean)
buildMetaBean in interface MetaBeanFactoryprotected boolean hasValidationConstraintsDefined(Method method)
method -
true if constraints detected
protected <A extends Annotation> Class<? extends ConstraintValidator<A,?>>[] findConstraintValidatorClasses(A annotation,
Constraint vcAnno)
ConstraintValidation classes for a given constraint annotation.
annotation - vcAnno -
ConstraintValidation implementation class array
protected <A extends Annotation> boolean applyConstraint(A annotation,
Class<? extends ConstraintValidator<A,?>>[] constraintClasses,
MetaProperty prop,
Class<?> owner,
AccessStrategy access,
AppendValidation appender)
throws IllegalAccessException,
InvocationTargetException
appender.
annotation - constraint annotationconstraintClasses - known ConstraintValidator implementation classes for annotationprop - meta-propertyowner - typeaccess - strategyappender -
IllegalAccessException
InvocationTargetException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||