public final class BeanMetaDataImpl<T> extends Object implements BeanMetaData<T>
Validator
interface can
instantiate an instance of this class and delegate the metadata extraction to it.Modifier and Type | Class and Description |
---|---|
static class |
BeanMetaDataImpl.BeanMetaDataBuilder<T> |
Constructor and Description |
---|
BeanMetaDataImpl(Class<T> beanClass,
List<Class<?>> defaultGroupSequence,
DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider,
Set<ConstraintMetaData> constraintMetaData)
Creates a new
BeanMetaDataImpl |
Modifier and Type | Method and Description |
---|---|
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() |
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() |
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.public Class<T> getBeanClass()
getBeanClass
in interface BeanMetaData<T>
public 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)
BeanMetaData
PropertyDescriptor
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 propertypublic List<Class<?>> getDefaultGroupSequence(T beanState)
BeanMetaData
If 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>
Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved