org.apache.bval.jsr303.extensions
Class ParameterDescriptorImpl

java.lang.Object
  extended by org.apache.bval.jsr303.ElementDescriptorImpl
      extended by org.apache.bval.jsr303.extensions.ParameterDescriptorImpl
All Implemented Interfaces:
ElementDescriptor, ParameterDescriptor

public class ParameterDescriptorImpl
extends ElementDescriptorImpl
implements ParameterDescriptor

Description: ParameterDescriptor 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.ElementDescriptorImpl
elementClass, metaBean
 
Constructor Summary
ParameterDescriptorImpl(Class<?> elementClass, Validation[] validations)
          Create a new ParameterDescriptorImpl instance.
ParameterDescriptorImpl(MetaBean metaBean, Validation[] validations)
          Create a new ParameterDescriptorImpl instance.
 
Method Summary
 int getIndex()
          Get the index of the referenced parameter.
 boolean isCascaded()
          Is the parameter marked by the @Valid annotation.
 void setCascaded(boolean cascaded)
          Set whether the referenced parameter descriptor should be validated.
 void setIndex(int index)
          Set the index of the referenced parameter.
 
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, toString, wait, wait, wait
 
Methods inherited from interface javax.validation.metadata.ElementDescriptor
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
 

Constructor Detail

ParameterDescriptorImpl

public ParameterDescriptorImpl(MetaBean metaBean,
                               Validation[] validations)
Create a new ParameterDescriptorImpl instance.

Parameters:
metaBean -
validations -

ParameterDescriptorImpl

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

Parameters:
elementClass -
validations -
Method Detail

isCascaded

public boolean isCascaded()
Is the parameter marked by the @Valid annotation.

Specified by:
isCascaded in interface ParameterDescriptor
Returns:
true if the annotation is present, false otherwise.

setCascaded

public void setCascaded(boolean cascaded)
Set whether the referenced parameter descriptor should be validated.

Parameters:
cascaded -

getIndex

public int getIndex()
Get the index of the referenced parameter.

Specified by:
getIndex in interface ParameterDescriptor
Returns:
int

setIndex

public void setIndex(int index)
Set the index of the referenced parameter.

Parameters:
index -


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