org.hibernate.validator.metadata
Class ParameterMetaData

java.lang.Object
  extended by org.hibernate.validator.metadata.ParameterMetaData
All Implemented Interfaces:
java.lang.Iterable<MethodMetaConstraint<?>>

public class ParameterMetaData
extends java.lang.Object
implements java.lang.Iterable<MethodMetaConstraint<?>>

Contains constraint-related meta-data for one method parameter.

Author:
Gunnar Morling

Constructor Summary
ParameterMetaData(int index, java.lang.Class<?> type, java.lang.String name, java.util.List<MethodMetaConstraint<?>> constraints, boolean isCascading)
           
 
Method Summary
 int getIndex()
           
 java.lang.String getParameterName()
           
 java.lang.Class<?> getType()
           
 boolean isCascading()
           
 boolean isConstrained()
          Whether this parameter is constrained or not.
 java.util.Iterator<MethodMetaConstraint<?>> iterator()
           
 ParameterMetaData merge(ParameterMetaData otherMetaData)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterMetaData

public ParameterMetaData(int index,
                         java.lang.Class<?> type,
                         java.lang.String name,
                         java.util.List<MethodMetaConstraint<?>> constraints,
                         boolean isCascading)
Method Detail

getType

public java.lang.Class<?> getType()

getIndex

public int getIndex()

getParameterName

public java.lang.String getParameterName()

isCascading

public boolean isCascading()

isConstrained

public boolean isConstrained()
Whether this parameter is constrained or not. This is the case, if this parameter has at least one constraint or a cascaded validation shall be performed for it.

Returns:
True, if this parameter is constrained, false otherwise.

iterator

public java.util.Iterator<MethodMetaConstraint<?>> iterator()
Specified by:
iterator in interface java.lang.Iterable<MethodMetaConstraint<?>>

merge

public ParameterMetaData merge(ParameterMetaData otherMetaData)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Oracle Corporation. All Rights Reserved.