org.apache.bval.jsr303.extensions
Class MethodBeanDescriptorImpl

java.lang.Object
  extended by org.apache.bval.jsr303.ElementDescriptorImpl
      extended by org.apache.bval.jsr303.BeanDescriptorImpl
          extended by org.apache.bval.jsr303.extensions.MethodBeanDescriptorImpl
All Implemented Interfaces:
BeanDescriptor, ElementDescriptor, MethodBeanDescriptor

 class MethodBeanDescriptorImpl
extends BeanDescriptorImpl
implements MethodBeanDescriptor

Description: MethodBeanDescriptor implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
 
Field Summary
 
Fields inherited from class org.apache.bval.jsr303.BeanDescriptorImpl
factoryContext
 
Fields inherited from class org.apache.bval.jsr303.ElementDescriptorImpl
elementClass, metaBean
 
Constructor Summary
protected MethodBeanDescriptorImpl(ApacheFactoryContext factoryContext, MetaBean metaBean)
          Create a new MethodBeanDescriptorImpl instance.
 
Method Summary
 Set<ConstructorDescriptor> getConstrainedConstructors()
          Get the set of constrained constructors.
 Set<MethodDescriptor> getConstrainedMethods()
          Get the set of constrained methods.
 ConstructorDescriptor getConstraintsForConstructor(Constructor<?> constructor)
          Get the constraints that apply to a particular constructor.
 MethodDescriptor getConstraintsForMethod(Method method)
          Get the constraints that apply to a particular method.
 Map<Constructor<?>,ConstructorDescriptor> getConstructorConstraints()
          Get the configured constructor constraints.
 Map<Method,MethodDescriptor> getMethodConstraints()
          Get the configured method constraints.
 void putConstructorDescriptor(Constructor<?> cons, ConstructorDescriptor desc)
          Add a ConstructorDescriptor to this MethodBeanDescriptorImpl.
 void putMethodDescriptor(Method method, MethodDescriptor desc)
          Add a MethodDescriptor to this MethodBeanDescriptorImpl.
 void setConstructorConstraints(Map<Constructor<?>,ConstructorDescriptor> constructorConstraints)
          Set the map of constructor constraints for this bean.
 void setMethodConstraints(Map<Method,MethodDescriptor> methodConstraints)
          Set the map of method constraints for this bean.
 
Methods inherited from class org.apache.bval.jsr303.BeanDescriptorImpl
getConstrainedProperties, getConstraintsForProperty, isBeanConstrained, toString
 
Methods inherited from class org.apache.bval.jsr303.ElementDescriptorImpl
findConstraints, getConstraintDescriptors, getConstraintDescriptors, getElementClass, getMetaBean, getMutableConstraintDescriptors, hasConstraints, setConstraintDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.validation.metadata.BeanDescriptor
getConstrainedProperties, getConstraintsForProperty, isBeanConstrained
 
Methods inherited from interface javax.validation.metadata.ElementDescriptor
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
 

Constructor Detail

MethodBeanDescriptorImpl

protected MethodBeanDescriptorImpl(ApacheFactoryContext factoryContext,
                                   MetaBean metaBean)
Create a new MethodBeanDescriptorImpl instance.

Parameters:
factoryContext -
metaBean -
Method Detail

setMethodConstraints

public void setMethodConstraints(Map<Method,MethodDescriptor> methodConstraints)
Set the map of method constraints for this bean.

Parameters:
methodConstraints -

setConstructorConstraints

public void setConstructorConstraints(Map<Constructor<?>,ConstructorDescriptor> constructorConstraints)
Set the map of constructor constraints for this bean.

Parameters:
constructorConstraints -

getConstraintsForMethod

public MethodDescriptor getConstraintsForMethod(Method method)
Get the constraints that apply to a particular method.

Specified by:
getConstraintsForMethod in interface MethodBeanDescriptor
Returns:
MethodDescriptor

getConstraintsForConstructor

public ConstructorDescriptor getConstraintsForConstructor(Constructor<?> constructor)
Get the constraints that apply to a particular constructor.

Specified by:
getConstraintsForConstructor in interface MethodBeanDescriptor
Returns:
ConstructorDescriptor

getConstrainedMethods

public Set<MethodDescriptor> getConstrainedMethods()
Get the set of constrained methods.

Specified by:
getConstrainedMethods in interface MethodBeanDescriptor
Returns:
Set of MethodDescriptor

putMethodDescriptor

public void putMethodDescriptor(Method method,
                                MethodDescriptor desc)
Add a MethodDescriptor to this MethodBeanDescriptorImpl.

Parameters:
method -
desc -

getConstrainedConstructors

public Set<ConstructorDescriptor> getConstrainedConstructors()
Get the set of constrained constructors.

Specified by:
getConstrainedConstructors in interface MethodBeanDescriptor
Returns:
Set of ConstructorDescriptor

putConstructorDescriptor

public void putConstructorDescriptor(Constructor<?> cons,
                                     ConstructorDescriptor desc)
Add a ConstructorDescriptor to this MethodBeanDescriptorImpl.

Parameters:
cons -
desc -

getMethodConstraints

public Map<Method,MethodDescriptor> getMethodConstraints()
Get the configured method constraints.

Returns:
Map of Method : MethodDescriptor

getConstructorConstraints

public Map<Constructor<?>,ConstructorDescriptor> getConstructorConstraints()
Get the configured constructor constraints.

Returns:
Map of Constructor : ConstructorDescriptor


Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.