public class ConstrainedClass extends Object
A class to provide access to annotation based property constraints. ConstrainedClass supports constraints that are added to the read & write methods (getters & setters) of JavaBean properties. It does not support constraints added to either the field of the property or the method parameter of the setter.
Copyright 2010 (C) by Martin Ganserer
| Modifier and Type | Method and Description |
|---|---|
static ConstrainedClass |
getConstrainedClass(Class<?> theClass)
Returns the ConstrainedClass for the given Class.
|
Set<String> |
getConstrainedProperties() |
Set<Annotation> |
getConstraints(String propertyName)
Returns the immutable set of constraints for a given property.
|
static boolean |
isConstraint(Annotation annotation) |
public static ConstrainedClass getConstrainedClass(Class<?> theClass)
theClass - the class to be wrappedIllegalArgumentException - if theClass is nullpublic static boolean isConstraint(Annotation annotation)
annotation - the annotation to testIllegalArgumentException - if annotation is nullpublic Set<Annotation> getConstraints(String propertyName) throws IntrospectionException
propertyName - name of the propertyIntrospectionException - if there are problems accessing the propertyIllegalArgumentException - if propertyName is nullCopyright © 2015. All rights reserved.