org.apache.bval.jsr303
Class ElementDescriptorImpl

java.lang.Object
  extended by org.apache.bval.jsr303.ElementDescriptorImpl
All Implemented Interfaces:
ElementDescriptor
Direct Known Subclasses:
BeanDescriptorImpl, ConstructorDescriptorImpl, MethodDescriptorImpl, ParameterDescriptorImpl, PropertyDescriptorImpl

public abstract class ElementDescriptorImpl
extends Object
implements ElementDescriptor

Description: MetaData class


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
 
Field Summary
protected  Class<?> elementClass
          the raw type of this element
protected  MetaBean metaBean
          the MetaBean of this element
 
Constructor Summary
protected ElementDescriptorImpl(Class<?> elementClass, Validation[] validations)
          Create a new ElementDescriptorImpl instance.
protected ElementDescriptorImpl(MetaBean metaBean, Class<?> elementClass, Validation[] validations)
          Create a new ElementDescriptorImpl instance.
 
Method Summary
 ElementDescriptor.ConstraintFinder findConstraints()
          
 Set<ConstraintDescriptor<?>> getConstraintDescriptors()
          
protected static Set<ConstraintDescriptor<?>> getConstraintDescriptors(Validation[] validations)
          Get a set of ConstraintDescriptors from the specified array of Validations.
 Class<?> getElementClass()
          
 MetaBean getMetaBean()
          Get the model MetaBean used.
protected  Set<ConstraintDescriptor<?>> getMutableConstraintDescriptors()
          Get the mutable ConstraintDescriptor Set.
 boolean hasConstraints()
           return true if at least one constraint declaration is present on the element.
 void setConstraintDescriptors(Set<ConstraintDescriptor<?>> constraintDescriptors)
          Set the constraintDescriptors for this element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaBean

protected final MetaBean metaBean
the MetaBean of this element


elementClass

protected final Class<?> elementClass
the raw type of this element

Constructor Detail

ElementDescriptorImpl

protected ElementDescriptorImpl(MetaBean metaBean,
                                Class<?> elementClass,
                                Validation[] validations)
Create a new ElementDescriptorImpl instance.

Parameters:
metaBean -
elementClass -
validations -

ElementDescriptorImpl

protected ElementDescriptorImpl(Class<?> elementClass,
                                Validation[] validations)
Create a new ElementDescriptorImpl instance.

Parameters:
elementClass -
validations -
Method Detail

getConstraintDescriptors

protected static Set<ConstraintDescriptor<?>> getConstraintDescriptors(Validation[] validations)
Get a set of ConstraintDescriptors from the specified array of Validations.

Parameters:
validations -
Returns:
ConstraintDescriptor set

getElementClass

public Class<?> getElementClass()

Specified by:
getElementClass in interface ElementDescriptor
Returns:
Statically defined returned type.

findConstraints

public ElementDescriptor.ConstraintFinder findConstraints()

Specified by:
findConstraints in interface ElementDescriptor

getConstraintDescriptors

public Set<ConstraintDescriptor<?>> getConstraintDescriptors()

Specified by:
getConstraintDescriptors in interface ElementDescriptor

getMutableConstraintDescriptors

protected Set<ConstraintDescriptor<?>> getMutableConstraintDescriptors()
Get the mutable ConstraintDescriptor Set.

Returns:
Set of ConstraintDescriptor

hasConstraints

public boolean hasConstraints()
return true if at least one constraint declaration is present on the element.

Specified by:
hasConstraints in interface ElementDescriptor

setConstraintDescriptors

public void setConstraintDescriptors(Set<ConstraintDescriptor<?>> constraintDescriptors)
Set the constraintDescriptors for this element.

Parameters:
constraintDescriptors - to set

getMetaBean

public MetaBean getMetaBean()
Get the model MetaBean used.

Returns:
MetaBean


Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.