public class BeanDescriptorImpl extends ElementDescriptorImpl implements BeanDescriptor
BeanDescriptor
.ElementDescriptor.ConstraintFinder
elementClass, metaBean
Modifier | Constructor and Description |
---|---|
protected |
BeanDescriptorImpl(ApacheFactoryContext factoryContext,
MetaBean metaBean) |
Modifier and Type | Method and Description |
---|---|
Set<ConstructorDescriptor> |
getConstrainedConstructors() |
Set<MethodDescriptor> |
getConstrainedMethods(MethodType methodType,
MethodType... methodTypes) |
Set<PropertyDescriptor> |
getConstrainedProperties() |
ConstructorDescriptor |
getConstraintsForConstructor(Class<?>... parameterTypes) |
MethodDescriptor |
getConstraintsForMethod(String methodName,
Class<?>... parameterTypes) |
PropertyDescriptor |
getConstraintsForProperty(String propertyName)
Return the property level constraints for a given propertyName or
null if
either the property does not exist or has no constraint. |
MethodDescriptor |
getInternalConstraintsForMethod(String methodName,
Class<?>... parameterTypes) |
boolean |
isBeanConstrained()
Returns true if the bean involves validation:
a constraint is hosted on the bean itself
a constraint is hosted on one of the bean properties, OR
a bean property is marked for cascade (
@Valid )
|
String |
toString() |
addGroupConversion, addGroupMapping, findConstraints, getConstraintDescriptors, getConstraintDescriptors, getElementClass, getGroupConversions, getMetaBean, getMutableConstraintDescriptors, hasConstraints, isCascaded, isValidated, mapGroup, setCascaded, setConstraintDescriptors, setValidated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
protected BeanDescriptorImpl(ApacheFactoryContext factoryContext, MetaBean metaBean)
public boolean isBeanConstrained()
@Valid
)isBeanConstrained
in interface BeanDescriptor
public PropertyDescriptor getConstraintsForProperty(String propertyName)
null
if
either the property does not exist or has no constraint. The returned
object (and associated objects including ConstraintDescriptors) are
immutable.getConstraintsForProperty
in interface BeanDescriptor
propertyName
- property evaluatedpublic Set<PropertyDescriptor> getConstrainedProperties()
getConstrainedProperties
in interface BeanDescriptor
public MethodDescriptor getInternalConstraintsForMethod(String methodName, Class<?>... parameterTypes)
public MethodDescriptor getConstraintsForMethod(String methodName, Class<?>... parameterTypes)
getConstraintsForMethod
in interface BeanDescriptor
public Set<MethodDescriptor> getConstrainedMethods(MethodType methodType, MethodType... methodTypes)
getConstrainedMethods
in interface BeanDescriptor
public ConstructorDescriptor getConstraintsForConstructor(Class<?>... parameterTypes)
getConstraintsForConstructor
in interface BeanDescriptor
public Set<ConstructorDescriptor> getConstrainedConstructors()
getConstrainedConstructors
in interface BeanDescriptor
Copyright © 2010–2024 The Apache Software Foundation. All rights reserved.