|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl<T>
public final class BeanMetaDataImpl<T>
This class encapsulates all meta data needed for validation. Implementations of Validator interface can
instantiate an instance of this class and delegate the metadata extraction to it.
| Nested Class Summary | |
|---|---|
static class |
BeanMetaDataImpl.BeanMetaDataBuilder<T>
|
| Constructor Summary | |
|---|---|
BeanMetaDataImpl(Class<T> beanClass,
List<Class<?>> defaultGroupSequence,
DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider,
Set<ConstraintMetaData> constraintMetaData)
Creates a new BeanMetaDataImpl |
|
| Method Summary | |
|---|---|
boolean |
defaultGroupSequenceIsRedefined()
|
Set<MethodMetaData> |
getAllMethodMetaData()
Returns the constraint-related meta data for all the methods of the type represented by this bean meta data. |
Set<PropertyMetaData> |
getAllPropertyMetaData()
|
Class<T> |
getBeanClass()
|
javax.validation.metadata.BeanDescriptor |
getBeanDescriptor()
|
Set<Member> |
getCascadedMembers()
|
List<Class<?>> |
getClassHierarchy()
|
List<Class<?>> |
getDefaultGroupSequence(T beanState)
Get the composition of the default group sequence. |
Set<MetaConstraint<?>> |
getDirectMetaConstraints()
|
Set<MetaConstraint<?>> |
getMetaConstraints()
|
MethodMetaData |
getMetaDataFor(Method method)
Returns the constraint-related meta data for the given method of the class represented by this bean meta data. |
PropertyMetaData |
getMetaDataFor(String propertyName)
Return PropertyDescriptor for the given property. |
TypeDescriptor |
getTypeDescriptor()
|
boolean |
isPropertyPresent(String name)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BeanMetaDataImpl(Class<T> beanClass,
List<Class<?>> defaultGroupSequence,
DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider,
Set<ConstraintMetaData> constraintMetaData)
BeanMetaDataImpl
beanClass - The Java type represented by this meta data object.defaultGroupSequence - The default group sequence.defaultGroupSequenceProvider - The default group sequence provider if set.constraintMetaData - All constraint meta data relating to the represented type.| Method Detail |
|---|
public Class<T> getBeanClass()
getBeanClass in interface BeanMetaData<T>public javax.validation.metadata.BeanDescriptor getBeanDescriptor()
getBeanDescriptor in interface BeanMetaData<T>ElementDescriptor describing the bean this meta data applies for.public TypeDescriptor getTypeDescriptor()
getTypeDescriptor in interface BeanMetaData<T>TypeDescriptor describing the bean this meta data applies for.public Set<Member> getCascadedMembers()
getCascadedMembers in interface BeanMetaData<T>public Set<MetaConstraint<?>> getMetaConstraints()
getMetaConstraints in interface BeanMetaData<T>MetaConstraint instances encapsulating the information of all the constraints
defined on the bean. This collection includes constraints from super classes as wellpublic Set<MetaConstraint<?>> getDirectMetaConstraints()
getDirectMetaConstraints in interface BeanMetaData<T>MetaConstraint instances encapsulating the information of all the constraints
defined on the bean directly (including constraints defined on implemented interfaces). It does not
contain constraints from super classes or interfaces implemented by super classespublic MethodMetaData getMetaDataFor(Method method)
BeanMetaData
getMetaDataFor in interface BeanMetaData<T>method - The method of interest.
public Set<MethodMetaData> getAllMethodMetaData()
BeanMetaData
getAllMethodMetaData in interface BeanMetaData<T>public PropertyMetaData getMetaDataFor(String propertyName)
BeanMetaDataPropertyDescriptor for the given property.
getMetaDataFor in interface BeanMetaData<T>propertyName - the name of the property for which to retrieve the descriptor.
PropertyDescriptor for the given property or null in case the
property does not have a descriptor.public boolean isPropertyPresent(String name)
isPropertyPresent in interface BeanMetaData<T>name - The name of the property
public List<Class<?>> getDefaultGroupSequence(T beanState)
BeanMetaDataIf the bean state is given in parameter and the bean metadata has a default group sequence provider then the dynamic default group sequence composition is returned. In the other cases the default group sequence redefinition specified by BV is used.
getDefaultGroupSequence in interface BeanMetaData<T>beanState - the bean state.
public boolean defaultGroupSequenceIsRedefined()
defaultGroupSequenceIsRedefined in interface BeanMetaData<T>true if the entity redefines the default group sequence, false otherwise.public Set<PropertyMetaData> getAllPropertyMetaData()
getAllPropertyMetaData in interface BeanMetaData<T>public List<Class<?>> getClassHierarchy()
getClassHierarchy in interface BeanMetaData<T>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||