[libhibernate-validator-java] 01/03: import upstream version 4.3.1.Final

Miguel Landaeta nomadium at moszumanska.debian.org
Sun Feb 9 01:58:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

nomadium pushed a commit to branch 737436
in repository libhibernate-validator-java.

commit e7ed47a54339b67e7ec72c215b556003526fd631
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Sat Feb 8 21:30:07 2014 -0300

    import upstream version 4.3.1.Final
---
 README.md                                          |   76 +
 changelog.txt                                      |  640 +++++
 copyright.txt                                      |   22 +
 hibernate-validator-annotation-processor/pom.xml   |   82 -
 .../validator/ap/ConstraintAnnotationVisitor.java  |  224 --
 .../ap/ConstraintValidationProcessor.java          |  182 --
 .../ap/checks/AbstractConstraintCheck.java         |   67 -
 .../validator/ap/checks/AnnotationTypeCheck.java   |   60 -
 .../validator/ap/checks/ConstraintCheck.java       |   99 -
 .../validator/ap/checks/ConstraintCheckError.java  |  143 -
 .../ap/checks/ConstraintCheckFactory.java          |  150 -
 .../validator/ap/checks/ConstraintChecks.java      |   45 -
 .../hibernate/validator/ap/checks/GetterCheck.java |   67 -
 .../validator/ap/checks/MultiValuedChecks.java     |   67 -
 .../validator/ap/checks/PrimitiveCheck.java        |   69 -
 .../validator/ap/checks/SingleValuedChecks.java    |   92 -
 .../hibernate/validator/ap/checks/StaticCheck.java |   64 -
 .../hibernate/validator/ap/checks/TypeCheck.java   |   87 -
 .../validator/ap/util/AnnotationApiHelper.java     |  271 --
 .../validator/ap/util/CollectionHelper.java        |   50 -
 .../validator/ap/util/ConstraintHelper.java        |  646 -----
 .../validator/ap/util/MessagerAdapter.java         |  102 -
 .../ap/ValidationProcessorMessages.properties      |   13 -
 .../ap/ConstraintValidationProcessorTest.java      |  386 ---
 ...ieldLevelValidationUsingBuiltInConstraints.java |   71 -
 ...thodLevelValidationUsingBuiltInConstraints.java |   58 -
 .../testmodel/MultipleConstraintsOfSameType.java   |   35 -
 .../ValidationUsingAtValidAnnotation.java          |   91 -
 .../validator/ap/testmodel/boxing/ValidLong.java   |   41 -
 .../ap/testmodel/boxing/ValidLongValidator.java    |   30 -
 .../ap/testmodel/boxing/ValidationUsingBoxing.java |   72 -
 .../ClassLevelValidation.java                      |   31 -
 .../classlevelconstraints/ValidCustomer.java       |   39 -
 .../ValidCustomerValidator.java                    |   32 -
 ...ieldLevelValidationUsingComposedConstraint.java |   31 -
 .../composedconstraint/ValidOrderNumber.java       |   45 -
 .../composedconstraint2/ComposedConstraint.java    |   43 -
 .../composedconstraint2/ComposingConstraint1.java  |   45 -
 ...ngConstraint1ValidatorForGregorianCalendar.java |   32 -
 .../ComposingConstraint1ValidatorForList.java      |   32 -
 .../ComposingConstraint1ValidatorForString.java    |   38 -
 .../composedconstraint2/ComposingConstraint2.java  |   45 -
 .../ComposingConstraint2ValidatorForArrayList.java |   33 -
 .../ComposingConstraint2ValidatorForCalendar.java  |   38 -
 ...ComposingConstraint2ValidatorForCollection.java |   32 -
 ...elValidationUsingComplexComposedConstraint.java |   59 -
 .../ap/testmodel/customconstraints/CaseMode.java   |   23 -
 .../ap/testmodel/customconstraints/CheckCase.java  |   43 -
 .../customconstraints/CheckCaseValidator.java      |   42 -
 ...FieldLevelValidationUsingCustomConstraints.java |   33 -
 .../AbstractCustomConstraintValidator.java         |   24 -
 .../inheritedvalidator/CustomConstraint.java       |   43 -
 .../CustomConstraintValidator.java                 |   30 -
 ...ieldLevelValidationUsingInheritedValidator.java |   33 -
 .../ValidCustomerNumber.java                       |   36 -
 .../NoUniqueValidatorResolution.java               |   35 -
 .../SerializableCollection.java                    |   25 -
 .../nouniquevalidatorresolution/Size.java          |   43 -
 .../SizeValidatorForCollection.java                |   32 -
 .../SizeValidatorForSerializable.java              |   32 -
 .../SizeValidatorForSet.java                       |   32 -
 .../validator/ap/testutil/CompilerTestHelper.java  |  178 --
 .../validator/ap/util/DiagnosticExpectation.java   |   51 -
 hibernate-validator-archetype/pom.xml              |   74 -
 .../org/hibernate/validator/quickstart/Car.java    |  108 -
 .../hibernate/validator/quickstart/CarChecks.java  |   24 -
 .../org/hibernate/validator/quickstart/Driver.java |   48 -
 .../validator/quickstart/DriverChecks.java         |   24 -
 .../validator/quickstart/OrderedChecks.java        |   28 -
 .../org/hibernate/validator/quickstart/Person.java |   42 -
 .../hibernate/validator/quickstart/RentalCar.java  |   30 -
 .../validator/quickstart/BootstrapTest.java        |  106 -
 .../hibernate/validator/quickstart/CarTest.java    |  119 -
 .../hibernate/validator/quickstart/GroupTest.java  |  105 -
 hibernate-validator-legacy/changelog.txt           |   57 -
 hibernate-validator-legacy/lgpl.txt                |  504 ----
 hibernate-validator-legacy/license.txt             |  202 --
 hibernate-validator-legacy/pom.xml                 |  207 --
 hibernate-validator-legacy/readme.txt              |   48 -
 .../src/main/assembly/dist.xml                     |   68 -
 .../src/main/docbook/en-US/master.xml              |   92 -
 .../docbook/en-US/modules/checkconstraints.xml     |  235 --
 .../docbook/en-US/modules/defineconstraints.xml    |  494 ----
 .../hibernate/validator/AbstractLuhnValidator.java |   40 -
 .../java/org/hibernate/validator/AssertFalse.java  |   22 -
 .../hibernate/validator/AssertFalseValidator.java  |   26 -
 .../java/org/hibernate/validator/AssertTrue.java   |   22 -
 .../hibernate/validator/AssertTrueValidator.java   |   26 -
 .../org/hibernate/validator/ClassValidator.java    |  758 -----
 .../org/hibernate/validator/CreditCardNumber.java  |   23 -
 .../validator/CreditCardNumberValidator.java       |   19 -
 .../main/java/org/hibernate/validator/Digits.java  |   25 -
 .../org/hibernate/validator/DigitsValidator.java   |   84 -
 .../src/main/java/org/hibernate/validator/EAN.java |   23 -
 .../java/org/hibernate/validator/EANValidator.java |   41 -
 .../main/java/org/hibernate/validator/Email.java   |   22 -
 .../org/hibernate/validator/EmailValidator.java    |   39 -
 .../java/org/hibernate/validator/Environment.java  |   26 -
 .../main/java/org/hibernate/validator/Future.java  |   22 -
 .../org/hibernate/validator/FutureValidator.java   |   35 -
 .../hibernate/validator/InvalidStateException.java |   27 -
 .../java/org/hibernate/validator/InvalidValue.java |   68 -
 .../main/java/org/hibernate/validator/Length.java  |   26 -
 .../org/hibernate/validator/LengthValidator.java   |   36 -
 .../src/main/java/org/hibernate/validator/Max.java |   24 -
 .../java/org/hibernate/validator/MaxValidator.java |   58 -
 .../hibernate/validator/MessageInterpolator.java   |   17 -
 .../src/main/java/org/hibernate/validator/Min.java |   24 -
 .../java/org/hibernate/validator/MinValidator.java |   58 -
 .../java/org/hibernate/validator/NotEmpty.java     |   22 -
 .../org/hibernate/validator/NotEmptyValidator.java |   54 -
 .../main/java/org/hibernate/validator/NotNull.java |   22 -
 .../org/hibernate/validator/NotNullValidator.java  |   38 -
 .../main/java/org/hibernate/validator/Past.java    |   22 -
 .../org/hibernate/validator/PastValidator.java     |   48 -
 .../main/java/org/hibernate/validator/Pattern.java |   28 -
 .../org/hibernate/validator/PatternValidator.java  |   31 -
 .../java/org/hibernate/validator/Patterns.java     |   21 -
 .../validator/PersistentClassConstraint.java       |   20 -
 .../hibernate/validator/PropertyConstraint.java    |   16 -
 .../main/java/org/hibernate/validator/Range.java   |   27 -
 .../org/hibernate/validator/RangeValidator.java    |   57 -
 .../main/java/org/hibernate/validator/Size.java    |   26 -
 .../org/hibernate/validator/SizeValidator.java     |   41 -
 .../main/java/org/hibernate/validator/Valid.java   |   20 -
 .../java/org/hibernate/validator/Validator.java    |   23 -
 .../org/hibernate/validator/ValidatorClass.java    |   21 -
 .../main/java/org/hibernate/validator/Version.java |   22 -
 .../validator/event/JPAValidateListener.java       |   65 -
 .../validator/event/ValidateEventListener.java     |  207 --
 .../event/ValidatePreInsertEventListener.java      |   13 -
 .../event/ValidatePreUpdateEventListener.java      |   13 -
 .../interpolator/DefaultMessageInterpolator.java   |  135 -
 .../DefaultMessageInterpolatorAggregator.java      |   57 -
 .../src/main/javadoc/stylesheet.css                |  117 -
 .../resources/DefaultValidatorMessages.properties  |   16 -
 .../DefaultValidatorMessages_cs.properties         |   16 -
 .../DefaultValidatorMessages_da.properties         |   16 -
 .../DefaultValidatorMessages_de.properties         |   16 -
 .../DefaultValidatorMessages_en.properties         |   16 -
 .../DefaultValidatorMessages_es.properties         |   16 -
 .../DefaultValidatorMessages_fr.properties         |   16 -
 .../DefaultValidatorMessages_it.properties         |   16 -
 .../DefaultValidatorMessages_ja.properties         |   16 -
 .../DefaultValidatorMessages_mn_MN.properties      |   16 -
 .../DefaultValidatorMessages_nl.properties         |   16 -
 .../DefaultValidatorMessages_pt_BR.properties      |   16 -
 .../DefaultValidatorMessages_sv.properties         |   16 -
 .../DefaultValidatorMessages_zh_CN.properties      |   16 -
 .../DefaultValidatorMessages_zh_TW.properties      |   16 -
 .../java/org/hibernate/validator/test/Address.java |  102 -
 .../org/hibernate/validator/test/AssertTest.java   |   59 -
 .../hibernate/validator/test/BooleanHolder.java    |   32 -
 .../java/org/hibernate/validator/test/Brother.java |   61 -
 .../org/hibernate/validator/test/Building.java     |   32 -
 .../java/org/hibernate/validator/test/Contact.java |   30 -
 .../org/hibernate/validator/test/EmailTest.java    |   38 -
 .../java/org/hibernate/validator/test/Engine.java  |   34 -
 .../org/hibernate/validator/test/HANTestCase.java  |  161 --
 .../validator/test/InterpolationTest.java          |   36 -
 .../hibernate/validator/test/Serializability.java  |   22 -
 .../validator/test/SerializabilityValidator.java   |   21 -
 .../java/org/hibernate/validator/test/Site.java    |   43 -
 .../test/java/org/hibernate/validator/test/Tv.java |   26 -
 .../java/org/hibernate/validator/test/TvOwner.java |   16 -
 .../java/org/hibernate/validator/test/User.java    |   15 -
 .../hibernate/validator/test/ValidatorTest.java    |  276 --
 .../java/org/hibernate/validator/test/Vase.java    |   11 -
 .../validator/test/collections/Movie.java          |   12 -
 .../validator/test/collections/Presenter.java      |   12 -
 .../hibernate/validator/test/collections/Show.java |   12 -
 .../hibernate/validator/test/collections/Tv.java   |   28 -
 .../test/collections/ValidationCollectionTest.java |   59 -
 .../validator/test/haintegration/Address.java      |  108 -
 .../validator/test/haintegration/CreditCard.java   |   41 -
 .../test/haintegration/EmbeddedObjectTest.java     |   50 -
 .../HibernateAnnotationIntegrationTest.java        |  205 --
 .../validator/test/haintegration/MarsAddress.java  |   34 -
 .../validator/test/haintegration/Martian.java      |   32 -
 .../validator/test/haintegration/MartianPk.java    |   52 -
 .../validator/test/haintegration/Music.java        |   14 -
 .../NonHibernateAnnotationsIntegrationTest.java    |   52 -
 .../haintegration/PrefixMessageInterpolator.java   |   14 -
 .../validator/test/haintegration/Rock.java         |   15 -
 .../hibernate/validator/test/haintegration/Tv.java |   30 -
 .../validator/test/haintegration/TvOwner.java      |   22 -
 .../validator/test/haintegration/User.java         |   42 -
 .../validator/test/haintegration/Venusian.java     |   38 -
 .../validator/test/haintegration/VenusianPk.java   |   47 -
 .../validator/test/inheritance/Animal.java         |   19 -
 .../validator/test/inheritance/BoneEater.java      |   14 -
 .../hibernate/validator/test/inheritance/Dog.java  |   31 -
 .../validator/test/inheritance/Eater.java          |   14 -
 .../test/inheritance/InheritanceTest.java          |   21 -
 .../hibernate/validator/test/inheritance/Name.java |   14 -
 .../java/org/hibernate/validator/test/jpa/Cat.java |   48 -
 .../hibernate/validator/test/jpa/Commander.java    |   25 -
 .../validator/test/jpa/HEMAutoWireringTest.java    |   54 -
 .../hibernate/validator/test/jpa/JPATestCase.java  |  104 -
 .../test/jpa/JPAValidateListenerTest.java          |   84 -
 .../hibernate/validator/test/jpa/NoOpListener.java |   14 -
 .../hibernate/validator/test/jpa/Submarine.java    |   65 -
 .../hibernate/validator/test/valid/Address.java    |   17 -
 .../org/hibernate/validator/test/valid/Form.java   |   21 -
 .../org/hibernate/validator/test/valid/Member.java |   22 -
 .../hibernate/validator/test/valid/ValidTest.java  |   22 -
 .../hibernate/validator/test/validators/Car.java   |   30 -
 .../validator/test/validators/CreditCard.java      |   14 -
 .../validator/test/validators/DigitsTest.java      |   56 -
 .../validator/test/validators/LuhnTest.java        |   28 -
 .../validator/test/validators/NotEmptyTest.java    |   31 -
 .../test/resources/ValidatorMessages.properties    |    7 -
 .../test/resources/ValidatorMessages_da.properties |    7 -
 .../test/resources/ValidatorMessages_fr.properties |    7 -
 .../src/test/resources/hibernate.properties        |  472 ----
 .../src/test/resources/log4j.properties            |   44 -
 .../src/test/resources/messages_en.properties      |   15 -
 hibernate-validator-tck-runner/pom.xml             |  265 --
 .../META-INF/jboss-test-harness.properties         |    3 -
 .../src/test/resources/jndi.properties             |    4 -
 hibernate-validator/license.txt                    |  202 --
 hibernate-validator/pom.xml                        |  350 ---
 hibernate-validator/readme.txt                     |   71 -
 hibernate-validator/src/main/assembly/dist.xml     |  100 -
 hibernate-validator/src/main/docbook/en-US/hv.ent  |    5 -
 .../main/docbook/en-US/images/hibernate_logo_a.png |  Bin 31862 -> 0 bytes
 .../src/main/docbook/en-US/master.xml              |   79 -
 .../docbook/en-US/modules/annotationprocessor.xml  |  484 ----
 .../main/docbook/en-US/modules/bootstrapping.xml   |  388 ---
 .../docbook/en-US/modules/customconstraints.xml    |  600 ----
 .../main/docbook/en-US/modules/furtherreading.xml  |   48 -
 .../main/docbook/en-US/modules/gettingstarted.xml  |  306 --
 .../src/main/docbook/en-US/modules/integration.xml |  191 --
 .../src/main/docbook/en-US/modules/preface.xml     |   69 -
 .../main/docbook/en-US/modules/programmaticapi.xml |  121 -
 .../main/docbook/en-US/modules/usingvalidator.xml  | 1381 ---------
 .../docbook/en-US/modules/xmlconfiguration.xml     |  226 --
 .../hibernate/validator/HibernateValidator.java    |   49 -
 .../validator/HibernateValidatorConfiguration.java |   77 -
 .../org/hibernate/validator/cfg/CascadeDef.java    |   78 -
 .../org/hibernate/validator/cfg/ConstraintDef.java |  133 -
 .../validator/cfg/ConstraintDefWrapper.java        |   52 -
 .../hibernate/validator/cfg/ConstraintMapping.java |  143 -
 .../validator/cfg/ConstraintsForType.java          |  114 -
 .../validator/cfg/defs/AssertFalseDef.java         |   33 -
 .../validator/cfg/defs/AssertTrueDef.java          |   33 -
 .../validator/cfg/defs/CreditCardNumberDef.java    |   34 -
 .../validator/cfg/defs/DecimalMaxDef.java          |   56 -
 .../validator/cfg/defs/DecimalMinDef.java          |   55 -
 .../hibernate/validator/cfg/defs/DigitsDef.java    |   61 -
 .../org/hibernate/validator/cfg/defs/EmailDef.java |   34 -
 .../hibernate/validator/cfg/defs/FutureDef.java    |   33 -
 .../validator/cfg/defs/GenericConstraintDef.java   |   65 -
 .../hibernate/validator/cfg/defs/LengthDef.java    |   62 -
 .../org/hibernate/validator/cfg/defs/MaxDef.java   |   55 -
 .../org/hibernate/validator/cfg/defs/MinDef.java   |   55 -
 .../hibernate/validator/cfg/defs/NotBlankDef.java  |   33 -
 .../hibernate/validator/cfg/defs/NotEmptyDef.java  |   33 -
 .../hibernate/validator/cfg/defs/NotNullDef.java   |   33 -
 .../org/hibernate/validator/cfg/defs/NullDef.java  |   33 -
 .../org/hibernate/validator/cfg/defs/PastDef.java  |   33 -
 .../hibernate/validator/cfg/defs/PatternDef.java   |   61 -
 .../org/hibernate/validator/cfg/defs/RangeDef.java |   60 -
 .../validator/cfg/defs/ScriptAssertDef.java        |   65 -
 .../org/hibernate/validator/cfg/defs/SizeDef.java  |   63 -
 .../org/hibernate/validator/cfg/defs/URLDef.java   |   64 -
 .../org/hibernate/validator/cfg/defs/package.html  |   24 -
 .../java/org/hibernate/validator/cfg/package.html  |   26 -
 .../validator/constraints/CreditCardNumber.java    |   63 -
 .../org/hibernate/validator/constraints/Email.java |   61 -
 .../hibernate/validator/constraints/Length.java    |   65 -
 .../hibernate/validator/constraints/NotBlank.java  |   66 -
 .../hibernate/validator/constraints/NotEmpty.java  |   65 -
 .../org/hibernate/validator/constraints/Range.java |   70 -
 .../validator/constraints/ScriptAssert.java        |  136 -
 .../org/hibernate/validator/constraints/URL.java   |   66 -
 .../constraints/impl/AssertFalseValidator.java     |   39 -
 .../constraints/impl/AssertTrueValidator.java      |   39 -
 .../impl/CreditCardNumberValidator.java            |   31 -
 .../impl/DecimalMaxValidatorForNumber.java         |   63 -
 .../impl/DecimalMaxValidatorForString.java         |   58 -
 .../impl/DecimalMinValidatorForNumber.java         |   64 -
 .../impl/DecimalMinValidatorForString.java         |   55 -
 .../constraints/impl/DigitsValidatorForNumber.java |   71 -
 .../constraints/impl/DigitsValidatorForString.java |   80 -
 .../validator/constraints/impl/EmailValidator.java |   49 -
 .../impl/FutureValidatorForCalendar.java           |   43 -
 .../constraints/impl/FutureValidatorForDate.java   |   43 -
 .../constraints/impl/LengthValidator.java          |   60 -
 .../validator/constraints/impl/LuhnValidator.java  |   63 -
 .../constraints/impl/MaxValidatorForNumber.java    |   57 -
 .../constraints/impl/MaxValidatorForString.java    |   51 -
 .../constraints/impl/MinValidatorForNumber.java    |   57 -
 .../constraints/impl/MinValidatorForString.java    |   51 -
 .../constraints/impl/NotBlankValidator.java        |   52 -
 .../constraints/impl/NotNullValidator.java         |   37 -
 .../validator/constraints/impl/NullValidator.java  |   38 -
 .../constraints/impl/PastValidatorForCalendar.java |   43 -
 .../constraints/impl/PastValidatorForDate.java     |   43 -
 .../constraints/impl/PatternValidator.java         |   55 -
 .../constraints/impl/ScriptAssertValidator.java    |   69 -
 .../constraints/impl/SizeValidatorForArray.java    |   69 -
 .../impl/SizeValidatorForArraysOfBoolean.java      |   48 -
 .../impl/SizeValidatorForArraysOfByte.java         |   48 -
 .../impl/SizeValidatorForArraysOfChar.java         |   48 -
 .../impl/SizeValidatorForArraysOfDouble.java       |   48 -
 .../impl/SizeValidatorForArraysOfFloat.java        |   48 -
 .../impl/SizeValidatorForArraysOfInt.java          |   48 -
 .../impl/SizeValidatorForArraysOfLong.java         |   48 -
 .../impl/SizeValidatorForArraysOfPrimitives.java   |   48 -
 .../impl/SizeValidatorForArraysOfShort.java        |   48 -
 .../impl/SizeValidatorForCollection.java           |   69 -
 .../constraints/impl/SizeValidatorForMap.java      |   69 -
 .../constraints/impl/SizeValidatorForString.java   |   69 -
 .../validator/constraints/impl/URLValidator.java   |   69 -
 .../validator/constraints/impl/package.html        |   26 -
 .../impl/scriptassert/ScriptEvaluator.java         |  108 -
 .../impl/scriptassert/ScriptEvaluatorFactory.java  |  105 -
 .../constraints/impl/scriptassert/package.html     |   26 -
 .../hibernate/validator/constraints/package.html   |   27 -
 .../validator/engine/ConfigurationImpl.java        |  296 --
 .../hibernate/validator/engine/ConstraintTree.java |  357 ---
 .../engine/ConstraintValidatorContextImpl.java     |  198 --
 .../engine/ConstraintValidatorFactoryImpl.java     |   36 -
 .../validator/engine/ConstraintViolationImpl.java  |  144 -
 .../hibernate/validator/engine/MessageAndPath.java |   41 -
 .../engine/MessageInterpolatorContext.java         |   83 -
 .../org/hibernate/validator/engine/NodeImpl.java   |  130 -
 .../org/hibernate/validator/engine/PathImpl.java   |  222 --
 .../validator/engine/ValidationContext.java        |  266 --
 .../validator/engine/ValidatorContextImpl.java     |   97 -
 .../validator/engine/ValidatorFactoryImpl.java     |  327 ---
 .../hibernate/validator/engine/ValidatorImpl.java  |  810 ------
 .../hibernate/validator/engine/ValueContext.java   |  136 -
 .../hibernate/validator/engine/groups/Group.java   |   85 -
 .../validator/engine/groups/GroupChain.java        |  123 -
 .../engine/groups/GroupChainGenerator.java         |  167 --
 .../hibernate/validator/engine/groups/package.html |   26 -
 .../org/hibernate/validator/engine/package.html    |   26 -
 .../resolver/DefaultTraversableResolver.java       |  104 -
 .../engine/resolver/JPATraversableResolver.java    |   69 -
 .../SingleThreadCachedTraversableResolver.java     |  162 --
 .../validator/engine/resolver/package.html         |   26 -
 .../ResourceBundleMessageInterpolator.java         |  288 --
 .../validator/messageinterpolation/package.html    |   27 -
 .../validator/metadata/AnnotationIgnores.java      |  125 -
 .../validator/metadata/BeanDescriptorImpl.java     |   48 -
 .../hibernate/validator/metadata/BeanMetaData.java |   93 -
 .../validator/metadata/BeanMetaDataCache.java      |   48 -
 .../validator/metadata/BeanMetaDataImpl.java       |  534 ----
 .../metadata/ConstraintDescriptorImpl.java         |  494 ----
 .../validator/metadata/ConstraintHelper.java       |  380 ---
 .../validator/metadata/ConstraintOrigin.java       |   35 -
 .../validator/metadata/ElementDescriptorImpl.java  |  153 -
 .../validator/metadata/MetaConstraint.java         |  175 --
 .../validator/metadata/PropertyDescriptorImpl.java |   46 -
 .../org/hibernate/validator/metadata/package.html  |   26 -
 .../main/java/org/hibernate/validator/package.html |   27 -
 .../AggregateResourceBundleLocator.java            |  147 -
 .../CachingResourceBundleLocator.java              |   56 -
 .../DelegatingResourceBundleLocator.java           |   41 -
 .../PlatformResourceBundleLocator.java             |   93 -
 .../resourceloading/ResourceBundleLocator.java     |   52 -
 .../validator/resourceloading/package.html         |   26 -
 .../org/hibernate/validator/util/IdentitySet.java  |  114 -
 .../validator/util/IteratorEnumeration.java        |   56 -
 .../validator/util/LazyValidatorFactory.java       |  101 -
 .../hibernate/validator/util/LoggerFactory.java    |   37 -
 .../hibernate/validator/util/ReflectionHelper.java |  692 -----
 .../validator/util/ValidatorTypeHelper.java        |  133 -
 .../java/org/hibernate/validator/util/Version.java |   66 -
 .../annotationfactory/AnnotationDescriptor.java    |   97 -
 .../util/annotationfactory/AnnotationFactory.java  |   60 -
 .../util/annotationfactory/AnnotationProxy.java    |  124 -
 .../validator/util/annotationfactory/package.html  |   26 -
 .../java/org/hibernate/validator/util/package.html |   26 -
 .../privilegedactions/ConstructorInstance.java     |   63 -
 .../privilegedactions/GetAnnotationParameter.java  |   72 -
 .../util/privilegedactions/GetClassLoader.java     |   51 -
 .../util/privilegedactions/GetConstructor.java     |   47 -
 .../util/privilegedactions/GetDeclaredField.java   |   49 -
 .../util/privilegedactions/GetDeclaredFields.java  |   40 -
 .../util/privilegedactions/GetDeclaredMethods.java |   40 -
 .../util/privilegedactions/GetMethod.java          |   47 -
 .../GetMethodFromPropertyName.java                 |   56 -
 .../util/privilegedactions/GetMethods.java         |   40 -
 .../util/privilegedactions/LoadClass.java          |   59 -
 .../util/privilegedactions/NewInstance.java        |   56 -
 .../util/privilegedactions/SetAccessibility.java   |   43 -
 .../validator/util/privilegedactions/package.html  |   26 -
 .../xml/ValidationBootstrapParameters.java         |   41 -
 .../validator/xml/ValidationXmlParser.java         |  270 --
 .../hibernate/validator/xml/XmlMappingParser.java  |  623 ----
 .../java/org/hibernate/validator/xml/package.html  |   26 -
 .../src/main/resources/META-INF/MANIFEST.MF        |   10 -
 .../validator/ValidationMessages.properties        |   23 -
 .../validator/ValidationMessages_de.properties     |   22 -
 .../validator/ValidationMessages_en.properties     |    9 -
 .../validator/ValidationMessages_fr.properties     |   21 -
 .../validator/ValidationMessages_mn_MN.properties  |   18 -
 .../validator/ValidationMessages_tr.properties     |   18 -
 .../src/main/xjb/binding-customization.xjb         |   14 -
 .../hibernate/validator/ValidationMessages.java    |   71 -
 .../test/HibernateValidatorConfigurationTest.java  |   45 -
 .../validator/test/bootstrap/Customer.java         |   70 -
 .../hibernate/validator/test/bootstrap/Order.java  |   36 -
 .../validator/test/bootstrap/ValidationTest.java   |  129 -
 .../validator/test/cfg/ConstraintMappingTest.java  |  302 --
 .../org/hibernate/validator/test/cfg/Marathon.java |   66 -
 .../validator/test/cfg/MarathonConstraint.java     |   44 -
 .../test/cfg/MarathonConstraintValidator.java      |   39 -
 .../org/hibernate/validator/test/cfg/Runner.java   |   45 -
 .../hibernate/validator/test/cfg/Tournament.java   |   29 -
 .../ClassValidatorWithTypeVariableTest.java        |  127 -
 .../validator/test/constraints/Cloneable.java      |   44 -
 .../constraints/CloneableConstraintValidator.java  |   34 -
 .../validator/test/constraints/ConstraintTest.java |   68 -
 .../ConstraintValidatorContextTest.java            |  160 --
 .../validator/test/constraints/Coordinate.java     |   35 -
 .../validator/test/constraints/Elevator.java       |   37 -
 .../validator/test/constraints/Interval.java       |   28 -
 .../hibernate/validator/test/constraints/Item.java |   28 -
 .../validator/test/constraints/Object.java         |   44 -
 .../constraints/ObjectConstraintValidator.java     |   34 -
 .../validator/test/constraints/PostCodeList.java   |   72 -
 .../validator/test/constraints/Serializable.java   |   44 -
 .../SerializableConstraintValidator.java           |   34 -
 .../test/constraints/StartLessThanEnd.java         |   41 -
 .../test/constraints/StartLessThanEndImpl.java     |   39 -
 .../validator/test/constraints/SubType.java        |   24 -
 .../validator/test/constraints/Suburb.java         |   96 -
 .../validator/test/constraints/SuperType.java      |   24 -
 .../validator/test/constraints/SuperTypeArray.java |   44 -
 .../test/constraints/SuperTypeArrayValidator.java  |   34 -
 .../test/constraints/ValidatorResolutionTest.java  |  213 --
 .../composition/CompositeConstraintTest.java       |  101 -
 .../test/constraints/composition/Person.java       |   54 -
 .../test/constraints/composition/ValidName.java    |   47 -
 .../composition/ValidNameSingleViolation.java      |   49 -
 .../constraints/impl/AssertFalseValidatorTest.java |   47 -
 .../constraints/impl/AssertTrueValidatorTest.java  |   48 -
 .../test/constraints/impl/BlankValidatorTest.java  |   84 -
 .../impl/CreditCardNumberValidatorTest.java        |   54 -
 .../test/constraints/impl/DateHolder.java          |   67 -
 .../impl/DecimalMinMaxValidatorBoundaryTest.java   |   89 -
 .../impl/DigitsValidatorForNumberTest.java         |  125 -
 .../impl/DigitsValidatorForStringTest.java         |   90 -
 .../test/constraints/impl/EmailValidatorTest.java  |   94 -
 .../impl/FutureValidatorForCalendarTest.java       |   65 -
 .../impl/FutureValidatorForDateTest.java           |   62 -
 .../test/constraints/impl/FutureValidatorTest.java |   44 -
 .../test/constraints/impl/LengthValidatorTest.java |   88 -
 .../impl/MaxValidatorForNumberTest.java            |  104 -
 .../impl/MaxValidatorForStringTest.java            |   95 -
 .../impl/MinMaxValidatorBoundaryTest.java          |   78 -
 .../impl/MinValidatorForNumberTest.java            |  102 -
 .../impl/MinValidatorForStringTest.java            |   94 -
 .../constraints/impl/NotNullValidatorTest.java     |   38 -
 .../test/constraints/impl/NullValidatorTest.java   |   44 -
 .../impl/PastValidatorForCalendarTest.java         |   64 -
 .../constraints/impl/PastValidatorForDateTest.java |   62 -
 .../constraints/impl/PatternValidatorTest.java     |   78 -
 .../impl/ScriptAssertValidatorTest.java            |  203 --
 .../test/constraints/impl/SizeValidatorTest.java   |  184 --
 .../test/constraints/impl/URLValidatorTest.java    |  122 -
 .../validator/test/engine/PathImplTest.java        |  113 -
 .../validator/test/engine/ValidatorTest.java       |   74 -
 .../engine/customerror/CustomErrorMessageTest.java |   47 -
 .../test/engine/customerror/DummyTestClass.java    |   27 -
 .../validator/test/engine/customerror/IsValid.java |   45 -
 .../test/engine/customerror/IsValidValidator.java  |   41 -
 .../validator/test/engine/groups/Address.java      |   81 -
 .../test/engine/groups/CyclicGroupSequence.java    |   27 -
 .../test/engine/groups/CyclicGroupSequence1.java   |   27 -
 .../test/engine/groups/CyclicGroupSequence2.java   |   27 -
 .../validator/test/engine/groups/First.java        |   26 -
 .../validator/test/engine/groups/GroupA.java       |   10 -
 .../validator/test/engine/groups/GroupB.java       |   10 -
 .../engine/groups/GroupChainGeneratorTest.java     |  175 --
 .../test/engine/groups/GroupChainTest.java         |  157 -
 .../validator/test/engine/groups/GroupsTest.java   |   48 -
 .../validator/test/engine/groups/Last.java         |   26 -
 .../validator/test/engine/groups/Second.java       |   26 -
 .../validator/test/engine/groups/TestSequence.java |   10 -
 .../validator/test/engine/groups/Try.java          |   50 -
 .../engine/groups/ZipCodeCoherenceChecker.java     |   39 -
 .../engine/groups/ZipCodeCoherenceValidator.java   |   34 -
 .../MessageInterpolationTest.java                  |  121 -
 .../MessageInterpolationWithDefaultBundleTest.java |  147 -
 .../MessageInterpolatorContextTest.java            |  113 -
 .../ResourceBundleMessageInterpolatorTest.java     |  379 ---
 .../test/engine/messageinterpolation/User.java     |   50 -
 .../hibernate/validator/test/engine/proxy/A.java   |   29 -
 .../hibernate/validator/test/engine/proxy/B.java   |   21 -
 .../validator/test/engine/proxy/ProxyTest.java     |   83 -
 .../ConstraintViolationSerializationTest.java      |   86 -
 .../CustomConstraintSerializableTest.java          |   99 -
 .../engine/serialization/DummyEmailValidator.java  |   35 -
 .../validator/test/engine/serialization/Email.java |   52 -
 .../engine/serialization/SerializableClass.java    |   29 -
 .../engine/serialization/UnSerializableClass.java  |   28 -
 .../test/engine/traversableresolver/Author.java    |   42 -
 .../traversableresolver/AuthorBusinessRules.java   |   38 -
 .../test/engine/traversableresolver/Book.java      |   37 -
 .../traversableresolver/BookBusinessRules.java     |   39 -
 .../CachedTraversableResolverTest.java             |  138 -
 .../test/engine/traversableresolver/Cloth.java     |   24 -
 .../test/engine/traversableresolver/Jacket.java    |   37 -
 .../JpaTraversableResolverTest.java                |   67 -
 .../test/engine/traversableresolver/Suit.java      |   61 -
 .../test/engine/traversableresolver/Trousers.java  |   39 -
 .../test/metadata/ConstraintHelperTest.java        |   74 -
 .../validator/test/metadata/Customer.java          |   67 -
 .../test/metadata/ElementDescriptorTest.java       |   87 -
 .../hibernate/validator/test/metadata/Engine.java  |   41 -
 .../hibernate/validator/test/metadata/Order.java   |   36 -
 .../hibernate/validator/test/metadata/Person.java  |   36 -
 .../test/resourceloading/AggregateBundleTest.java  |   99 -
 .../AggregateResourceBundleLocatorTest.java        |  100 -
 .../test/util/BoundariesConstraintValidator.java   |   39 -
 .../test/util/DummyTraversableResolver.java        |   39 -
 .../validator/test/util/HibernateTestCase.java     |  119 -
 .../validator/test/util/IdentitySetTest.java       |   78 -
 .../hibernate/validator/test/util/Positive.java    |   39 -
 .../test/util/PositiveConstraintValidator.java     |   27 -
 .../validator/test/util/ReflectionHelperTest.java  |  207 --
 .../hibernate/validator/test/util/TestUtil.java    |  262 --
 .../validator/test/util/ValidatorTypeTest.java     |   50 -
 .../annotationfactory/AnnotationFactoryTest.java   |   62 -
 .../org/hibernate/validator/test/xml/Customer.java |   71 -
 .../hibernate/validator/test/xml/MyInterface.java  |   27 -
 .../validator/test/xml/MyInterfaceImpl.java        |   28 -
 .../org/hibernate/validator/test/xml/Person.java   |   30 -
 .../hibernate/validator/test/xml/Properties.java   |   37 -
 .../validator/test/xml/XmlMappingTest.java         |  127 -
 .../test/xml/mixedconfiguration/ICompetition.java  |   20 -
 .../test/xml/mixedconfiguration/IFixture.java      |   22 -
 .../InheritanceMappingsTest.java                   |  133 -
 .../mixedconfiguration/annotation/Competition.java |   46 -
 .../xml/mixedconfiguration/annotation/Fixture.java |   31 -
 .../xml/mixedconfiguration/annotation/Game.java    |   48 -
 .../mixedconfiguration/annotation/GameDetail.java  |   44 -
 .../annotation/PersonCompetition.java              |   29 -
 .../annotation/TeamCompetition.java                |   28 -
 .../xml/mixedconfiguration/xml/Competition.java    |   41 -
 .../test/xml/mixedconfiguration/xml/Fixture.java   |   36 -
 .../test/xml/mixedconfiguration/xml/Game.java      |   43 -
 .../xml/mixedconfiguration/xml/GameDetail.java     |   39 -
 .../mixedconfiguration/xml/PersonCompetition.java  |   29 -
 .../mixedconfiguration/xml/TeamCompetition.java    |   29 -
 .../src/test/resources/log4j.properties            |   26 -
 .../test/xml/empty-my-interface-mapping.xml        |    7 -
 .../org/hibernate/validator/test/xml/mapping.xml   |   16 -
 .../test/xml/mixedconfiguration/xml-mappings.xml   |   37 -
 .../test/xml/my-interface-impl-mapping.xml         |   10 -
 .../validator/test/xml/my-interface-mapping.xml    |   10 -
 .../validator/test/xml/properties-mapping.xml      |   11 -
 hibernate-validator/src/test/suite/unit-tests.xml  |   27 -
 pom.xml                                            |  387 ---
 project/annotation-processor/pom.xml               |   93 +
 .../validator/ap/ConstraintAnnotationVisitor.java  |  227 ++
 .../ap/ConstraintValidationProcessor.java          |  132 +
 .../ap/checks/AbstractConstraintCheck.java         |   66 +
 .../validator/ap/checks/AnnotationTypeCheck.java   |   59 +
 .../ap/checks/AnnotationTypeMemberCheck.java       |  314 ++
 .../validator/ap/checks/ConstraintCheck.java       |   98 +
 .../validator/ap/checks/ConstraintCheckError.java  |  140 +
 .../ap/checks/ConstraintCheckFactory.java          |  164 ++
 .../validator/ap/checks/ConstraintChecks.java      |   44 +
 .../ap/checks/ConstraintValidatorCheck.java        |   71 +
 .../hibernate/validator/ap/checks/GetterCheck.java |   80 +
 .../ap/checks/GroupSequenceProviderCheck.java      |  222 ++
 .../validator/ap/checks/MultiValuedChecks.java     |   66 +
 .../validator/ap/checks/PrimitiveCheck.java        |   68 +
 .../validator/ap/checks/RetentionPolicyCheck.java  |   67 +
 .../validator/ap/checks/SingleValuedChecks.java    |   91 +
 .../hibernate/validator/ap/checks/StaticCheck.java |   63 +
 .../hibernate/validator/ap/checks/TargetCheck.java |   90 +
 .../hibernate/validator/ap/checks/TypeCheck.java   |   86 +
 .../org/hibernate/validator/ap/checks/package.html |   29 +
 .../java/org/hibernate/validator/ap/package.html   |   26 +
 .../validator/ap/util/AnnotationApiHelper.java     |  316 +++
 .../validator/ap/util/CollectionHelper.java        |   49 +
 .../hibernate/validator/ap/util/Configuration.java |  149 +
 .../validator/ap/util/ConstraintHelper.java        |  780 +++++
 .../validator/ap/util/MessagerAdapter.java         |  101 +
 .../org/hibernate/validator/ap/util/TypeNames.java |   80 +
 .../org/hibernate/validator/ap/util/package.html   |   24 +
 .../services/javax.annotation.processing.Processor |    0
 .../ap/ValidationProcessorMessages.properties      |   28 +
 .../validator/ap/AnnotationTypeValidationTest.java |  168 ++
 .../ap/ConstraintValidationProcessorTest.java      |  538 ++++
 .../ap/ConstraintValidationProcessorTestBase.java  |   52 +
 ...ieldLevelValidationUsingBuiltInConstraints.java |   70 +
 ...thodLevelValidationUsingBuiltInConstraints.java |   89 +
 .../ap/testmodel/ModelWithDateConstraints.java     |   32 +
 .../validator/ap/testmodel/ModelWithJodaTypes.java |   63 +
 .../ap/testmodel/ModelWithoutConstraints.java      |   26 +
 .../testmodel/MultipleConstraintsOfSameType.java   |   34 +
 .../ValidationUsingAtValidAnnotation.java          |   90 +
 .../validator/ap/testmodel/boxing/ValidLong.java   |   40 +
 .../ap/testmodel/boxing/ValidLongValidator.java    |   29 +
 .../ap/testmodel/boxing/ValidationUsingBoxing.java |   71 +
 .../ClassLevelValidation.java                      |   30 +
 .../classlevelconstraints/ValidCustomer.java       |   38 +
 .../ValidCustomerValidator.java                    |   31 +
 ...ieldLevelValidationUsingComposedConstraint.java |   30 +
 .../composedconstraint/ValidOrderNumber.java       |   44 +
 .../composedconstraint2/ComposedConstraint.java    |   42 +
 .../composedconstraint2/ComposingConstraint1.java  |   44 +
 ...ngConstraint1ValidatorForGregorianCalendar.java |   31 +
 .../ComposingConstraint1ValidatorForList.java      |   31 +
 .../ComposingConstraint1ValidatorForString.java    |   37 +
 .../composedconstraint2/ComposingConstraint2.java  |   44 +
 .../ComposingConstraint2ValidatorForArrayList.java |   32 +
 .../ComposingConstraint2ValidatorForCalendar.java  |   37 +
 ...ComposingConstraint2ValidatorForCollection.java |   31 +
 ...elValidationUsingComplexComposedConstraint.java |   58 +
 .../ConstraintsWithIllegalRetentionPolicies.java   |   73 +
 .../ConstraintsWithIllegalTargets.java             |  148 +
 .../ConstraintsWithWrongGroupsAttribute.java       |  147 +
 .../ConstraintsWithWrongMessageAttribute.java      |   72 +
 .../ConstraintsWithWrongPayloadAttribute.java      |  164 ++
 .../ConstraintsWithoutValidator.java               |   76 +
 .../testmodel/constrainttypes/DummyValidator.java  |   36 +
 .../constrainttypes/ValidCustomerNumber.java       |   35 +
 .../ap/testmodel/customconstraints/CaseMode.java   |   22 +
 .../ap/testmodel/customconstraints/CheckCase.java  |   42 +
 .../customconstraints/CheckCaseValidator.java      |   41 +
 ...FieldLevelValidationUsingCustomConstraints.java |   32 +
 ...ibernateValidatorProvidedCustomConstraints.java |   71 +
 .../BazDefaultGroupSequenceProvider.java           |   31 +
 .../FooBarBazDefaultGroupSequenceProvider.java     |   36 +
 .../FooBarDefaultGroupSequenceProvider.java        |   31 +
 .../FooDefaultGroupSequenceProvider.java           |   33 +
 .../GroupSequenceProviderDefinition.java           |   79 +
 .../QuxDefaultGroupSequenceProvider.java           |   33 +
 .../SampleDefaultGroupSequenceProvider.java        |   33 +
 .../AbstractCustomConstraintValidator.java         |   23 +
 .../inheritedvalidator/CustomConstraint.java       |   42 +
 .../CustomConstraintValidator.java                 |   29 +
 ...ieldLevelValidationUsingInheritedValidator.java |   32 +
 .../NoUniqueValidatorResolution.java               |   34 +
 .../SerializableCollection.java                    |   24 +
 .../nouniquevalidatorresolution/Size.java          |   42 +
 .../SizeValidatorForCollection.java                |   31 +
 .../SizeValidatorForSerializable.java              |   31 +
 .../SizeValidatorForSet.java                       |   31 +
 .../validator/ap/testutil/CompilerTestHelper.java  |  273 ++
 .../validator/ap/util/DiagnosticExpectation.java   |   75 +
 project/archetype/archetype.properties             |    5 +
 project/archetype/pom.xml                          |  107 +
 .../archetype/src/main/java/com/example/Car.java   |  112 +
 .../src/main/java/com/example/CarChecks.java       |   23 +
 .../src/main/java/com/example/Driver.java          |   47 +
 .../src/main/java/com/example/DriverChecks.java    |   23 +
 .../src/main/java/com/example/OrderedChecks.java   |   27 +
 .../src/main/java/com/example/Person.java          |   41 +
 .../src/main/java/com/example/RentalCar.java       |   41 +
 .../src/main/java/com/example/RentalChecks.java    |   23 +
 .../archetype}/src/main/resources/log4j.properties |    0
 .../src/test/java/com/example/BootstrapTest.java   |  106 +
 .../src/test/java/com/example/CarTest.java         |  144 +
 .../src/test/java/com/example/GroupTest.java       |  112 +
 project/distribution/pom.xml                       |  130 +
 project/distribution/src/main/assembly/dist.xml    |  122 +
 project/documentation/pom.xml                      |  149 +
 .../documentation/src/main/docbook/en-US/hv.ent    |    5 +
 .../en-US/images/annotation_processor_eclipse.png  |  Bin
 .../en-US/images/annotation_processor_intellij.png |  Bin
 .../en-US/images/annotation_processor_netbeans.png |  Bin
 .../docbook/en-US/images/application-layers.png    |  Bin
 .../docbook/en-US/images/application-layers2.png   |  Bin
 .../main/docbook/en-US/images/hibernate_logo_a.png |  Bin
 .../en-US/images/validation-configuration-1.0.png  |  Bin
 .../en-US/images/validation-mapping-1.0.png        |  Bin
 .../src/main/docbook/en-US/master.xml              |   86 +
 .../docbook/en-US/modules/annotationprocessor.xml  |  474 ++++
 .../main/docbook/en-US/modules/bootstrapping.xml   |  403 +++
 .../docbook/en-US/modules/customconstraints.xml    |  611 ++++
 .../main/docbook/en-US/modules/customoptions.xml   |  731 +++++
 .../main/docbook/en-US/modules/furtherreading.xml  |   47 +
 .../main/docbook/en-US/modules/gettingstarted.xml  |  308 ++
 .../src/main/docbook/en-US/modules/integration.xml |  281 ++
 .../src/main/docbook/en-US/modules/metadataapi.xml |  132 +
 .../src/main/docbook/en-US/modules/preface.xml     |   69 +
 .../main/docbook/en-US/modules/usingvalidator.xml  | 1653 +++++++++++
 .../docbook/en-US/modules/xmlconfiguration.xml     |  224 ++
 .../documentation/src/main/docbook/pot/master.pot  |   64 +
 .../docbook/pot/modules/annotationprocessor.pot    |  535 ++++
 .../src/main/docbook/pot/modules/bootstrapping.pot |  438 +++
 .../main/docbook/pot/modules/customconstraints.pot |  687 +++++
 .../src/main/docbook/pot/modules/customoptions.pot |  841 ++++++
 .../main/docbook/pot/modules/furtherreading.pot    |   46 +
 .../main/docbook/pot/modules/gettingstarted.pot    |  366 +++
 .../src/main/docbook/pot/modules/integration.pot   |  341 +++
 .../src/main/docbook/pot/modules/metadataapi.pot   |  126 +
 .../src/main/docbook/pot/modules/preface.pot       |   40 +
 .../main/docbook/pot/modules/programmaticapi.pot   |  132 +
 .../main/docbook/pot/modules/usingvalidator.pot    | 1830 ++++++++++++
 .../main/docbook/pot/modules/xmlconfiguration.pot  |  190 ++
 .../documentation/src/main/docbook/zh-CN/master.po |   65 +
 .../docbook/zh-CN/modules/annotationprocessor.po   |  841 ++++++
 .../main/docbook/zh-CN/modules/bootstrapping.po    |  819 ++++++
 .../docbook/zh-CN/modules/customconstraints.po     | 1199 ++++++++
 .../main/docbook/zh-CN/modules/customoptions.po    | 1111 ++++++++
 .../main/docbook/zh-CN/modules/furtherreading.po   |   77 +
 .../main/docbook/zh-CN/modules/gettingstarted.po   |  636 +++++
 .../src/main/docbook/zh-CN/modules/integration.po  |  535 ++++
 .../src/main/docbook/zh-CN/modules/metadataapi.po  |  194 ++
 .../src/main/docbook/zh-CN/modules/preface.po      |   69 +
 .../main/docbook/zh-CN/modules/programmaticapi.po  |  220 ++
 .../main/docbook/zh-CN/modules/usingvalidator.po   | 2985 ++++++++++++++++++++
 .../main/docbook/zh-CN/modules/xmlconfiguration.po |  416 +++
 project/engine/pom.xml                             |  298 ++
 .../hibernate/validator/HibernateValidator.java    |   47 +
 .../validator/HibernateValidatorConfiguration.java |  107 +
 .../validator/HibernateValidatorContext.java       |   51 +
 .../validator/HibernateValidatorFactory.java       |   37 +
 .../org/hibernate/validator/cfg/ConstraintDef.java |  100 +
 .../hibernate/validator/cfg/ConstraintMapping.java |   81 +
 .../validator/cfg/GenericConstraintDef.java        |   41 +
 .../cfg/context/AnnotationProcessingOptions.java   |   32 +
 .../validator/cfg/context/Cascadable.java          |   33 +
 .../validator/cfg/context/Constrainable.java       |   37 +
 .../context/MethodConstraintMappingContext.java    |   27 +
 .../validator/cfg/context/MethodTarget.java        |   40 +
 .../context/ParameterConstraintMappingContext.java |   30 +
 .../validator/cfg/context/ParameterTarget.java     |   35 +
 .../context/PropertyConstraintMappingContext.java  |   33 +
 .../validator/cfg/context/PropertyTarget.java      |   42 +
 .../ReturnValueConstraintMappingContext.java       |   30 +
 .../validator/cfg/context/ReturnValueTarget.java   |   33 +
 .../cfg/context/TypeConstraintMappingContext.java  |   75 +
 .../validator/cfg/context/TypeTarget.java          |   36 +
 .../hibernate/validator/cfg/context/package.html   |   27 +
 .../validator/cfg/defs/AssertFalseDef.java         |   31 +
 .../validator/cfg/defs/AssertTrueDef.java          |   31 +
 .../validator/cfg/defs/CreditCardNumberDef.java    |   31 +
 .../validator/cfg/defs/DecimalMaxDef.java          |   37 +
 .../validator/cfg/defs/DecimalMinDef.java          |   36 +
 .../hibernate/validator/cfg/defs/DigitsDef.java    |   42 +
 .../org/hibernate/validator/cfg/defs/EmailDef.java |   43 +
 .../hibernate/validator/cfg/defs/FutureDef.java    |   31 +
 .../hibernate/validator/cfg/defs/LengthDef.java    |   42 +
 .../org/hibernate/validator/cfg/defs/MaxDef.java   |   36 +
 .../org/hibernate/validator/cfg/defs/MinDef.java   |   36 +
 .../hibernate/validator/cfg/defs/NotBlankDef.java  |   29 +
 .../hibernate/validator/cfg/defs/NotEmptyDef.java  |   30 +
 .../hibernate/validator/cfg/defs/NotNullDef.java   |   32 +
 .../org/hibernate/validator/cfg/defs/NullDef.java  |   31 +
 .../org/hibernate/validator/cfg/defs/PastDef.java  |   31 +
 .../hibernate/validator/cfg/defs/PatternDef.java   |   42 +
 .../org/hibernate/validator/cfg/defs/RangeDef.java |   40 +
 .../validator/cfg/defs/ScriptAssertDef.java        |   45 +
 .../org/hibernate/validator/cfg/defs/SizeDef.java  |   44 +
 .../org/hibernate/validator/cfg/defs/URLDef.java   |   56 +
 .../org/hibernate/validator/cfg/defs/package.html  |   26 +
 .../java/org/hibernate/validator/cfg/package.html  |   26 +
 .../validator/constraints/CompositionType.java     |   43 +
 .../constraints/ConstraintComposition.java         |   47 +
 .../validator/constraints/CreditCardNumber.java    |   63 +
 .../org/hibernate/validator/constraints/Email.java |   73 +
 .../hibernate/validator/constraints/Length.java    |   62 +
 .../hibernate/validator/constraints/ModCheck.java  |  109 +
 .../hibernate/validator/constraints/NotBlank.java  |   63 +
 .../hibernate/validator/constraints/NotEmpty.java  |   64 +
 .../org/hibernate/validator/constraints/Range.java |   69 +
 .../hibernate/validator/constraints/SafeHtml.java  |  116 +
 .../validator/constraints/ScriptAssert.java        |  129 +
 .../org/hibernate/validator/constraints/URL.java   |   99 +
 .../hibernate/validator/constraints/br/CNPJ.java   |   65 +
 .../hibernate/validator/constraints/br/CPF.java    |   70 +
 .../validator/constraints/br/TituloEleitoral.java  |   66 +
 .../validator/constraints/br/package.html          |   26 +
 .../hibernate/validator/constraints/package.html   |   26 +
 .../group/DefaultGroupSequenceProvider.java        |   62 +
 .../validator/group/GroupSequenceProvider.java     |   50 +
 .../org/hibernate/validator/group/package.html     |   26 +
 .../internal/cfg/context/ConfiguredConstraint.java |  127 +
 .../cfg/context/ConstraintMappingContext.java      |  233 ++
 .../context/ConstraintMappingContextImplBase.java  |   90 +
 .../MethodConstraintMappingContextImpl.java        |   57 +
 .../ParameterConstraintMappingContextImpl.java     |  104 +
 .../PropertyConstraintMappingContextImpl.java      |   80 +
 .../ReturnValueConstraintMappingContextImpl.java   |   78 +
 .../context/TypeConstraintMappingContextImpl.java  |   76 +
 .../validator/internal/cfg/context/package.html    |   26 +
 .../constraintvalidators/AssertFalseValidator.java |   38 +
 .../constraintvalidators/AssertTrueValidator.java  |   38 +
 .../DecimalMaxValidatorForCharSequence.java        |   60 +
 .../DecimalMaxValidatorForNumber.java              |   68 +
 .../DecimalMinValidatorForCharSequence.java        |   57 +
 .../DecimalMinValidatorForNumber.java              |   69 +
 .../DigitsValidatorForCharSequence.java            |   83 +
 .../DigitsValidatorForNumber.java                  |   75 +
 .../constraintvalidators/EmailValidator.java       |   86 +
 .../FutureValidatorForCalendar.java                |   42 +
 .../FutureValidatorForDate.java                    |   42 +
 .../FutureValidatorForReadableInstant.java         |   45 +
 .../FutureValidatorForReadablePartial.java         |   45 +
 .../constraintvalidators/LengthValidator.java      |   64 +
 .../MaxValidatorForCharSequence.java               |   51 +
 .../MaxValidatorForNumber.java                     |   56 +
 .../MinValidatorForCharSequence.java               |   51 +
 .../MinValidatorForNumber.java                     |   56 +
 .../constraintvalidators/ModCheckValidator.java    |  172 ++
 .../constraintvalidators/NotBlankValidator.java    |   51 +
 .../constraintvalidators/NotNullValidator.java     |   36 +
 .../constraintvalidators/NullValidator.java        |   37 +
 .../PastValidatorForCalendar.java                  |   42 +
 .../constraintvalidators/PastValidatorForDate.java |   42 +
 .../PastValidatorForReadableInstant.java           |   45 +
 .../PastValidatorForReadablePartial.java           |   45 +
 .../constraintvalidators/PatternValidator.java     |   59 +
 .../constraintvalidators/SafeHtmlValidator.java    |   64 +
 .../ScriptAssertValidator.java                     |   95 +
 .../SizeValidatorForArray.java                     |   74 +
 .../SizeValidatorForArraysOfBoolean.java           |   47 +
 .../SizeValidatorForArraysOfByte.java              |   47 +
 .../SizeValidatorForArraysOfChar.java              |   47 +
 .../SizeValidatorForArraysOfDouble.java            |   47 +
 .../SizeValidatorForArraysOfFloat.java             |   47 +
 .../SizeValidatorForArraysOfInt.java               |   47 +
 .../SizeValidatorForArraysOfLong.java              |   47 +
 .../SizeValidatorForArraysOfPrimitives.java        |   53 +
 .../SizeValidatorForArraysOfShort.java             |   47 +
 .../SizeValidatorForCharSequence.java              |   74 +
 .../SizeValidatorForCollection.java                |   74 +
 .../constraintvalidators/SizeValidatorForMap.java  |   74 +
 .../constraintvalidators/URLValidator.java         |   68 +
 .../internal/constraintvalidators/package.html     |   26 +
 .../internal/engine/ConfigurationImpl.java         |  345 +++
 .../validator/internal/engine/ConstraintTree.java  |  544 ++++
 .../engine/ConstraintValidatorContextImpl.java     |  176 ++
 .../engine/ConstraintValidatorFactoryImpl.java     |   35 +
 .../internal/engine/ConstraintViolationImpl.java   |  144 +
 .../validator/internal/engine/MessageAndPath.java  |   42 +
 .../engine/MessageInterpolatorContext.java         |   82 +
 .../engine/MethodConstraintViolationImpl.java      |  154 +
 .../internal/engine/MethodParameterNodeImpl.java   |   48 +
 .../internal/engine/MethodReturnValueNodeImpl.java |   46 +
 .../internal/engine/MethodValidationContext.java   |  114 +
 .../validator/internal/engine/NodeImpl.java        |  178 ++
 .../validator/internal/engine/PathImpl.java        |  350 +++
 .../internal/engine/StandardValidationContext.java |   73 +
 .../internal/engine/ValidationContext.java         |  288 ++
 .../internal/engine/ValidatorContextImpl.java      |  105 +
 .../internal/engine/ValidatorFactoryImpl.java      |  145 +
 .../validator/internal/engine/ValidatorImpl.java   | 1288 +++++++++
 .../validator/internal/engine/ValueContext.java    |  223 ++
 .../DefaultGroupSequenceProviderAdapter.java       |   44 +
 .../engine/groups/DefaultValidationOrder.java      |  131 +
 .../validator/internal/engine/groups/Group.java    |   72 +
 .../validator/internal/engine/groups/Sequence.java |  126 +
 .../internal/engine/groups/ValidationOrder.java    |   45 +
 .../engine/groups/ValidationOrderGenerator.java    |  150 +
 .../validator/internal/engine/groups/package.html  |   25 +
 .../validator/internal/engine/package.html         |   25 +
 .../resolver/DefaultTraversableResolver.java       |  140 +
 .../engine/resolver/JPATraversableResolver.java    |   64 +
 .../SingleThreadCachedTraversableResolver.java     |  161 ++
 .../internal/engine/resolver/package.html          |   25 +
 .../internal/metadata/BeanMetaDataManager.java     |  179 ++
 .../aggregated/AbstractConstraintMetaData.java     |  149 +
 .../internal/metadata/aggregated/BeanMetaData.java |  139 +
 .../metadata/aggregated/BeanMetaDataImpl.java      |  593 ++++
 .../metadata/aggregated/ConstraintMetaData.java    |   94 +
 .../metadata/aggregated/MetaDataBuilder.java       |  146 +
 .../metadata/aggregated/MethodMetaData.java        |  412 +++
 .../metadata/aggregated/ParameterMetaData.java     |  143 +
 .../metadata/aggregated/PropertyMetaData.java      |  210 ++
 .../internal/metadata/aggregated/package.html      |   26 +
 .../metadata/core/AnnotationProcessingOptions.java |  144 +
 .../internal/metadata/core/ConstraintHelper.java   |  428 +++
 .../internal/metadata/core/ConstraintOrigin.java   |   34 +
 .../internal/metadata/core/MetaConstraint.java     |  149 +
 .../metadata/descriptor/BeanDescriptorImpl.java    |  116 +
 .../descriptor/ConstraintDescriptorImpl.java       |  545 ++++
 .../metadata/descriptor/ElementDescriptorImpl.java |  177 ++
 .../metadata/descriptor/MethodDescriptorImpl.java  |   50 +
 .../descriptor/ParameterDescriptorImpl.java        |   42 +
 .../descriptor/PropertyDescriptorImpl.java         |   41 +
 .../internal/metadata/descriptor/package.html      |   30 +
 .../metadata/location/BeanConstraintLocation.java  |  151 +
 .../metadata/location/ConstraintLocation.java      |   44 +
 .../location/MethodConstraintLocation.java         |  147 +
 .../internal/metadata/location/package.html        |   25 +
 .../validator/internal/metadata/package.html       |   25 +
 .../provider/AnnotationMetaDataProvider.java       |  439 +++
 .../metadata/provider/MetaDataProvider.java        |   61 +
 .../provider/MetaDataProviderKeyedByClassName.java |   88 +
 .../provider/ProgrammaticMetaDataProvider.java     |  397 +++
 .../metadata/provider/XmlMetaDataProvider.java     |  160 ++
 .../internal/metadata/provider/package.html        |   25 +
 .../metadata/raw/AbstractConstrainedElement.java   |  122 +
 .../internal/metadata/raw/BeanConfiguration.java   |  138 +
 .../internal/metadata/raw/ConfigurationSource.java |   48 +
 .../internal/metadata/raw/ConstrainedElement.java  |  101 +
 .../internal/metadata/raw/ConstrainedField.java    |   58 +
 .../internal/metadata/raw/ConstrainedMethod.java   |  210 ++
 .../metadata/raw/ConstrainedParameter.java         |   75 +
 .../internal/metadata/raw/ConstrainedType.java     |   49 +
 .../validator/internal/metadata/raw/package.html   |   26 +
 .../validator/internal/util/CollectionHelper.java  |  173 ++
 .../internal/util/ConcurrentReferenceHashMap.java  | 1727 +++++++++++
 .../validator/internal/util/Contracts.java         |   82 +
 .../validator/internal/util/IdentitySet.java       |  113 +
 .../internal/util/LazyValidatorFactory.java        |  231 ++
 .../hibernate/validator/internal/util/ModUtil.java |  104 +
 .../validator/internal/util/ReflectionHelper.java  |  787 ++++++
 .../validator/internal/util/TypeHelper.java        |  606 ++++
 .../hibernate/validator/internal/util/Version.java |   40 +
 .../annotationfactory/AnnotationDescriptor.java    |  107 +
 .../util/annotationfactory/AnnotationFactory.java  |   59 +
 .../util/annotationfactory/AnnotationProxy.java    |  133 +
 .../internal/util/annotationfactory/package.html   |   25 +
 .../validator/internal/util/logging/Log.java       |  425 +++
 .../internal/util/logging/LoggerFactory.java       |   35 +
 .../validator/internal/util/logging/Messages.java  |   78 +
 .../validator/internal/util/logging/package.html   |   24 +
 .../hibernate/validator/internal/util/package.html |   25 +
 .../privilegedactions/ConstructorInstance.java     |   67 +
 .../privilegedactions/GetAnnotationParameter.java  |   71 +
 .../util/privilegedactions/GetClassLoader.java     |   52 +
 .../util/privilegedactions/GetConstructor.java     |   46 +
 .../util/privilegedactions/GetDeclaredField.java   |   48 +
 .../util/privilegedactions/GetDeclaredFields.java  |   39 +
 .../util/privilegedactions/GetDeclaredMethod.java  |   48 +
 .../util/privilegedactions/GetDeclaredMethods.java |   39 +
 .../internal/util/privilegedactions/GetMethod.java |   46 +
 .../GetMethodFromPropertyName.java                 |   55 +
 .../util/privilegedactions/GetMethods.java         |   39 +
 .../internal/util/privilegedactions/LoadClass.java |  103 +
 .../util/privilegedactions/NewInstance.java        |   60 +
 .../util/privilegedactions/SetAccessibility.java   |   42 +
 .../internal/util/privilegedactions/package.html   |   25 +
 .../util/scriptengine/ScriptEvaluator.java         |   81 +
 .../util/scriptengine/ScriptEvaluatorFactory.java  |  113 +
 .../internal/util/scriptengine/package.html        |   25 +
 .../xml/ValidationBootstrapParameters.java         |  101 +
 .../internal/xml/ValidationXmlParser.java          |  256 ++
 .../validator/internal/xml/XmlMappingParser.java   |  650 +++++
 .../hibernate/validator/internal/xml/package.html  |   25 +
 .../ResourceBundleMessageInterpolator.java         |  322 +++
 .../ValueFormatterMessageInterpolator.java         |  174 ++
 .../validator/messageinterpolation/package.html    |   27 +
 .../method/MethodConstraintViolation.java          |  100 +
 .../method/MethodConstraintViolationException.java |   71 +
 .../validator/method/MethodValidator.java          |  199 ++
 .../method/metadata/MethodDescriptor.java          |   64 +
 .../method/metadata/ParameterDescriptor.java       |   49 +
 .../validator/method/metadata/TypeDescriptor.java  |   87 +
 .../validator/method/metadata/package.html         |   32 +
 .../org/hibernate/validator/method/package.html    |   31 +
 .../main/java/org/hibernate/validator/package.html |   28 +
 .../AggregateResourceBundleLocator.java            |  215 ++
 .../CachingResourceBundleLocator.java              |   73 +
 .../DelegatingResourceBundleLocator.java           |   75 +
 .../PlatformResourceBundleLocator.java             |  130 +
 .../resourceloading/ResourceBundleLocator.java     |   55 +
 .../validator/resourceloading/package.html         |   26 +
 .../spi/group/DefaultGroupSequenceProvider.java    |   59 +
 .../org/hibernate/validator/spi/group/package.html |   25 +
 .../spi/resourceloading/ResourceBundleLocator.java |   51 +
 .../validator/spi/resourceloading/package.html     |   28 +
 .../javax.validation.spi.ValidationProvider        |    0
 .../validator/ValidationMessages.properties        |   27 +
 .../validator/ValidationMessages_cs.properties     |   23 +
 .../validator/ValidationMessages_de.properties     |   23 +
 .../validator/ValidationMessages_en.properties     |    8 +
 .../validator/ValidationMessages_es.properties     |   23 +
 .../validator/ValidationMessages_fr.properties     |   22 +
 .../validator/ValidationMessages_hu.properties     |   23 +
 .../validator/ValidationMessages_mn_MN.properties  |   19 +
 .../validator/ValidationMessages_pt_BR.properties  |   27 +
 .../validator/ValidationMessages_tr.properties     |   20 +
 .../validator/ValidationMessages_zh_CN.properties  |   23 +
 .../engine/src/main/xjb/binding-customization.xjb  |   15 +
 .../src/main/xsd/validation-configuration-1.0.xsd  |    0
 .../src/main/xsd/validation-mapping-1.0.xsd        |    0
 .../engine}/src/site/site.xml                      |    0
 .../hibernate/validator/ValidationMessages.java    |   69 +
 .../test/HibernateValidatorConfigurationTest.java  |   44 +
 .../cfg/CascadingWithConstraintMappingTest.java    |  125 +
 .../validator/test/cfg/ConstraintMappingTest.java  |  531 ++++
 ...MappingWithAnnotationProcessingOptionsTest.java |  150 +
 .../org/hibernate/validator/test/cfg/Marathon.java |   69 +
 .../validator/test/cfg/MarathonConstraint.java     |   43 +
 .../test/cfg/MarathonConstraintValidator.java      |   38 +
 .../test/cfg/MethodConstraintMappingTest.java      |  589 ++++
 .../test/cfg/MultipleConstraintMappingsTest.java   |  165 ++
 .../org/hibernate/validator/test/cfg/Runner.java   |   54 +
 .../hibernate/validator/test/cfg/Tournament.java   |   28 +
 .../ClassValidatorWithTypeVariableTest.java        |  127 +
 .../validator/test/constraints/Cloneable.java      |   43 +
 .../constraints/CloneableConstraintValidator.java  |   33 +
 .../validator/test/constraints/ConstraintTest.java |   67 +
 .../ConstraintValidatorContextImplTest.java        |  166 ++
 .../ConstraintValidatorContextTest.java            |  128 +
 .../validator/test/constraints/Coordinate.java     |   34 +
 .../validator/test/constraints/Elevator.java       |   36 +
 .../validator/test/constraints/Interval.java       |   27 +
 .../hibernate/validator/test/constraints/Item.java |   27 +
 .../validator/test/constraints/Object.java         |   43 +
 .../constraints/ObjectConstraintValidator.java     |   33 +
 .../validator/test/constraints/PostCodeList.java   |   71 +
 .../validator/test/constraints/Serializable.java   |   43 +
 .../SerializableConstraintValidator.java           |   33 +
 .../test/constraints/StartLessThanEnd.java         |   40 +
 .../test/constraints/StartLessThanEndImpl.java     |   38 +
 .../validator/test/constraints/SubType.java        |   23 +
 .../validator/test/constraints/Suburb.java         |   95 +
 .../validator/test/constraints/SuperType.java      |   23 +
 .../validator/test/constraints/SuperTypeArray.java |   43 +
 .../test/constraints/SuperTypeArrayValidator.java  |   33 +
 .../test/constraints/ValidatorResolutionTest.java  |  212 ++
 .../constraints/boolcomposition/AllowedSSN.java    |   56 +
 .../constraints/boolcomposition/Blacklist.java     |   58 +
 .../BoolCompositeConstraintTest.java               |  143 +
 .../test/constraints/boolcomposition/IsBlank.java  |   52 +
 .../boolcomposition/NotNullAndSize.java            |   54 +
 .../constraints/boolcomposition/PatternOrSize.java |   57 +
 .../test/constraints/boolcomposition/Person.java   |   88 +
 .../test/constraints/boolcomposition/SSN.java      |   54 +
 .../constraints/boolcomposition/TemporarySSN.java  |   54 +
 .../test/constraints/boolcomposition/ValidSSN.java |   56 +
 .../localconstrval/LocalConstrValTest.java         |   76 +
 .../localconstrval/LongStringValidator.java        |   29 +
 .../localconstrval/PatternOrLong.java              |   54 +
 .../boolcomposition/localconstrval/Person.java     |   52 +
 .../localconstrval/SmallString.java                |   32 +
 .../localconstrval/SmallStringValidator.java       |   26 +
 .../test/constraints/br/CNPJValidatorTest.java     |   57 +
 .../test/constraints/br/CPFValidatorTest.java      |   71 +
 .../br/TituloEleitoralValidatorTest.java           |   59 +
 .../composition/CompositeConstraintTest.java       |   99 +
 .../test/constraints/composition/Person.java       |   53 +
 .../test/constraints/composition/ValidName.java    |   46 +
 .../composition/ValidNameSingleViolation.java      |   48 +
 .../EagerEvaluationOfComposingConstraintsTest.java |   87 +
 .../lazyevaluation/InvocationCounter.java          |   42 +
 .../lazyevaluation/InvocationCounting.java         |   49 +
 .../InvocationCountingValidator.java               |   36 +
 .../LazyEvaluationOfComposingConstraintsTest.java  |   89 +
 .../test/internal/bootstrap/Customer.java          |   69 +
 .../validator/test/internal/bootstrap/Order.java   |   35 +
 .../test/internal/bootstrap/ValidationTest.java    |  128 +
 .../AssertFalseValidatorTest.java                  |   46 +
 .../AssertTrueValidatorTest.java                   |   47 +
 .../constraintvalidators/BlankValidatorTest.java   |   83 +
 .../CreditCardNumberValidatorTest.java             |   98 +
 .../internal/constraintvalidators/DateHolder.java  |   66 +
 .../DecimalMinMaxValidatorBoundaryTest.java        |  115 +
 .../DigitsValidatorForNumberTest.java              |  124 +
 .../DigitsValidatorForStringTest.java              |   97 +
 .../constraintvalidators/EmailValidatorTest.java   |  199 ++
 .../FutureValidatorForCalendarTest.java            |   64 +
 .../FutureValidatorForDateTest.java                |   60 +
 .../FutureValidatorForReadableInstantTest.java     |   83 +
 .../FutureValidatorForReadablePartialTest.java     |   69 +
 .../constraintvalidators/FutureValidatorTest.java  |   43 +
 .../constraintvalidators/LengthValidatorTest.java  |  102 +
 .../MaxValidatorForNumberTest.java                 |  103 +
 .../MaxValidatorForStringTest.java                 |   99 +
 .../MinMaxValidatorBoundaryTest.java               |   74 +
 .../MinValidatorForNumberTest.java                 |  101 +
 .../MinValidatorForStringTest.java                 |   98 +
 .../ModCheckValidatorTest.java                     |  113 +
 .../constraintvalidators/MyCustomStringImpl.java   |   44 +
 .../constraintvalidators/NotNullValidatorTest.java |   37 +
 .../constraintvalidators/NullValidatorTest.java    |   43 +
 .../PastValidatorForCalendarTest.java              |   63 +
 .../PastValidatorForDateTest.java                  |   60 +
 .../PastValidatorForReadableInstantTest.java       |   83 +
 .../PastValidatorForReadablePartialTest.java       |   69 +
 .../constraintvalidators/PatternValidatorTest.java |   92 +
 .../SafeHtmlValidatorTest.java                     |   80 +
 .../ScriptAssertValidatorTest.java                 |  202 ++
 .../constraintvalidators/SizeValidatorTest.java    |  213 ++
 .../constraintvalidators/URLValidatorTest.java     |  245 ++
 .../internal/engine/ConfigurationImplTest.java     |  160 ++
 .../engine/ConstraintValidatorCachingTest.java     |  274 ++
 .../test/internal/engine/PathImplTest.java         |  235 ++
 .../test/internal/engine/ValidatorTest.java        |  287 ++
 .../cascaded/CascadedClassConstraintTest.java      |   86 +
 .../ConstraintValidatorResolutionTest.java         |  243 ++
 .../engine/customerror/CustomErrorMessageTest.java |   45 +
 .../engine/customerror/DummyTestClass.java         |   26 +
 .../test/internal/engine/customerror/IsValid.java  |   44 +
 .../engine/customerror/IsValidValidator.java       |   40 +
 .../internal/engine/failfast/FailFastTest.java     |  386 +++
 .../DefaultGroupSequenceProviderTest.java          |  195 ++
 .../DynamicGroupSequenceProvider.java              |   40 +
 .../defaultgroupsequenceprovider/StrongCheck.java  |   24 +
 .../groups/defaultgroupsequenceprovider/User.java  |   51 +
 .../groups/inheritance/GroupInheritanceTest.java   |   62 +
 .../internal/engine/groups/inheritance/Try.java    |   49 +
 .../engine/groups/redefiningdefaultgroup/Car.java  |  112 +
 .../groups/redefiningdefaultgroup/CarChecks.java   |   23 +
 .../groups/redefiningdefaultgroup/Driver.java      |   47 +
 .../redefiningdefaultgroup/DriverChecks.java       |   23 +
 .../redefiningdefaultgroup/OrderedChecks.java      |   27 +
 .../groups/redefiningdefaultgroup/Person.java      |   41 +
 .../RedefiningDefaultGroupTest.java                |  384 +++
 .../groups/redefiningdefaultgroup/RentalCar.java   |   29 +
 .../engine/groups/validationorder/First.java       |   25 +
 .../engine/groups/validationorder/GroupA.java      |    9 +
 .../engine/groups/validationorder/GroupB.java      |    9 +
 .../engine/groups/validationorder/Last.java        |   25 +
 .../engine/groups/validationorder/Second.java      |   25 +
 .../groups/validationorder/TestSequence.java       |    9 +
 .../validationorder/ValidationOrderTest.java       |  138 +
 .../groups/validationordergenerator/Address.java   |   80 +
 .../CyclicGroupSequence.java                       |   26 +
 .../CyclicGroupSequence1.java                      |   26 +
 .../CyclicGroupSequence2.java                      |   26 +
 .../ValidationOrderGeneratorTest.java              |  178 ++
 .../ZipCodeCoherenceChecker.java                   |   39 +
 .../ZipCodeCoherenceValidator.java                 |   33 +
 .../MessageInterpolationTest.java                  |  172 ++
 .../MessageInterpolationWithDefaultBundleTest.java |  142 +
 .../MessageInterpolatorContextTest.java            |  107 +
 .../ResourceBundleMessageInterpolatorTest.java     |  378 +++
 .../internal/engine/messageinterpolation/User.java |   49 +
 .../ValueFormatterMessageInterpolatorTest.java     |  285 ++
 .../IllegalMethodParameterConstraintsTest.java     |  183 ++
 .../MethodLevelValidationGroupSequenceTest.java    |  270 ++
 .../methodlevel/MethodLevelValidationTest.java     |  638 +++++
 .../internal/engine/methodlevel/model/Address.java |   39 +
 .../engine/methodlevel/model/Customer.java         |   54 +
 .../methodlevel/service/CustomerRepository.java    |   81 +
 .../service/CustomerRepositoryImpl.java            |  113 +
 ...ustomerRepositoryWithRedefinedDefaultGroup.java |   86 +
 ...merRepositoryWithRedefinedDefaultGroupImpl.java |   64 +
 .../engine/methodlevel/service/RepositoryBase.java |   51 +
 .../validator/test/internal/engine/proxy/A.java    |   28 +
 .../validator/test/internal/engine/proxy/B.java    |   20 +
 .../test/internal/engine/proxy/ProxyTest.java      |   83 +
 .../ConstraintViolationSerializationTest.java      |   85 +
 .../CustomConstraintSerializableTest.java          |   98 +
 .../engine/serialization/DummyEmailValidator.java  |   34 +
 .../test/internal/engine/serialization/Email.java  |   51 +
 .../engine/serialization/SerializableClass.java    |   28 +
 .../engine/serialization/UnSerializableClass.java  |   27 +
 .../engine/traversableresolver/Author.java         |   41 +
 .../traversableresolver/AuthorBusinessRules.java   |   37 +
 .../internal/engine/traversableresolver/Book.java  |   36 +
 .../traversableresolver/BookBusinessRules.java     |   38 +
 .../CachedTraversableResolverTest.java             |  137 +
 .../internal/engine/traversableresolver/Cloth.java |   23 +
 .../engine/traversableresolver/Jacket.java         |   36 +
 .../JpaTraversableResolverTest.java                |   66 +
 .../internal/engine/traversableresolver/Suit.java  |   60 +
 .../TraversableResolverTest.java                   |   96 +
 .../engine/traversableresolver/Trousers.java       |   38 +
 .../internal/metadata/BeanMetaDataManagerTest.java |  137 +
 .../test/internal/metadata/ChildWithAtValid.java   |   32 +
 .../internal/metadata/ChildWithoutAtValid.java     |   29 +
 .../internal/metadata/ChildWithoutAtValid2.java    |   32 +
 .../validator/test/internal/metadata/Customer.java |   66 +
 .../test/internal/metadata/CustomerRepository.java |   64 +
 .../internal/metadata/CustomerRepositoryExt.java   |   63 +
 .../validator/test/internal/metadata/Engine.java   |   40 +
 .../validator/test/internal/metadata/Order.java    |   35 +
 .../test/internal/metadata/ParentWithAtValid.java  |   31 +
 .../internal/metadata/ParentWithoutAtValid.java    |   29 +
 .../validator/test/internal/metadata/Person.java   |   35 +
 .../aggregated/AggregatedMethodMetaDataTest.java   |  158 ++
 .../metadata/aggregated/BeanMetaDataImplTest.java  |  101 +
 .../metadata/aggregated/MethodMetaDataTest.java    |  126 +
 .../metadata/aggregated/ParameterMetaDataTest.java |  108 +
 .../metadata/core/ConstraintHelperTest.java        |   75 +
 .../metadata/descriptor/ElementDescriptorTest.java |  157 +
 .../metadata/descriptor/MethodDescriptorTest.java  |  171 ++
 .../descriptor/ParameterDescriptorTest.java        |  141 +
 .../metadata/descriptor/TypeDescriptorTest.java    |  266 ++
 .../provider/AnnotationMetaDataProviderTest.java   |  125 +
 .../util/BoundariesConstraintValidator.java        |   38 +
 .../test/internal/util/IdentitySetTest.java        |   77 +
 .../internal/util/LazyValidatorFactoryTest.java    |   54 +
 .../validator/test/internal/util/ModUtilTest.java  |   73 +
 .../validator/test/internal/util/Positive.java     |   38 +
 .../internal/util/PositiveConstraintValidator.java |   26 +
 .../test/internal/util/ReflectionHelperTest.java   |  206 ++
 .../test/internal/util/TypeHelperTest.java         |  928 ++++++
 .../annotationfactory/AnnotationFactoryTest.java   |   61 +
 .../validator/test/internal/xml/Customer.java      |   70 +
 .../validator/test/internal/xml/MyInterface.java   |   26 +
 .../test/internal/xml/MyInterfaceImpl.java         |   27 +
 .../validator/test/internal/xml/Person.java        |   29 +
 .../validator/test/internal/xml/Properties.java    |   36 +
 .../test/internal/xml/XmlMappingTest.java          |  161 ++
 .../xml/mixedconfiguration/ICompetition.java       |   19 +
 .../internal/xml/mixedconfiguration/IFixture.java  |   21 +
 .../InheritanceMappingsTest.java                   |  132 +
 .../mixedconfiguration/annotation/Competition.java |   45 +
 .../xml/mixedconfiguration/annotation/Fixture.java |   30 +
 .../xml/mixedconfiguration/annotation/Game.java    |   47 +
 .../mixedconfiguration/annotation/GameDetail.java  |   43 +
 .../annotation/PersonCompetition.java              |   28 +
 .../annotation/TeamCompetition.java                |   27 +
 .../xml/mixedconfiguration/xml/Competition.java    |   40 +
 .../xml/mixedconfiguration/xml/Fixture.java        |   35 +
 .../internal/xml/mixedconfiguration/xml/Game.java  |   42 +
 .../xml/mixedconfiguration/xml/GameDetail.java     |   38 +
 .../mixedconfiguration/xml/PersonCompetition.java  |   28 +
 .../mixedconfiguration/xml/TeamCompetition.java    |   28 +
 .../test/resourceloading/AggregateBundleTest.java  |   98 +
 .../AggregateResourceBundleLocatorTest.java        |   99 +
 .../testutil/ConstraintViolationAssert.java        |  262 ++
 .../validator/testutil/CountValidationCalls.java   |   40 +
 .../testutil/CountValidationCallsValidator.java    |   48 +
 .../testutil/DummyTraversableResolver.java         |   38 +
 .../validator/testutil/HibernateTestCase.java      |  118 +
 .../hibernate/validator/testutil/TestForIssue.java |   37 +
 .../testutil/ValidationInvocationHandler.java      |   86 +
 .../validator/testutil/ValidatorUtil.java          |  251 ++
 .../hibernate/validator/testutil/package-info.java |   20 +
 .../resources/ValidationMessages_es.properties     |    0
 .../src/test/resources/hibernate.properties        |    0
 project/engine/src/test/resources/log4j.properties |   26 +
 .../validator/test/internal/engine/mapping.xml     |    8 +
 .../internal/xml/empty-my-interface-mapping.xml    |    7 +
 .../validator/test/internal/xml/hv-480-mapping.xml |   15 +
 .../validator/test/internal/xml/mapping.xml        |   16 +
 .../xml/mixedconfiguration/annotation-mappings.xml |    0
 .../xml/mixedconfiguration/xml-mappings.xml        |   37 +
 .../internal/xml/my-interface-impl-mapping.xml     |   10 +
 .../test/internal/xml/my-interface-mapping.xml     |   10 +
 .../test/internal/xml/properties-mapping.xml       |   11 +
 ...gateResourceBundleLocatorTestBundle1.properties |    0
 ...gateResourceBundleLocatorTestBundle2.properties |    0
 project/engine/src/test/suite/unit-tests.xml       |    9 +
 project/integration/pom.xml                        |  163 ++
 .../integration/src/main/java/.dontdelete          |    0
 .../CustomValidatorFactoryInPersistenceUnitIT.java |   97 +
 ...DefaultValidatorFactoryInPersistenceUnitIT.java |   97 +
 .../jbossas7/JndiLookupOfValidatorFactoryIT.java   |   79 +
 .../validator/integration/jbossas7/User.java       |   43 +
 ...actoryWithValidationXmlButNoProviderTestIT.java |   71 +
 ...azyValidatorFactoryWithValidationXmlTestIT.java |   63 +
 ...ValidatorFactoryWithoutValidationXmlTestIT.java |   64 +
 .../integration/util/IntegrationTestUtil.java      |   95 +
 .../integration/util/MyValidationProvider.java     |   76 +
 .../validator/integration/util/MyValidator.java    |   49 +
 .../integration/util/MyValidatorConfiguration.java |   83 +
 .../integration/src/test/resources/arquillian.xml  |   37 +
 .../javax.validation.spi.ValidationProvider        |    1 +
 .../test/resources/jboss-deployment-structure.xml  |   30 +
 .../src/test/resources/log4j.properties            |    8 +
 .../integration/src/test/resources/validation.xml  |   22 +
 project/performance/pom.xml                        |  191 ++
 project/performance/readme.md                      |   80 +
 project/performance/src/jmx/cascaded.jmx           |  154 +
 .../src/jmx/simple-cached-validator-factory.jmx    |  187 ++
 .../src/jmx/simple-uncached-validator-factory.jmx  |  185 ++
 project/performance/src/jmx/statistical.jmx        |  185 ++
 .../cascaded/CascadedValidationTest.java           |   79 +
 .../performance/simple/SimpleValidationTest.java   |  141 +
 .../StatisticalConstraintValidator.java            |   76 +
 .../statistical/StatisticalValidationTest.java     |   74 +
 .../performance/statistical/TestEntity.java        |   92 +
 .../src/main/resources/log4j.properties            |   26 +
 .../validator/performance/statistical/mapping.xml  |   65 +
 project/pom.xml                                    |  497 ++++
 project/settings-example.xml                       |  321 +++
 .../src/main/javadoc/resources/bkg_blkheader.png   |  Bin
 .../src/main/javadoc/resources/bkg_gradient.gif    |  Bin
 .../src/main/javadoc/resources/bkgheader.png       |  Bin
 .../src/main/javadoc/resources/h1_hdr.png          |  Bin
 .../src/main/javadoc/stylesheet.css                |    0
 project/tck-runner/pom.xml                         |  377 +++
 project/tck-runner/readme.md                       |   30 +
 .../META-INF/jboss-test-harness.properties         |    2 +
 .../tck-runner}/src/test/resources/log4j.xml       |    0
 src/site/site.xml                                  |   21 -
 1277 files changed, 82061 insertions(+), 43818 deletions(-)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0140dfe
--- /dev/null
+++ b/README.md
@@ -0,0 +1,76 @@
+# Hibernate Validator
+
+*Version: 4.3.1.Final, 28.11.2012*
+
+
+## What is it?
+
+This is the reference implementation of JSR 303 - Bean Validation. 
+Bean Validation defines a metadata model and API for JavaBean validation. 
+The default metadata source is annotations, with the ability to override and extend 
+the meta-data through the use of XML validation descriptors.
+
+## A bit of history
+
+Prior to version 4.x Hibernate Validators was based on a different source base which 
+is not based on JSR 303. This code can be accessed via [this](https://github.com/hibernate/hibernate-validator/tree/pre-validator3-removal/hibernate-validator-legacy) GitHub tag.
+
+## Documentation
+
+The documentation for this release is included in the docs directory of distribution package or can be accessed [online](  http://www.hibernate.org/subprojects/validator/docs.html).
+
+## Release Notes
+
+The full list of changes for this release can be found in changelog.txt.
+
+## System Requirements
+
+JDK 1.6 or above.
+
+## Using Hibernate Validator
+
+* In case you use the distribution archive from the download site, copy dist/hibernate-validator-<version>.jar together with all
+jar files from dist/lib/required into the classpath of your application. For the purposes of logging, Hibernate Validator uses
+the JBoss Logging API, an abstraction layer which supports several logging solutions such (e.g. log4j or the logging framework
+provided by the JDK) as implementation. Just add a supported logging library to the classpath (e.g. log4j-<version>.jar) and JBoss
+Logging will delegate any log requests to that provider.
+
+* Add the following to your maven or ivy dependency list (Hibernate Validator can be found in the [JBoss Maven repository](http://repository.jboss.org/nexus/content/groups/public-jboss)):
+
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>4.3.1.Final</version>
+        </dependency>
+
+
+*hibernate-validator-annotation-processor-<version>.jar* is an optional jar which can be integrated with your build
+environment respectively IDE to verify that constraint annotations are correctly used. Refer to the online
+documentation for more information.
+
+## Licensing
+
+Hibernate Validator itself as well as the Bean Validation API and TCK are all provided and distributed under
+the Apache Software License 2.0. Refer to license.txt for more information.
+
+## Build from Source
+
+You can build Hibernate Validator from source by cloning the git repository git://github.com/hibernate/hibernate-validator.git
+You will also need a JDK 6 or 7 and a Maven 3. With these prerequisites in place you can compile the source via
+
+    mvn clean install -s settings-example.xml
+
+The documentation module requires an additional tool called po2xml. If you don't have po2xml installed you can
+skip the building of the documentation via:
+
+    mvn clean install -DdisableDocumentationBuild=true -s settings-example.xml
+
+There are more build options available as well. For more information refer to [Contributing to Hibernate Validator](http://community.jboss.org/wiki/ContributingtoHibernateValidator).
+
+## Hibernate Validator URLs
+
+* [Home Page](http://validator.hibernate.org)
+* [Downloads](http://www.hibernate.org/subprojects/validator/download.html)
+* [Mailing Lists](http://www.hibernate.org/community/mailinglists.html)
+* [Source Code](git://github.com/hibernate/hibernate-validator.git)
+* [Issue Tracking](http://opensource.atlassian.com/projects/hibernate/browse/HV)
diff --git a/changelog.txt b/changelog.txt
new file mode 100644
index 0000000..ed906cc
--- /dev/null
+++ b/changelog.txt
@@ -0,0 +1,640 @@
+Hibernate Validator Changelog
+=============================
+
+4.3.1.Final (28.11.2012)
+------------------------
+
+** Bug
+    * [HV-591] - EmailValidator throws an IllegalArgumentException for long email addresses
+    * [HV-601] - NPE w/ overloaded methods on class validated with MethodValidationInterceptor
+    * [HV-607] - Email Validator producing error for large email addresses
+    * [HV-609] - EmailValidator fails where email address is large
+    * [HV-613] - email handles complete address as idn label and fails for valid longer addresses
+    * [HV-622] - Assumes all getX/setX methods are bean properties and errors with "wrong number of arguments"
+    * [HV-623] - Wrong constraint validator type resolution in case of constraint placed on parameterized type in class hierachy
+    * [HV-625] - EmailValidator.isValid sometimes throws an exception instead of returning false
+    * [HV-626] - AnnotationMetaDataProvider should use #getDeclaredAnnotations instead of #getAnnotations when reading metadata from class and members
+
+** Task
+    * [HV-639] - Evaluation of composed constraints should stops on first validation error when @ReportAsSingleViolation is used
+
+
+4.3.0.Final (09.05.2012)
+------------------------
+
+** Improvement
+    * [HV-568] - Perform a profiling of the annotation processor code and make use of caching where appropriate
+    * [HV-577] - Include javadoc jar in Maven repo
+
+** Task
+    * [HV-578] - Remove remaining references to slf4j
+    * [HV-580] - Remove deprecation of package org.hibernate.validator.group
+
+
+4.3.0.CR1 (30.04.2012)
+----------------------
+
+** Bug
+    * [HV-572] - Ensure the docs directory gets properly included into the distribution
+    * [HV-573] - Need graceful handling of return value constraint applied to method with void return type
+    * [HV-574] - Annotations processing fails with 4.3.0 Beta1
+    * [HV-575] - NPE in annotation processor ConstraintHelper.getName()
+
+** Improvement
+    * [HV-538] - Perform a profiling of the HV code in order to identify performance bottlenecks
+    * [HV-554] -  Regular Expression for @Email
+
+** Task
+    * [HV-100] - Implement a performance test harness for Bean Validation
+    * [HV-569] - Switch to Java 6
+
+
+4.3.0.Beta1 (04.04.2012)
+------------------------
+
+** Bug
+    * [HV-563] - Enable Configuration#buildValidatorFactory() to be callable several times
+    * [HV-567] - @Email reported as "disallowed" for String field
+
+** Improvement
+    * [HV-457] - Simplify annotation processor setup in IDEs in regards to required dependencies
+    * [HV-463] - Revisit the class and implementation of Group/GroupChain
+    * [HV-479] - Implement an eviction strategy for BeanMetaDataCache
+    * [HV-517] - Establish the notion of AnnotationIgnores for programmatic API
+    * [HV-564] - Allow caching of ConstraintValidator instances also for custom ConstraintValidatorFactories
+    * [HV-566] - Shorten directory names
+
+** Task
+    * [HV-558] - Upgrade AS 7 dependencies
+    * [HV-561] - Determine and mark the API to be deprecated for HV5
+
+
+4.3.0.Alpha1 (06.03.2012)
+-------------------------
+
+** Bug
+    * [HV-443] - Scope of ConstraintDescriptors sometimes wrong in type hierarchies
+    * [HV-472] - E-Mail Validator does not validate IDN E-Mail-Addresses
+    * [HV-480] - Constraints configured via XML and programmatic API aren't merged
+    * [HV-506] - Message interpolation should check whether an interpolated annotation paramter is an array
+    * [HV-508] - DecimalMaxValidatorForNumber for a double values is not correct
+    * [HV-509] - Property path is wrong for cascaded validation of class-level constraints
+    * [HV-511] - Minor documentation error
+    * [HV-516] - Hibernate Validator doesn't work well with hibernate persistence when generating DDL
+    * [HV-519] - Typos in ValidationMessages_de.properties
+    * [HV-524] - java.util.NoSuchElementException in type level validation using EclipseLink
+    * [HV-525] - tests fail on openjdk
+    * [HV-531] - hibernate-validator-annotation-processor tests fails when running against JDK7
+    * [HV-537] - Reintroduce jdocbook.ignoreTranslations in the docbook configuration
+    * [HV-543] - spelling mistake in org.hibernate.valisdator.validationMessages_fr.properties
+    * [HV-546] - LazyValidatorFactory does not allow alternative bean validation providers
+    * [HV-550] - fail-fast doesn't work on composite constraints
+    * [HV-551] - @Size doesn't work on List with bounded wildcard
+
+** Improvement
+    * [HV-473] - Add option to Canonicalize String Input
+    * [HV-491] - Add support for MOD11 Algorithm
+    * [HV-500] - ConfigurationImpl should support multiple programmatic constraint mappings
+    * [HV-502] - Changing Generic Type on @Size, @Pattern a.s.o. from String to CharacterSequence
+    * [HV-515] - Performance improvement for MinValidatorForString
+    * [HV-518] - Create copyright.txt as mentioned by the license headers
+    * [HV-520] - Remove package cycle between "descriptor" and "aggregated" packages
+    * [HV-527] - ValidationMessages in Czech language
+    * [HV-529] - ConstraintHelper is obsolete in ValidatorImpl
+    * [HV-539] - Modify how MANIFESTs are generated
+    * [HV-545] - Update TCK runner to run against AS 7.1
+    * [HV-547] - Make Hibernate Validator build not fail
+
+** Task
+    * [HV-441] - Refactor BeanMetaDataImpl
+    * [HV-465] - Remove obsolete type parameter from MetaConstraint#validateConstraint()
+    * [HV-481] - Move to i18n logs and exception via JBoss Logging
+    * [HV-484] - Refactor package organisation to clearly separate spi, public and private APIs - part 1 (internal packages)
+    * [HV-496] - Include Hibernate Validator test classes in a different classifier
+    * [HV-505] - Update tck runner to run against AS 7.0.0.Final
+    * [HV-510] - Upgrade BV TCK dependency to 1.0.6.GA 
+    * [HV-528] - Compilation fails with JDK 7 due to incompatabilites of JAXB versions
+    * [HV-530] - Explain propagation of redefined default groups across associated instances annotated with @Valid
+    * [HV-534] - Consider removing the shading plug-in
+    * [HV-536] - Upgrade JSoup dependency
+    * [HV-540] - Remove repository settings from the master pom
+    * [HV-544] - Create a integration test moodule 
+
+4.2.0.Final (20.06.2011)
+----------------------
+
+** Improvement
+    * [HV-315] - Create package-level JavaDoc for the AP
+    * [HV-485] - Determine an order for the constraint mapping fluent API
+    * [HV-486] - Remove getMethod() from MethodConstraintViolation
+    * [HV-490] - Create @SafeHtml annotation
+    * [HV-493] - Add support for Brazilian Portuguese for ValidationMessages
+
+** New Feature
+    * [HV-372] - Add section to method-level validation to the HV reference guide
+
+** Task
+    * [HV-489] - Upgrade dependency to BV TCK to 1.0.5.GA
+    * [HV-494] - upgrade to hibernate-jpa-2.0-api-1.0.1.Final
+    * [HV-497] - Create aggregated javadocs for the distribution and deployment on docs server
+
+4.2.0.CR1 (09.06.2011)
+----------------------
+
+** Bug
+    * [HV-406] - URL Validator not effective
+    * [HV-437] - Improve the javadocs of the URL constraints
+    * [HV-447] - Create documentation for boolean composition of composing constraints
+    * [HV-452] - Incorrect Paths when using fluent API to add constraints to a context
+    * [HV-458] - Wrong behaviour determining default group constraints in conjunction with @GroupSequence
+    * [HV-459] - Run TCK against AS 7
+    * [HV-466] - Avoid repeated validation of constraints in certain type hierarchies
+    * [HV-468] - Determine whether a property is indexed based on the runtime not static type
+    * [HV-470] - resolvedMessages in ResourceBundleMessageInterpolator needs to be synchronized
+
+** Improvement
+    * [HV-407] - Update "Presentation layer validation" section
+    * [HV-417] - Add section on public API and it's changes to the reference guide
+    * [HV-434] - ValidatorImpl#shouldFailFast() and ValidationContext#shouldFailFast() seem redundant
+    * [HV-442] - Make clear in the documentation which types are supported for built-in constraints
+    * [HV-446] - The annotation processor should allow constraint annotations at non-getter methods
+    * [HV-449] - Remove interface check in BeanMetaDataImpl#newGroupSequenceProviderInstance()
+    * [HV-453] - Add an example of default group sequence provider configuration with the programmatic API
+    * [HV-454] - Fix a mistake in the reference guide about custom properties supported by Hibernate Validator
+    * [HV-461] - Refactor TestUtil class
+    * [HV-475] - Add required and public packages to the OSGi manifest
+    * [HV-488] - Rename MethodDescriptor#getParameterConstraints() method
+
+** New Feature
+    * [HV-436] - The annotation processor should check @GroupSequenceProvider
+
+** Patch
+    * [HV-483] - ValidationMessages translation to Spanish
+
+** Task
+    * [HV-400] - Align the configuration of the archetype plugin with the configuration in search
+    * [HV-431] - Extend programmatic API to allow the definition of method level constraints
+    * [HV-464] - Remove obsolete type parameter from ParameterMetaConstraint
+    * [HV-471] - Group has to be an interface - Documentation or code bug
+    * [HV-474] - Get Hibernate Validator a proper changelog file
+    * [HV-487] - Settle on an approach for instantiating constraint definitions
+
+4.2.0.Beta2 (09.02.2011)
+------------------------
+
+** Bug
+    * [HV-376] - validateValue() and validateProperty() are too restrictive regarding processable property names
+    * [HV-381] - Provide a fail fast switch to stop processing constraints on first failure
+    * [HV-414] - Assembly plugin fails with maven 3.0.1
+    * [HV-418] - The annotation processor shouldn't report @Past/@Future given at Joda types as errors
+    * [HV-421] - Reconsider behavior of parameter validation for inheritance hierarchies
+    * [HV-422] - slf4j version in hibernate-validator
+    * [HV-426] - Wrong name in version logging message
+    * [HV-428] - Java 1.6 specific method used in programmatic validation API
+    * [HV-429] - validateValue and validateProperty using wrong default group sequence
+    * [HV-430] - XML configuration does not allow configuration of public fields in superclass
+    * [HV-433] - Cascaded validation on superclass fields does not work if only @Valid is used
+    * [HV-444] - Default group sequence defined with programmatic API is not used if the configured class doesn't define programmatic constraints
+
+** Improvement
+    * [HV-415] - Rename validateParameters to validateAllParameters
+    * [HV-419] - Update the dependency to slf4j-api to 1.6.x
+    * [HV-424] - Validators for Joda types should be specified for ReadableInstant/ReadablePartial
+
+** New Feature
+    * [HV-94] - Support dynamic default group sequence definition
+    * [HV-371] - Support method-level constraints in meta-data API
+
+** Task
+    * [HV-420] - Deprecate legacy validator
+    * [HV-440] - Extend programmatic API to allow the definition of default group sequence provider
+
+4.2.0.Beta1 (13.01.2011)
+------------------------
+
+** Sub-task
+    * [HV-367] - Evaluate @Valid annotation given at parameters
+    * [HV-368] - Evaluate @Valid annotation given at return values
+    * [HV-369] - Evaluate constraint annotations given at parameters
+    * [HV-370] - Evaluate constraint annotations given at return values
+
+** Bug
+    * [HV-350] - Inherited Bean validates non-default constraints as default
+    * [HV-352] - In some cexceptional cases the original stacktrace is not preserved
+    * [HV-355] - RangeDef's min() and max() are just wrong
+    * [HV-362] - Including Annotation Processor in Eclipse results in java.lang.OutOfMemoryError: Java heap space
+    * [HV-363] - HV uses Thread's context class loader to load internal implementation classes
+    * [HV-374] - NoSuchMethodError on Persistence.getPersistenceUtil() on WebLogic 10.3.3 (11g)
+    * [HV-379] - Remove obsolete dependency exlusion from tck-runner pom
+    * [HV-382] - "java.lang.NoSuchMethodError: java.lang.String.isEmpty" in ScriptAssertValidator.java
+    * [HV-384] - Performence problem when using programatic constrain declaration
+    * [HV-385] - Typo in German validation messages
+    * [HV-387] - org.hibernate.validator.cfg.defs.GenericConstraintDef should (probably) not extend the raw type ConstraintDef
+    * [HV-391] - Review assertions of @Past and @Future tests
+    * [HV-395] - Align Path.Node implementation with the Bean Validation specification
+    * [HV-396] - Build for hibernate-validator module fails using Maven 3 due to problem with the maven-shade-plugin
+    * [HV-398] - Build of Hibernate Validator Quickstart failed with another default locale than en
+    * [HV-402] - Make sure that Validator still works on JDK 5 due to ValueMessageInterpolator
+    * [HV-403] - Create a ValueMessageInterpolator based on java.text.Format instead of the scripting engine
+    * [HV-405] - Hibernate validator doesn't work well on JDK5
+    * [HV-408] - Validator throws wrongly an exception for constraints placed on  non-getter methods
+
+** Improvement
+    * [HV-346] - Improve some of the default debug/info messages
+    * [HV-353] - Support inheritance for group validation
+    * [HV-359] - chinese message template
+    * [HV-365] - It is very hard to find the HV annotation processor
+    * [HV-366] - The documentation refers to http://repository.jboss.com/maven2: this should be fixed to point to the new maven settings
+    * [HV-410] - Clarify the license on both the website and the reference documentation
+    * [HV-412] - Move GenericConstraintDef into org.hibernate.validator.cfg
+
+** New Feature
+    * [HV-299] - Annotation processor should check constraint annotation type declarations
+    * [HV-307] - Support @Past/@Future annotations at types from the Joda Time API
+    * [HV-347] - Create method level validation
+    * [HV-357] - Create a chapter for the reference guide describing the meta-data API
+    * [HV-358] - Create a pluggable MessageInterpolator which can interploate ${value}
+    * [HV-390] - Boolean composition of constraints
+    * [HV-401] - Ensure that the default validation provider is Hibernate Validator in LazyValidatorFactory
+
+** Task
+    * [HV-327] - Update TCK runner dependecies to not depend on the JBoss deprecated repo
+    * [HV-348] - Add note to JPA integration section about access type when using lazy loaded OneToOne and ManyToOne associations
+    * [HV-349] - Hungarian translation for ValidationMessages.properties
+    * [HV-351] - Translate hv document into chinese
+    * [HV-375] - Update jboss-testharness and bv tck dependecies
+    * [HV-378] - Cleanup the pom
+    * [HV-383] - Update VCS information in pom
+    * [HV-386] - Move readme.txt into top level directory
+    * [HV-392] - Update entity-manager tests dependecy to 3.6.0.Final
+    * [HV-393] - Version class should get the version injected via the maven-injection-plugin
+    * [HV-394] - Change log level from info to debug in DefaultTraversableResolver
+    * [HV-413] - Activate chinese transalation, update po and pot files and make sure that the translation gets included in the dist bundle
+
+4.1.0.Final (21.06.2010)
+------------------------
+
+** Bug
+    * [HV-335] - @Max, @Min, @DecimalMax and @DecimalMin can give wrong results
+    * [HV-339] - ^ not allowed in Email
+    * [HV-343] - Package type in the documentation example
+
+** Improvement
+    * [HV-338] - Move the discovery of constraint types into the constructor of ConstraintTree
+    * [HV-340] - When checking for composing constraints ignore annotations like @Target, @Documented, ...
+    * [HV-341] - Reduce the amounf of Annotation.annotationType() calls since reflection calls are expensive
+    * [HV-342] - Reduce the amout of calls to ConstraintHelper.isMultiValueConstraint
+    * [HV-344] - Add example for configuring hibernate validator through Spring session factory bean
+
+** Task
+    * [HV-334] - Stop hibernate-validator-legacy to be deployed in the maven repo
+    * [HV-336] - Remove deprecated constructor in ResourceBundleMessageInterpolator
+    * [HV-337] - Update documentation regarding the effects of @Length during DDL generation
+
+4.1.0.CR1 (14.06.2010)
+----------------------
+
+** Bug
+    * [HV-332] - Investigate the usage of CachingResourceBundleLocator in ResourceBundleMessageInterpolator
+    * [HV-333] - Verify that MessageInterpolatorContext.getValidatedValue returns the right value
+
+** Task
+    * [HV-331] - Investigate use of  field/method.setAccessible( true )
+
+4.1.0.Beta2 (02.06.2010)
+------------------------
+
+** Bug
+    * [HV-281] - validation of a persisted map
+    * [HV-293] - Annotation processor fails in Eclipse when evaluating custom constraints not defined in the current project
+    * [HV-305] - JPATraversableResolver tries to access properties that do not exist
+    * [HV-306] - Falling back to system´s default locale if chosen locale was EN
+    * [HV-309] - POM file's content-type is text/plain
+    * [HV-312] - Close all input streams opened by HV
+    * [HV-319] - Example in online documention reference javax.validation.ConstraintPayload instead of  javax.validation.Payload
+    * [HV-321] - javax.persistence.PersistenceException when trying to validate an object graphs with a class-level constraint annotation. In addition to the error report HV-266
+    * [HV-323] - URL Validator needs to pass on empty Strings
+    * [HV-324] - Default annotation not executing when group selector activated
+    * [HV-326] - Verify that for caching user objects during the validation process we use a IdentityHashMap or IdentityHashSet
+    * [HV-328] - Configuration.addMapping( null ) should throw IllegalArgumentException
+    * [HV-329] - Update quickstart section and remove reference to archetype catalog
+
+** Improvement
+    * [HV-156] - Exploring properties and cascade is unnecessary if TraversableResolver returns false
+    * [HV-298] - Add a section on using the annotation processor to the HV reference guide
+    * [HV-302] - JAXB shouldn't be required when not using XML configuration
+    * [HV-310] - Define, which parts of HV constitute its public API
+    * [HV-313] - Extract messaging related stuff from ConstraintAnnotationVisitor
+    * [HV-314] - Add @List annotations to the HV-specific constraints
+    * [HV-316] - Extract constraint checking from ConstraintAnnotationVisitor into separate check classes
+    * [HV-322] - Establish a processor option "verbose"
+
+** New Feature
+    * [HV-230] - Database Connective or @Unique
+    * [HV-274] - Write a programmatic mapping API for constraint declarations
+    * [HV-292] - Provide a constraint annotation @ScriptAssert
+
+** Patch
+    * [HV-151] - The mongolian validation message translation patch.
+
+** Task
+    * [HV-311] - Update pom to use the new distributationManagement information
+    * [HV-317] - Rename Global- and LocalExecutionContext
+    * [HV-325] - Align javadoc styles with the Core javadoc styles
+    * [HV-330] - Add a new constructor to ResourceBundleMessageInterpolator which enable/disables internal message caching
+
+4.1.0.Beta1 (24.03.2010)
+------------------------
+
+** Bug
+    * [HV-246] - BeanValidationEventListener has a bug (technically a problem with hibernate-annotations 3.5.0beta1... but I couldn't find that project)
+    * [HV-261] - Invalid license info
+    * [HV-266] - NullPointerException when trying to validate an object with a class-level constraint annotation.
+    * [HV-272] - jaxb dependencies should be dependencies with scope 'provided' instead of profile dependencies
+    * [HV-275] - Update french message template for @Email
+    * [HV-279] - Validator docbook files still reference GPL
+    * [HV-288] - The validator doesn't validate correctly groups composing a group sequence
+    * [HV-290] - Check the right copyright header is used in documenation
+    * [HV-291] - ConstraintViolation not serializable for composed constraints
+    * [HV-294] - Annotation processor should raise an error when @Valid is given at wrong places
+    * [HV-297] - Custom error messages built via ConstraintValidatorContext get ignored when constraint uses @ReportAsSingleViolation
+    * [HV-300] - Relocation from com.googlecode.jtype to org.hibernate.validator.jtype didn't catch all references
+
+** Improvement
+    * [HV-251] - ResourceMessageInterpolater - allow create with map of user resource bundles
+    * [HV-267] - Enhance distribution jar to make it OSGi bundle
+    * [HV-278] - ValidationMessages_de.properties spelling: "erwartet" instead of "erwarted"
+    * [HV-287] - French translation is not complete
+
+** New Feature
+    * [HV-229] - @Url needs to be added
+    * [HV-238] - Introduce a ResourceBundleLocatorStrategy interface which allows the ResourceBundleMessageInterpolator to delegate the loading of the resource bundle
+    * [HV-269] - Create an annotation processor validating constraint and property matching
+    * [HV-301] - Add a trim property to @NotEmpty please
+
+** Patch
+    * [HV-227] - hibernate validator message for turkish locale
+    * [HV-284] - Documentation fixes for hibernate-core integration
+    * [HV-286] - NoSuchMethodError on Persistence.getPersistenceUtil() when one follows the README file
+
+** Task
+    * [HV-141] - Use commons-annotations to apply the configuration specified in XML
+    * [HV-254] - Add section about ConstraintValidatorContext to documentation
+    * [HV-273] - Upgrade jtype and jpa2 dependency
+    * [HV-276] - Make sure that all used maven plugins specify their version explicitly
+    * [HV-282] - Create CreditCardValidator
+    * [HV-283] - Remove the legacy module from the main aggregator
+    * [HV-289] - Add requirements section to online manual about usage of Validator in JDK 5 and 6
+
+4.0.2.GA (06.11.2009)
+---------------------
+
+** Bug
+    * [HV-263] - NullPointerException when no constraint in xml
+    * [HV-265] - Constraints not loaded consistently for inherited classes
+    * [HV-268] - Wrong message templates for @Email and @Range
+
+4.0.1.GA (28.10.2009)
+---------------------
+
+** Bug
+    * [HV-250] - No validator could be found for type: T
+    * [HV-252] - HV with XML config tells me "Invalid property path." even though I know there is such a property.
+    * [HV-255] - Improve error handling for validateValue and validateProperty
+    * [HV-257] - ReflectionHelper.getValue fails to retrieve values from methods defined on a parent interface
+    * [HV-258] - The documentation for HV contains a invalid reference in section 2.1.3 class level constraints
+    * [HV-262] - Using interface in xml configuration does not work
+
+** Improvement
+    * [HV-253] - Fluent API to add path nodes is not flexible enough
+
+** Task
+    * [HV-259] - Add a payload example to the documentation
+
+4.0.0.GA (08.10.2009)
+---------------------
+
+** Sub-task
+    * [HV-217] - ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution
+    * [HV-218] - Validator implementation resolution is based on the returned value (at runtime) instead of the returned type
+    * [HV-222] - MessageInterpolationTest#testFallbackToDefaultLocale
+    * [HV-223] - BeanDescriptorTest#testGetConstraintsForNullProperty should be mapped
+    * [HV-224] - ConstraintValidatorContextTest#testDisableDefaultErrorWithoutAddingCustomError should raise a ValidationException
+    * [HV-225] - Tests in GroupSequenceIsolationTest and NestedConstraintCompositionTest need to be mapped or moved to the HV test suite
+    * [HV-244] - Cache the type to ConstraintValidator class computation per constraint declaration
+
+** Bug
+    * [HV-134] - Built-in constraint parameter validation
+    * [HV-180] - Failure when compiling Hibernate Validator
+    * [HV-199] - Various TCK issues
+    * [HV-213] - Should we mark ConstraintViolation as Serializable?
+    * [HV-231] - Add default messages for DecimalMin and DecimalMax to resource bundle
+    * [HV-234] - make sure int[] is converted in Integer[] when needed by a constraintValidator call
+    * [HV-249] - findConstraints() .unorderedAndMatchingGroups in ElementDescriptor honors default sequence overriding
+
+** Improvement
+    * [HV-129] - ResourceBundleMessageInterpolatorTest should not test ResourceBundleMessageInterpolato but rather the Bean Validation provider default bundle
+    * [HV-132] - Support hasBoolean format
+    * [HV-235] - More useful exception error messages
+    * [HV-236] - Spring/Hibernate integration, and maven suggestions
+    * [HV-239] - Rename ValidatorConfiguration to HibernateValidatorConfiguration and move from o.h.v.engine to o.h.v package
+    * [HV-240] - Replace Red Hat Middleware LLC to Red Hat, Inc. and/or its affiliates
+    * [HV-242] - Cache ConstraintValidator instances per ValidatorFactory and not per ConstraintTree
+    * [HV-245] - Make ConstraintViolation + Path implementations Serializable
+
+** Task
+    * [HV-220] - Complete documentation
+    * [HV-221] - Create a JPAValidateListener equivalent in the new hibernate validator
+    * [HV-232] - Modify the BeanValidationEventListener in the annotation project to be configurable via the hibernate config file
+    * [HV-233] - Make sure jtype implements the following rules
+    * [HV-237] - Add a toString implementation to ConstraintViolationImpl
+    * [HV-241] - Add @Email and @Range constraints
+    * [HV-247] - Implement latest changes to meta data API in ri
+
+4.0.0.CR1 (27.08.2009)
+----------------------
+
+** Sub-task
+    * [HV-200] - ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false?
+    * [HV-201] - BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name?
+    * [HV-202] - BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext)
+    * [HV-203] - MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV
+    * [HV-206] - CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation
+
+** Bug
+    * [HV-183] - Composite constraints have to honour the payload parameter as well
+    * [HV-191] - JPA 2 Dependency
+    * [HV-208] - Wrong Path in ConstraintViolation
+    * [HV-209] - Correctly handle <valid> configured in xml
+    * [HV-210] - XML constraint declaration with missing mandatory elements throws IllegalArgumentException insteadof  ValidationException
+    * [HV-212] - Group sequence resolution has to take sequence order of composing groups (via inheritance or other group sequence) into account
+    * [HV-214] - Constraints from interfaces and superclasses are not inherited when XML descriptors are used
+    * [HV-216] - Add the payload parameter to the xml configuration
+
+
+** Improvement
+    * [HV-185] - Change package name in codebase from org.hibernate.validation to org.hibernate.validator
+    * [HV-189] - ResourceBundleMessageInterpolator should cache the interpolation results for step 1-3 of the interpolation algorithm
+
+** New Feature
+    * [HV-91] - Make sure Validator<T> is thread-safe in the RI
+    * [HV-176] - Return the list of matching ConstraintDescriptor for a given set of groups
+
+
+
+** Task
+    * [HV-99] - Write unit tests for bootstrapping
+    * [HV-140] - Review all unchecked warnings
+    * [HV-188] - Cleanup ElementDescriptorImpl after we depend on bv api post CR3
+    * [HV-211] - Class name refactoring
+    * [HV-215] - Rename ConstraintPayload to Payload
+
+4.0.0.Beta3 (12.08.2009)
+------------------------
+
+** Bug
+    * [HV-124] - Hundreds of raw type use across the codebase
+    * [HV-186] - ResourceBundleMessageInterpolator has to allow all characters as message parameter
+    * [HV-187] - An exception occuring during a cal to the TraversableResolver has to be wrapped in a ValidationException
+    * [HV-190] - The Path implementation has to be matched with the specification
+    * [HV-192] - DigitsValidatorForNumber should strip trailing zeros
+    * [HV-193] - @OverridesAttribute.index starts at 0, not 1
+    * [HV-194] - Loading XML resources leads to NPE if the context classloader is not set
+    * [HV-196] - validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties
+    * [HV-198] - Wrong constraint violation path when adding subnode error to subnode
+
+
+** Improvement
+    * [HV-171] - Hibernate Validator must specify how to run in environments that use a SecurityManager
+    * [HV-195] - Be permissive to heading '/' in mapping file names
+
+** New Feature
+    * [HV-197] - Implement a LazyValidatorFactory
+
+
+4.0.0.Beta2 (20.07.2009)
+------------------------
+
+** Bug
+    * [HV-79] - The test suite assumes Hibernate Validator as the BV provider
+    * [HV-146] - ConstraintValidator impls cannot inherit from a super class implementing ConstraintValidator
+    * [HV-149] - ReflectionHelper.containsMethod ignores "is" methods
+    * [HV-150] - TraversableResolver pathToTraversableObject incorrectly includes traversableProperty
+    * [HV-153] - ConstraintValidators created out of CVF should be cached to minimize initialization overhead
+    * [HV-154] - isTraversable is called with a root bean class null when validateValue is used
+    * [HV-157] - properties are cascaded despite TraversableResolver answering no
+    * [HV-158] - ClassCastException in org.hibernate.validation.constraints.FutureValidatorForDate.initialize
+    * [HV-159] - NullPointerException in ValidatorFactoryImpl, if XML config file doesn't contain at least one constraint and one cascade configuration
+    * [HV-162] - XML based configuration should be tolerant to line breaks and white spaces where appropriate
+    * [HV-164] - Add test for default group sequence isolation
+    * [HV-165] - Hibernate Validator does not validate groups in class level annotations.
+    * [HV-169] - Make sure Validator is concurrent safe
+    * [HV-170] - Refactor the group sequence expansion and take the default sequence expansion of the validated entity into considertation
+    * [HV-172] - Static fields and methods annotated with constraints should be ignored
+    * [HV-173] - @Valid on an array type does not properly validate the elements of the array
+    * [HV-174] - When using Matcher.appendReplacement all \ and $ characters must be escaped
+    * [HV-175] - @Valid should be polymorphic
+    * [HV-181] - Refactor ConstraintDescriptorImpl
+    * [HV-182] - Error when using composite constraints (wrong messages and stack traces)
+    * [HV-184] - ResourceBundlerMessageInterpolator fails to meet the spec in some issues
+
+** Improvement
+    * [HV-155] - Use a TraversableResolver caching results within a call stack to reduce overhead
+    * [HV-166] - Move constraints validator impl into org.hibernate.validation.constraints.impl
+    * [HV-167] - Rewrite @NotEmpty as a composition of @NotNull, @Size(min=1) @ReportAsSingleViolation
+
+** New Feature
+    * [HV-89] - Implement XML mapping
+    * [HV-97] - Support XML Configuration and merge of configuration metadata
+    * [HV-131] - Support @DecimalMin / @DecimalMax
+    * [HV-160] - Make use of the TraversableResolver contract spliting reachability and cascadability
+    * [HV-163] - Add [] to non-indexed iterable in paths
+
+** Task
+    * [HV-101] - Write unit tests for constraint composition
+    * [HV-107] - Implement a Hibernate Core specifc implementation of TraversableResolver
+    * [HV-109] - Implement test for bootstrapping with multiple providers
+    * [HV-127] - Implement test for the different types of Size validators
+    * [HV-133] - Create test baseclass to allow test to run w and w/o xml configuration
+    * [HV-147] - Invetigate problem with maven release plugin
+    * [HV-148] - Make sure that context as well as current class loader are used when trying to load xml configuration files
+    * [HV-168] - Add validators for DecimalMin and DecimalMax
+    * [HV-177] - Integrate the new Path model
+    * [HV-178] - Add check for payload parameter
+
+
+4.0.0.Beta1 (27.04.2009)
+------------------------
+
+** Bug
+    * [HV-139] - BeanMetaDataCache and ConstraintValidatorDefinitionsCache should not be static
+
+** New Feature
+    * [HV-144] - Add support for ConstraintViolation.getRootBeanClass
+
+** Task
+    * [HV-110] - Implement parser for validation.xml
+    * [HV-111] - Bootstrap HV using validation.xml
+    * [HV-112] - Map constraints using XML
+    * [HV-137] - Create a Hibernate Validator maven archetype
+    * [HV-142] - Extract the xml parsing code from ValidatorFactoryImpl and delegate the parsing to a seperate class
+
+
+4.0.0.Alpha3 (20.03.2009)
+-------------------------
+
+** Bug
+    * [HV-78] - ValidatorImpl.expandGroupName() does not seem to expand recursively, this goes against the spec
+    * [HV-80] - Group sequence sequences can contain group sequence names
+    * [HV-83] - Object graph traversed too many times
+    * [HV-85] - Group sequence expansion and validation execution should be decoupled
+    * [HV-117] - BuiltinConstraints doesn't contain @Digits
+    * [HV-118] - BuiltinConstraints doesn't contain @Past
+    * [HV-120] - ConstraintDescriptor.getGroups() returns Default.class if no group is declared on the constraint
+    * [HV-123] - Wrong elementType in MetaConstraint constructor
+
+** Improvement
+    * [HV-103] - Default error message for Min/Max constraints doesn't reflect constraint specification and implementation
+
+** New Feature
+    * [HV-92] - Implement sequences on group interfaces and group inheritance
+    * [HV-121] - @Pattern support
+    * [HV-122] - Add byte support for numeric constraints (digits, max etc)
+
+** Task
+    * [HV-106] - Integrate TraversableResolver into reference implementation
+    * [HV-108] - Verify correct polymorphic behaviour for validation
+    * [HV-113] - Redefining the Default group for a class
+    * [HV-114] - Implement error report customization via ConstraintValidatorContext
+
+
+
+4.0.0.Alpha2 (03.03.2009)
+-------------------------
+
+** Bug
+    * [HV-78] - ValidatorImpl.expandGroupName() does not seem to expand recursively, this goes against the spec
+    * [HV-80] - Group sequence sequences can contain group sequence names
+    * [HV-83] - Object graph traversed too many times
+    * [HV-85] - Group sequence expansion and validation execution should be decoupled
+    * [HV-117] - BuiltinConstraints doesn't contain @Digits
+    * [HV-118] - BuiltinConstraints doesn't contain @Past
+    * [HV-120] - ConstraintDescriptor.getGroups() returns Default.class if no group is declared on the constraint
+    * [HV-123] - Wrong elementType in MetaConstraint constructor
+
+** Improvement
+    * [HV-103] - Default error message for Min/Max constraints doesn't reflect constraint specification and implementation
+
+** New Feature
+    * [HV-92] - Implement sequences on group interfaces and group inheritance
+    * [HV-121] - @Pattern support
+    * [HV-122] - Add byte support for numeric constraints (digits, max etc)
+
+** Task
+    * [HV-106] - Integrate TraversableResolver into reference implementation
+    * [HV-108] - Verify correct polymorphic behaviour for validation
+    * [HV-113] - Redefining the Default group for a class
+    * [HV-114] - Implement error report customization via ConstraintValidatorContext
+
+
+
diff --git a/copyright.txt b/copyright.txt
new file mode 100644
index 0000000..6757eb8
--- /dev/null
+++ b/copyright.txt
@@ -0,0 +1,22 @@
+Alaa Nassef
+Carlos Vara
+Dag Hovland
+Davide Marchignoli
+Emmanuel Bernard
+Federico
+Federico Mancini
+Gavin King
+George Gastaldi
+Gerhard Petracek
+Gunnar Morling
+Hardy Ferentschik
+Henno Vermeulen
+Juraci Krohling
+Justin Nauman
+Kevin Pollet
+kevinpollet
+Paolo Perrotta
+Pete Muir
+Shane Bryzak
+Steve Ebersole
+Strong Liu
diff --git a/hibernate-validator-annotation-processor/pom.xml b/hibernate-validator-annotation-processor/pom.xml
deleted file mode 100644
index 6f2fdef..0000000
--- a/hibernate-validator-annotation-processor/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>hibernate-validator-parent</artifactId>
-        <groupId>org.hibernate</groupId>
-        <version>4.1.0.Final</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator-annotation-processor</artifactId>
-    <name>Hibernate Validator Annotation Processor</name>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <compilerArgument>-proc:none</compilerArgument>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>generate-test-sources</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <stripVersion>true</stripVersion>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>javax.validation</groupId>
-                                    <artifactId>validation-api</artifactId>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <systemProperties>
-                        <property>
-                            <name>testSourceBaseDir</name>
-                            <value>${basedir}/src/test/java</value>
-                        </property>
-                        <!-- 
-                        	Used to specify the class path for the JavaCompiler in tests. For some reason 
-							this is not required within eclipse. The JavaCompiler there has access to all dependencies
-							of the program by default.
-							TODO GM: find a better way to solve this issue
-						 -->
-                        <property>
-                            <name>pathToBeanValidationApiJar</name>
-                            <value>${project.build.directory}/lib/validation-api.jar</value>
-                        </property>
-                    </systemProperties>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <classifier>jdk15</classifier>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java
deleted file mode 100644
index 40db754..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java
+++ /dev/null
@@ -1,224 +0,0 @@
-// $Id: ConstraintAnnotationVisitor.java 19524 2010-05-15 15:50:33Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap;
-
-import java.util.List;
-import java.util.Set;
-import javax.annotation.processing.Messager;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementVisitor;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.util.ElementKindVisitor6;
-import javax.tools.Diagnostic.Kind;
-
-import org.hibernate.validator.ap.checks.ConstraintCheck;
-import org.hibernate.validator.ap.checks.ConstraintCheckError;
-import org.hibernate.validator.ap.checks.ConstraintCheckFactory;
-import org.hibernate.validator.ap.checks.ConstraintChecks;
-import org.hibernate.validator.ap.util.AnnotationApiHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper;
-import org.hibernate.validator.ap.util.MessagerAdapter;
-
-/**
- * An {@link ElementVisitor} that visits annotated elements (type declarations,
- * methods and fields) and applies different {@link ConstraintCheck}s to them.
- * Each {@link ConstraintCheckError} occurred will be reported using the
- * {@link Messager} API.
- *
- * @author Gunnar Morling.
- */
-final class ConstraintAnnotationVisitor extends ElementKindVisitor6<Void, List<AnnotationMirror>> {
-
-	private final MessagerAdapter messager;
-
-	private final ConstraintCheckFactory constraintCheckFactory;
-
-	private final boolean verbose;
-
-	public ConstraintAnnotationVisitor(
-			ProcessingEnvironment processingEnvironment, MessagerAdapter messager, boolean verbose) {
-
-		this.messager = messager;
-		this.verbose = verbose;
-
-		AnnotationApiHelper annotationApiHelper = new AnnotationApiHelper(
-				processingEnvironment.getElementUtils(), processingEnvironment.getTypeUtils()
-		);
-
-		ConstraintHelper constraintHelper = new ConstraintHelper(
-				processingEnvironment.getElementUtils(), processingEnvironment.getTypeUtils(), annotationApiHelper
-		);
-
-		constraintCheckFactory = new ConstraintCheckFactory( constraintHelper );
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * method. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Constraint annotations may only be given at non-static, JavaBeans getter
-	 * methods which's return type is supported by the constraints.</li>
-	 * <li>
-	 * The <code>@Valid</code> annotation may only be given at non-static,
-	 * non-primitive JavaBeans getter methods.</li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitExecutableAsMethod(ExecutableElement method,
-										List<AnnotationMirror> mirrors) {
-
-		checkConstraints( method, mirrors );
-
-		return null;
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * field. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Constraint annotations may only be given at non-static fields which's
-	 * type is supported by the constraints.</li>
-	 * <li>
-	 * The <code>@Valid</code> annotation may only be given at non-static,
-	 * non-primitive fields.</li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitVariableAsField(VariableElement annotatedField, List<AnnotationMirror> mirrors) {
-
-		checkConstraints( annotatedField, mirrors );
-
-		return null;
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * annotation type declaration. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * The only annotation types allowed to be annotated with other constraint
-	 * annotations are composed constraint annotation type declarations.</li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitTypeAsAnnotationType(TypeElement annotationType,
-										  List<AnnotationMirror> mirrors) {
-
-		checkConstraints( annotationType, mirrors );
-
-		return null;
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * class type declaration. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Constraint annotations may at types supported by the constraints.</li>
-	 * <li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitTypeAsClass(TypeElement e, List<AnnotationMirror> p) {
-
-		checkConstraints( e, p );
-		return null;
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * enum type declaration. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Constraint annotations may at types supported by the constraints.</li>
-	 * <li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitTypeAsEnum(TypeElement e, List<AnnotationMirror> p) {
-
-		checkConstraints( e, p );
-		return null;
-	}
-
-	/**
-	 * <p>
-	 * Checks whether the given annotations are correctly specified at the given
-	 * interface type declaration. The following checks are performed:
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Constraint annotations may at types supported by the constraints.</li>
-	 * <li>
-	 * </ul>
-	 */
-	@Override
-	public Void visitTypeAsInterface(TypeElement e, List<AnnotationMirror> p) {
-
-		checkConstraints( e, p );
-		return null;
-	}
-
-	/**
-	 * Retrieves the checks required for the given element and annotations,
-	 * executes them and reports all occurred errors.
-	 *
-	 * @param annotatedElement The element to check.
-	 * @param mirrors The annotations to check.
-	 */
-	private void checkConstraints(Element annotatedElement, List<AnnotationMirror> mirrors) {
-
-		for ( AnnotationMirror oneAnnotationMirror : mirrors ) {
-
-			try {
-
-				ConstraintChecks constraintChecks = constraintCheckFactory.getConstraintChecks(
-						annotatedElement, oneAnnotationMirror
-				);
-				Set<ConstraintCheckError> errors = constraintChecks.execute( annotatedElement, oneAnnotationMirror );
-				messager.reportErrors( errors );
-			}
-			//HV-293: if single constraints can't be properly checked, report this and
-			//proceed with next constraints
-			catch ( Exception e ) {
-
-				if ( verbose ) {
-					messager.getDelegate()
-							.printMessage( Kind.NOTE, e.getMessage(), annotatedElement, oneAnnotationMirror );
-				}
-			}
-		}
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java
deleted file mode 100644
index 38f6a36..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java
+++ /dev/null
@@ -1,182 +0,0 @@
-// $Id: ConstraintValidationProcessor.java 19524 2010-05-15 15:50:33Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap;
-
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.Set;
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedOptions;
-import javax.annotation.processing.SupportedSourceVersion;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementVisitor;
-import javax.lang.model.element.TypeElement;
-import javax.tools.Diagnostic.Kind;
-
-import org.hibernate.validator.ap.util.AnnotationApiHelper;
-import org.hibernate.validator.ap.util.MessagerAdapter;
-
-/**
- * An annotation processor for checking <a
- * href="http://jcp.org/en/jsr/detail?id=303">Bean Validation</a> constraints.
- * The processor supports the following options:
- * <ul>
- * <li><code>diagnosticKind</code>: the severity with which any occurred problems
- * shall be reported. Must be given in form of the string representation of a
- * value from {@link javax.tools.Diagnostic.Kind}, e.g.
- * "diagnosticKind=WARNING". Default is Kind.ERROR.</li>
- * <li>TODO GM: validationMode: whether spec compliance shall be checked
- * strictly or loosely (e.g. by allowing validators for parametrized types)</li>
- * </ul>
- *
- * @author Hardy Ferentschik
- * @author Gunnar Morling
- */
- at SupportedAnnotationTypes("*")
- at SupportedSourceVersion(SourceVersion.RELEASE_6)
- at SupportedOptions({
-		ConstraintValidationProcessor.DIAGNOSTIC_KIND_PROCESSOR_OPTION_NAME,
-		ConstraintValidationProcessor.VERBOSE_PROCESSOR_OPTION_NAME
-})
-public class ConstraintValidationProcessor extends AbstractProcessor {
-
-	/**
-	 * The name of the processor option for setting the diagnostic kind to be
-	 * used when reporting errors during annotation processing.
-	 */
-	public final static String DIAGNOSTIC_KIND_PROCESSOR_OPTION_NAME = "diagnosticKind";
-
-	/**
-	 * The name of the processor option for activating verbose message reporting.
-	 */
-	public final static String VERBOSE_PROCESSOR_OPTION_NAME = "verbose";
-
-	/**
-	 * The diagnostic kind to be used if no or an invalid kind is given as processor option.
-	 */
-	public final static Kind DEFAULT_DIAGNOSTIC_KIND = Kind.ERROR;
-	/**
-	 * Whether this processor claims all processed annotations exclusively or not.
-	 */
-	private static final boolean ANNOTATIONS_CLAIMED_EXCLUSIVELY = false;
-
-	/**
-	 * The messager to be used for error reports.
-	 */
-	private MessagerAdapter messager;
-
-	/**
-	 * Whether logging information shall be put out in a verbose way or not.
-	 */
-	private boolean verbose;
-
-	@Override
-	public synchronized void init(ProcessingEnvironment processingEnv) {
-
-		super.init( processingEnv );
-
-		this.verbose = isVerbose();
-		messager = new MessagerAdapter( processingEnv.getMessager(), getDiagnosticKind() );
-	}
-
-	@Override
-	public boolean process(
-			final Set<? extends TypeElement> annotations,
-			final RoundEnvironment roundEnvironment) {
-
-		AnnotationApiHelper typeHelper = new AnnotationApiHelper(
-				processingEnv.getElementUtils(), processingEnv.getTypeUtils()
-		);
-
-		ElementVisitor<Void, List<AnnotationMirror>> visitor = new ConstraintAnnotationVisitor(
-				processingEnv, messager, verbose
-		);
-
-		for ( TypeElement oneAnnotation : annotations ) {
-
-			Set<? extends Element> elementsWithConstraintAnnotation =
-					roundEnvironment.getElementsAnnotatedWith( oneAnnotation );
-
-			for ( Element oneAnnotatedElement : elementsWithConstraintAnnotation ) {
-
-				List<AnnotationMirror> mirrorsOfCurrentAnnotation =
-						typeHelper.filterByType( oneAnnotatedElement.getAnnotationMirrors(), oneAnnotation.asType() );
-
-				oneAnnotatedElement.accept( visitor, mirrorsOfCurrentAnnotation );
-			}
-		}
-
-		return ANNOTATIONS_CLAIMED_EXCLUSIVELY;
-	}
-
-	/**
-	 * Retrieves the diagnostic kind to be used for error messages. If given in processor options, it
-	 * will be taken from there, otherwise the default value Kind.ERROR will be returned.
-	 *
-	 * @return The diagnostic kind to be used for error messages.
-	 */
-	private Kind getDiagnosticKind() {
-
-		String diagnosticKindFromOptions = processingEnv.getOptions()
-				.get( DIAGNOSTIC_KIND_PROCESSOR_OPTION_NAME );
-
-		if ( diagnosticKindFromOptions != null ) {
-			try {
-				return Kind.valueOf( diagnosticKindFromOptions );
-			}
-			catch ( IllegalArgumentException e ) {
-				super.processingEnv.getMessager().printMessage(
-						Kind.WARNING, MessageFormat.format(
-								"The given value {0} is no valid diagnostic kind. {1} will be used.",
-								diagnosticKindFromOptions,
-								DEFAULT_DIAGNOSTIC_KIND
-						)
-				);
-			}
-		}
-
-		return DEFAULT_DIAGNOSTIC_KIND;
-	}
-
-	/**
-	 * Retrieves the value for the "verbose" property from the options.
-	 *
-	 * @return The value for the "verbose" property.
-	 */
-	private boolean isVerbose() {
-
-		boolean theValue = Boolean.parseBoolean( processingEnv.getOptions().get( VERBOSE_PROCESSOR_OPTION_NAME ) );
-
-		if ( theValue ) {
-			super.processingEnv.getMessager().printMessage(
-					Kind.NOTE, MessageFormat.format(
-							"Verbose reporting is activated. Some processing information will be displayed using diagnostic kind {0}.",
-							Kind.NOTE
-					)
-			);
-		}
-
-		return theValue;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java
deleted file mode 100644
index e7e0951..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: AbstractConstraintCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-
-/**
- * <p>
- * Abstract base class for {@link ConstraintCheck} implementations. Concrete
- * checks should only override those check methods applicable for their
- * supported element types.
- * </p>
- * <p>
- * For instance would a check ensuring that constraint annotations are only
- * given at non-static fields or methods only override <code>checkField()</code>
- * and <code>checkMethod()</code>.
- * </p>
- * <p>
- * All check methods not overridden will return an empty list.
- * </p>
- *
- * @author Gunnar Morling
- */
-public class AbstractConstraintCheck implements ConstraintCheck {
-
-	public Set<ConstraintCheckError> checkField(VariableElement element, AnnotationMirror annotation) {
-
-		return Collections.emptySet();
-	}
-
-	public Set<ConstraintCheckError> checkMethod(ExecutableElement element, AnnotationMirror annotation) {
-
-		return Collections.emptySet();
-	}
-
-	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
-														 AnnotationMirror annotation) {
-
-		return Collections.emptySet();
-	}
-
-	public Set<ConstraintCheckError> checkNonAnnotationType(
-			TypeElement element, AnnotationMirror annotation) {
-
-		return Collections.emptySet();
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java
deleted file mode 100644
index bfab0ad..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id: AnnotationTypeCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.TypeElement;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper;
-
-/**
- * Checks, that only constraint annotation types are annotated with other
- * constraint annotations ("constraint composition"), but not non-constraint
- * annotations.
- *
- * @author Gunnar Morling
- */
-public class AnnotationTypeCheck extends AbstractConstraintCheck {
-
-	private final ConstraintHelper constraintHelper;
-
-	public AnnotationTypeCheck(ConstraintHelper constraintHelper) {
-		this.constraintHelper = constraintHelper;
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
-														 AnnotationMirror annotation) {
-
-		if ( !constraintHelper.isConstraintAnnotation( element ) ) {
-
-			return CollectionHelper.asSet(
-					new ConstraintCheckError(
-							element, annotation, "ONLY_CONSTRAINT_ANNOTATIONS_MAY_BE_ANNOTATED"
-					)
-			);
-		}
-
-		return Collections.emptySet();
-	}
-
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java
deleted file mode 100644
index 9ffea67..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id: ConstraintCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-
-/**
- * <p>
- * Implementations represent checks, which determine whether a given constraint
- * annotation is allowed at a given element.
- * </p>
- * <p>
- * Implementations should be derived from {@link AbstractConstraintCheck} in
- * order to implement only those check methods applicable for the element kinds
- * supported by the check.
- * </p>
- *
- * @author Gunnar Morling
- */
-public interface ConstraintCheck {
-
-	/**
-	 * Checks, whether the given annotation is allowed at the given field.
-	 *
-	 * @param element An annotated field.
-	 * @param annotation An annotation at that field.
-	 *
-	 * @return A set with errors, that describe, why the given annotation is
-	 *         not allowed at the given element. In case no errors occur (the
-	 *         given annotation is allowed at the given element), an empty set
-	 *         must be returned.
-	 */
-	Set<ConstraintCheckError> checkField(VariableElement element,
-										 AnnotationMirror annotation);
-
-	/**
-	 * Checks, whether the given annotation is allowed at the given method.
-	 *
-	 * @param element An annotated method.
-	 * @param annotation An annotation at that method.
-	 *
-	 * @return A set with errors, that describe, why the given annotation is
-	 *         not allowed at the given element. In case no errors occur (the
-	 *         given annotation is allowed at the given element), an empty set
-	 *         must be returned.
-	 */
-	Set<ConstraintCheckError> checkMethod(ExecutableElement element,
-										  AnnotationMirror annotation);
-
-	/**
-	 * Checks, whether the given annotation is allowed at the given annotation
-	 * type declaration.
-	 *
-	 * @param element An annotated annotation type declaration.
-	 * @param annotation An annotation at that annotation type.
-	 *
-	 * @return A set with errors, that describe, why the given annotation is
-	 *         not allowed at the given element. In case no errors occur (the
-	 *         given annotation is allowed at the given element), an empty set
-	 *         must be returned.
-	 */
-	Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
-												  AnnotationMirror annotation);
-
-	/**
-	 * Checks, whether the given annotation is allowed at the given type
-	 * declaration (class, interface, enum).
-	 *
-	 * @param element An annotated type declaration.
-	 * @param annotation An annotation at that type.
-	 *
-	 * @return A set with errors, that describe, why the given annotation is
-	 *         not allowed at the given element. In case no errors occur (the
-	 *         given annotation is allowed at the given element), an empty set
-	 *         must be returned.
-	 */
-	Set<ConstraintCheckError> checkNonAnnotationType(TypeElement element,
-													 AnnotationMirror annotation);
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java
deleted file mode 100644
index 79bace2..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id: ConstraintCheckError.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.text.MessageFormat;
-import java.util.Arrays;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-
-/**
- * The result of the execution of a {@link ConstraintCheck}. Comprises
- * information about the location at which the error occurred and a message
- * describing the occured error.
- *
- * @author Gunnar Morling
- */
-public class ConstraintCheckError {
-
-	private final Element element;
-
-	private final AnnotationMirror annotationMirror;
-
-	private final String messageKey;
-
-	private final Object[] messageParameters;
-
-	/**
-	 * Creates a new ConstraintCheckError.
-	 *
-	 * @param element The element at which the error occurred.
-	 * @param annotationMirror The annotation that causes the error.
-	 * @param messageKey A key for retrieving an error message template from the bundle
-	 * <p/>
-	 * <code>org.hibernate.validator.ap.ValidationProcessorMessages.</code>
-	 * @param messageParameters An array with values to put into the error message template
-	 * using {@link MessageFormat}. The number of elements must match
-	 * the number of place holders in the message template.
-	 */
-	public ConstraintCheckError(Element element,
-								AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) {
-
-		this.element = element;
-		this.annotationMirror = annotationMirror;
-		this.messageKey = messageKey;
-		this.messageParameters = messageParameters;
-	}
-
-	public Element getElement() {
-		return element;
-	}
-
-	public AnnotationMirror getAnnotationMirror() {
-		return annotationMirror;
-	}
-
-	public String getMessageKey() {
-		return messageKey;
-	}
-
-	public Object[] getMessageParameters() {
-		return messageParameters;
-	}
-
-	@Override
-	public String toString() {
-		return "ConstraintCheckError [annotationMirror=" + annotationMirror
-				+ ", element=" + element + ", messageKey=" + messageKey
-				+ ", messageParameters=" + Arrays.toString( messageParameters )
-				+ "]";
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime
-				* result
-				+ ( ( annotationMirror == null ) ? 0 : annotationMirror.hashCode() );
-		result = prime * result + ( ( element == null ) ? 0 : element.hashCode() );
-		result = prime * result
-				+ ( ( messageKey == null ) ? 0 : messageKey.hashCode() );
-		result = prime * result + Arrays.hashCode( messageParameters );
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if ( this == obj ) {
-			return true;
-		}
-		if ( obj == null ) {
-			return false;
-		}
-		if ( getClass() != obj.getClass() ) {
-			return false;
-		}
-		ConstraintCheckError other = ( ConstraintCheckError ) obj;
-		if ( annotationMirror == null ) {
-			if ( other.annotationMirror != null ) {
-				return false;
-			}
-		}
-		else if ( !annotationMirror.equals( other.annotationMirror ) ) {
-			return false;
-		}
-		if ( element == null ) {
-			if ( other.element != null ) {
-				return false;
-			}
-		}
-		else if ( !element.equals( other.element ) ) {
-			return false;
-		}
-		if ( messageKey == null ) {
-			if ( other.messageKey != null ) {
-				return false;
-			}
-		}
-		else if ( !messageKey.equals( other.messageKey ) ) {
-			return false;
-		}
-		if ( !Arrays.equals( messageParameters, other.messageParameters ) ) {
-			return false;
-		}
-		return true;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java
deleted file mode 100644
index ff71481..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id: ConstraintCheckFactory.java 19323 2010-04-29 18:37:41Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Map;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper.AnnotationType;
-
-/**
- * A factory in charge of determining the {@link ConstraintCheck}s required for
- * the validation of annotations at given elements.
- *
- * @author Gunnar Morling
- */
-public class ConstraintCheckFactory {
-
-	/**
-	 * Holds the checks to be executed for field elements.
-	 */
-	private final Map<AnnotationType, ConstraintChecks> fieldChecks;
-
-	/**
-	 * Holds the checks to be executed for method elements.
-	 */
-	private final Map<AnnotationType, ConstraintChecks> methodChecks;
-
-	/**
-	 * Holds the checks to be executed for annotation type declarations.
-	 */
-	private final Map<AnnotationType, ConstraintChecks> annotationTypeChecks;
-
-	/**
-	 * Holds the checks to be executed for class/interface/enum declarations.
-	 */
-	private final Map<AnnotationType, ConstraintChecks> nonAnnotationTypeChecks;
-
-	private ConstraintHelper constraintHelper;
-
-	private final static SingleValuedChecks NULL_CHECKS = new SingleValuedChecks();
-
-	public ConstraintCheckFactory(ConstraintHelper constraintHelper) {
-
-		this.constraintHelper = constraintHelper;
-
-		fieldChecks = CollectionHelper.newHashMap();
-		fieldChecks.put(
-				AnnotationType.CONSTRAINT_ANNOTATION,
-				new SingleValuedChecks( new StaticCheck(), new TypeCheck( constraintHelper ) )
-		);
-		fieldChecks.put(
-				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
-				new MultiValuedChecks( constraintHelper, new StaticCheck(), new TypeCheck( constraintHelper ) )
-		);
-		fieldChecks.put(
-				AnnotationType.GRAPH_VALIDATION_ANNOTATION,
-				new SingleValuedChecks( new StaticCheck(), new PrimitiveCheck() )
-		);
-		fieldChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
-
-		methodChecks = CollectionHelper.newHashMap();
-		methodChecks.put(
-				AnnotationType.CONSTRAINT_ANNOTATION,
-				new SingleValuedChecks( new GetterCheck(), new StaticCheck(), new TypeCheck( constraintHelper ) )
-		);
-		methodChecks.put(
-				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION, new MultiValuedChecks(
-						constraintHelper, new GetterCheck(), new StaticCheck(), new TypeCheck( constraintHelper )
-				)
-		);
-		methodChecks.put(
-				AnnotationType.GRAPH_VALIDATION_ANNOTATION,
-				new SingleValuedChecks( new GetterCheck(), new StaticCheck(), new PrimitiveCheck() )
-		);
-		methodChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
-
-		annotationTypeChecks = CollectionHelper.newHashMap();
-		annotationTypeChecks.put(
-				AnnotationType.CONSTRAINT_ANNOTATION,
-				new SingleValuedChecks( new AnnotationTypeCheck( constraintHelper ) )
-		);
-		annotationTypeChecks.put(
-				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
-				new MultiValuedChecks( constraintHelper, new AnnotationTypeCheck( constraintHelper ) )
-		);
-		annotationTypeChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
-
-		nonAnnotationTypeChecks = CollectionHelper.newHashMap();
-		nonAnnotationTypeChecks.put(
-				AnnotationType.CONSTRAINT_ANNOTATION, new SingleValuedChecks( new TypeCheck( constraintHelper ) )
-		);
-		nonAnnotationTypeChecks.put(
-				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
-				new MultiValuedChecks( constraintHelper, new TypeCheck( constraintHelper ) )
-		);
-		nonAnnotationTypeChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
-	}
-
-	/**
-	 * Returns those checks that have to be performed to validate the given
-	 * annotation at the given element. In case no checks have to be performed
-	 * (e.g. because the given annotation is no constraint annotation) an empty
-	 * {@link ConstraintChecks} instance will be returned. It's therefore always
-	 * safe to operate on the returned object.
-	 *
-	 * @param annotatedElement An annotated element, e.g. a type declaration or a method.
-	 * @param annotation An annotation.
-	 *
-	 * @return The checks to be performed to validate the given annotation at
-	 *         the given element.
-	 */
-	public ConstraintChecks getConstraintChecks(Element annotatedElement, AnnotationMirror annotation) {
-
-		AnnotationType annotationType = constraintHelper.getAnnotationType( annotation );
-
-		switch ( annotatedElement.getKind() ) {
-			case FIELD:
-				return fieldChecks.get( annotationType );
-			case METHOD:
-				return methodChecks.get( annotationType );
-			case ANNOTATION_TYPE:
-				return annotationTypeChecks.get( annotationType );
-			case CLASS:
-			case INTERFACE:
-			case ENUM:
-				return nonAnnotationTypeChecks.get( annotationType );
-			default:
-				return NULL_CHECKS;
-		}
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java
deleted file mode 100644
index f8ff5e3..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: ConstraintChecks.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-
-/**
- * Represents an ordered set of {@link ConstraintCheck}s with the ability
- * to execute these checks against given elements and their annotations.
- *
- * @author Gunnar Morling
- */
-public interface ConstraintChecks {
-
-	/**
-	 * Executes the checks contained within this set against the given element
-	 * and annotation.
-	 *
-	 * @param element An annotated element.
-	 * @param annotation The annotation to check.
-	 *
-	 * @return A set with errors. Will be empty in case all checks passed
-	 *         successfully.
-	 */
-	Set<ConstraintCheckError> execute(Element element,
-									  AnnotationMirror annotation);
-
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java
deleted file mode 100644
index 09dbca4..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: GetterCheck.java 19323 2010-04-29 18:37:41Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.type.TypeKind;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-
-/**
- * Checks whether a given element is a valid getter method.
- *
- * @author Gunnar Morling
- */
-public class GetterCheck extends AbstractConstraintCheck {
-	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
-												 AnnotationMirror annotation) {
-
-		if ( !isGetterMethod( element ) ) {
-			return CollectionHelper.asSet(
-					new ConstraintCheckError(
-							element, annotation, "ONLY_GETTERS_MAY_BE_ANNOTATED"
-					)
-			);
-		}
-
-		return Collections.emptySet();
-	}
-
-	private boolean isGetterMethod(ExecutableElement method) {
-
-		return isJavaBeanGetterName( method.getSimpleName().toString() )
-				&& !hasParameters( method ) && hasReturnValue( method );
-	}
-
-	private boolean hasReturnValue(ExecutableElement method) {
-		return method.getReturnType().getKind() != TypeKind.VOID;
-	}
-
-	private boolean hasParameters(ExecutableElement method) {
-		return !method.getParameters().isEmpty();
-	}
-
-	private boolean isJavaBeanGetterName(String methodName) {
-		return methodName.startsWith( "is" ) || methodName.startsWith( "has" ) || methodName.startsWith( "get" );
-	}
-
-}
-
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java
deleted file mode 100644
index c9e33b9..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: MultiValuedChecks.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.checks;
-
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper;
-
-/**
- * A {@link ConstraintChecks} implementation, that executed the contained checks
- * against all parts of given multi-valued annotations.
- *
- * @author Gunnar Morling
- */
-public class MultiValuedChecks implements ConstraintChecks {
-
-	private final ConstraintHelper constraintHelper;
-
-	private final SingleValuedChecks delegate;
-
-	/**
-	 * Creates a new MultiValuedChecks.
-	 *
-	 * @param constraintHelper Helper for handling multi-valued constraints.
-	 * @param checks The checks to execute.
-	 */
-	public MultiValuedChecks(ConstraintHelper constraintHelper,
-							 ConstraintCheck... checks) {
-
-		this.constraintHelper = constraintHelper;
-		this.delegate = new SingleValuedChecks( checks );
-	}
-
-	public Set<ConstraintCheckError> execute(Element element,
-											 AnnotationMirror annotation) {
-
-		Set<ConstraintCheckError> theValue = CollectionHelper.newHashSet();
-
-		//execute the checks on each element of the multi-valued constraint
-		for ( AnnotationMirror onePartOfMultiValuedConstraint :
-				constraintHelper.getPartsOfMultiValuedConstraint( annotation ) ) {
-
-			theValue.addAll( delegate.execute( element, onePartOfMultiValuedConstraint ) );
-		}
-
-		return theValue;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java
deleted file mode 100644
index 53ecbb5..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: PrimitiveCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.TypeMirror;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-
-/**
- * Validates that the given element is not of a primitive type. Applies to
- * fields and methods (the return type is evaluated).
- *
- * @author Gunnar Morling
- */
-public class PrimitiveCheck extends AbstractConstraintCheck {
-
-	@Override
-	public Set<ConstraintCheckError> checkField(VariableElement element,
-												AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, element.asType(), "ATVALID_NOT_ALLOWED_AT_PRIMITIVE_FIELD" );
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
-												 AnnotationMirror annotation) {
-
-		return checkInternal(
-				element, annotation, element.getReturnType(), "ATVALID_NOT_ALLOWED_AT_METHOD_RETURNING_PRIMITIVE_TYPE"
-		);
-	}
-
-	private Set<ConstraintCheckError> checkInternal(Element element,
-													AnnotationMirror annotation, TypeMirror type, String messageKey) {
-
-		if ( type.getKind().isPrimitive() ) {
-
-			return CollectionHelper.asSet(
-					new ConstraintCheckError(
-							element, annotation, messageKey
-					)
-			);
-		}
-
-		return Collections.emptySet();
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java
deleted file mode 100644
index 0c0b909..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id: SingleValuedChecks.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-
-/**
- * A {@link ConstraintChecks} implementation that simply executes all
- * contained checks against given elements and annotations.
- *
- * @author Gunnar Morling
- */
-public class SingleValuedChecks implements ConstraintChecks {
-
-	//TODO GM: the "ordered set" character is currently ensured by adding
-	//each check only once in ConstraintCheckFactory. Should this be a real set?
-	private final List<ConstraintCheck> checks;
-
-	/**
-	 * Creates a new SingleValuedChecks.
-	 *
-	 * @param checks The checks to execute.
-	 */
-	public SingleValuedChecks(ConstraintCheck... checks) {
-
-		if ( checks == null ) {
-			this.checks = Collections.emptyList();
-		}
-		else {
-			this.checks = Arrays.asList( checks );
-		}
-	}
-
-	public Set<ConstraintCheckError> execute(Element element, AnnotationMirror annotation) {
-
-		Set<ConstraintCheckError> theValue = CollectionHelper.newHashSet();
-
-		//for each check execute the check method appropriate for the kind of
-		//the given element
-		for ( ConstraintCheck oneCheck : checks ) {
-
-			if ( element.getKind() == ElementKind.FIELD ) {
-				theValue.addAll( oneCheck.checkField( ( VariableElement ) element, annotation ) );
-			}
-			else if ( element.getKind() == ElementKind.METHOD ) {
-				theValue.addAll( oneCheck.checkMethod( ( ExecutableElement ) element, annotation ) );
-			}
-			else if ( element.getKind() == ElementKind.ANNOTATION_TYPE ) {
-				theValue.addAll( oneCheck.checkAnnotationType( ( TypeElement ) element, annotation ) );
-			}
-			else if (
-					element.getKind() == ElementKind.CLASS ||
-							element.getKind() == ElementKind.INTERFACE ||
-							element.getKind() == ElementKind.ENUM ) {
-
-				theValue.addAll( oneCheck.checkNonAnnotationType( ( TypeElement ) element, annotation ) );
-			}
-
-			if ( !theValue.isEmpty() ) {
-				return theValue;
-			}
-		}
-
-		return theValue;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java
deleted file mode 100644
index e89a119..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id: StaticCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.VariableElement;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-
-/**
- * Checks, that the given element is not a static element. Applies to fields
- * and methods.
- *
- * @author Gunnar Morling
- */
-public class StaticCheck extends AbstractConstraintCheck {
-
-	@Override
-	public Set<ConstraintCheckError> checkField(VariableElement element, AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, "STATIC_FIELDS_MAY_NOT_BE_ANNOTATED" );
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkMethod(ExecutableElement element, AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, "STATIC_METHODS_MAY_NOT_BE_ANNOTATED" );
-	}
-
-	private Set<ConstraintCheckError> checkInternal(Element element,
-													AnnotationMirror annotation, String messageKey) {
-		if ( isStaticElement( element ) ) {
-
-			return CollectionHelper.asSet( new ConstraintCheckError( element, annotation, messageKey ) );
-		}
-
-		return Collections.emptySet();
-	}
-
-	private boolean isStaticElement(Element element) {
-		return element.getModifiers().contains( Modifier.STATIC );
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java
deleted file mode 100644
index e3eabfc..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id: TypeCheck.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.checks;
-
-import java.util.Collections;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.TypeMirror;
-
-import org.hibernate.validator.ap.util.CollectionHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper;
-import org.hibernate.validator.ap.util.ConstraintHelper.ConstraintCheckResult;
-
-/**
- * Checks, that constraint annotations are only specified at elements
- * of a type supported by the constraints. Applies to fields, methods and
- * non-annotation type declarations.
- *
- * @author Gunnar Morling
- */
-public class TypeCheck extends AbstractConstraintCheck {
-
-	private ConstraintHelper constraintHelper;
-
-	public TypeCheck(ConstraintHelper constraintHelper) {
-		this.constraintHelper = constraintHelper;
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkField(VariableElement element,
-												AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, element.asType(), "NOT_SUPPORTED_TYPE" );
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
-												 AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, element.getReturnType(), "NOT_SUPPORTED_RETURN_TYPE" );
-	}
-
-	@Override
-	public Set<ConstraintCheckError> checkNonAnnotationType(
-			TypeElement element, AnnotationMirror annotation) {
-
-		return checkInternal( element, annotation, element.asType(), "NOT_SUPPORTED_TYPE" );
-	}
-
-	private Set<ConstraintCheckError> checkInternal(Element element,
-													AnnotationMirror annotation, TypeMirror type, String messageKey) {
-
-		if ( constraintHelper.checkConstraint(
-				annotation.getAnnotationType(), type
-		) != ConstraintCheckResult.ALLOWED ) {
-
-			return CollectionHelper.asSet(
-					new ConstraintCheckError(
-							element, annotation, messageKey,
-							annotation.getAnnotationType().asElement().getSimpleName()
-					)
-			);
-		}
-
-		return Collections.emptySet();
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java
deleted file mode 100644
index a446dda..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java
+++ /dev/null
@@ -1,271 +0,0 @@
-// $Id: AnnotationApiHelper.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.util;
-
-import java.lang.annotation.Annotation;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.AnnotationValue;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleAnnotationValueVisitor6;
-import javax.lang.model.util.Types;
-
-/**
- * A helper class providing some useful methods to work with types
- * from the JSR-269-API.
- *
- * @author Gunnar Morling
- */
-public class AnnotationApiHelper {
-
-	private Elements elementUtils;
-
-	private Types typeUtils;
-
-	private final Map<Class<?>, TypeMirror> primitiveMirrors;
-
-	public AnnotationApiHelper(Elements elementUtils, Types typeUtils) {
-
-		this.elementUtils = elementUtils;
-		this.typeUtils = typeUtils;
-
-		Map<Class<?>, TypeMirror> tempPrimitiveMirrors = CollectionHelper.newHashMap();
-
-		tempPrimitiveMirrors.put( Boolean.TYPE, typeUtils.getPrimitiveType( TypeKind.BOOLEAN ) );
-		tempPrimitiveMirrors.put( Character.TYPE, typeUtils.getPrimitiveType( TypeKind.CHAR ) );
-		tempPrimitiveMirrors.put( Byte.TYPE, typeUtils.getPrimitiveType( TypeKind.BYTE ) );
-		tempPrimitiveMirrors.put( Short.TYPE, typeUtils.getPrimitiveType( TypeKind.SHORT ) );
-		tempPrimitiveMirrors.put( Integer.TYPE, typeUtils.getPrimitiveType( TypeKind.INT ) );
-		tempPrimitiveMirrors.put( Long.TYPE, typeUtils.getPrimitiveType( TypeKind.LONG ) );
-		tempPrimitiveMirrors.put( Float.TYPE, typeUtils.getPrimitiveType( TypeKind.FLOAT ) );
-		tempPrimitiveMirrors.put( Double.TYPE, typeUtils.getPrimitiveType( TypeKind.DOUBLE ) );
-
-		primitiveMirrors = Collections.unmodifiableMap( tempPrimitiveMirrors );
-	}
-
-	/**
-	 * Returns a list containing those annotation mirrors from the input list,
-	 * which are of type <code>annotationType</code>. The input collection
-	 * remains untouched.
-	 *
-	 * @param annotationMirrors A list of annotation mirrors.
-	 * @param annotationType The type to be compared against.
-	 *
-	 * @return A list with those annotation mirrors from the input list, which
-	 *         are of type <code>annotationType</code>. May be empty but never
-	 *         null.
-	 */
-	public List<AnnotationMirror> filterByType(List<? extends AnnotationMirror> annotationMirrors, TypeMirror annotationType) {
-
-		List<AnnotationMirror> theValue = CollectionHelper.newArrayList();
-
-		if ( annotationMirrors == null || annotationType == null ) {
-			return theValue;
-		}
-
-		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
-
-			if ( typeUtils.isSameType( oneAnnotationMirror.getAnnotationType(), annotationType ) ) {
-				theValue.add( oneAnnotationMirror );
-			}
-		}
-
-		return theValue;
-	}
-
-	/**
-	 * Returns that mirror from the given list of annotation mirrors that
-	 * represents the annotation type specified by the given class.
-	 *
-	 * @param annotationMirrors A list of annotation mirrors.
-	 * @param annotationClazz The class of the annotation of interest.
-	 *
-	 * @return The mirror from the given list that represents the specified
-	 *         annotation or null, if the given list doesn't contain such a
-	 *         mirror.
-	 */
-	public AnnotationMirror getMirror(List<? extends AnnotationMirror> annotationMirrors, Class<? extends Annotation> annotationClazz) {
-
-		if ( annotationMirrors == null || annotationClazz == null ) {
-			return null;
-		}
-
-		TypeMirror mirrorForAnnotation = elementUtils.getTypeElement(
-				annotationClazz.getCanonicalName()
-		).asType();
-
-		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
-
-			if ( typeUtils.isSameType(
-					oneAnnotationMirror.getAnnotationType(),
-					mirrorForAnnotation
-			) ) {
-				return oneAnnotationMirror;
-			}
-		}
-
-		return null;
-	}
-
-	/**
-	 * Returns a TypeMirror for the given class.
-	 *
-	 * @param clazz The class of interest. May not be a an array type.
-	 *
-	 * @return A TypeMirror for the given class.
-	 */
-	public TypeMirror getMirrorForType(Class<?> clazz) {
-
-		if ( clazz.isPrimitive() ) {
-			return primitiveMirrors.get( clazz );
-		}
-		else {
-
-			TypeElement typeElement = elementUtils.getTypeElement( clazz.getCanonicalName() );
-
-			if ( typeElement != null ) {
-				return typeUtils.getDeclaredType( typeElement );
-			}
-		}
-
-		throw new AssertionError( "Couldn't find a type element for class " + clazz );
-	}
-
-	/**
-	 * Returns the annotation value of the given annotation mirror with the
-	 * given name.
-	 *
-	 * @param annotationMirror An annotation mirror.
-	 * @param name The name of the annotation value of interest.
-	 *
-	 * @return The annotation value with the given name or null, if one of the
-	 *         input values is null or if no value with the given name exists
-	 *         within the given annotation mirror.
-	 */
-	public AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String name) {
-
-		if ( annotationMirror == null || name == null ) {
-			return null;
-		}
-
-		Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues = annotationMirror.getElementValues();
-
-		for ( Entry<? extends ExecutableElement, ? extends AnnotationValue> oneElementValue : elementValues.entrySet() ) {
-
-			if ( oneElementValue.getKey().getSimpleName().contentEquals( name ) ) {
-
-				return oneElementValue.getValue();
-			}
-		}
-
-		return null;
-	}
-
-	/**
-	 * Returns the given annotation mirror's array-typed annotation value with
-	 * the given name.
-	 *
-	 * @param annotationMirror An annotation mirror.
-	 * @param name The name of the annotation value of interest.
-	 *
-	 * @return The annotation value with the given name or an empty list, if no
-	 *         such value exists within the given annotation mirror or such a
-	 *         value exists but is not an array-typed one.
-	 */
-	public List<? extends AnnotationValue> getAnnotationArrayValue(AnnotationMirror annotationMirror, String name) {
-
-		AnnotationValue annotationValue = getAnnotationValue( annotationMirror, name );
-
-		if ( annotationValue == null ) {
-			return Collections.<AnnotationValue>emptyList();
-		}
-
-		List<? extends AnnotationValue> theValue = annotationValue.accept(
-				new SimpleAnnotationValueVisitor6<List<? extends AnnotationValue>, Void>() {
-
-					@Override
-					public List<? extends AnnotationValue> visitArray(List<? extends AnnotationValue> values, Void p) {
-						return values;
-					}
-
-				}, null
-		);
-
-		return theValue != null ? theValue : Collections
-				.<AnnotationValue>emptyList();
-	}
-
-	/**
-	 * <p>
-	 * Returns a set containing the "lowest" type per hierarchy contained in the
-	 * input set. The following examples shall demonstrate the behavior.
-	 * </p>
-	 * <ul>
-	 * <li>
-	 * Input: <code>String</code>; Output: <code>String</code></li>
-	 * <li>
-	 * Input: <code>Object</code>, <code>String</code>; Output:
-	 * <code>String</code></li>
-	 * <li>
-	 * Input: <code>Object</code>, <code>Collection</code>, <code>List</code>;
-	 * Output: <code>List</code></li>
-	 * <li>
-	 * Input: <code>Collection</code>, <code>Set</code>, <code>List</code>;
-	 * Output: <code>List</code>, <code>Set</code></li>
-	 * </ul>
-	 *
-	 * @param types A set of type mirrors.
-	 *
-	 * @return A set with the lowest types per hierarchy or null, if the input
-	 *         set was null.
-	 */
-	public Set<TypeMirror> keepLowestTypePerHierarchy(Set<TypeMirror> types) {
-
-		if ( types == null ) {
-			return null;
-		}
-
-		Set<TypeMirror> theValue = CollectionHelper.newHashSet();
-
-		for ( TypeMirror typeMirror1 : types ) {
-			boolean foundSubType = false;
-			for ( TypeMirror typeMirror2 : types ) {
-				if ( !typeUtils.isSameType( typeMirror2, typeMirror1 ) && typeUtils.isAssignable(
-						typeMirror2, typeMirror1
-				) ) {
-					foundSubType = true;
-					continue;
-				}
-			}
-			if ( !foundSubType ) {
-				theValue.add( typeMirror1 );
-			}
-		}
-
-		return theValue;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java
deleted file mode 100644
index 720c5fb..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id: CollectionHelper.java 19033 2010-03-19 21:27:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Provides some methods for simplified collection instantiation.
- *
- * @author Gunnar Morling
- */
-public class CollectionHelper {
-
-	public static <K, V> HashMap<K, V> newHashMap() {
-		return new HashMap<K, V>();
-	}
-
-	public static <T> HashSet<T> newHashSet() {
-		return new HashSet<T>();
-	}
-
-	public static <T> ArrayList<T> newArrayList() {
-		return new ArrayList<T>();
-	}
-
-	public static <T> Set<T> asSet(T... ts) {
-
-		return new HashSet<T>( Arrays.asList( ts ) );
-	}
-
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java
deleted file mode 100644
index c8b1499..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java
+++ /dev/null
@@ -1,646 +0,0 @@
-// $Id: ConstraintHelper.java 19324 2010-04-29 19:02:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.util;
-
-import java.lang.annotation.Annotation;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.AnnotationValue;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.Name;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleAnnotationValueVisitor6;
-import javax.lang.model.util.TypeKindVisitor6;
-import javax.lang.model.util.Types;
-import javax.validation.Constraint;
-import javax.validation.ConstraintValidator;
-import javax.validation.Valid;
-import javax.validation.constraints.AssertFalse;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.DecimalMax;
-import javax.validation.constraints.DecimalMin;
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Null;
-import javax.validation.constraints.Past;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-/**
- * Helper class that deals with all constraint-related stuff, such as
- * determining whether a given annotation represents a constraint annotation or
- * whether a given annotation is allowed to be declared at a given element.
- *
- * @author Gunnar Morling
- */
-public class ConstraintHelper {
-
-	/**
-	 * Possible results of a constraint check as returned by
-	 * {@link ConstraintHelper#checkConstraint(DeclaredType, TypeMirror)}.
-	 *
-	 * @author Gunnar Morling
-	 */
-	public enum ConstraintCheckResult {
-
-		/**
-		 * The checked constraint is allowed at the evaluated type.
-		 */
-		ALLOWED,
-
-		/**
-		 * The checked constraint is not allowed at the evaluated type.
-		 */
-		DISALLOWED,
-
-		/**
-		 * Multiple validators were found, that could validate the checked
-		 * constrained at the evaluated type.
-		 */
-		MULTIPLE_VALIDATORS_FOUND
-	}
-
-	/**
-	 * The type of an annotation with respect to the BV API.
-	 *
-	 * @author Gunnar Morling
-	 */
-	public enum AnnotationType {
-
-		/**
-		 * Given annotation is a constraint annotation (e.g. @Min).
-		 */
-		CONSTRAINT_ANNOTATION,
-
-		/**
-		 * Given annotation is a multi-valued annotation (e.g.
-		 * <code>
-		 *
-		 * @List({
-		 * @Min(10),
-		 * @Min(value=20, groups= Special.class})
-		 * })
-		 * </code>.
-		 */
-		MULTI_VALUED_CONSTRAINT_ANNOTATION,
-
-		/**
-		 * Given annotation is the @Valid annotation.
-		 */
-		GRAPH_VALIDATION_ANNOTATION,
-
-		/**
-		 * Given annotation is not related to the BV API (e.g. @Resource).
-		 */
-		NO_CONSTRAINT_ANNOTATION
-	}
-
-	/**
-	 * The name of the package containing JSR 303 standard annotations
-	 * ("javax.validation.constraints").
-	 */
-	private final Name CONSTRAINT_ANNOTATION_PACKAGE_NAME;
-
-	private static Map<Name, Set<TypeMirror>> builtInConstraints;
-
-	private Elements elementUtils;
-
-	private Types typeUtils;
-
-	private AnnotationApiHelper annotationApiHelper;
-
-	public ConstraintHelper(Elements elementUtils, Types typeUtils, AnnotationApiHelper annotationApiHelper) {
-
-		this.elementUtils = elementUtils;
-		this.typeUtils = typeUtils;
-		this.annotationApiHelper = annotationApiHelper;
-
-		CONSTRAINT_ANNOTATION_PACKAGE_NAME = elementUtils.getName( Size.class.getPackage().getName() );
-
-		builtInConstraints = CollectionHelper.newHashMap();
-
-		registerAllowedTypesForBuiltInConstraint(
-				AssertFalse.class, CollectionHelper.<Class<?>>asSet( Boolean.class )
-		);
-		registerAllowedTypesForBuiltInConstraint( AssertTrue.class, CollectionHelper.<Class<?>>asSet( Boolean.class ) );
-		registerAllowedTypesForBuiltInConstraint(
-				DecimalMax.class, CollectionHelper.<Class<?>>asSet( Number.class, String.class )
-		);
-		registerAllowedTypesForBuiltInConstraint(
-				DecimalMin.class, CollectionHelper.<Class<?>>asSet( Number.class, String.class )
-		);
-		registerAllowedTypesForBuiltInConstraint(
-				Digits.class, CollectionHelper.<Class<?>>asSet( Number.class, String.class )
-		);
-		registerAllowedTypesForBuiltInConstraint(
-				Future.class, CollectionHelper.<Class<?>>asSet( Calendar.class, Date.class )
-		);
-		registerAllowedTypesForBuiltInConstraint(
-				Max.class, CollectionHelper.<Class<?>>asSet( Number.class, String.class )
-		);
-		registerAllowedTypesForBuiltInConstraint(
-				Min.class, CollectionHelper.<Class<?>>asSet( Number.class, String.class )
-		);
-		registerAllowedTypesForBuiltInConstraint( NotNull.class, CollectionHelper.<Class<?>>asSet( Object.class ) );
-		registerAllowedTypesForBuiltInConstraint( Null.class, CollectionHelper.<Class<?>>asSet( Object.class ) );
-		registerAllowedTypesForBuiltInConstraint(
-				Past.class, CollectionHelper.<Class<?>>asSet( Calendar.class, Date.class )
-		);
-		registerAllowedTypesForBuiltInConstraint( Pattern.class, CollectionHelper.<Class<?>>asSet( String.class ) );
-		registerAllowedTypesForBuiltInConstraint(
-				Size.class, CollectionHelper.<Class<?>>asSet(
-						Object[].class,
-						boolean[].class,
-						byte[].class,
-						char[].class,
-						double[].class,
-						float[].class,
-						int[].class,
-						long[].class,
-						short[].class,
-						Collection.class,
-						Map.class,
-						String.class
-				)
-		);
-	}
-
-	/**
-	 * Checks, whether the given type element represents a constraint annotation
-	 * or not. That's the case, if the given element is annotated with the
-	 * {@link Constraint} meta-annotation (which is only allowed at annotation
-	 * declarations).
-	 *
-	 * @param element The element of interest.
-	 *
-	 * @return True, if the given element is a constraint annotation type, false
-	 *         otherwise.
-	 */
-	public boolean isConstraintAnnotation(Element element) {
-		return element.getAnnotation( Constraint.class ) != null;
-	}
-
-	/**
-	 * Returns the {@link AnnotationType} of the given annotation.
-	 *
-	 * @param annotationMirror The annotation mirror of interest.
-	 *
-	 * @return The given mirror's annotation type.
-	 */
-	public AnnotationType getAnnotationType(AnnotationMirror annotationMirror) {
-
-		if ( isConstraintAnnotation( annotationMirror ) ) {
-			return AnnotationType.CONSTRAINT_ANNOTATION;
-		}
-		else if ( isMultiValuedConstraint( annotationMirror ) ) {
-			return AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION;
-		}
-		else if ( isGraphValidationAnnotation( annotationMirror ) ) {
-			return AnnotationType.GRAPH_VALIDATION_ANNOTATION;
-		}
-		else {
-			return AnnotationType.NO_CONSTRAINT_ANNOTATION;
-		}
-
-	}
-
-	/**
-	 * Returns a list with the constraint annotations contained in the given
-	 * array-valued annotation mirror.
-	 *
-	 * @param annotationMirror An array-valued annotation mirror (meaning it has an
-	 * array-typed attribute with name "value").
-	 *
-	 * @return A list with the constraint annotations part of the given
-	 *         multi-valued constraint annotation. Will return an empty list if
-	 *         the given annotation is no multi-valued annotation or if no
-	 *         constraint annotations are contained within the given
-	 *         array-valued annotation.
-	 */
-	public List<AnnotationMirror> getPartsOfMultiValuedConstraint(
-			AnnotationMirror annotationMirror) {
-
-		final List<AnnotationMirror> theValue = CollectionHelper.newArrayList();
-
-		for ( AnnotationValue oneValuePart : annotationApiHelper
-				.getAnnotationArrayValue( annotationMirror, "value" ) ) {
-
-			oneValuePart.accept(
-					new SimpleAnnotationValueVisitor6<Void, Void>() {
-
-						@Override
-						public Void visitAnnotation(AnnotationMirror a, Void p) {
-
-							if ( isConstraintAnnotation(
-									a.getAnnotationType()
-											.asElement()
-							) ) {
-								theValue.add( a );
-							}
-
-							return null;
-						}
-
-					}, null
-			);
-
-		}
-
-		return theValue;
-	}
-
-	/**
-	 * Checks whether the given annotation type (which <b>must</b> be a
-	 * constraint annotation type) may be specified at elements of the specified
-	 * type.
-	 *
-	 * @param constraintAnnotationType A constraint annotation type.
-	 * @param typeOfAnnotatedElement A type which with an element is annotated.
-	 *
-	 * @return Whether the given constraint annotation may be specified at
-	 *         elements of the given type.
-	 */
-	public ConstraintCheckResult checkConstraint(
-			DeclaredType constraintAnnotationType,
-			TypeMirror typeOfAnnotatedElement) {
-
-		return isBuiltInConstraint( constraintAnnotationType ) ? checkBuiltInConstraint(
-				constraintAnnotationType, typeOfAnnotatedElement
-		)
-				: checkCustomConstraint(
-				constraintAnnotationType,
-				typeOfAnnotatedElement
-		);
-	}
-
-	// ==================================
-	// private API below
-	// ==================================
-
-	/**
-	 * Checks, whether the given annotation mirror represents a constraint
-	 * annotation or not. That's the case, if the given mirror is annotated with
-	 * the {@link Constraint} meta-annotation (which is only allowed at
-	 * annotation declarations).
-	 *
-	 * @param annotationMirror The annotation mirror of interest.
-	 *
-	 * @return True, if the given mirror represents a constraint annotation
-	 *         type, false otherwise.
-	 */
-	private boolean isConstraintAnnotation(AnnotationMirror annotationMirror) {
-		return isConstraintAnnotation(
-				annotationMirror.getAnnotationType()
-						.asElement()
-		);
-	}
-
-	/**
-	 * Checks, whether the given annotation mirror represents a multi-valued
-	 * constraint such as {@link javax.validation.constraints.Pattern.List}.
-	 * That is the case if the annotation has an array-typed attribute with name
-	 * "value", that exclusively contains constraint annotations.
-	 *
-	 * @param annotationMirror The annotation mirror of interest.
-	 *
-	 * @return True, if the given mirror represents a multi-valued constraint,
-	 *         false otherwise.
-	 */
-	private boolean isMultiValuedConstraint(AnnotationMirror annotationMirror) {
-
-		List<? extends AnnotationValue> annotationArrayValue = annotationApiHelper.getAnnotationArrayValue(
-				annotationMirror, "value"
-		);
-
-		// a multi-valued constraint must have at least one value
-		if ( annotationArrayValue.isEmpty() ) {
-			return false;
-		}
-
-		for ( AnnotationValue oneAnnotationValue : annotationArrayValue ) {
-
-			Boolean isConstraintAnnotation = oneAnnotationValue.accept(
-					new SimpleAnnotationValueVisitor6<Boolean, Void>() {
-
-						@Override
-						public Boolean visitAnnotation(
-								AnnotationMirror a, Void p) {
-
-							return isConstraintAnnotation( a.getAnnotationType().asElement() );
-						}
-					}, null
-			);
-
-			//TODO GM: have all parts of the array to be constraint annotations?
-			if ( Boolean.TRUE != isConstraintAnnotation ) {
-				return false;
-			}
-		}
-
-		return true;
-	}
-
-	/**
-	 * Checks, whether the given mirror represents the {@link Valid} annotation.
-	 *
-	 * @param annotationMirror The annotation mirror of interest.
-	 *
-	 * @return True, if the given mirror represents the @Valid annotation, false
-	 *         otherwise.
-	 */
-	private boolean isGraphValidationAnnotation(
-			AnnotationMirror annotationMirror) {
-
-		return typeUtils.isSameType(
-				annotationMirror.getAnnotationType(),
-				annotationApiHelper.getMirrorForType( Valid.class )
-		);
-	}
-
-	private ConstraintCheckResult checkBuiltInConstraint(DeclaredType builtInAnnotationType, TypeMirror typeOfAnnotatedElement) {
-
-		Set<TypeMirror> allowedTypes = getAllowedTypesForBuiltInConstraint( builtInAnnotationType );
-
-		for ( TypeMirror oneAllowedType : allowedTypes ) {
-			if ( typeUtils.isAssignable( typeOfAnnotatedElement, oneAllowedType ) ) {
-				return ConstraintCheckResult.ALLOWED;
-			}
-		}
-
-		return ConstraintCheckResult.DISALLOWED;
-	}
-
-	private Set<TypeMirror> getAllowedTypesForBuiltInConstraint(DeclaredType builtInAnnotationType) {
-
-		Set<TypeMirror> theValue = builtInConstraints.get( builtInAnnotationType.asElement().getSimpleName() );
-
-		if ( theValue == null ) {
-			theValue = Collections.emptySet();
-		}
-
-		return theValue;
-	}
-
-	/**
-	 * Returns a set containing all those types, at which the specified custom
-	 * constraint-annotation is allowed.
-	 *
-	 * @param customAnnotationType A custom constraint type.
-	 * @param typeOfAnnotatedElement The type of the annotated element
-	 *
-	 * @return A set with all types supported by the given constraint. May be
-	 *         empty in case of constraint composition, if there is no common
-	 *         type supported by all composing constraints.
-	 */
-	private ConstraintCheckResult checkCustomConstraint(DeclaredType customAnnotationType, TypeMirror typeOfAnnotatedElement) {
-
-		Set<AnnotationMirror> composingConstraints = getComposingConstraints( customAnnotationType );
-		boolean isComposedConstraint = !composingConstraints.isEmpty();
-
-		for ( AnnotationMirror oneComposingConstraint : composingConstraints ) {
-
-			ConstraintCheckResult annotationCheckResult = checkConstraint(
-					oneComposingConstraint.getAnnotationType(), typeOfAnnotatedElement
-			);
-
-			if ( annotationCheckResult != ConstraintCheckResult.ALLOWED ) {
-				return annotationCheckResult;
-			}
-
-		}
-
-		Set<TypeMirror> theValue = getSupportedTypes(
-				customAnnotationType,
-				typeOfAnnotatedElement
-		);
-
-		if ( theValue.size() > 1 ) {
-			return ConstraintCheckResult.MULTIPLE_VALIDATORS_FOUND;
-		}
-		else if ( theValue.size() == 1 || isComposedConstraint ) {
-			return ConstraintCheckResult.ALLOWED;
-		}
-		else {
-			return ConstraintCheckResult.DISALLOWED;
-		}
-	}
-
-	/**
-	 * <p> Returns a set with those types supported by the constraint validators
-	 * specified in the @Constraint meta-annotation of the given constraint
-	 * annotation type to which the specified type can be assigned. </p>
-	 * <p>
-	 * If multiple types from the same inheritance hierarchy (e.g. Collection
-	 * and Set) are supported by the validators, only the "lowest" one (e.g.
-	 * Set) will be part of the result.
-	 * </p>
-	 *
-	 * @param constraintAnnotationType A constraint annotation type.
-	 * @param type A type.
-	 *
-	 * @return A set with the supported types.
-	 */
-	private Set<TypeMirror> getSupportedTypes(
-			DeclaredType constraintAnnotationType, TypeMirror type) {
-
-		Set<TypeMirror> theValue = CollectionHelper.newHashSet();
-
-		//the Constraint meta-annotation at the type declaration, e.g. "@Constraint(validatedBy = CheckCaseValidator.class)"
-		AnnotationMirror constraintMetaAnnotation = getConstraintMetaAnnotation( constraintAnnotationType );
-
-		//the validator classes, e.g. [CheckCaseValidator.class]
-		List<? extends AnnotationValue> validatorClassReferences = getValidatorClassesFromConstraintMetaAnnotation(
-				constraintMetaAnnotation
-		);
-
-		for ( AnnotationValue oneValidatorClassReference : validatorClassReferences ) {
-
-			TypeMirror supportedType = getSupportedType( oneValidatorClassReference );
-
-			if ( typeUtils.isAssignable( type, supportedType ) ) {
-				theValue.add( supportedType );
-			}
-		}
-
-		return annotationApiHelper.keepLowestTypePerHierarchy( theValue );
-	}
-
-	private TypeMirror getSupportedType(AnnotationValue oneValidatorClassReference) {
-
-		TypeMirror validatorType = oneValidatorClassReference.accept(
-				new SimpleAnnotationValueVisitor6<TypeMirror, Void>() {
-
-					@Override
-					public TypeMirror visitType(TypeMirror t, Void p) {
-						return t;
-					}
-				}, null
-		);
-
-		// contains the bindings of the type parameters from the implemented
-		// ConstraintValidator interface, e.g. "ConstraintValidator<CheckCase, String>"
-		TypeMirror constraintValidatorImplementation = getConstraintValidatorSuperType( validatorType );
-
-		return constraintValidatorImplementation.accept(
-				new TypeKindVisitor6<TypeMirror, Void>() {
-
-					@Override
-					public TypeMirror visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
-						// 2nd type parameter contains the data type supported by current validator class, e.g. "String"
-						return constraintValidatorImplementation.getTypeArguments().get( 1 );
-					}
-
-				}, null
-		);
-	}
-
-	private TypeMirror getConstraintValidatorSuperType(TypeMirror type) {
-
-		List<? extends TypeMirror> superTypes = typeUtils.directSupertypes( type );
-		List<TypeMirror> nextSuperTypes = CollectionHelper.newArrayList();
-
-		//follow the type hierarchy upwards, until we have found the ConstraintValidator IF
-		while ( !superTypes.isEmpty() ) {
-
-			for ( TypeMirror oneSuperType : superTypes ) {
-				if ( typeUtils.asElement( oneSuperType ).getSimpleName()
-						.contentEquals( ConstraintValidator.class.getSimpleName() ) ) {
-
-					return oneSuperType;
-				}
-
-				nextSuperTypes.addAll( typeUtils.directSupertypes( oneSuperType ) );
-			}
-
-			superTypes = nextSuperTypes;
-			nextSuperTypes = CollectionHelper.newArrayList();
-		}
-
-		//HV-293: Actually this should never happen, as we can have only ConstraintValidator implementations
-		//here. The Eclipse JSR 269 implementation unfortunately doesn't always create the type hierarchy 
-		//properly though.
-		//TODO GM: create and report an isolated test case
-		throw new IllegalStateException( "Expected type " + type + " to implement javax.validation.ConstraintValidator, but it doesn't." );
-	}
-
-	/**
-	 * Retrieves the {@link Constraint} meta-annotation from the given
-	 * constraint annotation.
-	 *
-	 * @param annotationType A constraint type.
-	 *
-	 * @return The Constraint meta-annotation.
-	 *
-	 * @throws IllegalArgumentException If the given constraint annotation type isn't annotated with
-	 *                                  the {@link Constraint} meta-annotation.
-	 */
-	private AnnotationMirror getConstraintMetaAnnotation(DeclaredType annotationType) {
-
-		List<? extends AnnotationMirror> annotationMirrors = annotationType.asElement().getAnnotationMirrors();
-
-		AnnotationMirror constraintMetaAnnotation = annotationApiHelper.getMirror(
-				annotationMirrors, Constraint.class
-		);
-
-		if ( constraintMetaAnnotation == null ) {
-			throw new IllegalArgumentException( "Given type " + annotationType + " isn't a constraint annotation type." );
-		}
-
-		return constraintMetaAnnotation;
-	}
-
-	private List<? extends AnnotationValue> getValidatorClassesFromConstraintMetaAnnotation(AnnotationMirror constraintMetaAnnotation) {
-
-		AnnotationValue validatedBy = annotationApiHelper.getAnnotationValue( constraintMetaAnnotation, "validatedBy" );
-
-		return validatedBy.accept(
-				new SimpleAnnotationValueVisitor6<List<? extends AnnotationValue>, Void>() {
-
-					@Override
-					public List<? extends AnnotationValue> visitArray(List<? extends AnnotationValue> values, Void p) {
-						return values;
-					}
-
-				}, null
-		);
-	}
-
-	private void registerAllowedTypesForBuiltInConstraint(Class<? extends Annotation> annotation, Set<Class<?>> allowedTypes) {
-
-		Set<TypeMirror> mirrorsForAllowedTypes = CollectionHelper.newHashSet();
-
-		for ( Class<?> oneAllowedType : allowedTypes ) {
-
-			if ( oneAllowedType.isArray() ) {
-				mirrorsForAllowedTypes.add( typeUtils.getArrayType( annotationApiHelper.getMirrorForType( oneAllowedType.getComponentType() ) ) );
-			}
-			else {
-				mirrorsForAllowedTypes.add( annotationApiHelper.getMirrorForType( oneAllowedType ) );
-			}
-
-		}
-
-		builtInConstraints.put( elementUtils.getName( annotation.getSimpleName() ), mirrorsForAllowedTypes );
-	}
-
-	/**
-	 * Checks, whether the given constraint annotation type is a built-in
-	 * constraint annotation (which is the case, if it is declared in the
-	 * package <code>javax.validation.constraints</code>).
-	 *
-	 * @param constraintAnnotationType The type to check.
-	 *
-	 * @return True, if the given type is a constraint annotation, false
-	 *         otherwise.
-	 */
-	private boolean isBuiltInConstraint(DeclaredType constraintAnnotationType) {
-
-		return
-				CONSTRAINT_ANNOTATION_PACKAGE_NAME.equals(
-						elementUtils.getPackageOf( constraintAnnotationType.asElement() ).getQualifiedName()
-				);
-	}
-
-	private Set<AnnotationMirror> getComposingConstraints(DeclaredType constraintAnnotationType) {
-
-		Set<AnnotationMirror> theValue = CollectionHelper.newHashSet();
-
-		List<? extends AnnotationMirror> annotationMirrors = constraintAnnotationType.asElement()
-				.getAnnotationMirrors();
-
-		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
-			if ( isConstraintAnnotation( oneAnnotationMirror.getAnnotationType().asElement() ) ) {
-				theValue.add( oneAnnotationMirror );
-			}
-		}
-
-		return theValue;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java b/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java
deleted file mode 100644
index b256ee5..0000000
--- a/hibernate-validator-annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id: MessagerAdapter.java 19310 2010-04-27 22:51:17Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.util;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.Set;
-import javax.annotation.processing.Messager;
-import javax.tools.Diagnostic.Kind;
-
-import org.hibernate.validator.ap.checks.ConstraintCheckError;
-
-/**
- * Wrapper around {@link Messager}, which adds the ability to format error messages using {@link MessageFormat}.
- *
- * @author Gunnar Morling
- */
-public class MessagerAdapter {
-
-	/**
-	 * Contains the texts to be displayed.
-	 */
-	private final ResourceBundle errorMessages;
-
-	private final Messager messager;
-
-	/**
-	 * The kind of diagnostic to be used when reporting any problems.
-	 */
-	private Kind diagnosticKind;
-
-	/**
-	 * Creates a new MessagerAdapter.
-	 *
-	 * @param messager The underlying messager.
-	 * @param diagnosticKind The kind with which messages shall be reported.
-	 */
-	public MessagerAdapter(Messager messager, Kind diagnosticKind) {
-
-		this.messager = messager;
-		this.diagnosticKind = diagnosticKind;
-
-		errorMessages = ResourceBundle.getBundle( "org.hibernate.validator.ap.ValidationProcessorMessages" );
-	}
-
-	/**
-	 * Returns the messager used by this adapter.
-	 *
-	 * @return The underlying messager.
-	 */
-	public Messager getDelegate() {
-		return messager;
-	}
-
-	/**
-	 * Reports the given errors against the underlying {@link Messager} using
-	 * the specified {@link Kind}.
-	 *
-	 * @param errors A set with errors to report. May be empty but must not be
-	 * null.
-	 */
-	public void reportErrors(Set<ConstraintCheckError> errors) {
-		for ( ConstraintCheckError oneError : errors ) {
-			reportError( oneError );
-		}
-	}
-
-	/**
-	 * Reports the given error. Message parameters will be put into the template
-	 * retrieved from the resource bundle if applicable.
-	 *
-	 * @param error The error to report.
-	 */
-	private void reportError(ConstraintCheckError error) {
-
-		String message = errorMessages.getString( error.getMessageKey() );
-
-		if ( error.getMessageParameters() != null ) {
-			message = MessageFormat.format( message, error.getMessageParameters() );
-		}
-
-		messager.printMessage(
-				diagnosticKind, message, error.getElement(), error.getAnnotationMirror()
-		);
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties b/hibernate-validator-annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties
deleted file mode 100644
index f13af72..0000000
--- a/hibernate-validator-annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# $Id: ValidationProcessorMessages.properties 17927 2009-11-05 09:51:52Z hardy.ferentschik $
-#
-# Contains error messages to be used by the ConstraintValidationProcessor.
-
-ONLY_GETTERS_MAY_BE_ANNOTATED=Constraint annotations must not be specified at methods, which are no valid JavaBeans getter methods.
-NOT_SUPPORTED_TYPE=The annotation @{0} is disallowed for this data type.
-NOT_SUPPORTED_RETURN_TYPE=The annotation @{0} is disallowed for the return type of this method.
-ONLY_CONSTRAINT_ANNOTATIONS_MAY_BE_ANNOTATED=Constraint annotations must not be specified at annotation types, which are no constraint annotation types themselves.
-STATIC_METHODS_MAY_NOT_BE_ANNOTATED=Only non-static methods may be annotated with constraint annotations.
-STATIC_FIELDS_MAY_NOT_BE_ANNOTATED=Only non-static fields may be annotated with constraint annotations.
-INVALID_DIAGNOSTIC_KIND_GIVEN=The given value {0} is no valid diagnostic kind. Kind.ERROR will be used.
-ATVALID_NOT_ALLOWED_AT_PRIMITIVE_FIELD=Fields of a primitive type must not annotated with @Valid.
-ATVALID_NOT_ALLOWED_AT_METHOD_RETURNING_PRIMITIVE_TYPE=Methods returning a primitive type must not annotated with @Valid.
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java
deleted file mode 100644
index 30e042b..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java
+++ /dev/null
@@ -1,386 +0,0 @@
-// $Id: ConstraintValidationProcessorTest.java 19525 2010-05-15 16:05:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap;
-
-import java.io.File;
-import javax.tools.Diagnostic;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaFileObject;
-import javax.tools.ToolProvider;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.ap.testmodel.FieldLevelValidationUsingBuiltInConstraints;
-import org.hibernate.validator.ap.testmodel.MethodLevelValidationUsingBuiltInConstraints;
-import org.hibernate.validator.ap.testmodel.MultipleConstraintsOfSameType;
-import org.hibernate.validator.ap.testmodel.ValidationUsingAtValidAnnotation;
-import org.hibernate.validator.ap.testmodel.boxing.ValidLong;
-import org.hibernate.validator.ap.testmodel.boxing.ValidLongValidator;
-import org.hibernate.validator.ap.testmodel.boxing.ValidationUsingBoxing;
-import org.hibernate.validator.ap.testmodel.classlevelconstraints.ClassLevelValidation;
-import org.hibernate.validator.ap.testmodel.classlevelconstraints.ValidCustomer;
-import org.hibernate.validator.ap.testmodel.classlevelconstraints.ValidCustomerValidator;
-import org.hibernate.validator.ap.testmodel.composedconstraint.FieldLevelValidationUsingComposedConstraint;
-import org.hibernate.validator.ap.testmodel.composedconstraint.ValidOrderNumber;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposedConstraint;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForGregorianCalendar;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForList;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForString;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForArrayList;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForCalendar;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForCollection;
-import org.hibernate.validator.ap.testmodel.composedconstraint2.FieldLevelValidationUsingComplexComposedConstraint;
-import org.hibernate.validator.ap.testmodel.customconstraints.CaseMode;
-import org.hibernate.validator.ap.testmodel.customconstraints.CheckCase;
-import org.hibernate.validator.ap.testmodel.customconstraints.CheckCaseValidator;
-import org.hibernate.validator.ap.testmodel.customconstraints.FieldLevelValidationUsingCustomConstraints;
-import org.hibernate.validator.ap.testmodel.inheritedvalidator.AbstractCustomConstraintValidator;
-import org.hibernate.validator.ap.testmodel.inheritedvalidator.CustomConstraint;
-import org.hibernate.validator.ap.testmodel.inheritedvalidator.CustomConstraintValidator;
-import org.hibernate.validator.ap.testmodel.inheritedvalidator.FieldLevelValidationUsingInheritedValidator;
-import org.hibernate.validator.ap.testmodel.invalidcomposedconstraint.ValidCustomerNumber;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.NoUniqueValidatorResolution;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SerializableCollection;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.Size;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForCollection;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForSerializable;
-import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForSet;
-import org.hibernate.validator.ap.testutil.CompilerTestHelper;
-import org.hibernate.validator.ap.util.DiagnosticExpectation;
-
-import static org.hibernate.validator.ap.testutil.CompilerTestHelper.assertThatDiagnosticsMatch;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Test for {@link ConstraintValidationProcessor} using the Java compiler
- * API as defined by JSR 199.
- *
- * @author Gunnar Morling.
- */
-public class ConstraintValidationProcessorTest {
-
-	private static CompilerTestHelper compilerHelper;
-
-	private DiagnosticCollector<JavaFileObject> diagnostics;
-
-	@BeforeClass
-	public static void setUpCompilerHelper() {
-
-		String testSourceBaseDir = System.getProperty( "testSourceBaseDir" );
-		String pathToBeanValidationApiJar = System.getProperty( "pathToBeanValidationApiJar" );
-
-		assertNotNull(
-				testSourceBaseDir,
-				"The system property testSourceBaseDir has to be set and point to the base directory of the test java sources."
-		);
-		assertNotNull(
-				pathToBeanValidationApiJar,
-				"The system property pathToBeanValidationApiJar has to be set and point to the BV API Jars."
-		);
-
-		compilerHelper =
-				new CompilerTestHelper(
-						ToolProvider.getSystemJavaCompiler(), testSourceBaseDir, pathToBeanValidationApiJar
-				);
-	}
-
-	@BeforeMethod
-	public void setUp() {
-		diagnostics = new DiagnosticCollector<JavaFileObject>();
-	}
-
-	@Test
-	public void fieldLevelValidationUsingBuiltInConstraints() {
-
-		File sourceFile = compilerHelper.getSourceFile( FieldLevelValidationUsingBuiltInConstraints.class );
-
-		boolean compilationResult =
-				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics, new DiagnosticExpectation( Kind.ERROR, 54 ), new DiagnosticExpectation( Kind.ERROR, 60 )
-		);
-	}
-
-	@Test
-	public void testThatProcessorOptionsAreEvaluated() {
-
-		File sourceFile = compilerHelper.getSourceFile( FieldLevelValidationUsingBuiltInConstraints.class );
-
-		// compile with -AdiagnosticKind=Kind.WARNING and -Averbose=true
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(), diagnostics, Kind.WARNING, true, sourceFile
-				);
-
-		// compilation succeeds as there are problems, but Kind.WARNING won't stop compilation
-		assertTrue( compilationResult );
-
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.NOTE, Diagnostic.NOPOS ), //says that verbose messaging is enabled
-				new DiagnosticExpectation( Kind.WARNING, 54 ),
-				new DiagnosticExpectation( Kind.WARNING, 60 )
-		);
-	}
-
-	@Test
-	public void fieldLevelValidationUsingCustomConstraints() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingCustomConstraints.class );
-		File sourceFile2 = compilerHelper.getSourceFile( CheckCase.class );
-		File sourceFile3 = compilerHelper.getSourceFile( CaseMode.class );
-		File sourceFile4 = compilerHelper.getSourceFile( CheckCaseValidator.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(),
-						diagnostics,
-						sourceFile1,
-						sourceFile2,
-						sourceFile3,
-						sourceFile4
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 30 ) );
-	}
-
-	@Test
-	public void testThatInheritedValidatorClassesAreHandledCorrectly() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingInheritedValidator.class );
-		File sourceFile2 = compilerHelper.getSourceFile( CustomConstraint.class );
-		File sourceFile3 = compilerHelper.getSourceFile( AbstractCustomConstraintValidator.class );
-		File sourceFile4 = compilerHelper.getSourceFile( CustomConstraintValidator.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(),
-						diagnostics,
-						sourceFile1,
-						sourceFile2,
-						sourceFile3,
-						sourceFile4
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 30 ) );
-	}
-
-	@Test
-	public void methodLevelValidationUsingBuiltInConstraints() {
-
-		File sourceFile = compilerHelper.getSourceFile( MethodLevelValidationUsingBuiltInConstraints.class );
-
-		boolean compilationResult =
-				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.ERROR, 32 ),
-				new DiagnosticExpectation( Kind.ERROR, 39 ),
-				new DiagnosticExpectation( Kind.ERROR, 47 ),
-				new DiagnosticExpectation( Kind.ERROR, 54 )
-		);
-	}
-
-	@Test
-	public void classLevelValidation() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( ClassLevelValidation.class );
-		File sourceFile2 = compilerHelper.getSourceFile( ValidCustomer.class );
-		File sourceFile3 = compilerHelper.getSourceFile( ValidCustomerValidator.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2, sourceFile3
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 28 ) );
-	}
-
-	@Test
-	public void validationUsingComposedConstraint() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingComposedConstraint.class );
-		File sourceFile2 = compilerHelper.getSourceFile( ValidOrderNumber.class );
-
-		boolean compilationResult =
-				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 29 ) );
-	}
-
-	@Test
-	public void validationUsingComplexComposedConstraint() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingComplexComposedConstraint.class );
-		File sourceFile2 = compilerHelper.getSourceFile( ComposedConstraint.class );
-		File sourceFile3 = compilerHelper.getSourceFile( ComposingConstraint1.class );
-		File sourceFile4 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForString.class );
-		File sourceFile5 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForGregorianCalendar.class );
-		File sourceFile6 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForList.class );
-		File sourceFile7 = compilerHelper.getSourceFile( ComposingConstraint2.class );
-		File sourceFile8 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForArrayList.class );
-		File sourceFile9 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForCalendar.class );
-		File sourceFile10 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForCollection.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(),
-						diagnostics,
-						sourceFile1,
-						sourceFile2,
-						sourceFile3,
-						sourceFile4,
-						sourceFile5,
-						sourceFile6,
-						sourceFile7,
-						sourceFile8,
-						sourceFile9,
-						sourceFile10
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.ERROR, 29 ),
-				new DiagnosticExpectation( Kind.ERROR, 41 ),
-				new DiagnosticExpectation( Kind.ERROR, 50 ),
-				new DiagnosticExpectation( Kind.ERROR, 56 )
-		);
-	}
-
-	@Test
-	public void validationUsingBoxing() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( ValidationUsingBoxing.class );
-		File sourceFile2 = compilerHelper.getSourceFile( ValidLong.class );
-		File sourceFile3 = compilerHelper.getSourceFile( ValidLongValidator.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2, sourceFile3
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.ERROR, 31 ),
-				new DiagnosticExpectation( Kind.ERROR, 37 ),
-				new DiagnosticExpectation( Kind.ERROR, 43 ),
-				new DiagnosticExpectation( Kind.ERROR, 59 ),
-				new DiagnosticExpectation( Kind.ERROR, 67 )
-		);
-	}
-
-	@Test
-	public void testThatSpecifyingConstraintAnnotationAtNonConstraintAnnotationTypeCausesCompilationError() {
-
-		File sourceFile = compilerHelper.getSourceFile( ValidCustomerNumber.class );
-
-		boolean compilationResult =
-				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics, new DiagnosticExpectation( Kind.ERROR, 28 ), new DiagnosticExpectation( Kind.ERROR, 29 )
-		);
-	}
-
-	@Test
-	public void testThatNonUniqueValidatorResolutionCausesCompilationError() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( NoUniqueValidatorResolution.class );
-		File sourceFile2 = compilerHelper.getSourceFile( Size.class );
-		File sourceFile3 = compilerHelper.getSourceFile( SizeValidatorForCollection.class );
-		File sourceFile4 = compilerHelper.getSourceFile( SizeValidatorForSerializable.class );
-		File sourceFile5 = compilerHelper.getSourceFile( SerializableCollection.class );
-		File sourceFile6 = compilerHelper.getSourceFile( SizeValidatorForSet.class );
-
-		boolean compilationResult =
-				compilerHelper.compile(
-						new ConstraintValidationProcessor(),
-						diagnostics,
-						sourceFile1,
-						sourceFile2,
-						sourceFile3,
-						sourceFile4,
-						sourceFile5,
-						sourceFile6
-				);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics, new DiagnosticExpectation(
-						Kind.ERROR, 33
-				)
-		);
-	}
-
-	@Test
-	public void testThatMultiValuedConstrainedIsOnlyGivenAtSupportedType() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( MultipleConstraintsOfSameType.class );
-
-		boolean compilationResult = compilerHelper.compile(
-				new ConstraintValidationProcessor(), diagnostics, sourceFile1
-		);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.ERROR, 33 ),
-				new DiagnosticExpectation( Kind.ERROR, 33 )
-		);
-	}
-
-	@Test
-	public void testThatAtValidAnnotationGivenAtNotSupportedTypesCausesCompilationErrors() {
-
-		File sourceFile1 = compilerHelper.getSourceFile( ValidationUsingAtValidAnnotation.class );
-
-		boolean compilationResult = compilerHelper.compile(
-				new ConstraintValidationProcessor(), diagnostics, sourceFile1
-		);
-
-		assertFalse( compilationResult );
-		assertThatDiagnosticsMatch(
-				diagnostics,
-				new DiagnosticExpectation( Kind.ERROR, 34 ),
-				new DiagnosticExpectation( Kind.ERROR, 40 ),
-				new DiagnosticExpectation( Kind.ERROR, 56 ),
-				new DiagnosticExpectation( Kind.ERROR, 64 ),
-				new DiagnosticExpectation( Kind.ERROR, 72 ),
-				new DiagnosticExpectation( Kind.ERROR, 80 ),
-				new DiagnosticExpectation( Kind.ERROR, 88 )
-		);
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java
deleted file mode 100644
index a889b9f..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id: FieldLevelValidationUsingBuiltInConstraints.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import javax.validation.constraints.Size;
-
-public class FieldLevelValidationUsingBuiltInConstraints {
-
-	@Size(min = 10)
-	public String string;
-
-	@Size(min = 10)
-	public Collection collection1;
-
-	@Size(min = 10)
-	public Collection<?> collection2;
-
-	@Size(min = 10)
-	public Collection<String> stringCollection;
-
-	/**
-	 * Allowed, as List extends Collection.
-	 */
-	@Size(min = 10)
-	public List list1;
-
-	@Size(min = 10)
-	public List<?> list2;
-
-	@Size(min = 10)
-	public List<String> stringList;
-
-	/**
-	 * Not allowed (unsupported type).
-	 */
-	@Size(min = 10)
-	public Date date;
-
-	/**
-	 * Not allowed (static field).
-	 */
-	@Size(min = 10)
-	public static String staticString;
-
-	@Size(min = 10)
-	public Object[] objectArray;
-
-	@Size(min = 10)
-	public Integer[] integerArray;
-
-	@Size(min = 10)
-	public int[] intArray;
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java
deleted file mode 100644
index a97ef04..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id: MethodLevelValidationUsingBuiltInConstraints.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel;
-
-import java.util.Date;
-import javax.validation.constraints.Size;
-
-public class MethodLevelValidationUsingBuiltInConstraints {
-	@Size(min = 10)
-	public String getString() {
-		return null;
-	}
-
-	/**
-	 * Not allowed. Method is no getter.
-	 */
-	@Size(min = 10)
-	public void setString() {
-	}
-
-	/**
-	 * Not allowed. Return type doesn't match.
-	 */
-	@Size(min = 10)
-	public Date getDate() {
-		return null;
-	}
-
-	/**
-	 * Not allowed. No return type.
-	 */
-	@Size(min = 10)
-	public void getAnotherString() {
-	}
-
-	/**
-	 * Not allowed. Static method.
-	 */
-	@Size(min = 10)
-	public static String getStringStatically() {
-		return null;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java
deleted file mode 100644
index 8ff9ea3..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id: MultipleConstraintsOfSameType.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel;
-
-import java.util.Date;
-
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Pattern.List;
-
-public class MultipleConstraintsOfSameType {
-	
-	@List(value = { @Pattern(regexp = ""), @Pattern(regexp = "") })
-	public String string;
-
-	/**
-	 * Not allowed.
-	 */
-	@List(value = { @Pattern(regexp = ""), @Pattern(regexp = "") })
-	public Date date;
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java
deleted file mode 100644
index d9344ac..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id: ValidationUsingAtValidAnnotation.java 19090 2010-03-23 15:22:59Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel;
-
-import java.util.Collection;
-import javax.validation.Valid;
-
-public class ValidationUsingAtValidAnnotation {
-
-	@Valid
-	public Integer integer;
-
-	@Valid
-	public Collection<?> collection1;
-
-	/**
-	 * Not allowed (primitive type).
-	 */
-	@Valid
-	public int primitiveInt;
-
-	/**
-	 * Not allowed (static field).
-	 */
-	@Valid
-	public static Integer staticInteger;
-
-	@Valid
-	public Integer getInteger() {
-		return null;
-	}
-
-	@Valid
-	public Collection<?> getCollection() {
-		return null;
-	}
-
-	/**
-	 * Not allowed (primitive type).
-	 */
-	@Valid
-	public int getPrimitiveInt() {
-		return 0;
-	}
-
-	/**
-	 * Not allowed (static field).
-	 */
-	@Valid
-	public static Integer getStaticInteger() {
-		return null;
-	}
-
-	/**
-	 * Not allowed (no getter).
-	 */
-	@Valid
-	public Collection<?> getCollectionWithParams(int i) {
-		return null;
-	}
-
-	/**
-	 * Not allowed (no getter).
-	 */
-	@Valid
-	public Collection<?> setCollection() {
-		return null;
-	}
-
-	/**
-	 * Not allowed (no getter).
-	 */
-	@Valid
-	public void getVoid() {
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java
deleted file mode 100644
index b31b754..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: ValidLong.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.boxing;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = ValidLongValidator.class)
- at Documented
-public @interface ValidLong {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java
deleted file mode 100644
index 84296d9..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id: ValidLongValidator.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.boxing;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ValidLongValidator implements ConstraintValidator<ValidLong, Long> {
-	public void initialize(ValidLong constraintAnnotation) {
-	}
-
-	public boolean isValid(Long object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java
deleted file mode 100644
index f16bdd4..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id: ValidationUsingBoxing.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.boxing;
-
-public class ValidationUsingBoxing {
-
-	@ValidLong
-	public long primitiveLongField;
-
-	@ValidLong
-	public Long longField;
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidLong
-	public int intField;
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidLong
-	public Integer integerField;
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidLong
-	public double doubleField;
-
-	@ValidLong
-	public long getPrimitiveLong() {
-		return 0;
-	}
-
-	@ValidLong
-	public Long getLong() {
-		return Long.MIN_VALUE;
-	}
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidLong
-	public int getInt() {
-		return 0;
-	}
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidLong
-	public Integer getInteger() {
-		return Integer.MIN_VALUE;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java
deleted file mode 100644
index 2195d06..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id: ClassLevelValidation.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.classlevelconstraints;
-
-public class ClassLevelValidation {
-	@ValidCustomer
-	public static class Customer {
-	}
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidCustomer
-	public static class Order {
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java
deleted file mode 100644
index b7fe256..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: ValidCustomer.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.classlevelconstraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = ValidCustomerValidator.class)
- at Documented
-public @interface ValidCustomer {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java
deleted file mode 100644
index 604388e..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: ValidCustomerValidator.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.classlevelconstraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.ap.testmodel.classlevelconstraints.ClassLevelValidation.Customer;
-
-public class ValidCustomerValidator implements ConstraintValidator<ValidCustomer, Customer> {
-	public void initialize(ValidCustomer constraintAnnotation) {
-	}
-
-	public boolean isValid(Customer customer, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java
deleted file mode 100644
index 260d9f8..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id: FieldLevelValidationUsingComposedConstraint.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint;
-
-import java.util.Date;
-
-public class FieldLevelValidationUsingComposedConstraint {
-	@ValidOrderNumber
-	public String string;
-
-	/**
-	 * Not allowed.
-	 */
-	@ValidOrderNumber
-	public Date date;
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java
deleted file mode 100644
index cab0bc7..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: ValidOrderNumber.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at NotNull
- at Size(min = 10, max = 10)
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = { })
- at Documented
-public @interface ValidOrderNumber {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java
deleted file mode 100644
index 52a7cd4..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: ComposedConstraint.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at ComposingConstraint1
- at ComposingConstraint2
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = { })
- at Documented
-public @interface ComposedConstraint {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java
deleted file mode 100644
index 005adba..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: ComposingConstraint1.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = {
-		ComposingConstraint1ValidatorForList.class,
-		ComposingConstraint1ValidatorForString.class,
-		ComposingConstraint1ValidatorForGregorianCalendar.class
-})
- at Documented
-public @interface ComposingConstraint1 {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java
deleted file mode 100644
index 0729eac..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: ComposingConstraint1ValidatorForGregorianCalendar.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.GregorianCalendar;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint1ValidatorForGregorianCalendar
-		implements ConstraintValidator<ComposingConstraint1, GregorianCalendar> {
-	public void initialize(ComposingConstraint1 constraintAnnotation) {
-	}
-
-	public boolean isValid(GregorianCalendar object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java
deleted file mode 100644
index f74ff3e..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: ComposingConstraint1ValidatorForList.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.List;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint1ValidatorForList implements ConstraintValidator<ComposingConstraint1, List<?>> {
-	public void initialize(ComposingConstraint1 constraintAnnotation) {
-
-	}
-
-	public boolean isValid(List<?> object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java
deleted file mode 100644
index 3cd0e8f..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id: ComposingConstraint1ValidatorForString.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint1ValidatorForString implements
-ConstraintValidator<ComposingConstraint1, String> {
-
-	
-
-	public void initialize(ComposingConstraint1 constraintAnnotation) {
-		
-	}
-
-	public boolean isValid(String object,
-			ConstraintValidatorContext constraintContext) {
-
-		return true;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java
deleted file mode 100644
index 8362d8d..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: ComposingConstraint2.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = {
-		ComposingConstraint2ValidatorForArrayList.class,
-		ComposingConstraint2ValidatorForCalendar.class,
-		ComposingConstraint2ValidatorForCollection.class
-})
- at Documented
-public @interface ComposingConstraint2 {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java
deleted file mode 100644
index 73fd680..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: ComposingConstraint2ValidatorForArrayList.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.ArrayList;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint2ValidatorForArrayList
-		implements ConstraintValidator<ComposingConstraint2, ArrayList<?>> {
-
-	public void initialize(ComposingConstraint2 constraintAnnotation) {
-	}
-
-	public boolean isValid(ArrayList<?> object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java
deleted file mode 100644
index 2ad6fb8..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id: ComposingConstraint2ValidatorForCalendar.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.Calendar;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint2ValidatorForCalendar implements
-ConstraintValidator<ComposingConstraint2, Calendar> {
-
-	public void initialize(ComposingConstraint2 constraintAnnotation) {
-		
-	}
-
-	public boolean isValid(Calendar object,
-			ConstraintValidatorContext constraintContext) {
-
-		return true;
-	}
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java
deleted file mode 100644
index 506ffe8..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: ComposingConstraint2ValidatorForCollection.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.Collection;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class ComposingConstraint2ValidatorForCollection
-		implements ConstraintValidator<ComposingConstraint2, Collection<?>> {
-	public void initialize(ComposingConstraint2 constraintAnnotation) {
-	}
-
-	public boolean isValid(Collection<?> object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java
deleted file mode 100644
index 84a7a24..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id: FieldLevelValidationUsingComplexComposedConstraint.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.composedconstraint2;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-public class FieldLevelValidationUsingComplexComposedConstraint {
-
-	@ComposedConstraint
-	public String string;
-	
-	@ComposedConstraint
-	public List<?> list;
-	
-	/**
-	 * Allowed
-	 */
-	@ComposedConstraint
-	public GregorianCalendar gregorianCalendar;
-	
-	@ComposedConstraint
-	public Collection<?> collection;
-	
-	/**
-	 * Allowed
-	 */
-	@ComposedConstraint
-	public ArrayList<?> arrayList;
-	
-	@ComposedConstraint
-	public Calendar calendar;
-		
-	/**
-	 * Not allowed.
-	 */
-	@ComposedConstraint
-	public Date date;
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java
deleted file mode 100644
index fad415e..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id: CaseMode.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.customconstraints;
-
-public enum CaseMode {
-	UPPER,
-	LOWER;
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java
deleted file mode 100644
index 9977c96..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: CheckCase.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.customconstraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = CheckCaseValidator.class)
- at Documented
-public @interface CheckCase {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	CaseMode value();
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java
deleted file mode 100644
index 6b258da..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id: CheckCaseValidator.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.customconstraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
-	private CaseMode caseMode;
-
-	public void initialize(CheckCase constraintAnnotation) {
-		this.caseMode = constraintAnnotation.value();
-	}
-
-	public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
-		if ( object == null ) {
-			return true;
-		}
-
-		if ( caseMode == CaseMode.UPPER ) {
-			return object.equals( object.toUpperCase() );
-		}
-		else {
-			return object.equals( object.toLowerCase() );
-		}
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java
deleted file mode 100644
index 3623dbb..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: FieldLevelValidationUsingCustomConstraints.java 18896 2010-02-25 19:04:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.customconstraints;
-
-import java.util.Date;
-
-public class FieldLevelValidationUsingCustomConstraints {
-
-	@CheckCase(CaseMode.UPPER)
-	public String string;
-	
-	/**
-	 * Not allowed.
-	 */
-	@CheckCase(CaseMode.UPPER)
-	public Date date;
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java
deleted file mode 100644
index e5af4cf..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: AbstractCustomConstraintValidator.java 19324 2010-04-29 19:02:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.inheritedvalidator;
-
-import javax.validation.ConstraintValidator;
-
-public abstract class AbstractCustomConstraintValidator implements ConstraintValidator<CustomConstraint, String> {
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java
deleted file mode 100644
index 6d33f63..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: CustomConstraint.java 19324 2010-04-29 19:02:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.inheritedvalidator;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = CustomConstraintValidator.class)
- at Documented
-public @interface CustomConstraint {
-
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java
deleted file mode 100644
index c1fef5e..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id: CustomConstraintValidator.java 19324 2010-04-29 19:02:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.inheritedvalidator;
-
-import javax.validation.ConstraintValidatorContext;
-
-public class CustomConstraintValidator extends AbstractCustomConstraintValidator {
-
-	public void initialize(CustomConstraint constraintAnnotation) {
-	}
-
-	public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java
deleted file mode 100644
index c1e5f0e..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: FieldLevelValidationUsingInheritedValidator.java 19324 2010-04-29 19:02:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.inheritedvalidator;
-
-import java.util.Date;
-
-public class FieldLevelValidationUsingInheritedValidator {
-
-	@CustomConstraint
-	public String string;
-
-	/**
-	 * Not allowed.
-	 */
-	@CustomConstraint
-	public Date date;
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/invalidcomposedconstraint/ValidCustomerNumber.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/invalidcomposedconstraint/ValidCustomerNumber.java
deleted file mode 100644
index e958c94..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/invalidcomposedconstraint/ValidCustomerNumber.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: ValidCustomerNumber.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.invalidcomposedconstraint;
-
-import javax.validation.Payload;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * Constraint annotations are not allowed here, as ValidCustomerNumber isn't a
- * proper constraint type definition.
- */
- at NotNull
- at Size(min = 10, max = 10)
-public @interface ValidCustomerNumber {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java
deleted file mode 100644
index 6f8cf35..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id: NoUniqueValidatorResolution.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.util.Set;
-
-public class NoUniqueValidatorResolution {
-
-	/**
-	 * Allowed, as there is one maximally specific validator.
-	 */
-	@Size
-	public Set<?> set;
-
-	/**
-	 * Not allowed, as two maximally specific validators exist.
-	 */
-	@Size
-	public SerializableCollection<?> serializableCollection;
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java
deleted file mode 100644
index 9ba77d2..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// $Id: SerializableCollection.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.io.Serializable;
-import java.util.Collection;
-
-public interface SerializableCollection<T> extends Serializable, Collection<T> {
-
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java
deleted file mode 100644
index 4bb4ee5..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: Size.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = {
-		SizeValidatorForCollection.class, SizeValidatorForSerializable.class, SizeValidatorForSet.class
-})
- at Documented
-public @interface Size {
-	String message() default "";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java
deleted file mode 100644
index 0cda1b6..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: SizeValidatorForCollection.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.util.Collection;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class SizeValidatorForCollection implements ConstraintValidator<Size, Collection> {
-
-	public void initialize(Size constraintAnnotation) {
-	}
-
-	public boolean isValid(Collection object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java
deleted file mode 100644
index 2737368..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: SizeValidatorForSerializable.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.io.Serializable;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class SizeValidatorForSerializable implements ConstraintValidator<Size, Serializable> {
-
-	public void initialize(Size constraintAnnotation) {
-	}
-
-	public boolean isValid(Serializable object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java
deleted file mode 100644
index 1c753fe..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id: SizeValidatorForSet.java 18897 2010-02-25 19:12:35Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
-
-import java.util.Set;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class SizeValidatorForSet implements ConstraintValidator<Size, Set> {
-
-	public void initialize(Size constraintAnnotation) {
-	}
-
-	public boolean isValid(Set object, ConstraintValidatorContext constraintContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java
deleted file mode 100644
index 781b12c..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java
+++ /dev/null
@@ -1,178 +0,0 @@
-// $Id: CompilerTestHelper.java 19525 2010-05-15 16:05:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.testutil;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import javax.annotation.processing.Processor;
-import javax.tools.Diagnostic;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaCompiler.CompilationTask;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-
-import org.hibernate.validator.ap.util.DiagnosticExpectation;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Infrastructure for unit tests based on the Java Compiler API.
- *
- * @author Gunnar Morling
- */
-public class CompilerTestHelper {
-
-	private final JavaCompiler compiler;
-
-	private final String sourceBaseDir;
-
-	private final String pathToBeanValidationApiJar;
-
-	public CompilerTestHelper(JavaCompiler compiler, String sourceBaseDir, String pathToBeanValidationApiJar) {
-
-		this.compiler = compiler;
-		this.sourceBaseDir = sourceBaseDir;
-		this.pathToBeanValidationApiJar = pathToBeanValidationApiJar;
-	}
-
-	/**
-	 * Retrieves a file object containing the source of the given class.
-	 *
-	 * @param clazz The class of interest.
-	 *
-	 * @return A file with the source of the given class.
-	 */
-	public File getSourceFile(Class<?> clazz) {
-
-		String sourceFileName =
-				File.separator + clazz.getName().replace( ".", File.separator ) + ".java";
-
-		return new File( sourceBaseDir + sourceFileName );
-	}
-
-	/**
-	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, File...)
-	 */
-	public boolean compile(
-			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, File... sourceFiles) {
-
-		return compile( annotationProcessor, diagnostics, null, null, sourceFiles );
-	}
-
-	/**
-	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, File...)
-	 */
-	public boolean compile(
-			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, Kind diagnosticKind, File... sourceFiles) {
-
-		return compile( annotationProcessor, diagnostics, diagnosticKind, null, sourceFiles );
-	}
-
-	/**
-	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, File...)
-	 */
-	public boolean compile(
-			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, boolean verbose, File... sourceFiles) {
-
-		return compile( annotationProcessor, diagnostics, null, verbose, sourceFiles );
-	}
-
-	/**
-	 * Creates and executes a {@link CompilationTask} using the given input.
-	 *
-	 * @param annotationProcessor An annotation processor to be attached to the task.
-	 * @param diagnostics An diagnostics listener to be attached to the task.
-	 * @param diagnosticKind A value for the "diagnosticKind" option.
-	 * @param verbose A value for the "verbose" option.
-	 * @param sourceFiles The source files to be compiled.
-	 *
-	 * @return True, if the source files could be compiled successfully (meaning
-	 *         in especially, that the given annotation processor didn't raise
-	 *         any errors), false otherwise.
-	 */
-	public boolean compile(
-			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, Kind diagnosticKind, Boolean verbose, File... sourceFiles) {
-
-		StandardJavaFileManager fileManager =
-				compiler.getStandardFileManager( null, null, null );
-
-		Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjects( sourceFiles );
-
-		List<String> options = new ArrayList<String>();
-
-		options.addAll( Arrays.asList( "-classpath", pathToBeanValidationApiJar, "-d", "target" ) );
-
-		if ( diagnosticKind != null ) {
-			options.add( "-AdiagnosticKind=" + diagnosticKind );
-		}
-
-		if ( verbose != null ) {
-			options.add( "-Averbose=" + verbose.toString() );
-		}
-
-		CompilationTask task = compiler.getTask( null, fileManager, diagnostics, options, null, compilationUnits );
-		task.setProcessors( Arrays.asList( annotationProcessor ) );
-
-		return task.call();
-	}
-
-	/**
-	 * <p>
-	 * Asserts, that the given diagnostics match with the given expectations.
-	 * </p>
-	 * <p>
-	 * First checks, whether the number of actual diagnostics matches with the
-	 * number of given expectations. If that's the case, {@link Kind} and line
-	 * number of each expectation are compared.
-	 * </p>
-	 *
-	 * @param diagnostics The actual diagnostics as populated by the executed
-	 * {@link CompilationTask}.
-	 * @param expectations The expectations to compare against.
-	 */
-	public static void assertThatDiagnosticsMatch(DiagnosticCollector<JavaFileObject> diagnostics, DiagnosticExpectation... expectations) {
-
-		List<Diagnostic<? extends JavaFileObject>> diagnosticsList = diagnostics.getDiagnostics();
-
-		if ( expectations == null ) {
-			assertTrue( diagnosticsList.isEmpty() );
-		}
-		else {
-
-			if ( diagnosticsList.size() != expectations.length ) {
-				System.out.println( diagnosticsList );
-			}
-
-			assertEquals( diagnosticsList.size(), expectations.length, "Wrong number of diagnostics." );
-
-			int i = 0;
-			for ( DiagnosticExpectation oneExpectation : expectations ) {
-
-				assertEquals( diagnosticsList.get( i ).getKind(), oneExpectation.getKind() );
-				assertEquals( diagnosticsList.get( i ).getLineNumber(), oneExpectation.getLineNumber() );
-
-				i++;
-			}
-		}
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java b/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java
deleted file mode 100644
index 681a1d9..0000000
--- a/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id: DiagnosticExpectation.java 19525 2010-05-15 16:05:09Z gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.ap.util;
-
-import javax.tools.Diagnostic;
-import javax.tools.Diagnostic.Kind;
-
-/**
- * Expectation value to be matched against a given {@link Diagnostic}.
- *
- * @author Gunnar Morling
- */
-public class DiagnosticExpectation {
-
-	private final Kind kind;
-
-	private final long lineNumber;
-
-	public DiagnosticExpectation(Kind kind, long lineNumber) {
-		this.kind = kind;
-		this.lineNumber = lineNumber;
-	}
-
-	public Kind getKind() {
-		return kind;
-	}
-
-	public long getLineNumber() {
-		return lineNumber;
-	}
-
-	@Override
-	public String toString() {
-		return "DiagnosticExpectation [kind=" + kind + ", lineNumber=" + lineNumber + "]";
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-archetype/pom.xml b/hibernate-validator-archetype/pom.xml
deleted file mode 100644
index b34ff58..0000000
--- a/hibernate-validator-archetype/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>hibernate-validator-parent</artifactId>
-        <groupId>org.hibernate</groupId>
-        <version>4.1.0.Final</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator-quickstart</artifactId>
-    <packaging>jar</packaging>
-    <name>Hibernate Validator Quickstart</name>
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.5</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-        </dependency>
-        <!--
-        Provided dependencies.
-        JAXB is needed when running on Java5. In this environment these dependencies have to be added
-        On Java6 jaxb is part of the runtime environment
-        -->
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-    <build>
-        <defaultGoal>test</defaultGoal>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-archetype-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-    <repositories>
-        <repository>
-            <id>jboss</id>
-            <url>https://repository.jboss.org/nexus/content/repositories/public</url>
-        </repository>
-    </repositories>
-</project>
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Car.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Car.java
deleted file mode 100644
index 9ca1374..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Car.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.quickstart;
-
-import javax.validation.Valid;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * An example entity class enriched with constraint annotations from
- * the Bean Validation API (<a href="http://jcp.org/en/jsr/detail?id=303">JSR
- * 303</a>). Have a look at {@link org.hibernate.validator.quickstart.CarTest} to learn, how the Bean Validation
- * API can be used to validate {@code Car} instances.
- *
- * @author Gunnar Morling
- * @author Hardy Ferentschik
- */
-public class Car {
-
-	/**
-	 * By annotating the field with @NotNull we specify, that null is not a valid
-	 * value.
-	 */
-	@NotNull
-	private String manufacturer;
-
-	/**
-	 * This String field shall not only not allowed to be null, it shall also between
-	 * 2 and 14 characters long.
-	 */
-	@NotNull
-	@Size(min = 2, max = 14)
-	private String licensePlate;
-
-	/**
-	 * This int field shall have a value of at least 2.
-	 */
-	@Min(2)
-	private int seatCount;
-
-	@AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
-	private boolean passedVehicleInspection;
-
-	@Valid
-	private Driver driver;
-
-	public Car(String manufacturer, String licencePlate, int seatCount) {
-		this.manufacturer = manufacturer;
-		this.licensePlate = licencePlate;
-		this.seatCount = seatCount;
-	}
-
-	public String getManufacturer() {
-		return manufacturer;
-	}
-
-	public void setManufacturer(String manufacturer) {
-		this.manufacturer = manufacturer;
-	}
-
-	public String getLicensePlate() {
-		return licensePlate;
-	}
-
-	public void setLicensePlate(String licensePlate) {
-		this.licensePlate = licensePlate;
-	}
-
-	public int getSeatCount() {
-		return seatCount;
-	}
-
-	public void setSeatCount(int seatCount) {
-		this.seatCount = seatCount;
-	}
-
-	public boolean getPassedVehicleInspection() {
-		return passedVehicleInspection;
-	}
-
-	public void setPassedVehicleInspection(boolean passed) {
-		this.passedVehicleInspection = passed;
-	}
-
-	public Driver getDriver() {
-		return driver;
-	}
-
-	public void setDriver(Driver driver) {
-		this.driver = driver;
-	}
-}
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/CarChecks.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/CarChecks.java
deleted file mode 100644
index 32745b2..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/CarChecks.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: CarChecks.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface CarChecks {
-}
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Driver.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Driver.java
deleted file mode 100644
index 8be348c..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Driver.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: Driver.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.Min;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Driver extends Person {
-	@Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class)
-	public int age;
-
-	@AssertTrue(message = "You first have to pass the driving test", groups = DriverChecks.class)
-	public boolean hasDrivingLicense;
-
-	public Driver(String name) {
-		super( name );
-	}
-
-	public void passedDrivingTest(boolean b) {
-		hasDrivingLicense = b;
-	}
-
-	public int getAge() {
-		return age;
-	}
-
-	public void setAge(int age) {
-		this.age = age;
-	}
-}
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/DriverChecks.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/DriverChecks.java
deleted file mode 100644
index 577cb57..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/DriverChecks.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: DriverChecks.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface DriverChecks {
-}
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/OrderedChecks.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/OrderedChecks.java
deleted file mode 100644
index b8e8b5a..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/OrderedChecks.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: OrderedChecks.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-import javax.validation.GroupSequence;
-import javax.validation.groups.Default;
-
-/**
- * @author Hardy Ferentschik
- */
- at GroupSequence({ Default.class, CarChecks.class, DriverChecks.class })
-public interface OrderedChecks {
-}
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Person.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Person.java
deleted file mode 100644
index 5e5e7b3..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/Person.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id: Person.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Person {
-	@NotNull
-	private String name;
-
-	public Person(String name) {
-		super();
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
-
diff --git a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/RentalCar.java b/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/RentalCar.java
deleted file mode 100644
index b1d6461..0000000
--- a/hibernate-validator-archetype/src/main/java/org/hibernate/validator/quickstart/RentalCar.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id: RentalCar.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.quickstart;
-
-import javax.validation.GroupSequence;
-
-/**
- * @author Hardy Ferentschik
- */
- at GroupSequence({ RentalCar.class, CarChecks.class })
-public class RentalCar extends Car {
-	public RentalCar(String manufacturer, String licencePlate, int seatCount) {
-		super( manufacturer, licencePlate, seatCount );
-	}
-}
diff --git a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/BootstrapTest.java b/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/BootstrapTest.java
deleted file mode 100644
index a7aeb1c..0000000
--- a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/BootstrapTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.quickstart;
-
-import java.lang.annotation.ElementType;
-import java.util.Locale;
-import javax.validation.Configuration;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-
-/**
- * A module test that shows the different bootstrap possibilities of Hibernate Validator.
- *
- * @author Hardy Ferentschik
- */
-public class BootstrapTest {
-
-	@Test
-	public void testBuildDefaultValidatorFactory() {
-		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		assertNotNull( validator );
-	}
-
-	@Test
-	public void testByDefaultProvider() {
-		Configuration<?> config = Validation.byDefaultProvider().configure();
-		config.messageInterpolator( new MyMessageInterpolator() )
-				.traversableResolver( new MyTraversableResolver() )
-				.constraintValidatorFactory( new MyConstraintValidatorFactory() );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		assertNotNull( validator );
-	}
-
-	@Test
-	public void testByProvider() {
-		HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
-		config.messageInterpolator( new MyMessageInterpolator() )
-				.traversableResolver( new MyTraversableResolver() )
-				.constraintValidatorFactory( new MyConstraintValidatorFactory() );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		assertNotNull( validator );
-	}
-
-	public class MyMessageInterpolator implements MessageInterpolator {
-
-		public String interpolate(String messageTemplate, Context context) {
-			return null;
-		}
-
-		public String interpolate(String messageTemplate, Context context, Locale locale) {
-			return null;
-		}
-	}
-
-	public class MyTraversableResolver implements TraversableResolver {
-
-		public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			return true;
-		}
-
-		public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			return true;
-		}
-	}
-
-	public class MyConstraintValidatorFactory implements ConstraintValidatorFactory {
-
-		public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/CarTest.java b/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/CarTest.java
deleted file mode 100644
index 46df7fd..0000000
--- a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/CarTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.quickstart;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * <p>
- * A module test that shows how to use the Bean Validation (BV) API to validate
- * the constraint annotations at the exemplary {@link Car} model class.
- * </p>
- * <p>
- * The interface {@link Validator} is the main entry point the BV API. The
- * test makes use of the <code>validate()</code> method of that interface, which
- * returns a set of <code>ConstraintViolation</code>s, that describe the
- * problems occurred during validation.
- * </p>
- * <p>
- * In case the object in question could be validated successfully this set will
- * be empty.
- * </p>
- *
- * @author Gunnar Morling
- * @author Hardy Ferentschik
- */
-public class CarTest {
-
-	/**
-	 * The validator to be used for object validation. Will be retrieved once
-	 * for all test methods.
-	 */
-	private static Validator validator;
-
-	/**
-	 * Retrieves the validator instance.
-	 */
-	@BeforeClass
-	public static void setUp() {
-		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-		validator = factory.getValidator();
-	}
-
-	/**
-	 * One constraint violation due to the manufacturer field being null
-	 * expected.
-	 */
-	@Test
-	public void manufacturerIsNull() {
-		Car car = new Car( null, "DD-AB-123", 4 );
-
-		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-
-		assertEquals( 1, constraintViolations.size() );
-		assertEquals( "may not be null", constraintViolations.iterator().next().getMessage() );
-	}
-
-	/**
-	 * One constraint violation due to the licensePlate field being too short
-	 * expected.
-	 */
-	@Test
-	public void licensePlateTooShort() {
-		Car car = new Car( "Morris", "D", 4 );
-
-		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-
-		assertEquals( 1, constraintViolations.size() );
-		assertEquals( "size must be between 2 and 14", constraintViolations.iterator().next().getMessage() );
-	}
-
-	/**
-	 * One constraint violation due to the seatCount field being too low
-	 * expected.
-	 */
-	@Test
-	public void seatCountTooLow() {
-		Car car = new Car( "Morris", "DD-AB-123", 1 );
-
-		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-
-		assertEquals( 1, constraintViolations.size() );
-		assertEquals( "must be greater than or equal to 2", constraintViolations.iterator().next().getMessage() );
-	}
-
-	/**
-	 * No constraint violation expected, as all fields of the validated Car
-	 * instance have proper values.
-	 */
-	@Test
-	public void carIsValid() {
-		Car car = new Car( "Morris", "DD-AB-123", 2 );
-
-		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-
-		assertEquals( 0, constraintViolations.size() );
-	}
-}
diff --git a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/GroupTest.java b/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/GroupTest.java
deleted file mode 100644
index de29005..0000000
--- a/hibernate-validator-archetype/src/test/java/org/hibernate/validator/quickstart/GroupTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.quickstart;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.groups.Default;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * A module test that shows how to use the grouping functionality of Bean Validation.
- *
- * @author Hardy Ferentschik
- */
-public class GroupTest {
-
-
-	private static Validator validator;
-
-	@BeforeClass
-	public static void setUp() {
-		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-		validator = factory.getValidator();
-	}
-
-	@Test
-	public void testDriveAway() {
-		// create a car and check that everything is ok with it.
-		Car car = new Car( "Morris", "DD-AB-123", 2 );
-		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-		assertEquals( 0, constraintViolations.size() );
-
-		// but has it passed the vehicle inspection?
-		constraintViolations = validator.validate( car, CarChecks.class );
-		assertEquals( 1, constraintViolations.size() );
-		assertEquals(
-				"The car has to pass the vehicle inspection first", constraintViolations.iterator().next().getMessage()
-		);
-
-		// let's go to the vehicle inspection
-		car.setPassedVehicleInspection( true );
-		assertEquals( 0, validator.validate( car ).size() );
-
-		// now let's add a driver. He is 18, but has not passed the driving test yet
-		Driver john = new Driver( "John Doe" );
-		john.setAge( 18 );
-		car.setDriver( john );
-		constraintViolations = validator.validate( car, DriverChecks.class );
-		assertEquals( 1, constraintViolations.size() );
-		assertEquals( "You first have to pass the driving test", constraintViolations.iterator().next().getMessage() );
-
-		// ok, John passes the test
-		john.passedDrivingTest( true );
-		assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );
-
-		// just checking that everything is in order now
-		assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );
-	}
-
-	@Test
-	public void testOrderedChecks() {
-		Car car = new Car( "Morris", "DD-AB-123", 2 );
-		car.setPassedVehicleInspection( true );
-
-		Driver john = new Driver( "John Doe" );
-		john.setAge( 18 );
-		john.passedDrivingTest( true );
-		car.setDriver( john );
-
-		assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );
-	}
-
-	@Test
-	public void testOrderedChecksWithRedefinedDefault() {
-		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
-		rentalCar.setPassedVehicleInspection( true );
-
-		Driver john = new Driver( "John Doe" );
-		john.setAge( 18 );
-		john.passedDrivingTest( true );
-		rentalCar.setDriver( john );
-
-		assertEquals( 0, validator.validate( rentalCar, Default.class, DriverChecks.class ).size() );
-	}
-}
diff --git a/hibernate-validator-legacy/changelog.txt b/hibernate-validator-legacy/changelog.txt
deleted file mode 100644
index 62e3715..0000000
--- a/hibernate-validator-legacy/changelog.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Hibernate Validator Changelog
-=============================
-
-3.1.0.GA (10-09-2008)
-----------------------
-
-
-3.1.0.CR2 (20-08-2008)
-----------------------
-
-** Bug
-    * [HV-15] - @Past validation annotation generates incorrect DDL for Oracle 8.x
-    * [HV-53] - AssertTrue and AssertFalse not compatible with null values
-    * [HV-65] - @Past cannot use current_date as per the ANSI SQL spec
-    * [HV-66] - 3.1.0.CR1 incompatible with Hibernate 3.3.0
-
-
-3.1.0.CR1 (27-05-2008)
-----------------------
-
-** Bug
-    * [HV-14] - Minor typo in regular expression in class EmailValidator
-    * [HV-48] - There is no DefaultValidatorMessage_en leading to no message loaded when locale is explicit and the system default is not en
-
-
-** Improvement
-    * [HV-57] - Move to slf4j
-
-** New Feature
-    * [HV-54] - Add pom
-    * [HV-55] - Make build independent of Hibernate Core structure
-    * [HV-56] - Move to Hibernate Core 3.3
-
-** Patch
-    * [HV-36] - DefaultValidatorMessages_ja.properties
-
-
-3.0.0.GA (19-03-2007)
----------------------
-
-Initial release as a standalone product (see Hibernate Annotations changelog for previous informations)
-
-** Bug
-    * [HV-2] - Deprecate String support for both @Past and @Future validating Strings
-    * [HV-3] - @Email fail on empty strings
-    * [HV-7] - Two level @Valid annotation doesn't work
-
-
-** Improvement
-    * [HV-5] - Multiple validators of the same type per element (John Gilbert)
-
-** New Feature
-    * [HV-1] - Make ClassValidator independent of Hibernate Annotations
-    * [HV-6] - @EAN
-    * [HV-8] - Make Validator support pure JavaPersistence players
-    * [HV-9] - @Digits(integerDigits, fractionalDigits)
-    * [HV-10] - @CreditCardNumber for Hibernate Validator
diff --git a/hibernate-validator-legacy/lgpl.txt b/hibernate-validator-legacy/lgpl.txt
deleted file mode 100644
index 1c03f74..0000000
--- a/hibernate-validator-legacy/lgpl.txt
+++ /dev/null
@@ -1,504 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-		     
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/hibernate-validator-legacy/license.txt b/hibernate-validator-legacy/license.txt
deleted file mode 100644
index d645695..0000000
--- a/hibernate-validator-legacy/license.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/hibernate-validator-legacy/pom.xml b/hibernate-validator-legacy/pom.xml
deleted file mode 100644
index da03052..0000000
--- a/hibernate-validator-legacy/pom.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>hibernate-validator-parent</artifactId>
-        <groupId>org.hibernate</groupId>
-        <version>4.1.0.Final</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <artifactId>hibernate-validator-legacy</artifactId>
-    <packaging>jar</packaging>
-    <name>Hibernate Validator Legacy</name>
-    <version>4.1.0.Final</version>
-    <url>http://validator.hibernate.org</url>
-    <licenses>
-        <license>
-            <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
-            <url>http://www.gnu.org/licenses/lgpl.txt</url>
-        </license>
-    </licenses>
-    <description>Following the DRY (Don't Repeat Yourself) principle, Hibernate Validator let's you express your domain
-        constraints once (and only once) and ensure their compliance at various level of your system automatically.
-    </description>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-core</artifactId>
-            <version>3.3.1.GA</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-commons-annotations</artifactId>
-            <version>3.1.0.GA</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>ejb3-persistence</artifactId>
-            <version>1.0.2.GA</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-annotations</artifactId>
-            <version>3.4.0.GA</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-entitymanager</artifactId>
-            <version>3.4.0.GA</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>javassist</groupId>
-            <artifactId>javassist</artifactId>
-            <version>3.4.GA</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>asm</groupId>
-            <artifactId>asm</artifactId>
-            <version>1.5.3</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>asm</groupId>
-            <artifactId>asm-attrs</artifactId>
-            <version>1.5.3</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>3.8.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.transaction</groupId>
-            <artifactId>jta</artifactId>
-            <version>1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-            <version>1.8.0.2</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>dist</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/dist.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-javadoc-plugin</artifactId>
-                        <configuration>
-                            <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>make-javadoc</id>
-                                <phase>package</phase>
-                                <goals>
-                                    <goal>javadoc</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.jboss.maven.plugins</groupId>
-                        <artifactId>maven-jdocbook-plugin</artifactId>
-                        <version>2.1.0</version>
-                        <extensions>true</extensions>
-                        <dependencies>
-                            <dependency>
-                                <groupId>org.hibernate</groupId>
-                                <artifactId>hibernate-jdocbook-style</artifactId>
-                                <version>1.0.2</version>
-                                <type>jdocbook-style</type>
-                            </dependency>
-                        </dependencies>
-                        <configuration>
-                            <sourceDocumentName>master.xml</sourceDocumentName>
-                            <sourceDirectory>${basedir}/src/main/docbook/en-US</sourceDirectory>
-                            <masterTranslation>en-US</masterTranslation>
-                            <imageResource>
-                                <directory>${basedir}/src/main/docbook/en-US/images</directory>
-                            </imageResource>
-                            <formats>
-                                <format>
-                                    <formatName>pdf</formatName>
-                                    <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
-                                    <finalName>hibernate-validator-legacy-guide.pdf</finalName>
-                                </format>
-                                <format>
-                                    <formatName>html_single</formatName>
-                                    <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl
-                                    </stylesheetResource>
-                                    <finalName>index.html</finalName>
-                                </format>
-                                <format>
-                                    <formatName>html</formatName>
-                                    <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl
-                                    </stylesheetResource>
-                                    <finalName>index.html</finalName>
-                                </format>
-                            </formats>
-                            <options>
-                                <xincludeSupported>true</xincludeSupported>
-                                <localeSeparator>-</localeSeparator>
-                                <useRelativeImageUris>true</useRelativeImageUris>
-                            </options>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>make-doc</id>
-                                <phase>site</phase>
-                                <goals>
-                                    <goal>resources</goal>
-                                    <goal>generate</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-</project>
diff --git a/hibernate-validator-legacy/readme.txt b/hibernate-validator-legacy/readme.txt
deleted file mode 100644
index 969a493..0000000
--- a/hibernate-validator-legacy/readme.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Hibernate Validator
-==================================================
-Version: 3.1.0.GA, 10.09.2008
-
-Description
------------
-
-Hibernate Validator aims at defining and checking a domain model level constraints.
-It supports custom constraints definitions as well as full internationalization.
-Annotations are used to define constraints on object level.
-The validation mechanism can be executed in different layers in your application
-without having to duplicate any of these rules (presentation layer,
-data access layer, Database schema).
-
-Hibernate Requires Hibernate Core 3.2 and above.
-This version runs well with Hibernate Annotations 3.3.x and Hibernate EntityManager 3.3.x
-
-
-Instructions
-------------
-
-Unzip to installation directory, read doc/reference
-
-
-Contact
-------------
-
-Latest Documentation:
-
-   http://www.hibernate.org
-
-Bug Reports:
-
-   Hibernate JIRA (preferred)
-   hibernate-devel at lists.sourceforge.net
-
-Free Technical Support:
-
-   http://forum.hibernate.org (http://forum.hibernate.org/viewforum.php?f=9)
-
-
-Notes
------------
-
-If you want to contribute, go to http://www.hibernate.org/
-
-This software and its documentation are distributed under the terms of the
-FSF Lesser Gnu Public License (see lgpl.txt).
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/assembly/dist.xml b/hibernate-validator-legacy/src/main/assembly/dist.xml
deleted file mode 100644
index 0ba284f..0000000
--- a/hibernate-validator-legacy/src/main/assembly/dist.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<assembly>
-    <id>dist</id>
-    <formats>
-        <format>tar.gz</format>
-        <format>tar.bz2</format>
-        <format>zip</format>
-    </formats>
-
-    <dependencySets>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>/dist/lib/runtime</outputDirectory>
-            <scope>runtime</scope>
-        </dependencySet>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>/dist/lib/test</outputDirectory>
-            <scope>test</scope>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory>/dist</outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target/site/apidocs</directory>
-            <outputDirectory>/dist/docs/api</outputDirectory>
-        </fileSet>
-        <fileSet>
-            <directory>target/docbook/publish/en-US</directory>
-            <outputDirectory>/dist/docs/manual</outputDirectory>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <excludes>
-                <exclude>**/target/**</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-
-</assembly>
diff --git a/hibernate-validator-legacy/src/main/docbook/en-US/master.xml b/hibernate-validator-legacy/src/main/docbook/en-US/master.xml
deleted file mode 100644
index 49b9fe8..0000000
--- a/hibernate-validator-legacy/src/main/docbook/en-US/master.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-<!--
-  ~ Hibernate, Relational Persistence for Idiomatic Java
-  ~
-  ~ Copyright (c) 2008, Red Hat, Inc. and/or its affiliates  or third-party contributors as
-  ~ indicated by the @author tags or express copyright attribution
-  ~ statements applied by the authors.  All third-party contributions are
-  ~ distributed under license by Red Hat, Inc.
-  ~
-  ~ This copyrighted material is made available to anyone wishing to use, modify,
-  ~ copy, or redistribute it subject to the terms and conditions of the GNU
-  ~ Lesser General Public License, as published by the Free Software Foundation.
-  ~
-  ~ This program is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-  ~ for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public License
-  ~ along with this distribution; if not, write to:
-  ~ Free Software Foundation, Inc.
-  ~ 51 Franklin Street, Fifth Floor
-  ~ Boston, MA  02110-1301  USA
-  -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-        <!ENTITY versionNumber "3.1.0.GA">
-        <!ENTITY copyrightYear "2004">
-        <!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
-]>
-
-<book lang="en">
-    <bookinfo>
-        <title>Hibernate Validator</title>
-        <subtitle>Reference Guide</subtitle>
-        <releaseinfo>&versionNumber;</releaseinfo>
-        <productnumber>&versionNumber;</productnumber>
-        <issuenum>1</issuenum>
-        <mediaobject>
-          <imageobject>
-            <imagedata fileref="images/hibernate_logo_a.png" format="png" />
-          </imageobject>
-        </mediaobject> 
-        <copyright>
-            <year>©rightYear;</year>
-            <holder>©rightHolder;</holder>
-        </copyright>
-        <!-- include translators... -->
-    </bookinfo>
-
-  <toc/>
-
-  <preface id="preface" revision="2">
-    <title>Preface</title>
-
-    <para>Annotations are a very convenient and elegant way to specify
-    invariant constraints for a domain model. You can, for example, express
-    that a property should never be null, that the account balance should be
-    strictly positive, etc. These domain model constraints are declared in the
-    bean itself by annotating its properties. A validator can then read them
-    and check for constraint violations. The validation mechanism can be
-    executed in different layers in your application without having to
-    duplicate any of these rules (presentation layer, data access layer).
-    Following the DRY principle, Hibernate Validator has been designed for
-    that purpose.</para>
-
-    <para>Hibernate Validator works at two levels. First, it is able to check
-    in-memory instances of a class for constraint violations. Second, it can
-    apply the constraints to the Hibernate metamodel and incorporate them into
-    the generated database schema.</para>
-
-    <para>Each constraint annotation is associated to a validator
-    implementation responsible for checking the constraint on the entity
-    instance. A validator can also (optionally) apply the constraint to the
-    Hibernate metamodel, allowing Hibernate to generate DDL that expresses the
-    constraint. With the appropriate event listener, you can execute the
-    checking operation on inserts and updates done by Hibernate. Hibernate
-    Validator is not limited to use with Hibernate. You can easily use it
-    anywhere in your application as well as with any Java Persistence provider
-    (entity listener provided).</para>
-
-    <para>When checking instances at runtime, Hibernate Validator returns
-    information about constraint violations in an array of
-    <classname>InvalidValue</classname> s. Among other information, the
-    <classname>InvalidValue</classname> contains an error description message
-    that can embed the parameter values bundle with the annotation (eg. length
-    limit), and message strings that may be externalized to a
-    <classname>ResourceBundle</classname> .</para>
-  </preface>
-
-  <xi:include href="modules/defineconstraints.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="modules/checkconstraints.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</book>
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/docbook/en-US/modules/checkconstraints.xml b/hibernate-validator-legacy/src/main/docbook/en-US/modules/checkconstraints.xml
deleted file mode 100644
index cc1e673..0000000
--- a/hibernate-validator-legacy/src/main/docbook/en-US/modules/checkconstraints.xml
+++ /dev/null
@@ -1,235 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-<!--
-  ~ Hibernate, Relational Persistence for Idiomatic Java
-  ~
-  ~ Copyright (c) 2008, Red Hat, Inc. and/or its affiliates  or third-party contributors as
-  ~ indicated by the @author tags or express copyright attribution
-  ~ statements applied by the authors.  All third-party contributions are
-  ~ distributed under license by Red Hat, Inc.
-  ~
-  ~ This copyrighted material is made available to anyone wishing to use, modify,
-  ~ copy, or redistribute it subject to the terms and conditions of the GNU
-  ~ Lesser General Public License, as published by the Free Software Foundation.
-  ~
-  ~ This program is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-  ~ for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public License
-  ~ along with this distribution; if not, write to:
-  ~ Free Software Foundation, Inc.
-  ~ 51 Franklin Street, Fifth Floor
-  ~ Boston, MA  02110-1301  USA
-  -->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<chapter id="validator-checkconstraints">
-  <title>Using the Validator framework</title>
-
-  <para>Hibernate Validator is intended to be used to implement multi-layered
-  data validation, where constraints are expressed in a single place (the
-  annotated domain model) and checked in various different layers of the
-  application.</para>
-
-  <para>This chapter will cover Hibernate Validator usage for different
-  layers</para>
-
-  <section id="validator-checkconstraints-db" revision="2">
-    <title>Database schema-level validation</title>
-
-    <para>Out of the box, Hibernate Annotations will translate the constraints
-    you have defined for your entities into mapping metadata. For example, if
-    a property of your entity is annotated <literal>@NotNull</literal>, its
-    columns will be declared as <literal>not null</literal> in the DDL schema
-    generated by Hibernate.</para>
-
-    <para>Using hbm2ddl, domain model constraints will be expressed into the
-    database schema.</para>
-
-    <para>If, for some reason, the feature needs to be disabled, set
-    <literal>hibernate.validator.apply_to_ddl</literal> to
-    <literal>false</literal>.</para>
-  </section>
-
-  <section id="validator-checkconstraints-orm">
-    <title>ORM integration</title>
-
-    <para>Hibernate Validator integrates with both Hibernate and all pure Java
-    Persistence providers</para>
-
-    <section id="validator-checkconstraints-orm-hibernateevent" revision="1">
-      <title>Hibernate event-based validation</title>
-
-      <para>Hibernate Validator has two built-in Hibernate event listeners.
-      Whenever a <literal>PreInsertEvent</literal> or
-      <literal>PreUpdateEvent</literal> occurs, the listeners will verify all
-      constraints of the entity instance and throw an exception if any
-      constraint is violated. Basically, objects will be checked before any
-      inserts and before any updates made by Hibernate. This includes changes
-      applied by cascade! This is the most convenient and the easiest way to
-      activate the validation process. On constraint violation, the event will
-      raise a runtime <classname>InvalidStateException</classname> which
-      contains an array of <literal>InvalidValue</literal>s describing each
-      failure.</para>
-
-      <para>If Hibernate Validator is present in the classpath, Hibernate
-      Annotations (or Hibernate EntityManager) will use it transparently. If,
-      for some reason, you want to disable this integration, set
-      <literal>hibernate.validator.autoregister_listeners</literal> to
-      false</para>
-
-      <para><note>
-          <para>If the beans are not annotated with validation annotations,
-          there is no runtime performance cost.</para>
-        </note></para>
-
-      <para>In case you need to manually set the event listeners for Hibernate
-      Core, use the following configuration in
-      <literal>hibernate.cfg.xml</literal>:</para>
-
-      <programlisting><hibernate-configuration>
-    ...
-    <event type="pre-update">
-        <listener 
-          class="org.hibernate.validator.event.ValidateEventListener"/>
-    </event>
-    <event type="pre-insert">
-        <listener 
-          class="org.hibernate.validator.event.ValidateEventListener"/>
-    </event>
-</hibernate-configuration></programlisting>
-    </section>
-
-    <section id="validator-checkconstraints-orm-jpaevent">
-      <title>Java Persistence event-based validation</title>
-
-      <para>Hibernate Validator is not tied to Hibernate for event based
-      validation: a Java Persistence entity listener is available. Whenever an
-      listened entity is persisted or updated, Hibernate Validator will verify
-      all constraints of the entity instance and throw an exception if any
-      constraint is violated. Basically, objects will be checked before any
-      inserts and before any updates made by the Java Persistence provider.
-      This includes changes applied by cascade! On constraint violation, the
-      event will raise a runtime <classname>InvalidStateException</classname>
-      which contains an array of <literal>InvalidValue</literal>s describing
-      each failure.</para>
-
-      <para>Here is how to make a class validatable:</para>
-
-      <programlisting>@Entity
- at EntityListeners( JPAValidateListener.class )
-public class Submarine {
-    ...
-}</programlisting>
-
-      <para><note>
-          <para>Compared to the Hibernate event, the Java Persistence listener
-          has two drawbacks. You need to define the entity listener on every
-          validatable entity. The DDL generated by your provider will not
-          reflect the constraints.</para>
-        </note></para>
-    </section>
-  </section>
-
-  <section>
-    <title>Application-level validation</title>
-
-    <para>Hibernate Validator can be applied anywhere in your application
-    code.</para>
-
-    <programlisting>ClassValidator personValidator = new ClassValidator( Person.class );
-ClassValidator addressValidator = new ClassValidator( Address.class, ResourceBundle.getBundle("messages", Locale.ENGLISH) );
-
-InvalidValue[] validationMessages = addressValidator.getInvalidValues(address);</programlisting>
-
-    <para>The first two lines prepare the Hibernate Validator for class
-    checking. The first one relies upon the error messages embedded in
-    Hibernate Validator (see <xref
-    linkend="validator-defineconstraints-error" />), the second one uses a
-    resource bundle for these messages. It is considered a good practice to
-    execute these lines once and cache the validator instances.</para>
-
-    <para>The third line actually validates the <literal>Address</literal>
-    instance and returns an array of <literal>InvalidValue</literal>s. Your
-    application logic will then be able to react to the failure.</para>
-
-    <para>You can also check a particular property instead of the whole bean.
-    This might be useful for property per property user interaction</para>
-
-    <programlisting>ClassValidator addressValidator = new ClassValidator( Address.class, ResourceBundle.getBundle("messages", Locale.ENGLISH) );
-
-//only get city property invalid values
-InvalidValue[] validationMessages = addressValidator.getInvalidValues(address, "city");
-
-//only get potential city property invalid values
-InvalidValue[] validationMessages = addressValidator.getPotentialInvalidValues("city", "Paris")</programlisting>
-  </section>
-
-  <section>
-    <title>Presentation layer validation</title>
-
-    <para>When working with JSF and <productname>JBoss Seam</productname>, one
-    can triggers the validation process at the presentation layer using Seam's
-    JSF tags <literal><s:validate></literal> and
-    <literal><s:validateAll/></literal>, letting the constraints be
-    expressed on the model, and the violations presented in the view</para>
-
-    <programlisting><h:form>
-    <div>
-        <h:messages/>
-    </div>
-    <emphasis role="bold"><s:validateAll></emphasis>
-        <div>
-            Country:
-            <h:inputText value="#{location.country}" required="true"/>
-        </div>
-        <div>
-            Zip code:
-            <h:inputText value="#{location.zip}" required="true"/>
-        </div>
-        <div>
-            <h:commandButton/>
-        </div>
-    <emphasis role="bold"></s:validateAll></emphasis>
-</h:form></programlisting>
-
-    <para>Going even further, and adding <productname>Ajax4JSF</productname>
-    to the loop will bring client side validation with just a couple of
-    additional JSF tags, again without validation definition
-    duplication.</para>
-
-    <para>Check the <ulink url="http://www.jboss.com/products/seam">JBoss
-    Seam</ulink> documentation for more information.</para>
-  </section>
-
-  <section>
-    <title>Validation informations</title>
-
-    <para>As a validation information carrier, hibernate provide an array of
-    <classname>InvalidValue</classname>. Each <literal>InvalidValue</literal>
-    has a buch of methods describing the individual issues.</para>
-
-    <para><methodname>getBeanClass()</methodname> retrieves the failing bean
-    type</para>
-
-    <para><methodname>getBean()</methodname>retrieves the failing instance (if
-    any ie not when using
-    <methodname>getPotentianInvalidValues()</methodname>)</para>
-
-    <para><methodname>getValue()</methodname> retrieves the failing
-    value</para>
-
-    <para><methodname>getMessage()</methodname> retrieves the proper
-    internationalized error message</para>
-
-    <para><methodname>getRootBean()</methodname> retrieves the root bean
-    instance generating the issue (useful in conjunction with
-    <literal>@Valid</literal>), is null if getPotentianInvalidValues() is
-    used.</para>
-
-    <para><literal>getPropertyPath()</literal> retrieves the dotted path of
-    the failing property starting from the root bean</para>
-  </section>
-</chapter>
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/docbook/en-US/modules/defineconstraints.xml b/hibernate-validator-legacy/src/main/docbook/en-US/modules/defineconstraints.xml
deleted file mode 100644
index 998adc4..0000000
--- a/hibernate-validator-legacy/src/main/docbook/en-US/modules/defineconstraints.xml
+++ /dev/null
@@ -1,494 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-<!--
-  ~ Hibernate, Relational Persistence for Idiomatic Java
-  ~
-  ~ Copyright (c) 2008, Red Hat, Inc. and/or its affiliates  or third-party contributors as
-  ~ indicated by the @author tags or express copyright attribution
-  ~ statements applied by the authors.  All third-party contributions are
-  ~ distributed under license by Red Hat, Inc.
-  ~
-  ~ This copyrighted material is made available to anyone wishing to use, modify,
-  ~ copy, or redistribute it subject to the terms and conditions of the GNU
-  ~ Lesser General Public License, as published by the Free Software Foundation.
-  ~
-  ~ This program is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-  ~ for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public License
-  ~ along with this distribution; if not, write to:
-  ~ Free Software Foundation, Inc.
-  ~ 51 Franklin Street, Fifth Floor
-  ~ Boston, MA  02110-1301  USA
-  -->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<chapter id="validator-defineconstraints">
-  <title>Defining constraints</title>
-
-  <section id="validator-defineconstraints-definition" revision="1">
-    <title>What is a constraint?</title>
-
-    <para>A constraint is a rule that a given element (field, property or
-    bean) has to comply to. The rule semantic is expressed by an annotation. A
-    constraint usually has some attributes used to parameterize the
-    constraints limits. The constraint applies to the annotated
-    element.</para>
-  </section>
-
-  <section id="validator-defineconstraints-builtin" revision="2">
-    <title>Built in constraints</title>
-
-    <para>Hibernate Validator comes with some built-in constraints, which
-    covers most basic data checks. As we'll see later, you're not limited to
-    them, you can literally in a minute write your own constraints.</para>
-
-    <table>
-      <title>Built-in constraints</title>
-
-      <tgroup cols="4">
-        <colspec align="center" />
-
-        <thead>
-          <row>
-            <entry>Annotation</entry>
-
-            <entry>Apply on</entry>
-
-            <entry>Runtime checking</entry>
-
-            <entry>Hibernate Metadata impact</entry>
-          </row>
-        </thead>
-
-        <tbody>
-          <row>
-            <entry>@Length(min=, max=)</entry>
-
-            <entry>property (String)</entry>
-
-            <entry>check if the string length match the range</entry>
-
-            <entry>Column length will be set to max</entry>
-          </row>
-
-          <row>
-            <entry>@Max(value=)</entry>
-
-            <entry>property (numeric or string representation of a
-            numeric)</entry>
-
-            <entry>check if the value is less than or equals to max</entry>
-
-            <entry>Add a check constraint on the column</entry>
-          </row>
-
-          <row>
-            <entry>@Min(value=)</entry>
-
-            <entry>property (numeric or string representation of a
-            numeric)</entry>
-
-            <entry>check if the value is more than or equals to min</entry>
-
-            <entry>Add a check constraint on the column</entry>
-          </row>
-
-          <row>
-            <entry>@NotNull</entry>
-
-            <entry>property</entry>
-
-            <entry>check if the value is not null</entry>
-
-            <entry>Column(s) are not null</entry>
-          </row>
-
-          <row>
-            <entry>@NotEmpty</entry>
-
-            <entry>property</entry>
-
-            <entry>check if the string is not null nor empty. Check if the
-            connection is not null nor empty</entry>
-
-            <entry>Column(s) are not null (for String)</entry>
-          </row>
-
-          <row>
-            <entry>@Past</entry>
-
-            <entry>property (date or calendar)</entry>
-
-            <entry>check if the date is in the past</entry>
-
-            <entry>Add a check constraint on the column</entry>
-          </row>
-
-          <row>
-            <entry>@Future</entry>
-
-            <entry>property (date or calendar)</entry>
-
-            <entry>check if the date is in the future</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Pattern(regex="regexp", flag=) or @Patterns(
-            {@Pattern(...)} )</entry>
-
-            <entry>property (string)</entry>
-
-            <entry>check if the property match the regular expression given a
-            match flag (see <classname>java.util.regex.Pattern </classname>
-            )</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Range(min=, max=)</entry>
-
-            <entry>property (numeric or string representation of a
-            numeric)</entry>
-
-            <entry>check if the value is between min and max
-            (included)</entry>
-
-            <entry>Add a check constraint on the column</entry>
-          </row>
-
-          <row>
-            <entry>@Size(min=, max=)</entry>
-
-            <entry>property (array, collection, map)</entry>
-
-            <entry>check if the element size is between min and max
-            (included)</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@AssertFalse</entry>
-
-            <entry>property</entry>
-
-            <entry>check that the method evaluates to false (useful for
-            constraints expressed in code rather than annotations)</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@AssertTrue</entry>
-
-            <entry>property</entry>
-
-            <entry>check that the method evaluates to true (useful for
-            constraints expressed in code rather than annotations)</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Valid</entry>
-
-            <entry>property (object)</entry>
-
-            <entry>perform validation recursively on the associated object. If
-            the object is a Collection or an array, the elements are validated
-            recursively. If the object is a Map, the value elements are
-            validated recursively.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Email</entry>
-
-            <entry>property (String)</entry>
-
-            <entry>check whether the string is conform to the email address
-            specification</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@CreditCardNumber</entry>
-
-            <entry>property (String)</entry>
-
-            <entry>check whether the string is a well formated credit card
-            number (derivative of the Luhn algorithm)</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Digits</entry>
-
-            <entry>property (numeric or string representation of a
-            numeric)</entry>
-
-            <entry>check whether the property is a number having up to
-            <literal>integerDigits</literal> integer digits and
-            <literal>fractionalDigits</literal> fractonal digits</entry>
-
-            <entry>define column precision and scale</entry>
-          </row>
-
-          <row>
-            <entry>@EAN</entry>
-
-            <entry>property (string)</entry>
-
-            <entry>check whether the string is a properly formated EAN or
-            UPC-A code</entry>
-
-            <entry>none</entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-
-  <section id="validator-defineconstraints-error" xreflabel="Error messages">
-    <title>Error messages</title>
-
-    <para>Hibernate Validator comes with a default set of error messages
-    translated in about ten languages (if yours is not part of it, please sent
-    us a patch). You can override those messages by creating a
-    <filename>ValidatorMessages.properties</filename> or (
-    <filename>ValidatorMessages_loc.properties</filename> ) and override the
-    needed keys. You can even add your own additional set of messages while
-    writing your validator annotations. If Hibernate Validator cannot resolve
-    a key from your resourceBundle nor from ValidatorMessage, it falls back to
-    the default built-in values.</para>
-
-    <para>Alternatively you can provide a
-    <classname>ResourceBundle</classname> while checking programmatically the
-    validation rules on a bean or if you want a completly different
-    interpolation mechanism, you can provide an implementation of
-    <literal>org.hibernate.validator.MessageInterpolator</literal> (check the
-    JavaDoc for more informations).</para>
-  </section>
-
-  <section id="validator-defineconstraints-own" revision="1">
-    <title>Writing your own constraints</title>
-
-    <para>Extending the set of built-in constraints is extremely easy. Any
-    constraint consists of two pieces: the constraint
-    <emphasis>descriptor</emphasis> (the annotation) and the constraint
-    <emphasis>validator</emphasis> (the implementation class). Here is a
-    simple user-defined descriptor:</para>
-
-    <programlisting>@ValidatorClass(CapitalizedValidator.class)
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Capitalized {
-    CapitalizeType type() default Capitalize.FIRST;
-    String message() default "has incorrect capitalization"
-}        </programlisting>
-
-    <para><literal>type</literal> is a parameter describing how the property
-    should to be capitalized. This is a user parameter fully dependant on the
-    annotation business.</para>
-
-    <para><literal>message</literal> is the default string used to describe
-    the constraint violation and is mandatory. You can hard code the string or
-    you can externalize part/all of it through the Java ResourceBundle
-    mechanism. Parameters values are going to be injected inside the message
-    when the <literal>{parameter}</literal> string is found (in our example
-    <literal>Capitalization is not {type}</literal> would generate
-    <literal>Capitalization is not FIRST</literal> ), externalizing the whole
-    string in <filename>ValidatorMessages.properties</filename> is considered
-    good practice. See <xref linkend="validator-defineconstraints-error" />
-    .</para>
-
-    <programlisting>@ValidatorClass(CapitalizedValidator.class)
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Capitalized {
-    CapitalizeType type() default Capitalize.FIRST;
-    String message() default "{validator.capitalized}";
-}
-
-
-#in ValidatorMessages.properties
-validator.capitalized = <literal>Capitalization is not {type}</literal>
-        </programlisting>
-
-    <para>As you can see the {} notation is recursive.</para>
-
-    <para>To link a descriptor to its validator implementation, we use the
-    <literal>@ValidatorClass</literal> meta-annotation. The validator class
-    parameter must name a class which implements
-    <literal>Validator<ConstraintAnnotation></literal> .</para>
-
-    <para>We now have to implement the validator (ie. the rule checking
-    implementation). A validation implementation can check the value of the a
-    property (by implementing <literal>PropertyConstraint</literal> ) and/or
-    can modify the hibernate mapping metadata to express the constraint at the
-    database level (by implementing
-    <literal>PersistentClassConstraint</literal> )</para>
-
-    <programlisting>public class CapitalizedValidator
-        implements Validator<Capitalized>, PropertyConstraint {
-    private CapitalizeType type;
-
-    //part of the Validator<Annotation> contract,
-    //allows to get and use the annotation values
-    public void initialize(Capitalized parameters) {
-        type = parameters.type();
-    }
-
-    //part of the property constraint contract
-    public boolean isValid(Object value) {
-        if (value==null) return true;
-        if ( !(value instanceof String) ) return false;
-        String string = (String) value;
-        if (type == CapitalizeType.ALL) {
-            return string.equals( string.toUpperCase() );
-        }
-        else {
-            String first = string.substring(0,1);
-            return first.equals( first.toUpperCase();
-        }
-    }
-}        </programlisting>
-
-    <para>The <literal>isValid()</literal> method should return false if the
-    constraint has been violated. For more examples, refer to the built-in
-    validator implementations.</para>
-
-    <para>We only have seen property level validation, but you can write a
-    Bean level validation annotation. Instead of receiving the return instance
-    of a property, the bean itself will be passed to the validator. To
-    activate the validation checking, just annotated the bean itself instead.
-    A small sample can be found in the unit test suite.</para>
-
-    <para>If your constraint can be applied multiple times (with different
-    parameters) on the same property or type, you can use the following
-    annotation form:</para>
-
-    <programlisting>@Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-<emphasis role="bold">public @interface Patterns {</emphasis>
-    Pattern[] value();
-}
-
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
- at ValidatorClass(PatternValidator.class)
-public @interface Pattern {
-    String regexp();
-}</programlisting>
-
-    <para>Basically an annotation containing the value attribute as an array
-    of validator annotations.</para>
-  </section>
-
-  <section>
-    <title>Annotating your domain model</title>
-
-    <para>Since you are already familiar with annotations now, the syntax
-    should be very familiar</para>
-
-    <programlisting>public class Address {
-    private String line1;
-    private String line2;
-    private String zip;
-    private String state;
-    private String country;
-    private long id;
-
-    // a not null string of 20 characters maximum
-    @Length(max=20)
-    @NotNull
-    public String getCountry() {
-        return country;
-    }
-
-    // a non null string
-    @NotNull
-    public String getLine1() {
-        return line1;
-    }
-
-    //no constraint
-    public String getLine2() {
-        return line2;
-    }
-
-    // a not null string of 3 characters maximum
-    @Length(max=3) @NotNull
-    public String getState() {
-        return state;
-    }
-
-    // a not null numeric string of 5 characters maximum
-    // if the string is longer, the message will
-    //be searched in the resource bundle at key 'long'
-    @Length(max=5, message="{long}")
-    @Pattern(regex="[0-9]+")
-    @NotNull
-    public String getZip() {
-        return zip;
-    }
-
-    // should always be true
-    @AssertTrue
-    public boolean isValid() {
-        return true;
-    }
-
-    // a numeric between 1 and 2000
-    @Id @Min(1)
-    @Range(max=2000)
-    public long getId() {
-        return id;
-    }
-}        </programlisting>
-
-    <para>While the example only shows public property validation, you can
-    also annotate fields of any kind of visibility</para>
-
-    <programlisting>@MyBeanConstraint(max=45
-public class Dog {
-    @AssertTrue private boolean isMale;
-    @NotNull protected String getName() { ... };
-    ...
-}        </programlisting>
-
-    <para>You can also annotate interfaces. Hibernate Validator will check all
-    superclasses and interfaces extended or implemented by a given bean to
-    read the appropriate validator annotations.</para>
-
-    <programlisting>public interface Named {
-    @NotNull String getName();
-    ...
-}
-
-public class Dog implements Named {
-
-    @AssertTrue private boolean isMale;
-
-    public String getName() { ... };
-
-}
-        </programlisting>
-
-    <para>The name property will be checked for nullity when the Dog bean is
-    validated.</para>
-  </section>
-</chapter>
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AbstractLuhnValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AbstractLuhnValidator.java
deleted file mode 100644
index 19361db..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AbstractLuhnValidator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-//$Id: AbstractLuhnValidator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Implement the Luhn algorithm (with Luhn key on the last digit)
- * @author Emmanuel Bernard
- */
-public abstract class AbstractLuhnValidator {
-	abstract int multiplicator();
-
-	public boolean isValid(Object value) {
-		if (value == null) return true;
-		if ( ! ( value instanceof String) ) return false;
-		String creditCard = (String) value;
-		char[] chars = creditCard.toCharArray();
-
-		List<Integer> ints = new ArrayList<Integer>();
-		for (char c : chars) {
-			if ( Character.isDigit( c ) ) ints.add( c - '0' );
-		}
-		int length = ints.size();
-		int sum = 0;
-		boolean even = false;
-		for ( int index = length - 1 ; index >= 0 ; index-- ) {
-			int digit = ints.get(index);
-			if  (even) {
-				digit *= multiplicator();
-			}
-			if (digit > 9) {
-				digit = digit / 10 + digit % 10;
-			}
-			sum+= digit;
-			even = !even;
-		}
-		return  sum % 10 == 0;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalse.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalse.java
deleted file mode 100644
index 5fc100f..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalse.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: AssertFalse.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * The annotated property has to be false.
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(AssertFalseValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface AssertFalse {
-	String message() default "{validator.assertFalse}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalseValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalseValidator.java
deleted file mode 100644
index 821a80c..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertFalseValidator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: AssertFalseValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-
-
-/**
- * Check if a given object is false or not
- *
- * @author Gavin King
- * @author Hardy Ferentschik
- */
-public class AssertFalseValidator implements Validator<AssertFalse>, Serializable {
-
-    public boolean isValid(Object value) {
-        if (value == null) return true;
-        if (value instanceof Boolean) {
-            return !(Boolean) value;
-        }
-        return false;
-    }
-
-    public void initialize(AssertFalse parameters) {
-    }
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrue.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrue.java
deleted file mode 100644
index 7a9619a..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrue.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: AssertTrue.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * The annotated element has to be true
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(AssertTrueValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface AssertTrue {
-	String message() default "{validator.assertTrue}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrueValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrueValidator.java
deleted file mode 100644
index 07a8085..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/AssertTrueValidator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: AssertTrueValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-
-
-/**
- * Check whether an element is true or not.
- *
- * @author Gavin King
- * @author Hardy Ferentschik
- */
-public class AssertTrueValidator implements Validator<AssertTrue>, Serializable {
-
-    public boolean isValid(Object value) {
-        if (value == null) return true;
-        if (value instanceof Boolean) {
-            return (Boolean) value;
-        }
-        return false;
-    }
-
-    public void initialize(AssertTrue parameters) {
-    }
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ClassValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ClassValidator.java
deleted file mode 100644
index a043301..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ClassValidator.java
+++ /dev/null
@@ -1,758 +0,0 @@
-//$Id: ClassValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.beans.Introspector;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.hibernate.AssertionFailure;
-import org.hibernate.Hibernate;
-import org.hibernate.MappingException;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.Property;
-import org.hibernate.mapping.Component;
-import org.hibernate.annotations.common.reflection.Filter;
-import org.hibernate.annotations.common.reflection.ReflectionManager;
-import org.hibernate.annotations.common.reflection.XClass;
-import org.hibernate.annotations.common.reflection.XMember;
-import org.hibernate.annotations.common.reflection.XMethod;
-import org.hibernate.annotations.common.reflection.XProperty;
-import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
-import org.hibernate.util.IdentitySet;
-import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggregator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Engine that take a bean and check every expressed annotation restrictions
- *
- * @author Gavin King
- * @author Emmanuel Bernard
- */
-public class ClassValidator<T> implements Serializable {
-	//TODO Define magic number
-	private static final Logger log = LoggerFactory.getLogger( ClassValidator.class );
-	private static final InvalidValue[] EMPTY_INVALID_VALUE_ARRAY = new InvalidValue[]{};
-	private static final String DEFAULT_VALIDATOR_MESSAGE = "org.hibernate.validator.resources.DefaultValidatorMessages";
-	private static final String VALIDATOR_MESSAGE = "ValidatorMessages";
-	private static final Set<Class> INDEXABLE_CLASS = new HashSet<Class>();
-
-	static {
-		INDEXABLE_CLASS.add( Integer.class );
-		INDEXABLE_CLASS.add( Long.class );
-		INDEXABLE_CLASS.add( String.class );
-	}
-
-	static {
-		Version.touch(); //touch version
-	}
-
-	private final Class<T> beanClass;
-	private transient ResourceBundle messageBundle;
-	private transient ResourceBundle defaultMessageBundle;
-	private transient boolean isUserProvidedResourceBundle;
-	private transient ReflectionManager reflectionManager;
-
-	private final transient Map<XClass, ClassValidator> childClassValidators;
-	private transient List<Validator> beanValidators;
-	private transient List<Validator> memberValidators;
-	private transient List<XMember> memberGetters;
-	private transient List<XMember> childGetters;
-	private transient DefaultMessageInterpolatorAggregator defaultInterpolator;
-	private transient MessageInterpolator userInterpolator;
-	private static final Filter GET_ALL_FILTER = new Filter() {
-		public boolean returnStatic() {
-		return true;
-		}
-
-		public boolean returnTransient() {
-		return true;
-		}
-	};
-
-	/**
-	 * create the validator engine for this bean type
-	 */
-	public ClassValidator(Class<T> beanClass) {
-		this( beanClass, (ResourceBundle) null );
-	}
-
-	/**
-	 * create the validator engine for a particular bean class, using a resource bundle
-	 * for message rendering on violation
-	 */
-	public ClassValidator(Class<T> beanClass, ResourceBundle resourceBundle) {
-		this( beanClass, resourceBundle, null, new HashMap<XClass, ClassValidator>(), null );
-	}
-
-	/**
-	 * create the validator engine for a particular bean class, using a custom message interpolator
-	 * for message rendering on violation
-	 */
-	public ClassValidator(Class<T> beanClass, MessageInterpolator interpolator) {
-		this( beanClass, null, interpolator, new HashMap<XClass, ClassValidator>(), null );
-	}
-
-    /**
-     * Not a public API
-     */
-    public ClassValidator(
-			Class<T> beanClass, ResourceBundle resourceBundle, MessageInterpolator interpolator,
-            Map<XClass, ClassValidator> childClassValidators, ReflectionManager reflectionManager
-    ) {
-        this.reflectionManager = reflectionManager != null ? reflectionManager : new JavaReflectionManager();
-        XClass beanXClass = this.reflectionManager.toXClass( beanClass );
-		this.beanClass = beanClass;
-		this.messageBundle = resourceBundle == null ?
-				getDefaultResourceBundle() :
-				resourceBundle;
-		this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
-		this.userInterpolator = interpolator;
-		this.childClassValidators = childClassValidators != null ?
-                childClassValidators :
-                new HashMap<XClass, ClassValidator>();
-		initValidator( beanXClass, this.childClassValidators );
-	}
-
-	@SuppressWarnings("unchecked")
-	protected ClassValidator(
-			XClass beanXClass, ResourceBundle resourceBundle, MessageInterpolator userInterpolator,
-			Map<XClass, ClassValidator> childClassValidators, ReflectionManager reflectionManager
-	) {
-		this.reflectionManager = reflectionManager;
-		this.beanClass = reflectionManager.toClass( beanXClass );
-		this.messageBundle = resourceBundle == null ?
-				getDefaultResourceBundle() :
-				resourceBundle;
-		this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
-		this.userInterpolator = userInterpolator;
-		this.childClassValidators = childClassValidators;
-		initValidator( beanXClass, childClassValidators );
-	}
-
-	private ResourceBundle getDefaultResourceBundle() {
-		ResourceBundle rb;
-		try {
-			//use context class loader as a first citizen
-			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-			if ( contextClassLoader == null ) {
-				throw new MissingResourceException( "No context classloader", null, VALIDATOR_MESSAGE );
-			}
-			rb = ResourceBundle.getBundle(
-					VALIDATOR_MESSAGE,
-					Locale.getDefault(),
-					contextClassLoader
-			);
-		}
-		catch (MissingResourceException e) {
-			log.trace( "ResourceBundle {} not found in thread context classloader", VALIDATOR_MESSAGE );
-			//then use the Validator Framework classloader
-			try {
-				rb = ResourceBundle.getBundle(
-						VALIDATOR_MESSAGE,
-						Locale.getDefault(),
-						this.getClass().getClassLoader()
-				);
-			}
-			catch (MissingResourceException ee) {
-				log.debug(
-						"ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to {}",
-						DEFAULT_VALIDATOR_MESSAGE
-				);
-				//the user did not override the default ValidatorMessages
-				rb = null;
-			}
-		}
-		isUserProvidedResourceBundle = true;
-		return rb;
-	}
-
-	private void initValidator(
-			XClass xClass, Map<XClass, ClassValidator> childClassValidators
-	) {
-		beanValidators = new ArrayList<Validator>();
-		memberValidators = new ArrayList<Validator>();
-		memberGetters = new ArrayList<XMember>();
-		childGetters = new ArrayList<XMember>();
-		defaultInterpolator = new DefaultMessageInterpolatorAggregator();
-		defaultInterpolator.initialize( messageBundle, defaultMessageBundle );
-
-		//build the class hierarchy to look for members in
-		childClassValidators.put( xClass, this );
-		Collection<XClass> classes = new HashSet<XClass>();
-		addSuperClassesAndInterfaces( xClass, classes );
-		for ( XClass currentClass : classes ) {
-			Annotation[] classAnnotations = currentClass.getAnnotations();
-			for ( int i = 0; i < classAnnotations.length ; i++ ) {
-				Annotation classAnnotation = classAnnotations[i];
-				Validator beanValidator = createValidator( classAnnotation );
-				if ( beanValidator != null ) beanValidators.add( beanValidator );
-				handleAggregateAnnotations(classAnnotation, null);
-			}
-		}
-
-		//Check on all selected classes
-		for ( XClass currClass : classes ) {
-			List<XMethod> methods = currClass.getDeclaredMethods();
-			for ( XMethod method : methods ) {
-				createMemberValidator( method );
-				createChildValidator( method );
-			}
-
-			List<XProperty> fields = currClass.getDeclaredProperties(
-					"field", GET_ALL_FILTER
-			);
-			for ( XProperty field : fields ) {
-				createMemberValidator( field );
-				createChildValidator( field );
-			}
-		}
-	}
-
-	private void addSuperClassesAndInterfaces(XClass clazz, Collection<XClass> classes) {
-		for ( XClass currClass = clazz; currClass != null ; currClass = currClass.getSuperclass() ) {
-			if ( ! classes.add( currClass ) ) return;
-			XClass[] interfaces = currClass.getInterfaces();
-			for ( XClass interf : interfaces ) {
-				addSuperClassesAndInterfaces( interf, classes );
-			}
-		}
-	}
-
-	private boolean handleAggregateAnnotations(Annotation annotation, XMember member) {
-		Object[] values;
-		try {
-			Method valueMethod = annotation.getClass().getMethod( "value" );
-			if ( valueMethod.getReturnType().isArray() ) {
-				values = (Object[]) valueMethod.invoke( annotation );
-			}
-			else {
-				return false;
-			}
-		}
-		catch (NoSuchMethodException e) {
-			return false;
-		}
-		catch (Exception e) {
-			throw new IllegalStateException( e );
-		}
-
-		boolean validatorPresent = false;
-		for ( Object value : values ) {
-			if ( value instanceof Annotation ) {
-				annotation = (Annotation) value;
-				Validator validator = createValidator( annotation );
-				if ( validator != null ) {
-					if ( member != null ) {
-						//member
-						memberValidators.add( validator );
-						setAccessible( member );
-						memberGetters.add( member );
-					}
-					else {
-						//bean
-						beanValidators.add( validator );
-					}
-					validatorPresent = true;
-				}
-			}
-		}
-		return validatorPresent;
-	}
-
-	@SuppressWarnings("unchecked")
-	private void createChildValidator( XMember member) {
-		if ( member.isAnnotationPresent( Valid.class ) ) {
-			setAccessible( member );
-			childGetters.add( member );
-			XClass clazz;
-			if ( member.isCollection() || member.isArray() ) {
-				clazz = member.getElementClass();
-			}
-			else {
-				clazz = member.getType();
-			}
-			if ( !childClassValidators.containsKey( clazz ) ) {
-				//ClassValidator added by side effect (added to childClassValidators during CV construction)
-				new ClassValidator( clazz, messageBundle, userInterpolator, childClassValidators, reflectionManager );
-			}
-		}
-	}
-
-	private void createMemberValidator(XMember member) {
-		boolean validatorPresent = false;
-		Annotation[] memberAnnotations = member.getAnnotations();
-		for ( Annotation methodAnnotation : memberAnnotations ) {
-			Validator propertyValidator = createValidator( methodAnnotation );
-			if ( propertyValidator != null ) {
-				memberValidators.add( propertyValidator );
-				setAccessible( member );
-				memberGetters.add( member );
-				validatorPresent = true;
-			}
-			boolean agrValidPresent = handleAggregateAnnotations( methodAnnotation, member );
-			validatorPresent = validatorPresent || agrValidPresent;
-		}
-		if ( validatorPresent && !member.isTypeResolved() ) {
-			log.warn( "Original type of property {} is unbound and has been approximated.", member );
-		}
-	}
-
-	private static void setAccessible(XMember member) {
-		if ( !Modifier.isPublic( member.getModifiers() ) ) {
-			member.setAccessible( true );
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private Validator createValidator(Annotation annotation) {
-		try {
-			ValidatorClass validatorClass = annotation.annotationType().getAnnotation( ValidatorClass.class );
-			if ( validatorClass == null ) {
-				return null;
-			}
-			Validator beanValidator = validatorClass.value().newInstance();
-			beanValidator.initialize( annotation );
-			defaultInterpolator.addInterpolator( annotation, beanValidator );
-			return beanValidator;
-		}
-		catch (Exception e) {
-			throw new IllegalArgumentException( "could not instantiate ClassValidator", e );
-		}
-	}
-
-	public boolean hasValidationRules() {
-		return beanValidators.size() != 0 || memberValidators.size() != 0;
-	}
-
-	/**
-	 * apply constraints on a bean instance and return all the failures.
-	 * if <code>bean</code> is null, an empty array is returned
-	 */
-	public InvalidValue[] getInvalidValues(T bean) {
-		return this.getInvalidValues( bean, new IdentitySet() );
-	}
-
-	/**
-	 * apply constraints on a bean instance and return all the failures.
-	 * if <code>bean</code> is null, an empty array is returned
-	 */
-	@SuppressWarnings("unchecked")
-	protected InvalidValue[] getInvalidValues(T bean, Set<Object> circularityState) {
-		if ( bean == null || circularityState.contains( bean ) ) {
-			return EMPTY_INVALID_VALUE_ARRAY; //Avoid circularity
-		}
-		else {
-			circularityState.add( bean );
-		}
-
-		if ( !beanClass.isInstance( bean ) ) {
-			throw new IllegalArgumentException( "not an instance of: " + bean.getClass() );
-		}
-
-		List<InvalidValue> results = new ArrayList<InvalidValue>();
-
-		for ( int i = 0; i < beanValidators.size() ; i++ ) {
-			Validator validator = beanValidators.get( i );
-			if ( !validator.isValid( bean ) ) {
-				results.add( new InvalidValue( interpolate(validator), beanClass, null, bean, bean ) );
-			}
-		}
-
-		for ( int i = 0; i < memberValidators.size() ; i++ ) {
-			XMember getter = memberGetters.get( i );
-			if ( Hibernate.isPropertyInitialized( bean, getPropertyName( getter ) ) ) {
-				Object value = getMemberValue( bean, getter );
-				Validator validator = memberValidators.get( i );
-				if ( !validator.isValid( value ) ) {
-					String propertyName = getPropertyName( getter );
-					results.add( new InvalidValue( interpolate(validator), beanClass, propertyName, value, bean ) );
-				}
-			}
-		}
-
-		for ( int i = 0; i < childGetters.size() ; i++ ) {
-			XMember getter = childGetters.get( i );
-			if ( Hibernate.isPropertyInitialized( bean, getPropertyName( getter ) ) ) {
-				Object value = getMemberValue( bean, getter );
-				if ( value != null && Hibernate.isInitialized( value ) ) {
-					String propertyName = getPropertyName( getter );
-					if ( getter.isCollection() ) {
-						int index = 0;
-						boolean isIterable = value instanceof Iterable;
-						Map map = ! isIterable ? (Map) value : null;
-						Iterable elements = isIterable ?
-								(Iterable) value :
-								map.keySet();
-						for ( Object element : elements ) {
-							Object actualElement = isIterable ? element : map.get( element );
-							if ( actualElement == null ) {
-								index++;
-								continue;
-							}
-							InvalidValue[] invalidValues = getClassValidator( actualElement )
-									.getInvalidValues( actualElement, circularityState );
-
-							String indexedPropName = MessageFormat.format(
-									"{0}[{1}]",
-									propertyName,
-									INDEXABLE_CLASS.contains( element.getClass() ) ?
-											( "'" + element + "'" ) :
-											index
-							);
-							index++;
-
-							for ( InvalidValue invalidValue : invalidValues ) {
-								invalidValue.addParentBean( bean, indexedPropName );
-								results.add( invalidValue );
-							}
-						}
-					}
-					if ( getter.isArray() ) {
-						int index = 0;
-						for ( Object element : (Object[]) value ) {
-							if ( element == null ) {
-								index++;
-								continue;
-							}
-							InvalidValue[] invalidValues = getClassValidator( element )
-									.getInvalidValues( element, circularityState );
-
-							String indexedPropName = MessageFormat.format(
-									"{0}[{1}]",
-									propertyName,
-									index
-							);
-							index++;
-
-							for ( InvalidValue invalidValue : invalidValues ) {
-								invalidValue.addParentBean( bean, indexedPropName );
-								results.add( invalidValue );
-							}
-						}
-					}
-					else {
-						InvalidValue[] invalidValues = getClassValidator( value )
-								.getInvalidValues( value, circularityState );
-						for ( InvalidValue invalidValue : invalidValues ) {
-							invalidValue.addParentBean( bean, propertyName );
-							results.add( invalidValue );
-						}
-					}
-				}
-			}
-		}
-
-		return results.toArray( new InvalidValue[results.size()] );
-	}
-
-	private String interpolate(Validator validator) {
-		String message = defaultInterpolator.getAnnotationMessage( validator );
-		if (userInterpolator != null) {
-			return userInterpolator.interpolate( message, validator, defaultInterpolator );
-		}
-		else {
-			return defaultInterpolator.interpolate( message, validator, null);
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private ClassValidator getClassValidator(Object value) {
-		Class clazz = value.getClass();
-		ClassValidator validator = childClassValidators.get( reflectionManager.toXClass( clazz ) );
-		if ( validator == null ) { //handles polymorphism
-			//TODO cache this thing. in a second queue (reflectionManager being sealed)? beware of concurrency
-			validator = new ClassValidator( clazz );
-		}
-		return validator;
-	}
-
-	/**
-	 * Apply constraints of a particular property on a bean instance and return all the failures.
-	 * Note this is not recursive.
-	 */
-	//TODO should it be recursive?
-	public InvalidValue[] getInvalidValues(T bean, String propertyName) {
-		List<InvalidValue> results = new ArrayList<InvalidValue>();
-
-		for ( int i = 0; i < memberValidators.size() ; i++ ) {
-			XMember getter = memberGetters.get( i );
-			if ( getPropertyName( getter ).equals( propertyName ) ) {
-				Object value = getMemberValue( bean, getter );
-				Validator validator = memberValidators.get( i );
-				if ( !validator.isValid( value ) ) {
-					results.add( new InvalidValue( interpolate(validator), beanClass, propertyName, value, bean ) );
-				}
-			}
-		}
-
-		return results.toArray( new InvalidValue[results.size()] );
-	}
-
-	/**
-	 * Apply constraints of a particular property value of a bean type and return all the failures.
-	 * The InvalidValue objects returns return null for InvalidValue#getBean() and InvalidValue#getRootBean()
-	 * Note this is not recursive.
-	 */
-	//TODO should it be recursive?
-	public InvalidValue[] getPotentialInvalidValues(String propertyName, Object value) {
-		List<InvalidValue> results = new ArrayList<InvalidValue>();
-
-		for ( int i = 0; i < memberValidators.size() ; i++ ) {
-			XMember getter = memberGetters.get( i );
-			if ( getPropertyName( getter ).equals( propertyName ) ) {
-				Validator validator = memberValidators.get( i );
-				if ( !validator.isValid( value ) ) {
-					results.add( new InvalidValue( interpolate(validator), beanClass, propertyName, value, null ) );
-				}
-			}
-		}
-
-		return results.toArray( new InvalidValue[results.size()] );
-	}
-
-	private Object getMemberValue(T bean, XMember getter) {
-		Object value;
-		try {
-			value = getter.invoke( bean );
-		}
-		catch (Exception e) {
-			throw new IllegalStateException( "Could not get property value", e );
-		}
-		return value;
-	}
-
-	private String getPropertyName(XMember member) {
-		//Do no try to cache the result in a map, it's actually much slower (2.x time)
-		String propertyName;
-		if ( XProperty.class.isAssignableFrom( member.getClass() ) ) {
-			propertyName = member.getName();
-		}
-		else if ( XMethod.class.isAssignableFrom( member.getClass() ) ) {
-			propertyName = member.getName();
-			if ( propertyName.startsWith( "is" ) ) {
-				propertyName = Introspector.decapitalize( propertyName.substring( 2 ) );
-			}
-			else if ( propertyName.startsWith( "get" ) ) {
-				propertyName = Introspector.decapitalize( propertyName.substring( 3 ) );
-			}
-			//do nothing for non getter method, in case someone want to validate a PO Method
-		}
-		else {
-			throw new AssertionFailure( "Unexpected member: " + member.getClass().getName() );
-		}
-		return propertyName;
-	}
-
-	/** @deprecated */
-	private String replace(String message, Annotation parameters) {
-		StringTokenizer tokens = new StringTokenizer( message, "#{}", true );
-		StringBuilder buf = new StringBuilder( 30 );
-		boolean escaped = false;
-		boolean el = false;
-		while ( tokens.hasMoreTokens() ) {
-			String token = tokens.nextToken();
-			if ( !escaped && "#".equals( token ) ) {
-				el = true;
-			}
-			if ( !el && "{".equals( token ) ) {
-				escaped = true;
-			}
-			else if ( escaped && "}".equals( token ) ) {
-				escaped = false;
-			}
-			else if ( !escaped ) {
-				if ( "{".equals( token ) ) el = false;
-				buf.append( token );
-			}
-			else {
-				Method member;
-				try {
-					member = parameters.getClass().getMethod( token, (Class[]) null );
-				}
-				catch (NoSuchMethodException nsfme) {
-					member = null;
-				}
-				if ( member != null ) {
-					try {
-						buf.append( member.invoke( parameters ) );
-					}
-					catch (Exception e) {
-						throw new IllegalArgumentException( "could not render message", e );
-					}
-				}
-				else {
-					String string = null;
-					try {
-						string = messageBundle != null ? messageBundle.getString( token ) : null;
-					}
-					catch( MissingResourceException e ) {
-						//give a second chance with the default resource bundle
-					}
-					if (string == null) {
-						try {
-							string = defaultMessageBundle.getString( token );
-						}
-						catch( MissingResourceException e) {
-							throw new MissingResourceException(
-									"Can't find resource in validator bundles, key " + token,
-                                    defaultMessageBundle.getClass().getName(),
-                                    token
-							);
-						}
-					}
-					if ( string != null ) buf.append( replace( string, parameters ) );
-				}
-			}
-		}
-		return buf.toString();
-	}
-
-	/**
-	 * apply the registred constraints rules on the hibernate metadata (to be applied on DB schema...)
-	 *
-	 * @param persistentClass hibernate metadata
-	 */
-	public void apply(PersistentClass persistentClass) {
-
-		for ( Validator validator : beanValidators ) {
-			if ( validator instanceof PersistentClassConstraint ) {
-				( (PersistentClassConstraint) validator ).apply( persistentClass );
-			}
-		}
-
-		Iterator<Validator> validators = memberValidators.iterator();
-		Iterator<XMember> getters = memberGetters.iterator();
-		while ( validators.hasNext() ) {
-			Validator validator = validators.next();
-			String propertyName = getPropertyName( getters.next() );
-			if ( validator instanceof PropertyConstraint ) {
-				try {
-					Property property = findPropertyByName(persistentClass, propertyName);
-					if (property != null) {
-						( (PropertyConstraint) validator ).apply( property );
-					}
-				}
-				catch (MappingException pnfe) {
-					//do nothing
-				}
-			}
-		}
-
-	}
-
-	public void assertValid(T bean) {
-		InvalidValue[] values = getInvalidValues( bean );
-		if ( values.length > 0 ) {
-			throw new InvalidStateException( values );
-		}
-	}
-
-	private void writeObject(ObjectOutputStream oos) throws IOException {
-		ResourceBundle rb = messageBundle;
-		MessageInterpolator interpolator = this.userInterpolator;
-		if ( rb != null && ! ( rb instanceof Serializable ) ) {
-			messageBundle = null;
-			if ( ! isUserProvidedResourceBundle ) {
-				log.warn(
-						"Serializing a ClassValidator with a non serializable ResourceBundle: ResourceBundle ignored"
-				);
-			}
-		}
-		if (interpolator != null && ! (interpolator instanceof Serializable) ) {
-			userInterpolator = null;
-			log.warn( "Serializing a non serializable MessageInterpolator" );
-		}
-		oos.defaultWriteObject();
-		oos.writeObject( messageBundle );
-		oos.writeObject( userInterpolator );
-		messageBundle = rb;
-		userInterpolator = interpolator;
-	}
-
-	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
-		ois.defaultReadObject();
-		ResourceBundle rb = (ResourceBundle) ois.readObject();
-		if ( rb == null ) rb = getDefaultResourceBundle();
-		this.messageBundle = rb;
-		this.userInterpolator = (MessageInterpolator) ois.readObject();
-		this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
-		reflectionManager = new JavaReflectionManager();
-		initValidator( reflectionManager.toXClass( beanClass ), new HashMap<XClass, ClassValidator>() );
-	}
-
-	/**
-	 * Retrieve the property by path in a recursive way, including IndetifierProperty in the loop
-	 * If propertyName is null or empty, the IdentifierProperty is returned
-	 */
-	public static Property findPropertyByName(PersistentClass associatedClass, String propertyName) {
-		Property property = null;
-		Property idProperty = associatedClass.getIdentifierProperty();
-		String idName = idProperty != null ? idProperty.getName() : null;
-		try {
-			if ( propertyName == null
-					|| propertyName.length() == 0
-					|| propertyName.equals( idName ) ) {
-				//default to id
-				property = idProperty;
-			}
-			else {
-				if ( propertyName.indexOf( idName + "." ) == 0 ) {
-					property = idProperty;
-					propertyName = propertyName.substring( idName.length() + 1 );
-				}
-				StringTokenizer st = new StringTokenizer( propertyName, ".", false );
-				while ( st.hasMoreElements() ) {
-					String element = (String) st.nextElement();
-					if ( property == null ) {
-						property = associatedClass.getProperty( element );
-					}
-					else {
-						if ( ! property.isComposite() ) return null;
-						property = ( (Component) property.getValue() ).getProperty( element );
-					}
-				}
-			}
-		}
-		catch (MappingException e) {
-			try {
-				//if we do not find it try to check the identifier mapper
-				if ( associatedClass.getIdentifierMapper() == null ) return null;
-				StringTokenizer st = new StringTokenizer( propertyName, ".", false );
-				while ( st.hasMoreElements() ) {
-					String element = (String) st.nextElement();
-					if ( property == null ) {
-						property = associatedClass.getIdentifierMapper().getProperty( element );
-					}
-					else {
-						if ( ! property.isComposite() ) return null;
-						property = ( (Component) property.getValue() ).getProperty( element );
-					}
-				}
-			}
-			catch (MappingException ee) {
-				return null;
-			}
-		}
-		return property;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumber.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumber.java
deleted file mode 100644
index ec68dd3..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumber.java
+++ /dev/null
@@ -1,23 +0,0 @@
-//$Id: CreditCardNumber.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The annotated element has to represent a valid
- * credit card number. This is the Luhn algorithm implementation
- * which aims to check for user mistake, not credit card validity!
- *
- * @author Emmanuel Bernard
- */
- at Documented
- at ValidatorClass( CreditCardNumberValidator.class)
- at Target({ElementType.METHOD, ElementType.FIELD})
- at Retention( RetentionPolicy.RUNTIME )
-public @interface CreditCardNumber {
-	String message() default "{validator.creditCard}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumberValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumberValidator.java
deleted file mode 100644
index dbd99a8..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/CreditCardNumberValidator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-//$Id: CreditCardNumberValidator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-
-/**
- * Check a credit card number through the Luhn algorithm
- *
- * @author Emmanuel Bernard
- */
-public class CreditCardNumberValidator extends AbstractLuhnValidator implements Validator<CreditCardNumber>, Serializable {
-
-	public void initialize(CreditCardNumber parameters) {
-	}
-
-	int multiplicator() {
-		return 2;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Digits.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Digits.java
deleted file mode 100644
index 96dbf96..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Digits.java
+++ /dev/null
@@ -1,25 +0,0 @@
-//$Id: Digits.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Check that a given number has <code>integerDigits</code> integer digits
- * and <code>fractionalDigits</code> fractional digits
- * The constraints are defined at the database level too
- *
- * @author Norman Richards
- */
- at ValidatorClass(DigitsValidator.class)
- at Target({ElementType.METHOD, ElementType.FIELD})
- at Retention( RetentionPolicy.RUNTIME)
- at Documented
-public @interface Digits {
-    int integerDigits();
-    int fractionalDigits() default 0;
-    String message() default "{validator.digits}";
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/DigitsValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/DigitsValidator.java
deleted file mode 100644
index 75b2af7..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/DigitsValidator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-//$Id: DigitsValidator.java 16729 2009-06-09 16:50:05Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.hibernate.mapping.Property;
-import org.hibernate.mapping.Column;
-
-/**
- * Validate a Digit to check if it matches the according pattern
- *
- * @author Norman Richards
- * @author Emmanuel Bernard
- */
-public class DigitsValidator implements Validator<Digits>, PropertyConstraint {
-	int integerDigits;
-	int fractionalDigits;
-
-	public void initialize(Digits configuration) {
-		integerDigits = configuration.integerDigits();
-		fractionalDigits = configuration.fractionalDigits();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) {
-			return true;
-		}
-
-		String stringValue;
-
-		if ( value instanceof String ) {
-			try {
-				stringValue = stringValue( new BigDecimal( (String) value ) );
-			}
-			catch (NumberFormatException nfe) {
-				return false;
-			}
-		}
-		else if ( value instanceof BigDecimal ) {
-			stringValue = stringValue( (BigDecimal) value );
-		}
-		else if ( value instanceof BigInteger ) {
-			stringValue = stringValue( (BigInteger) value );
-		}
-		else if ( value instanceof Number ) {
-			//yukky
-			stringValue = stringValue( new BigDecimal( ( (Number) value ).toString() ) );
-		}
-		else {
-			return false;
-		}
-
-		int pos = stringValue.indexOf( "." );
-
-		int left = ( pos == -1 ) ?
-				stringValue.length() :
-				pos;
-		int right = ( pos == -1 ) ?
-				0 :
-				stringValue.length() - pos - 1;
-
-		if ( left == 1 && stringValue.charAt( 0 ) == '0' ) {
-			left--;
-		}
-
-		return !( left > integerDigits || right > fractionalDigits );
-
-	}
-
-	private String stringValue(BigDecimal number) {
-		return number.abs().stripTrailingZeros().toPlainString();
-	}
-
-	private String stringValue(BigInteger number) {
-		return number.abs().toString();
-	}
-
-	public void apply(Property property) {
-		Column col = (Column) property.getColumnIterator().next();
-		col.setPrecision( integerDigits + fractionalDigits );
-		col.setScale( fractionalDigits );
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EAN.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EAN.java
deleted file mode 100644
index a066742..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EAN.java
+++ /dev/null
@@ -1,23 +0,0 @@
-//$Id: EAN.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The annotated element has to represent an EAN-13 or UPC-A
- *
- * which aims to check for user mistake, not actual number validity!
- *
- * @author Emmanuel Bernard
- */
- at Documented
- at ValidatorClass( EANValidator.class)
- at Target({ElementType.METHOD, ElementType.FIELD})
- at Retention( RetentionPolicy.RUNTIME )
-public @interface EAN {
-	String message() default "{validator.ean}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EANValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EANValidator.java
deleted file mode 100644
index 3f7a17c..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EANValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-//$Id: EANValidator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Validate EAN13 and UPC-A
- *
- * @author Emmanuel Bernard
- */
-public class EANValidator implements Validator<EAN> {
-
-	public void initialize(EAN parameters) {
-	}
-
-
-	public boolean isValid(Object value) {
-		if (value == null) return true;
-		if ( ! ( value instanceof String) ) return false;
-		String creditCard = (String) value;
-		char[] chars = creditCard.toCharArray();
-
-		List<Integer> ints = new ArrayList<Integer>();
-		for (char c : chars) {
-			if ( Character.isDigit( c ) ) ints.add( c - '0' );
-		}
-		int length = ints.size();
-		int sum = 0;
-		boolean even = false;
-		for ( int index = length - 1 ; index >= 0 ; index-- ) {
-			int digit = ints.get(index);
-			if  (even) {
-				digit *= 3;
-			}
-			sum+= digit;
-			even = !even;
-		}
-		return  sum % 10 == 0;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Email.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Email.java
deleted file mode 100644
index 311f192..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Email.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: Email.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * The string has to be a well-formed email address
- *
- * @author Emmanuel Bernard
- */
- at Documented
- at ValidatorClass(EmailValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Email {
-	String message() default "{validator.email}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EmailValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EmailValidator.java
deleted file mode 100644
index 03b6fc5..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/EmailValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-//$Id: EmailValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.util.regex.Matcher;
-
-/**
- * Check that a given string is a well-formed email address
- *
- * @author Emmanuel Bernard
- */
-public class EmailValidator implements Validator<Email>, Serializable {
-	//TODO: Implement this http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html regex in java
-	private static String ATOM = "[^\\x00-\\x1F^\\(^\\)^\\<^\\>^\\@^\\,^\\;^\\:^\\\\^\\\"^\\.^\\[^\\]^\\s]";
-	private static String DOMAIN = "(" + ATOM + "+(\\." + ATOM + "+)*";
-	private static String IP_DOMAIN = "\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\]";
-
-	private java.util.regex.Pattern pattern;
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( !( value instanceof String ) ) return false;
-		String string = (String) value;
-		if ( string.length() == 0 ) return true;
-		Matcher m = pattern.matcher( string );
-		return m.matches();
-	}
-
-	public void initialize(Email parameters) {
-		pattern = java.util.regex.Pattern.compile(
-				"^" + ATOM + "+(\\." + ATOM + "+)*@"
-						 + DOMAIN
-						 + "|"
-						 + IP_DOMAIN
-						 + ")$",
-				java.util.regex.Pattern.CASE_INSENSITIVE
-		);
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Environment.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Environment.java
deleted file mode 100644
index ff9bcf9..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Environment.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: Environment.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-/**
- * Hibernate Validator Event properties
- * The properties are retrieved from Hibernate
- * (hibernate.properties, hibernate.cfg.xml, persistence.xml or Configuration API)
- *
- * @author Emmanuel Bernard
- */
-public class Environment {
-	/**
-	 * Message interpolator class used. The same instance is shared across all ClassValidators
-	 */
-	public static final String MESSAGE_INTERPOLATOR_CLASS = "hibernate.validator.message_interpolator_class";
-
-	/**
-	 * Apply DDL changes on Hibernate metamodel when using validator with Hibernate Annotations. Default to true.
-	 */
-	public static final String APPLY_TO_DDL = "hibernate.validator.apply_to_ddl";
-
-	/**
-	 * Enable listeners auto registration in Hibernate Annotations and EntityManager. Default to true.
-	 */
-	public static final String AUTOREGISTER_LISTENERS = "hibernate.validator.autoregister_listeners";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Future.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Future.java
deleted file mode 100644
index d3260fe..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Future.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: Future.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Check that a Date, a Calendar, or a string representation apply in the future
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(FutureValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Future {
-	String message() default "{validator.future}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/FutureValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/FutureValidator.java
deleted file mode 100644
index 2a52fa5..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/FutureValidator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-//$Id: FutureValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * Check that a given date is in the future, and apply the same restriction
- * at the DB level
- *
- * @author Emmanuel Bernard
- */
-public class FutureValidator implements Validator<Future>, Serializable {
-
-	public void initialize(Future parameters) {
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( value instanceof Date ) {
-			Date date = (Date) value;
-			return date.after( new Date() );
-		}
-		else if ( value instanceof Calendar ) {
-			Calendar cal = (Calendar) value;
-			return cal.after( Calendar.getInstance() );
-		}
-		else {
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidStateException.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidStateException.java
deleted file mode 100644
index 303a5f9..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidStateException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-//$Id: InvalidStateException.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-/**
- * Thrown when the bean has violated one or several of its constraints
- * You can get the violation details in getInvalidValues()
- *
- * @author Gavin King
- */
-public class InvalidStateException extends RuntimeException {
-
-	private final InvalidValue[] invalidValues;
-
-	public InvalidStateException(InvalidValue[] invalidValues) {
-		this( invalidValues, invalidValues[0].getBeanClass().getName() );
-	}
-
-	public InvalidStateException(InvalidValue[] invalidValues, String className) {
-		super( "validation failed for: " + className );
-		this.invalidValues = invalidValues;
-	}
-
-	public InvalidValue[] getInvalidValues() {
-		return invalidValues;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidValue.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidValue.java
deleted file mode 100644
index 18b229f..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/InvalidValue.java
+++ /dev/null
@@ -1,68 +0,0 @@
-//$Id: InvalidValue.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-
-/**
- * A single violation of a class level or method level constraint.
- *
- * @author Gavin King
- */
-public class InvalidValue implements Serializable {
-	private final String message;
-	private final Object value;
-	private final String propertyName;
-	private final Class beanClass;
-	private final Object bean;
-	private Object rootBean;
-
-	public Object getRootBean() {
-		return rootBean;
-	}
-
-	public String getPropertyPath() {
-		return propertyPath;
-	}
-
-	private String propertyPath;
-
-	public InvalidValue(String message, Class beanClass, String propertyName, Object value, Object bean) {
-		this.message = message;
-		this.value = value;
-		this.beanClass = beanClass;
-		this.propertyName = propertyName;
-		this.bean = bean;
-		this.rootBean = bean;
-		this.propertyPath = propertyName;
-	}
-
-	public void addParentBean(Object parentBean, String propertyName) {
-		this.rootBean = parentBean;
-		this.propertyPath = propertyName + "." + this.propertyPath;
-	}
-
-	public Class getBeanClass() {
-		return beanClass;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getPropertyName() {
-		return propertyName;
-	}
-
-	public Object getValue() {
-		return value;
-	}
-
-	public Object getBean() {
-		return bean;
-	}
-
-	public String toString() {
-		return propertyName + ' ' + message;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Length.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Length.java
deleted file mode 100644
index 7ef6836..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Length.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: Length.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Apply some length restrictions to the annotated element. It has to be a string
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(LengthValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Length {
-	int max() default Integer.MAX_VALUE;
-
-	int min() default 0;
-
-	String message() default "{validator.length}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/LengthValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/LengthValidator.java
deleted file mode 100644
index d2bd7d1..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/LengthValidator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-//$Id: LengthValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-
-/**
- * Do check a length restriction on a string, and apply expected contraints on hibernate metadata.
- *
- * @author Gavin King
- */
-public class LengthValidator implements Validator<Length>, PropertyConstraint, Serializable {
-	private int max;
-	private int min;
-
-	public void initialize(Length parameters) {
-		max = parameters.max();
-		min = parameters.min();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( !( value instanceof String ) ) return false;
-		String string = (String) value;
-		int length = string.length();
-		return length >= min && length <= max;
-	}
-
-	public void apply(Property property) {
-		Column col = (Column) property.getColumnIterator().next();
-		if ( max < Integer.MAX_VALUE ) col.setLength( max );
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Max.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Max.java
deleted file mode 100644
index 963ef30..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Max.java
+++ /dev/null
@@ -1,24 +0,0 @@
-//$Id: Max.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * max restriction on a numeric annotated element
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(MaxValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Max {
-	long value();
-
-	String message() default "{validator.max}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MaxValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MaxValidator.java
deleted file mode 100644
index 91901dc..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MaxValidator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-//$Id: MaxValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-
-/**
- * Do check a max restriction on a numeric (whether and actual number or its string representation,
- * and apply expected contraints on hibernate metadata.
- *
- * @author Gavin King
- */
-public class MaxValidator implements Validator<Max>, PropertyConstraint, Serializable {
-
-	private long max;
-
-	public void initialize(Max parameters) {
-		max = parameters.value();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( value instanceof String ) {
-			try {
-				return new BigDecimal( (String) value ).compareTo( BigDecimal.valueOf( max ) ) <= 0;
-			}
-			catch (NumberFormatException nfe) {
-				return false;
-			}
-		}
-		else if ( ( value instanceof Double ) || ( value instanceof Float ) ) {
-			double dv = ( (Number) value ).doubleValue();
-			return dv <= max;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( (BigInteger) value ).compareTo( BigInteger.valueOf( max ) ) <= 0;
-		}
-		else if ( value instanceof BigDecimal ) {
-			return ( (BigDecimal) value ).compareTo( BigDecimal.valueOf( max ) ) <= 0;
-		}
-		else if ( value instanceof Number ) {
-			long lv = ( (Number) value ).longValue();
-			return lv <= max;
-		}
-		else {
-			return false;
-		}
-	}
-
-	public void apply(Property property) {
-		Column col = (Column) property.getColumnIterator().next();
-		col.setCheckConstraint( col.getName() + "<=" + max );
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MessageInterpolator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MessageInterpolator.java
deleted file mode 100644
index f20c4ed..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MessageInterpolator.java
+++ /dev/null
@@ -1,17 +0,0 @@
-//$Id: MessageInterpolator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-/**
- * Responsible for validator message interpolation (variable replacement etc)
- * this extension point is useful if the call has some contextual informations to
- * interpolate in validator messages
- *
- * @author Emmanuel Bernard
- */
-public interface MessageInterpolator {
-	/**
-	 * Interpolate a given validator message.
-	 * The implementation is free to delegate to the default interpolator or not.
-	 */
-	String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator);
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Min.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Min.java
deleted file mode 100644
index 1b2dd91..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Min.java
+++ /dev/null
@@ -1,24 +0,0 @@
-//$Id: Min.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * min restriction on a numeric annotated elemnt (or the string representation of a numeric)
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(MinValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Min {
-	long value();
-
-	String message() default "{validator.min}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MinValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MinValidator.java
deleted file mode 100644
index 7c98fc0..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/MinValidator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-//$Id: MinValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-
-/**
- * Do check a min restriction on a numeric (whether and actual number or its string representation,
- * and apply expected contraints on hibernate metadata.
- *
- * @author Gavin King
- */
-public class MinValidator implements Validator<Min>, PropertyConstraint, Serializable {
-
-	private long min;
-
-	public void initialize(Min parameters) {
-		min = parameters.value();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( value instanceof String ) {
-			try {
-				return new BigDecimal( (String) value ).compareTo( BigDecimal.valueOf(min) ) >= 0;
-			}
-			catch (NumberFormatException nfe) {
-				return false;
-			}
-		}
-		else if ( ( value instanceof Double ) || ( value instanceof Float ) ) {
-			double dv = ( (Number) value ).doubleValue();
-			return dv >= min;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( (BigInteger) value ).compareTo( BigInteger.valueOf( min ) ) >= 0;
-		}
-		else if ( value instanceof BigDecimal ) {
-			return ( (BigDecimal) value ).compareTo( BigDecimal.valueOf( min ) ) >= 0;
-		}
-		else if ( value instanceof Number ) {
-			long lv = ( (Number) value ).longValue();
-			return lv >= min;
-		}
-		else {
-			return false;
-		}
-	}
-
-	public void apply(Property property) {
-		Column col = (Column) property.getColumnIterator().next();
-		col.setCheckConstraint( col.getName() + ">=" + min );
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmpty.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmpty.java
deleted file mode 100644
index f74c3f9..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmpty.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: NotEmpty.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Check that a String is not empty (not null and length > 0)
- * or that a Collection (or array) is not empty (not null and length > 0)
- *
- * @author Emmanuel Bernard
- */
- at Documented
- at ValidatorClass(NotEmptyValidator.class)
- at Target({ElementType.METHOD, ElementType.FIELD})
- at Retention( RetentionPolicy.RUNTIME )
-public @interface NotEmpty {
-	String message() default "{validator.notEmpty}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmptyValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmptyValidator.java
deleted file mode 100644
index 37eeff1..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotEmptyValidator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-//$Id: NotEmptyValidator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.lang.reflect.Array;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Property;
-import org.hibernate.mapping.SingleTableSubclass;
-import org.hibernate.mapping.Column;
-
-/**
- * Check the non emptyness of the element
- *
- * @author Gavin King
- */
-public class NotEmptyValidator implements Validator<NotEmpty>, PropertyConstraint, Serializable {
-
-	public void initialize(NotEmpty parameters) {
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return false;
-		if ( value.getClass().isArray() ) {
-			return Array.getLength( value ) > 0;
-		}
-		else if ( value instanceof Collection ) {
-			return ( (Collection) value ).size() > 0;
-		}
-		else if ( value instanceof Map ) {
-			return ( (Map) value ).size() > 0;
-		}
-		else {
-			return ( (String) value ).length() > 0;
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	public void apply(Property property) {
-		if ( ! ( property.getPersistentClass() instanceof SingleTableSubclass )
-				&& ! ( property.getValue() instanceof Collection ) ) {
-			//single table should not be forced to null
-			if ( !property.isComposite() ) { //composite should not add not-null on all columns
-				Iterator<Column> iter = (Iterator<Column>) property.getColumnIterator();
-				while ( iter.hasNext() ) {
-					iter.next().setNullable( false );
-				}
-			}
-		}
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNull.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNull.java
deleted file mode 100644
index edcc051..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNull.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: NotNull.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * not null constraint
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(NotNullValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface NotNull {
-	String message() default "{validator.notNull}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNullValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNullValidator.java
deleted file mode 100644
index 89f05ad..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/NotNullValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-//$Id: NotNullValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-import org.hibernate.mapping.SingleTableSubclass;
-
-/**
- * Check a not null restriction on an object
- * and apply the equivalent constraint on hibernate metadata.
- *
- * @author Gavin King
- */
-public class NotNullValidator implements Validator<NotNull>, PropertyConstraint, Serializable {
-
-	public boolean isValid(Object value) {
-		return value != null;
-	}
-
-	public void initialize(NotNull parameters) {
-	}
-
-	@SuppressWarnings("unchecked")
-	public void apply(Property property) {
-		if ( ! ( property.getPersistentClass() instanceof SingleTableSubclass ) ) {
-			//single table should not be forced to null
-			if ( !property.isComposite() ) { //composite should not add not-null on all columns
-				Iterator<Column> iter = (Iterator<Column>) property.getColumnIterator();
-				while ( iter.hasNext() ) {
-					iter.next().setNullable( false );
-				}
-			}
-		}
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Past.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Past.java
deleted file mode 100644
index 14d4600..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Past.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: Past.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Check that a Date, a Calendar, or a string representation apply in the past
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(PastValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Past {
-	String message() default "{validator.past}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PastValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PastValidator.java
deleted file mode 100644
index 36ad561..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PastValidator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-//$Id: PastValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-
-/**
- * Check that a given date is in the past, and apply the same restriction
- * at the DB level
- *
- * @author Gavin King
- */
-public class PastValidator implements Validator<Past>, PropertyConstraint, Serializable {
-
-	public void initialize(Past parameters) {
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( value instanceof Date ) {
-			Date date = (Date) value;
-			return date.before( new Date() );
-		}
-		else if ( value instanceof Calendar ) {
-			Calendar cal = (Calendar) value;
-			return cal.before( Calendar.getInstance() );
-		}
-		else {
-			return false;
-		}
-	}
-
-//  ANSI SQL does not allow the use of current_date on check constraints :(
-//	public void apply(Property property) {
-//		Column col = (Column) property.getColumnIterator().next();
-//		col.setCheckConstraint( col.getName() + " < current_date" );
-//	}
-
-	//TODO Keep it here for ABI compatibility. Should be removed whe moving to Bean Validation
-	public void apply(Property property) {
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Pattern.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Pattern.java
deleted file mode 100644
index b0ebba1..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Pattern.java
+++ /dev/null
@@ -1,28 +0,0 @@
-//$Id: Pattern.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * The annotated element must follow the regexp pattern
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(PatternValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Pattern {
-	/** regular expression */
-	String regex();
-
-	/** regular expression processing flags */
-	int flags() default 0;
-
-	String message() default "{validator.pattern}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PatternValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PatternValidator.java
deleted file mode 100644
index 33e29b4..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PatternValidator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-//$Id: PatternValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.util.regex.Matcher;
-
-/**
- * check if a given element match the regular expression
- *
- * @author Gavin King
- */
-public class PatternValidator implements Validator<Pattern>, Serializable {
-
-	private java.util.regex.Pattern pattern;
-
-	public void initialize(Pattern parameters) {
-		pattern = java.util.regex.Pattern.compile(
-				parameters.regex(),
-				parameters.flags()
-		);
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( !( value instanceof String ) ) return false;
-		String string = (String) value;
-		Matcher m = pattern.matcher( string );
-		return m.matches();
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Patterns.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Patterns.java
deleted file mode 100644
index bd0d40e..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Patterns.java
+++ /dev/null
@@ -1,21 +0,0 @@
-//$Id: Patterns.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-
-/**
- * The annotated element must follow the list of regexp patterns
- *
- * @author Emmanuel Bernard
- */
- at Documented
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Patterns {
-	Pattern[] value();
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PersistentClassConstraint.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PersistentClassConstraint.java
deleted file mode 100644
index e3f06e1..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PersistentClassConstraint.java
+++ /dev/null
@@ -1,20 +0,0 @@
-//$Id: PersistentClassConstraint.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import org.hibernate.mapping.PersistentClass;
-
-/**
- * Interface implemented by the validator
- * when a constraint may be represented in the
- * hibernate metadata
- *
- * @author Gavin King
- */
-public interface PersistentClassConstraint {
-	/**
-	 * Apply the constraint in the hibernate metadata
-	 *
-	 * @param persistentClass
-	 */
-	public void apply(PersistentClass persistentClass);
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PropertyConstraint.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PropertyConstraint.java
deleted file mode 100644
index 1e3e7e3..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/PropertyConstraint.java
+++ /dev/null
@@ -1,16 +0,0 @@
-//$Id: PropertyConstraint.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import org.hibernate.mapping.Property;
-
-/**
- * Interface implemented by the validator
- * when a constraint may be represented in a
- * hibernate metadata property
- *
- * @author Gavin King
- */
-public interface PropertyConstraint {
-
-	public void apply(Property property);
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Range.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Range.java
deleted file mode 100644
index 520a46d..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Range.java
+++ /dev/null
@@ -1,27 +0,0 @@
-//$Id: Range.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * The annotated elemnt has to be in the appropriate range. Apply on numeric values or string
- * representation of the numeric value.
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(RangeValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Range {
-	long max() default Long.MAX_VALUE;
-
-	long min() default Long.MIN_VALUE;
-
-	String message() default "{validator.range}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/RangeValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/RangeValidator.java
deleted file mode 100644
index 07e7e00..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/RangeValidator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-//$Id: RangeValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Property;
-
-/**
- * The value has to be in a defined range, the constraint is also applied on DB
- *
- * @author Gavin King
- */
-public class RangeValidator implements Validator<Range>, PropertyConstraint, Serializable {
-	private long max;
-	private long min;
-
-	public void initialize(Range parameters) {
-		max = parameters.max();
-		min = parameters.min();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		if ( value instanceof String ) {
-			try {
-				BigDecimal dv = new BigDecimal( (String) value );
-				return dv.compareTo( BigDecimal.valueOf( min ) ) >= 0 && dv.compareTo( BigDecimal.valueOf( max ) ) <= 0;
-			}
-			catch (NumberFormatException nfe) {
-				return false;
-			}
-		}
-		else if ( ( value instanceof Double ) || ( value instanceof Float ) ) {
-			double dv = ( (Number) value ).doubleValue();
-			return dv >= min && dv <= max;
-		}
-		else if ( value instanceof Number ) {
-			long lv = ( (Number) value ).longValue();
-			return lv >= min && lv <= max;
-		}
-		else {
-			return false;
-		}
-	}
-
-	public void apply(Property property) {
-		Column col = (Column) property.getColumnIterator().next();
-		String check = "";
-		if ( min != Long.MIN_VALUE ) check += col.getName() + ">=" + min;
-		if ( max != Long.MAX_VALUE && min != Long.MIN_VALUE ) check += " and ";
-		if ( max != Long.MAX_VALUE ) check += col.getName() + "<=" + max;
-		col.setCheckConstraint( check );
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Size.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Size.java
deleted file mode 100644
index 97c490d..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Size.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: Size.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Size range for Arrays, Collections or Maps
- *
- * @author Gavin King
- */
- at Documented
- at ValidatorClass(SizeValidator.class)
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Size {
-	int max() default Integer.MAX_VALUE;
-
-	int min() default 0;
-
-	String message() default "{validator.size}";
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/SizeValidator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/SizeValidator.java
deleted file mode 100644
index 3f53682..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/SizeValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-//$Id: SizeValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.io.Serializable;
-import java.lang.reflect.Array;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * Check the size range according to the element
- *
- * @author Gavin King
- */
-public class SizeValidator implements Validator<Size>, Serializable {
-	private int max;
-	private int min;
-
-	public void initialize(Size parameters) {
-		max = parameters.max();
-		min = parameters.min();
-	}
-
-	public boolean isValid(Object value) {
-		if ( value == null ) return true;
-		int length;
-		if ( value.getClass().isArray() ) {
-			length = Array.getLength( value );
-		}
-		else if ( value instanceof Collection ) {
-			length = ( (Collection) value ).size();
-		}
-		else if ( value instanceof Map ) {
-			length = ( (Map) value ).size();
-		}
-		else {
-			return false;
-		}
-		return length >= min && length <= max;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Valid.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Valid.java
deleted file mode 100755
index 4e9d829..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Valid.java
+++ /dev/null
@@ -1,20 +0,0 @@
-//$Id: Valid.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Enables recursive validation of an associated object
- *
- * @author Gavin King
- */
- at Documented
- at Target({METHOD, FIELD})
- at Retention(RUNTIME)
-public @interface Valid {
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Validator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Validator.java
deleted file mode 100644
index 0f1edae..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Validator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-//$Id: Validator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Annotation;
-
-/**
- * A constraint validator for a particular annotation
- *
- * @author Gavin King
- */
-public interface Validator<A extends Annotation> {
-	/**
-	 * does the object/element pass the constraints
-	 */
-	public boolean isValid(Object value);
-
-	/**
-	 * Take the annotations values
-	 *
-	 * @param parameters
-	 */
-	public void initialize(A parameters);
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ValidatorClass.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ValidatorClass.java
deleted file mode 100644
index f6dfa55..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/ValidatorClass.java
+++ /dev/null
@@ -1,21 +0,0 @@
-//$Id: ValidatorClass.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-
-/**
- * Link between an constraint annotation and it's validator implementation
- *
- * @author Gavin King
- */
- at Documented
- at Target({ANNOTATION_TYPE})
- at Retention(RUNTIME)
-public @interface ValidatorClass {
-	Class<? extends Validator> value();
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Version.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Version.java
deleted file mode 100644
index c86ae34..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/Version.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: Version.java 15169 2008-09-10 10:53:41Z hardy.ferentschik $
-package org.hibernate.validator;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Hibernate Vaildator version
- *
- * @author Emmanuel Bernard
- */
-public class Version {
-	public static final String VERSION = "3.1.0.GA";
-	private static Logger log = LoggerFactory.getLogger( Version.class );
-
-	static {
-		log.info( "Hibernate Validator {}", VERSION );
-	}
-
-	public static void touch() {
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/JPAValidateListener.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/JPAValidateListener.java
deleted file mode 100644
index f6e6e74..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/JPAValidateListener.java
+++ /dev/null
@@ -1,65 +0,0 @@
-//$Id: JPAValidateListener.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.event;
-
-import java.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.Set;
-import java.util.HashSet;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-
-import org.hibernate.validator.ClassValidator;
-
-/**
- * Java Persistence Entity Listener that validates entities on inserts or updates
- * This listener needs ot be placed on each validatable entities
- *
- * <code>
- * @Entity
- * @EntityListeners(JPAValidateListener.class)
- * public class Submarine {
- *     @NotEmpty private String name;
- *     ...
- * }
- * </code>
- *
- * @author Emmanuel Bernard
- */
-public class JPAValidateListener {
-	//No need for weakReference if the event listener is loaded by the same CL than
-	//the entities, but in a shared env this is not the case
-	//TODO check that this can be hot redeployable
-	private static final Map<Class, WeakReference<ClassValidator>> validators;
-	private static final ClassValidator<JPAValidateListener> NO_VALIDATOR;
-	static {
-		validators = new WeakHashMap<Class, WeakReference<ClassValidator>>();
-		NO_VALIDATOR = new ClassValidator<JPAValidateListener>( JPAValidateListener.class);
-	}
-
-	//keep hardref at the instance level
-	private final Set<ClassValidator> currentValidators = new HashSet<ClassValidator>();
-
-	@PrePersist
-	@PreUpdate
-	@SuppressWarnings( "unchecked" )
-	public void onChange(Object object) {
-		if (object == null) return;
-		Class entity = object.getClass();
-		WeakReference<ClassValidator> weakValidator = validators.get(entity);
-		ClassValidator validator = weakValidator != null ? weakValidator.get() : null;
-		if ( validator == null ) {
-			//initialize
-			//TODO reuse the same reflection manager?
-			validator = new ClassValidator(entity);
-			if ( ! validator.hasValidationRules() ) {
-				validator = NO_VALIDATOR;
-			}
-			validators.put( entity, new WeakReference<ClassValidator>(validator) );
-			currentValidators.add( validator );
-		}
-		if ( validator != NO_VALIDATOR ) {
-			validator.assertValid( object );
-		}
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidateEventListener.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidateEventListener.java
deleted file mode 100644
index 35ea155..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidateEventListener.java
+++ /dev/null
@@ -1,207 +0,0 @@
-//$Id: ValidateEventListener.java 17094 2009-07-15 11:53:24Z hardy.ferentschik $
-package org.hibernate.validator.event;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.AssertionFailure;
-import org.hibernate.EntityMode;
-import org.hibernate.HibernateException;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.event.Initializable;
-import org.hibernate.event.PreInsertEvent;
-import org.hibernate.event.PreInsertEventListener;
-import org.hibernate.event.PreUpdateEvent;
-import org.hibernate.event.PreUpdateEventListener;
-import org.hibernate.mapping.Component;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.Property;
-import org.hibernate.property.Getter;
-import org.hibernate.property.PropertyAccessor;
-import org.hibernate.property.PropertyAccessorFactory;
-import org.hibernate.annotations.common.reflection.ReflectionManager;
-import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
-import org.hibernate.util.ReflectHelper;
-import org.hibernate.util.StringHelper;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.Environment;
-import org.hibernate.validator.InvalidStateException;
-import org.hibernate.validator.InvalidValue;
-import org.hibernate.validator.MessageInterpolator;
-
-/**
- * Before insert and update, executes the validator framework
- *
- * @author Emmanuel Bernard
- */
-public class ValidateEventListener implements PreInsertEventListener, PreUpdateEventListener, Initializable {
-	private boolean isInitialized;
-	private Map<Class, ValidatableElement> validators = new HashMap<Class, ValidatableElement>();
-
-	/**
-	 * initialize the validators, any non significant validators are not kept
-	 */
-	@SuppressWarnings( "unchecked" )
-	public synchronized void initialize(final Configuration cfg) {
-		if ( !isInitialized ) {
-			String interpolatorString = cfg.getProperty( Environment.MESSAGE_INTERPOLATOR_CLASS );
-			MessageInterpolator interpolator = null;
-			if ( StringHelper.isNotEmpty( interpolatorString ) ) {
-				try {
-					Class interpolatorClass = ReflectHelper.classForName( interpolatorString );
-					interpolator = (MessageInterpolator) interpolatorClass.newInstance();
-				}
-				catch (ClassNotFoundException e) {
-					throw new HibernateException( "Unable to find message interpolator: " + interpolatorString, e );
-				}
-				catch (IllegalAccessException e) {
-					throw new HibernateException( "Unable to instanciate message interpolator: " + interpolatorString,
-							e );
-				}
-				catch (InstantiationException e) {
-					throw new HibernateException( "Unable to instanciate message interpolator: " + interpolatorString,
-							e );
-				}
-				catch (ClassCastException e) {
-					throw new HibernateException( "Class does not implement "
-							+ MessageInterpolator.class.getName() + ": " + interpolatorString, e );
-				}
-			}
-			Iterator<PersistentClass> classes = (Iterator<PersistentClass>) cfg.getClassMappings();
-			ReflectionManager reflectionManager;
-			try {
-				//TODO introduce q ReflectionManagerHolder interface to avoid reflection
-				//I want to avoid hard link between HAN and Validator for usch a simple need
-				//reuse the existing reflectionManager one when possible
-				reflectionManager =
-						(ReflectionManager) cfg.getClass().getMethod( "getReflectionManager" ).invoke( cfg );
-
-			}
-			catch (Exception e) {
-				reflectionManager = new JavaReflectionManager();
-			}
-			while ( classes.hasNext() ) {
-				PersistentClass clazz = classes.next();
-				final Class mappedClass = clazz.getMappedClass();
-				ClassValidator validator =
-						new ClassValidator( mappedClass, null, interpolator, null, reflectionManager );
-				ValidatableElement element = new ValidatableElement( mappedClass, validator );
-				addSubElement( clazz.getIdentifierProperty(), element );
-				Iterator properties = clazz.getPropertyIterator();
-				while ( properties.hasNext() ) {
-					addSubElement( (Property) properties.next(), element );
-				}
-				if ( element.subElements.size() != 0 || element.validator.hasValidationRules() ) {
-					validators.put( mappedClass, element );
-				}
-			}
-			isInitialized = true;
-		}
-	}
-
-	@SuppressWarnings( "unchecked" )
-	private void addSubElement(Property property, ValidatableElement element) {
-		if ( property != null && property.isComposite() && !property.isBackRef() ) {
-			Component component = (Component) property.getValue();
-			if ( component.isEmbedded() ) return;
-			PropertyAccessor accessor = PropertyAccessorFactory.getPropertyAccessor( property, EntityMode.POJO );
-			Getter getter = accessor.getGetter( element.clazz, property.getName() );
-			ClassValidator validator = new ClassValidator( getter.getReturnType() );
-			ValidatableElement subElement = new ValidatableElement( getter.getReturnType(), validator, getter );
-			Iterator properties = component.getPropertyIterator();
-			while ( properties.hasNext() ) {
-				addSubElement( (Property) properties.next(), subElement );
-			}
-			if ( subElement.getSubElements().size() != 0 || subElement.validator.hasValidationRules() ) {
-				element.addSubElement( subElement );
-			}
-		}
-	}
-
-	@SuppressWarnings( "unchecked" )
-	protected void validate(Object entity, EntityMode mode) {
-		if ( entity == null || !EntityMode.POJO.equals( mode ) ) return;
-		ValidatableElement element;
-		if ( isInitialized ) {
-			element = validators.get( entity.getClass() );
-		}
-		else {
-			throw new AssertionFailure( "Validator event not initialized" );
-		}
-		if ( element == null ) return; //no validation to do
-		List<InvalidValue> consolidatedInvalidValues = new ArrayList<InvalidValue>();
-		validateSubElements( element, entity, consolidatedInvalidValues );
-		InvalidValue[] invalidValues = element.validator == null ?
-				null :
-				element.validator.getInvalidValues( entity );
-		if ( invalidValues != null ) {
-			for ( InvalidValue invalidValue : invalidValues ) {
-				consolidatedInvalidValues.add( invalidValue );
-			}
-		}
-		if ( consolidatedInvalidValues.size() > 0 ) {
-			throw new InvalidStateException(
-					consolidatedInvalidValues.toArray( new InvalidValue[consolidatedInvalidValues.size()] ),
-					entity.getClass().getName()
-			);
-		}
-	}
-
-	@SuppressWarnings( "unchecked" )
-	private void validateSubElements(
-			ValidatableElement element, Object entity, List<InvalidValue> consolidatedInvalidValues
-	) {
-		if ( element != null ) {
-			for ( ValidatableElement subElement : element.subElements ) {
-				Object component = subElement.getter.get( entity );
-				InvalidValue[] invalidValues = subElement.validator.getInvalidValues( component );
-				for ( InvalidValue invalidValue : invalidValues ) {
-					consolidatedInvalidValues.add( invalidValue );
-				}
-				validateSubElements( subElement, component, consolidatedInvalidValues );
-			}
-		}
-	}
-
-	@SuppressWarnings({ "deprecation" })
-	public boolean onPreInsert(PreInsertEvent event) {
-		validate( event.getEntity(), event.getSource().getEntityMode() );
-		return false;
-	}
-
-	@SuppressWarnings({ "deprecation" })
-	public boolean onPreUpdate(PreUpdateEvent event) {
-		validate( event.getEntity(), event.getSource().getEntityMode() );
-		return false;
-	}
-
-	private static class ValidatableElement implements Serializable {
-		private Class clazz;
-		private ClassValidator validator;
-		private Getter getter;
-		private Collection<ValidatableElement> subElements = new ArrayList<ValidatableElement>();
-
-		public ValidatableElement(Class clazz, ClassValidator validator) {
-			this.clazz = clazz;
-			this.validator = validator;
-		}
-
-		public ValidatableElement(Class clazz, ClassValidator validator, Getter getter) {
-			this( clazz, validator );
-			this.getter = getter;
-		}
-
-		public void addSubElement(ValidatableElement subValidatableElement) {
-			subElements.add( subValidatableElement );
-		}
-
-		public Collection<ValidatableElement> getSubElements() {
-			return this.subElements;
-		}
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreInsertEventListener.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreInsertEventListener.java
deleted file mode 100644
index f610e4e..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreInsertEventListener.java
+++ /dev/null
@@ -1,13 +0,0 @@
-//$Id: ValidatePreInsertEventListener.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.event;
-
-/**
- * Before insert, execute the validator framework
- *
- * @deprecated use ValidateEventListener
- * 
- * @author Gavin King
- */
-public class ValidatePreInsertEventListener extends ValidateEventListener {
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreUpdateEventListener.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreUpdateEventListener.java
deleted file mode 100644
index ff82afc..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/event/ValidatePreUpdateEventListener.java
+++ /dev/null
@@ -1,13 +0,0 @@
-//$Id: ValidatePreUpdateEventListener.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.event;
-
-/**
- * Before update, execute the validator framework
- *
- * @deprecated use ValidateEventListener
- *
- * @author Gavin King
- */
-public class ValidatePreUpdateEventListener extends ValidateEventListener {
-
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java
deleted file mode 100644
index 50446ad..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java
+++ /dev/null
@@ -1,135 +0,0 @@
-//$Id: DefaultMessageInterpolator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.interpolator;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-
-import org.hibernate.util.StringHelper;
-import org.hibernate.validator.MessageInterpolator;
-import org.hibernate.validator.Validator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Resource bundle based interpolator
- * Also interpolate annotation parameters inside the message
- *
- * @author Emmanuel Bernard
- */
-public class DefaultMessageInterpolator implements MessageInterpolator, Serializable {
-	private static final Logger log = LoggerFactory.getLogger( DefaultMessageInterpolator.class );
-	private Map<String, Object> annotationParameters = new HashMap<String, Object>();
-	private transient ResourceBundle messageBundle;
-	private transient ResourceBundle defaultMessageBundle;
-	private String annotationMessage;
-	private String interpolateMessage;
-
-	//not an interface method
-	public void initialize(ResourceBundle messageBundle, ResourceBundle defaultMessageBundle) {
-		this.messageBundle = messageBundle;
-		this.defaultMessageBundle = defaultMessageBundle;
-	}
-
-	public void initialize(Annotation annotation, MessageInterpolator defaultInterpolator) {
-		Class clazz = annotation.getClass();
-		for ( Method method  : clazz.getMethods() ) {
-			try {
-				//FIXME remove non serilalization elements on writeObject?
-				if ( method.getReturnType() != void.class
-						&& method.getParameterTypes().length == 0
-						&& ! Modifier.isStatic( method.getModifiers() ) ) {
-					//cannot use an exclude list because the parameter name could match a method name
-					annotationParameters.put( method.getName(), method.invoke( annotation ) );
-				}
-			}
-			catch (IllegalAccessException e) {
-				//really should not happen, but we degrade nicely
-				log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(), method.getName() ) );
-			}
-			catch (InvocationTargetException e) {
-				//really should not happen, but we degrade nicely
-				log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(), method.getName() ) );
-			}
-		}
-		annotationMessage = (String) annotationParameters.get( "message" );
-		if (annotationMessage == null) {
-			throw new IllegalArgumentException( "Annotation " + clazz + " does not have an (accessible) message attribute");
-		}
-		//do not resolve the property eagerly to allow validator.apply to work wo interpolator
-    }
-
-	private String replace(String message) {
-		StringTokenizer tokens = new StringTokenizer( message, "#{}", true );
-		StringBuilder buf = new StringBuilder( 30 );
-		boolean escaped = false;
-		boolean el = false;
-		while ( tokens.hasMoreTokens() ) {
-			String token = tokens.nextToken();
-			if ( !escaped && "#".equals( token ) ) {
-				el = true;
-			}
-			if ( !el && "{".equals( token ) ) {
-				escaped = true;
-			}
-			else if ( escaped && "}".equals( token ) ) {
-				escaped = false;
-			}
-			else if ( !escaped ) {
-				if ( "{".equals( token ) ) el = false;
-				buf.append( token );
-			}
-			else {
-				Object variable = annotationParameters.get( token );
-				if ( variable != null ) {
-					buf.append( variable );
-				}
-				else {
-					String string = null;
-					try {
-						string = messageBundle != null ? messageBundle.getString( token ) : null;
-					}
-					catch( MissingResourceException e ) {
-						//give a second chance with the default resource bundle
-					}
-					if (string == null) {
-						try {
-							string = defaultMessageBundle.getString( token );
-						}
-						catch( MissingResourceException e) {
-                            //return the unchanged string
-                            buf.append('{').append(token).append('}');
-						}
-					}
-					if ( string != null ) buf.append( replace( string ) );
-				}
-			}
-		}
-		return buf.toString();
-	}
-
-	public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
-		if ( annotationMessage.equals( message ) ) {
-			//short cut
-            if (interpolateMessage == null) {
-                interpolateMessage = replace( annotationMessage );
-            }
-            return interpolateMessage;
-		}
-		else {
-			//TODO keep them in a weak hash map, but this might not even be useful
-			return replace( message );
-		}
-	}
-
-	public String getAnnotationMessage() {
-		return annotationMessage;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java b/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java
deleted file mode 100644
index 043d0b5..0000000
--- a/hibernate-validator-legacy/src/main/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-//$Id: DefaultMessageInterpolatorAggregator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.interpolator;
-
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.io.Serializable;
-
-import org.hibernate.validator.MessageInterpolator;
-import org.hibernate.validator.Validator;
-import org.hibernate.AssertionFailure;
-
-/**
- * @author Emmanuel Bernard
- */
-public class DefaultMessageInterpolatorAggregator implements MessageInterpolator, Serializable {
-	private transient Map<Validator, DefaultMessageInterpolator> interpolators = new HashMap<Validator, DefaultMessageInterpolator>();
-	//transient but repopulated by the object owing a reference to the interpolator
-	private transient ResourceBundle messageBundle;
-	//transient but repopulated by the object owing a reference to the interpolator
-	private transient ResourceBundle defaultMessageBundle;
-
-	//not an interface method
-	public void initialize(ResourceBundle messageBundle, ResourceBundle defaultMessageBundle) {
-		this.messageBundle = messageBundle;
-		this.defaultMessageBundle = defaultMessageBundle;
-		//useful when we deserialize
-		for ( DefaultMessageInterpolator interpolator : interpolators.values() ) {
-			interpolator.initialize( messageBundle, defaultMessageBundle );
-		}
-	}
-
-	public void addInterpolator(Annotation annotation, Validator validator) {
-		DefaultMessageInterpolator interpolator = new DefaultMessageInterpolator();
-		interpolator.initialize(messageBundle, defaultMessageBundle );
-		interpolator.initialize( annotation, null );
-		interpolators.put( validator, interpolator );
-	}
-
-	public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
-		DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
-		if (defaultMessageInterpolator == null) {
-			return message;
-		}
-		else {
-			return defaultMessageInterpolator.interpolate( message, validator, defaultInterpolator );
-		}
-	}
-
-	public String getAnnotationMessage(Validator validator) {
-		DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
-		String message = defaultMessageInterpolator != null ? defaultMessageInterpolator.getAnnotationMessage() : null;
-		if (message == null) throw new AssertionFailure("Validator not registred to the messageInterceptorAggregator");
-		return message;
-	}
-}
diff --git a/hibernate-validator-legacy/src/main/javadoc/stylesheet.css b/hibernate-validator-legacy/src/main/javadoc/stylesheet.css
deleted file mode 100644
index 819d52f..0000000
--- a/hibernate-validator-legacy/src/main/javadoc/stylesheet.css
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Javadoc style sheet */
-
-/* Define colors, fonts and other style attributes here to override the defaults  */
-
-/* Page background color */
-body { 	font-family: Arial;
-	background-color: white;
-	font-size: 10pt;
- }
-td { 	font-family: Arial;
-	font-size: 10pt;
- }
-/* Table colors */
-.TableHeadingColor     { background: #F4F4F4 }
-.TableSubHeadingColor  { background: #F4F4F4 }
-.TableRowColor         { background: #FFFFFF }
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Arial }
-.FrameHeadingFont { font-size: normal; font-family: Arial }
-.FrameItemFont    { font-size: normal; font-family: Arial }
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-.NavBarCell1    { background-color:#F4F4F4;}
-.NavBarCell1Rev { background-color:silver;}
-
-.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-A {
-    color: #003399;
-}
-
-A:active {
-    color: #003399;
-}
-
-A:visited {
-    color: #888888;
-}
-
-P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
-    color: #000000;
-}
-
-TD, TH, SPAN {
-    color: #000000;
-}
-
-BLOCKQUOTE {
-    margin-right: 0px;
-}
-
-
-/*H1, H2, H3, H4, H5, H6    {
-    color: #000000;
-    font-weight:500;
-    margin-top:10px;
-    padding-top:15px;
-}
-
-H1 { font-size: 150%; }
-H2 { font-size: 140%; }
-H3 { font-size: 110%; font-weight: bold; }
-H4 { font-size: 110%; font-weight: bold;}
-H5 { font-size: 100%; font-style: italic; }
-H6 { font-size: 100%; font-style: italic; }*/
-
-TT {
-font-size: 90%;
-    font-family: "Courier New", Courier, monospace;
-    color: #000000;
-}
-
-PRE {
-font-size: 90%;
-    padding: 5px;
-    border-style: solid;
-    border-width: 1px;
-    border-color: #CCCCCC;
-    background-color: #F4F4F4;
-}
-
-UL, OL, LI {
-    list-style: disc;
-}
-
-HR  {
-    width: 100%;
-    height: 1px;
-    background-color: #CCCCCC;
-    border-width: 0px;
-    padding: 0px;
-    color: #CCCCCC;
-}
-
-.variablelist { 
-    padding-top: 10; 
-    padding-bottom:10; 
-    margin:0;
-}
-
-.itemizedlist, UL { 
-    padding-top: 0; 
-    padding-bottom:0; 
-    margin:0; 
-}
-
-.term { 
-    font-weight:bold;
-}
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages.properties
deleted file mode 100644
index b9c3c21..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=assertion failed
-validator.assertTrue=assertion failed
-validator.future=must be a future date
-validator.length=length must be between {min} and {max}
-validator.max=must be less than or equal to {value}
-validator.min=must be greater than or equal to {value}
-validator.notNull=may not be null
-validator.past=must be a past date
-validator.pattern=must match "{regex}"
-validator.range=must be between {min} and {max}
-validator.size=size must be between {min} and {max}
-validator.email=not a well-formed email address
-validator.notEmpty=may not be null or empty
-validator.digits=Numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.creditCard=Invalid credit card number
-validator.ean=Invalid EAN
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_cs.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_cs.properties
deleted file mode 100644
index 470483e..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_cs.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=p\u0159edpoklad neplat\u00ed
-validator.assertTrue=p\u0159edpoklad neplat\u00ed
-validator.future=mus\u00ed b\u00fdt datum v budoucnosti
-validator.length=d\u00e9lka mus\u00ed b\u00fdt mezi {min} a {max}
-validator.max=mus\u00ed b\u00fdt men\u0161\u00ed nebo rovno {value}
-validator.min=mus\u00e1 b\u00fdt men\u0161\u00ed nebo rovno {value}
-validator.notNull=nesm\u00ed b\u00fdt pr\u00e1zdn\u00e9
-validator.past=mus\u00ed b\u00fdt datum v minulosti
-validator.pattern=mus\u00ed odpov\u00eddat "{regex}"
-validator.range=mus\u00ed b\u00fdt v rozmez\u00ed od {min} do {max}
-validator.size=d\u00e9lka mus\u00ed b\u00fdt mezi {min} a {max}
-validator.email=nen\u00ed spr\u00e1vn\u011b zapsan\u00e1 emailov\u00e1 adresa
-validator.notEmpty=nesm\u00ed b\u00fdt pr\u00e1zdn\u00e9
-validator.digits=\u010c\u00edseln\u00e1 hodnota je mimo rozsah (o\u010dek\u00e1v\u00e1no <{integerDigits} \u010d\u00edsel>,<{fractionalDigits} \u010d\u00edsel>)
-validator.creditCard=Nen\u00ed platn\u00e9 \u010d\u00edslo kreditn\u00ed karty
-validator.ean=Nen\u00ed platn\u00e9 EAN
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_da.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_da.properties
deleted file mode 100644
index afaa728..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_da.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=assertion fejlet
-validator.assertTrue=assertion fejlet
-validator.future=skal v�re en fremtidig dato
-validator.length=l�ngden skal v�re mellem {min} og {max}
-validator.max=skal v�re mindre end eller lig med {value}
-validator.min=skal v�re st�rre end eller lig med {value}
-validator.notNull=m� ikke v�re null
-validator.past=skal v�re en passeret dato
-validator.pattern=skal matche "{regex}"
-validator.range=skal v�re mellem {min} og {max}
-validator.size=antallet skal v�re mellem {min} og {max}
-validator.email=not a well-formed email address
-validator.notEmpty=m� ikke v�re null eller tom
-validator.digits=V�rdien er ikke inden for det forventede (<{integerDigits} heltal>.<{fractionalDigits} decimaler>)
-validator.ean=Ukorrekt EAN
-validator.creditCard=Ukorrekt kreditkort nummer
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_de.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_de.properties
deleted file mode 100644
index 1e03d70..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_de.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=nicht garantiert
-validator.assertTrue=garantiert
-validator.future=muss in der Zukunft liegen
-validator.length=muss zwischen {min} und {max} lang sein
-validator.max=muss weniger oder gleich {value} sein
-validator.min=muss mehr oder gleich {value} sein
-validator.notNull=kann nicht leer sein
-validator.past=muss in der Vergangenheit liegen
-validator.pattern=muss Ausdruck "{regex}" entsprechen
-validator.range=muss zwischen {min} und {max} sein
-validator.size=muss zwischen {min} und {max} gross sein
-validator.email=not a well-formed email address
-validator.notEmpty=kann nicht null oder leer sein
-validator.digits=numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.ean=invalid EAN
-validator.creditCard=Ung�ltige Kreditkartennummer
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_en.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_en.properties
deleted file mode 100644
index b9c3c21..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_en.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=assertion failed
-validator.assertTrue=assertion failed
-validator.future=must be a future date
-validator.length=length must be between {min} and {max}
-validator.max=must be less than or equal to {value}
-validator.min=must be greater than or equal to {value}
-validator.notNull=may not be null
-validator.past=must be a past date
-validator.pattern=must match "{regex}"
-validator.range=must be between {min} and {max}
-validator.size=size must be between {min} and {max}
-validator.email=not a well-formed email address
-validator.notEmpty=may not be null or empty
-validator.digits=Numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.creditCard=Invalid credit card number
-validator.ean=Invalid EAN
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_es.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_es.properties
deleted file mode 100644
index 44ae220..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_es.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=aserci�n fallida
-validator.assertTrue=aserci�n fallida
-validator.future=debe ser una fecha futura
-validator.length=la longitud debe ser entre {min} y {max}
-validator.max=debe ser menor o igual a {value}
-validator.min=debe ser mayor o igual a {value}
-validator.notNull=no puede ser nula
-validator.past=debe ser una fecha pasada
-validator.pattern=debe corresponder a "{regex}"
-validator.range=debe ser entre {min} y {max}
-validator.size=el tama�o debe ser entre {min} y {max}
-validator.email=no es una direcci�n de correo electr�nico bien formada
-validator.notEmpty=no debe ser nulo o vac�o
-validator.digits=valor num�rico fuera de los l�mites (se esperaba <{integerDigits} d�gitos>.<{fractionalDigits} d�gitos>)
-validator.ean=EAN inv�lido
-validator.creditCard=n�mero de tarjeta de cr�dito inv�lido
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_fr.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_fr.properties
deleted file mode 100644
index ab87851..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_fr.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=l'assertion a �chou�
-validator.assertTrue=l'assertion a �chou�
-validator.future=doit �tre dans le futur
-validator.length=la longueur doit �tre entre {min} et {max}
-validator.max=doit �tre inf�rieur ou �gal � {value}
-validator.min=doit �tre sup�rieur ou �gal � {value}
-validator.notNull=ne peut pas �tre nul
-validator.past=doit �tre dans le pass�
-validator.pattern=doit suivre "{regex}"
-validator.range=doit �tre entre {min} et {max}
-validator.size=le nombre d'�l�ments doit �tre entre {min} et {max}
-validator.email=Address email mal form�e
-validator.notEmpty=ne peut pas �tre nul ou vide
-validator.digits=Valeur num�rique hors limite (<{integerDigits} chiffres>.<{fractionalDigits} chiffres> attendus)
-validator.ean=EAN invalide
-validator.creditCard=Num�ro de carte de cr�dit invalide
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_it.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_it.properties
deleted file mode 100644
index 0345213..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_it.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=asserzione fallita
-validator.assertTrue=asserzione fallita
-validator.future=deve essere una data futura
-validator.length=la lunghezza deve essere tra {min} e {max}
-validator.max=deve essere minore o uguale a {value}
-validator.min=deve essere maggiore o uguale a {value}
-validator.notNull=non pu� essere nullo
-validator.past=deve essere una data nel passato
-validator.pattern=deve corrispondere a "{regex}"
-validator.range=deve essere tra {min} e {max}
-validator.size=le dimensioni devono essere tra {min} e {max}
-validator.email=not a well-formed email address
-validator.notEmpty=non pu� essere nullo o vuoto
-validator.digits=Valore numerico fuori dai limiti (atteso <{integerDigits} cifre>.<{fractionalDigits} cifre>)
-validator.ean=EAN invalido
-validator.creditCard=invalid credit card number
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_ja.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_ja.properties
deleted file mode 100644
index 942373e..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_ja.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-validator.assertTrue=\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-validator.future=\u672a\u6765\u306e\u65e5\u4ed8\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.length={min}\u6587\u5b57\u304b\u3089{max}\u6587\u5b57\u307e\u3067\u306e\u9577\u3055\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.max={value}\u4ee5\u4e0b\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.min={value}\u4ee5\u4e0a\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.notNull=null\u306e\u72b6\u614b\u306f\u8a31\u3055\u308c\u307e\u305b\u3093
-validator.past=\u904e\u53bb\u306e\u65e5\u4ed8\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.pattern="{regex}"\u306b\u30de\u30c3\u30c1\u3055\u305b\u3066\u304f\u3060\u3055\u3044
-validator.range={min}\u4ee5\u4e0a\u3001{max}\u4ee5\u4e0b\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.size={min}\u304b\u3089{max}\u307e\u3067\u306e\u30b5\u30a4\u30ba\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
-validator.email=\u96fb\u5b50\u30e1\u30fc\u30eb\u306e\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u3068\u3057\u3066\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093
-validator.notEmpty=null\u3084\u7a7a\u306e\u72b6\u614b\u306f\u8a31\u3055\u308c\u307e\u305b\u3093
-validator.digits=\u7bc4\u56f2\u5916\u306e\u6570\u5024\u3067\u3059(<{integerDigits}\u6841>.<{fractionalDigits}\u6841>\u307e\u3067\u306e\u6841\u6570\u304c\u8a31\u5bb9\u3055\u308c\u3066\u3044\u307e\u3059)
-validator.creditCard=\u7121\u52b9\u306a\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u3067\u3059
-validator.ean=\u7121\u52b9\u306aJAN\u30b3\u30fc\u30c9\u3067\u3059
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_mn_MN.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_mn_MN.properties
deleted file mode 100644
index 9421a01..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_mn_MN.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=\u0411\u0430\u0442\u0430\u043B\u0433\u0430\u0430\u0436\u0443\u0443\u043B\u0430\u043B\u0442 \u0430\u043C\u0436\u0438\u043B\u0442\u0433\u04AF\u0439 \u0431\u043E\u043B\u043B\u043E\u043E
-validator.assertTrue=\u0411\u0430\u0442\u0430\u043B\u0433\u0430\u0430\u0436\u0443\u0443\u043B\u0430\u043B\u0442 \u0430\u043C\u0436\u0438\u043B\u0442\u0433\u04AF\u0439 \u0431\u043E\u043B\u043B\u043E\u043E
-validator.future={value}-\u0441 \u0445\u043E\u0439\u0448\u0438\u0445 \u043E\u0433\u043D\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430 \u0443\u0443
-validator.length=\u0422\u044D\u043C\u0434\u044D\u0433\u0442\u0438\u0439\u043D \u0443\u0440\u0442 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
-validator.max=\u0422\u044D\u043C\u0434\u044D\u0433\u0442\u0438\u0439\u043D \u0443\u0440\u0442 {value}-\u0441 \u0438\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430
-validator.min=\u0422\u044D\u043C\u0434\u044D\u0433\u0442\u0438\u0439\u043D \u0443\u0440\u0442 {value}-\u0441 \u0431\u0430\u0433\u0430\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430
-validator.notNull=\u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
-validator.past={value}-\u0441 \u04E9\u043C\u043D\u04E9\u0445 \u043E\u0433\u043D\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430 \u0443\u0443
-validator.pattern="{regex}"-\u0434 \u0442\u0430\u0430\u0440\u0430\u0445 \u0451\u0441\u0442\u043E\u0439
-validator.range=\u0423\u0442\u0433\u0430 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
-validator.size=\u0425\u044D\u043C\u0436\u044D\u044D {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
-validator.email=\u0411\u0443\u0440\u0443\u0443 \u0438-\u043C\u044D\u0439\u043B \u0445\u0430\u044F\u0433 \u0431\u0430\u0439\u043D\u0430
-validator.notEmpty=\u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
-validator.digits=\u0422\u043E\u043E\u043D\u044B \u0445\u044F\u0437\u0433\u0430\u0430\u0440\u0430\u0430\u0441 \u0445\u044D\u0442\u044D\u0440\u0441\u044D\u043D \u0431\u0430\u0439\u043D\u0430 (<{integerDigits} digits>.<{fractionalDigits} digits>)
-validator.creditCard=\u041A\u0440\u0435\u0434\u0438\u0442 \u043A\u0430\u0440\u0442\u044B\u043D \u0434\u0443\u0433\u0430\u0430\u0440 \u0431\u0443\u0440\u0443\u0443 \u0431\u0430\u0439\u043D\u0430
-validator.ean=\u0411\u0443\u0440\u0443\u0443 EAN \u043A\u043E\u0434 \u0431\u0430\u0439\u043D\u0430
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_nl.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_nl.properties
deleted file mode 100644
index 69263cf..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_nl.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=is niet geldig
-validator.assertTrue=is niet geldig
-validator.future=moet een datum in de toekomst zijn
-validator.length=moet tussen {min} en {max} lang zijn
-validator.max=moet kleiner of gelijk aan {value} zijn
-validator.min=moet groter of gelijk aan {value} zijn
-validator.notNull=mag niet leeg zijn
-validator.past=moet een datum in het verleden zijn
-validator.pattern=moet overeenkomen met "{regex}"
-validator.range=moet tussen {min} en {max} zijn
-validator.size=moet tussen {min} en {max} groot zijn
-validator.email=moet een geldig e-mail adres zijn
-validator.notEmpty=mag niet null of leeg zijn
-validator.digits=numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.ean=invalid EAN
-validator.creditCard=invalid credit card number
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_pt_BR.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_pt_BR.properties
deleted file mode 100644
index 64266b2..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_pt_BR.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=asser��o falhou
-validator.assertTrue=asser��o falhou
-validator.future=deve ser uma data no futuro
-validator.length=tamanho deve estar entre {min} e {max}
-validator.max=deve ser menor ou igual a {value}
-validator.min=deve ser maior ou igual a {value}
-validator.notNull=n�o pode ser nulo
-validator.past=deve ser uma data no passado
-validator.pattern=deve ser v�lida de acordo com a express�o "{regex}"
-validator.range=deve estar entre {min} e {max}
-validator.size=tamanho deve estar entre {min} e {max}
-validator.email=n�o � um email v�lido
-validator.notEmpty=n�o pode ser nulo ou vazio 
-validator.digits=Valor num�rico fora do padr�o (esperado <{integerDigits}> d�gitos,<{fractionalDigits} d�gitos)
-validator.ean=EAN inv�lido
-validator.creditCard=N�mero inv�lido de cart�o de cr�dito
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_sv.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_sv.properties
deleted file mode 100644
index 95eaefc..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_sv.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=Felaktigt p�st�ende
-validator.assertTrue=Felaktigt p�st�ende
-validator.future=m�ste vara ett datum fram i tiden
-validator.length=m�ste vara mellan {min} och {max} tecken
-validator.max=f�r vara max {value}
-validator.min=m�ste vara minst {value}
-validator.notNull=f�r inte vara tomt
-validator.past=m�ste vara ett datum bak�t i tiden
-validator.pattern=m�ste matcha "{regex}"
-validator.range=m�ste vara mellan {min} och {max}
-validator.size=storlek m�ste vara mellan {min} och {max}
-validator.email=ogiltig e-mail adress
-validator.notEmpty=f�r inte vara tomt
-validator.digits=numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.ean=invalid EAN
-validator.creditCard=invalid credit card number
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_CN.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_CN.properties
deleted file mode 100644
index 1cf64b3..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_CN.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=\u9a8c\u8bc1\u5931\u8d25
-validator.assertTrue=\u9a8c\u8bc1\u5931\u8d25
-validator.future=\u5fc5\u987b\u8fdf\u4e8e\u4eca\u65e5
-validator.length=\u957f\u5ea6\u5fc5\u987b\u4ecb\u4e8e {min} \u4e0e {max} \u4e4b\u95f4
-validator.max=\u5fc5\u987b\u5c0f\u4e8e\u7b49\u4e8e {value}
-validator.min=\u5fc5\u987b\u5927\u4e8e\u7b49\u4e8e {value}
-validator.notNull=\u4e0d\u80fd\u4e3a\u7a7a
-validator.past=\u5fc5\u987b\u65e9\u4e8e\u4eca\u65e5
-validator.pattern=\u5fc5\u987b\u7b26\u5408 "{regex}"
-validator.range=\u5fc5\u987b\u4ecb\u4e8e {min} \u4e0e {max} \u4e4b\u95f4
-validator.size=\u5927\u5c0f\u5fc5\u987b\u4ecb\u4e8e {min} \u4e0e {max} \u4e4b\u95f4
-validator.email=not a well-formed email address
-validator.notEmpty=may not be null or empty
-validator.digits=numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.ean=invalid EAN
-validator.creditCard=invalid credit card number
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_TW.properties b/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_TW.properties
deleted file mode 100644
index f4f135c..0000000
--- a/hibernate-validator-legacy/src/main/resources/org/hibernate/validator/resources/DefaultValidatorMessages_zh_TW.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-validator.assertFalse=\u9a57\u8b49\u5931\u6557
-validator.assertTrue=\u9a57\u8b49\u5931\u6557
-validator.future=\u5fc5\u9808\u9072\u4e8e\u4eca\u65e5
-validator.length=\u9577\u5ea6\u5fc5\u9808\u4ecb\u65bc {min} \u8207 {max} \u4e4b\u9593
-validator.max=\u5fc5\u9808\u5c0f\u4e8e\u6216\u7b49\u65bc{value}
-validator.min=\u5fc5\u9808\u5927\u4e8e\u6216\u7b49\u65bc{value}
-validator.notNull=\u5fc5\u9808\u586b\u5beb
-validator.past=\u5fc5\u9808\u65e9\u4e8e\u4eca\u65e5
-validator.pattern=\u5fc5\u9808\u7b26\u5408"{regex}"
-validator.range=\u5fc5\u9808\u4ecb\u65bc{min} \u8207 {max} \u4e4b\u9593
-validator.size=\u5927\u5c0f\u5fc5\u9808\u4ecb\u65bc{min} \u8207 {max} \u4e4b\u9593
-validator.email=not a well-formed email address
-validator.digits=numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)
-validator.notEmpty=may not be null or empty
-validator.ean=invalid EAN
-validator.creditCard=invalid credit card number
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Address.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Address.java
deleted file mode 100644
index 3c825ec..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Address.java
+++ /dev/null
@@ -1,102 +0,0 @@
-//$Id: Address.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.AssertTrue;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.Min;
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Pattern;
-import org.hibernate.validator.Range;
-import org.hibernate.validator.Max;
-
-/**
- * @author Gavin King
- */
-public class Address {
-	@NotNull
-	public static String blacklistedZipCode;
-
-	private String line1;
-	private String line2;
-	private String zip;
-	private String state;
-	@Length(max = 20)
-	@NotNull
-	private String country;
-	private long id;
-	private boolean internalValid = true;
-	@Range(min = -2, max = 50, message = "{floor.out.of.range} (escaping #{el})")
-   @Max(70)
-   public int floor;
-
-	public String getCountry() {
-		return country;
-	}
-
-	public void setCountry(String country) {
-		this.country = country;
-	}
-
-	@NotNull
-	public String getLine1() {
-		return line1;
-	}
-
-	public void setLine1(String line1) {
-		this.line1 = line1;
-	}
-
-	public String getLine2() {
-		return line2;
-	}
-
-	public void setLine2(String line2) {
-		this.line2 = line2;
-	}
-
-	@Length(max = 3)
-	@NotNull
-	public String getState() {
-		return state;
-	}
-
-	public void setState(String state) {
-		this.state = state;
-	}
-
-	@Length(max = 5, message = "{long}")
-	@Pattern(regex = "[0-9]+")
-	@NotNull
-	public String getZip() {
-		return zip;
-	}
-
-	public void setZip(String zip) {
-		this.zip = zip;
-	}
-
-	@AssertTrue
-	public boolean isValid() {
-		return true;
-	}
-
-	@AssertTrue
-	private boolean isInternalValid() {
-		return internalValid;
-	}
-
-	public void setInternalValid(boolean internalValid) {
-		this.internalValid = internalValid;
-	}
-
-	@Min(1)
-	@Range(max = 2000)
-	public long getId() {
-		return id;
-	}
-
-	public void setId(long id) {
-		this.id = id;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/AssertTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/AssertTest.java
deleted file mode 100644
index 1971883..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/AssertTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id: AssertTest.java 15111 2008-08-19 10:16:17Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-import org.hibernate.validator.AssertTrueValidator;
-import org.hibernate.validator.AssertFalseValidator;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/**
- * Test cases for <code>AssertFalse</code> and <code>AssertTrue</code>.
- *
- * @author Hardy Ferentschik
- * @see HV-53
- */
-public class AssertTest extends TestCase {
-    ClassValidator<BooleanHolder> classValidator;
-
-    public void setUp() throws Exception {
-        classValidator = new ClassValidator<BooleanHolder>(
-                BooleanHolder.class, ResourceBundle.getBundle("messages", Locale.ENGLISH)
-        );
-    }
-
-    public void testSuccessfulValidation() throws Exception {
-        BooleanHolder bholder = new BooleanHolder();
-        bholder.setMustBeTrue(true);
-        bholder.setMustBeFalse(false);
-        InvalidValue[] invalidValues = classValidator.getInvalidValues(bholder);
-        assertTrue("should be empty", invalidValues.length == 0);
-    }
-
-    public void testUnSuccessfulValidation() throws Exception {
-        BooleanHolder bholder = new BooleanHolder();
-        bholder.setMustBeTrue(false);
-        bholder.setMustBeFalse(true);
-        InvalidValue[] invalidValues = classValidator.getInvalidValues(bholder);
-        assertTrue("should be empty", invalidValues.length == 2);
-    }
-
-    public void testNullValidation() throws Exception {
-        BooleanHolder bholder = new BooleanHolder();
-        bholder.setMustBeTrue(null);
-        bholder.setMustBeFalse(null);
-        InvalidValue[] invalidValues = classValidator.getInvalidValues(bholder);
-        assertTrue("should be empty", invalidValues.length == 0);
-    }
-
-    public void testNonBooleanValidation() throws Exception {
-        AssertTrueValidator trueValidator = new AssertTrueValidator();
-        assertFalse(trueValidator.isValid("foo"));
-
-        AssertFalseValidator falseValidator = new AssertFalseValidator();
-        assertFalse(falseValidator.isValid("foo"));
-    }
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/BooleanHolder.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/BooleanHolder.java
deleted file mode 100644
index e355fd7..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/BooleanHolder.java
+++ /dev/null
@@ -1,32 +0,0 @@
-//$Id: BooleanHolder.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.AssertFalse;
-import org.hibernate.validator.AssertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class BooleanHolder {
-    @AssertTrue
-    private Boolean mustBeTrue;
-
-    @AssertFalse
-    private Boolean mustBeFalse;
-
-    public Boolean getMustBeTrue() {
-        return mustBeTrue;
-    }
-
-    public void setMustBeTrue(Boolean mustBeTrue) {
-        this.mustBeTrue = mustBeTrue;
-    }
-
-    public Boolean getMustBeFalse() {
-        return mustBeFalse;
-    }
-
-    public void setMustBeFalse(Boolean mustBeFalse) {
-        this.mustBeFalse = mustBeFalse;
-    }
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Brother.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Brother.java
deleted file mode 100644
index b55048c..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Brother.java
+++ /dev/null
@@ -1,61 +0,0 @@
-//$Id: Brother.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Brother {
-	private String name;
-	private Brother elder;
-	private Brother youngerBrother;
-	@NotNull
-	@Valid
-	private Address address;
-
-	@NotNull
-	public String getName() {
-		return name;
-	}
-
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Valid
-	public Brother getElder() {
-		return elder;
-	}
-
-	public void setElder(Brother elder) {
-		this.elder = elder;
-	}
-
-	@Valid
-	public Brother getYoungerBrother() {
-		return youngerBrother;
-	}
-
-	public void setYoungerBrother(Brother youngerBrother) {
-		this.youngerBrother = youngerBrother;
-	}
-
-	public Address getAddress() {
-		return address;
-	}
-
-	public void setAddress(Address address) {
-		this.address = address;
-	}
-
-	public boolean equals(Object o) {
-		return true; //workaround dummy equals and hashcode?
-	}
-
-	public int hashCode() {
-		return 5;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Building.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Building.java
deleted file mode 100644
index fc804b5..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Building.java
+++ /dev/null
@@ -1,32 +0,0 @@
-//$Id: Building.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.Length;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Building {
-	private Long id;
-
-	@Length( min = 1, message = "{notpresent.Key} and #{key.notPresent} and {key.notPresent2} {min}" )
-	private String address;
-
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getAddress() {
-		return address;
-	}
-
-	public void setAddress(String address) {
-		this.address = address;
-	}
-}
-
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Contact.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Contact.java
deleted file mode 100644
index eb06256..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Contact.java
+++ /dev/null
@@ -1,30 +0,0 @@
-//$Id: Contact.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Contact {
-	@NotNull
-	private String name;
-	@NotNull
-	private String phone;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getPhone() {
-		return phone;
-	}
-
-	public void setPhone(String phone) {
-		this.phone = phone;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/EmailTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/EmailTest.java
deleted file mode 100644
index c72688a..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/EmailTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-//$Id: EmailTest.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-
-/**
- * @author Emmanuel Bernard
- */
-public class EmailTest extends TestCase {
-	private ClassValidator<User> userValidator;
-
-	public void testEmail() throws Exception {
-		userValidator = new ClassValidator<User>(User.class);
-		isRightEmail("emmanuel at hibernate.org");
-		isRightEmail("");
-		isRightEmail(null);
-		isRightEmail("emmanuel at hibernate");
-		isRightEmail("emma-n_uel at hibernate");
-		isRightEmail("emma+nuel at hibernate.org");
-		isRightEmail("emma=nuel at hibernate.org");
-		isRightEmail("emmanuel@[123.12.2.11]");
-		isWrongEmail("emmanuel.hibernate.org");
-		isWrongEmail("emma nuel at hibernate.org");
-		isWrongEmail("emma(nuel at hibernate.org");
-		isWrongEmail("emmanuel@");
-		isWrongEmail("emma\nnuel at hibernate.org");
-		isWrongEmail("emma at nuel@hibernate.org");
-	}
-
-	private void isRightEmail(String email) {
-		assertEquals("Wrong email", 0, userValidator.getPotentialInvalidValues("email", email).length);
-	}
-
-	private void isWrongEmail(String email) {
-		assertEquals("Right email", 1, userValidator.getPotentialInvalidValues("email", email).length);
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Engine.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Engine.java
deleted file mode 100644
index f55aa3e..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Engine.java
+++ /dev/null
@@ -1,34 +0,0 @@
-//$Id: Engine.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.Patterns;
-import org.hibernate.validator.Pattern;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Engine {
-	@Patterns( {
-			@Pattern(regex = "^[A-Z0-9-]+$", message = "must contain alphabetical characters only"),
-			@Pattern(regex = "^....-....-....$", message="must match ....-....-....")
-			} )
-	private String serialNumber;
-	private long horsePower;
-
-
-	public String getSerialNumber() {
-		return serialNumber;
-	}
-
-	public void setSerialNumber(String serialNumber) {
-		this.serialNumber = serialNumber;
-	}
-
-	public long getHorsePower() {
-		return horsePower;
-	}
-
-	public void setHorsePower(long horsePower) {
-		this.horsePower = horsePower;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/HANTestCase.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/HANTestCase.java
deleted file mode 100644
index f33d0fd..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/HANTestCase.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//$Id: HANTestCase.java 17094 2009-07-15 11:53:24Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import java.io.InputStream;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.Session;
-import org.hibernate.HibernateException;
-import org.hibernate.Interceptor;
-import org.hibernate.dialect.Dialect;
-import org.hibernate.cfg.AnnotationConfiguration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.cfg.Configuration;
-
-/**
- * Copy from HAN
- *
- * @author Emmanuel Bernard
- */
-public abstract class HANTestCase extends junit.framework.TestCase {
-
-	private static SessionFactory sessions;
-	private static AnnotationConfiguration cfg;
-	private static Dialect dialect;
-	private static Class lastTestClass;
-	private Session session;
-
-	public HANTestCase() {
-		super();
-	}
-
-	public HANTestCase(String x) {
-		super( x );
-	}
-
-	protected void buildSessionFactory(Class[] classes, String[] packages, String[] xmlFiles) throws Exception {
-
-		if ( getSessions() != null ) getSessions().close();
-		try {
-			setCfg( new AnnotationConfiguration() );
-			configure( cfg );
-			if ( recreateSchema() ) {
-				cfg.setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
-			}
-			for ( int i = 0; i < packages.length; i++ ) {
-				getCfg().addPackage( packages[i] );
-			}
-			for ( int i = 0; i < classes.length; i++ ) {
-				getCfg().addAnnotatedClass( classes[i] );
-			}
-			for ( int i = 0; i < xmlFiles.length; i++ ) {
-				InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFiles[i] );
-				getCfg().addInputStream( is );
-			}
-			setDialect( Dialect.getDialect() );
-			setSessions( getCfg().buildSessionFactory( /*new TestInterceptor()*/ ) );
-		}
-		catch (Exception e) {
-			e.printStackTrace();
-			throw e;
-		}
-	}
-
-	protected void setUp() throws Exception {
-		if ( getSessions() == null || lastTestClass != getClass() ) {
-			buildSessionFactory( getMappings(), getAnnotatedPackages(), getXmlFiles() );
-			lastTestClass = getClass();
-		}
-	}
-
-	@SuppressWarnings({ "deprecation" })
-	protected void runTest() throws Throwable {
-		try {
-			super.runTest();
-			if ( session != null && session.isOpen() ) {
-				if ( session.isConnected() ) session.connection().rollback();
-				session.close();
-				session = null;
-				fail( "unclosed session" );
-			}
-			else {
-				session = null;
-			}
-		}
-		catch (Throwable e) {
-			try {
-				if ( session != null && session.isOpen() ) {
-					if ( session.isConnected() ) session.connection().rollback();
-					session.close();
-				}
-			}
-			catch (Exception ignore) {
-			}
-			try {
-				if ( sessions != null ) {
-					sessions.close();
-					sessions = null;
-				}
-			}
-			catch (Exception ignore) {
-			}
-			throw e;
-		}
-	}
-
-	public Session openSession() throws HibernateException {
-		session = getSessions().openSession();
-		return session;
-	}
-
-	public Session openSession(Interceptor interceptor) throws HibernateException {
-		session = getSessions().openSession( interceptor );
-		return session;
-	}
-
-	protected abstract Class[] getMappings();
-
-	protected String[] getAnnotatedPackages() {
-		return new String[]{};
-	}
-
-	protected String[] getXmlFiles() {
-		return new String[]{};
-	}
-
-	private void setSessions(SessionFactory sessions) {
-		HANTestCase.sessions = sessions;
-	}
-
-	protected SessionFactory getSessions() {
-		return sessions;
-	}
-
-	private void setDialect(Dialect dialect) {
-		HANTestCase.dialect = dialect;
-	}
-
-	protected Dialect getDialect() {
-		return dialect;
-	}
-
-	protected static void setCfg(AnnotationConfiguration cfg) {
-		HANTestCase.cfg = cfg;
-	}
-
-	protected static AnnotationConfiguration getCfg() {
-		return cfg;
-	}
-
-	protected void configure(Configuration cfg) {
-		//cfg.setNamingStrategy( AlternativeNamingStrategy.INSTANCE );
-		//cfg.getSessionEventListenerConfig().setFlushEventListener( new EJB3FlushEventListener() );
-		//cfg.getSessionEventListenerConfig().setAutoFlushEventListener( new EJB3AutoFlushEventListener() );
-	}
-
-	protected boolean recreateSchema() {
-		return true;
-	}
-
-}
-
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/InterpolationTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/InterpolationTest.java
deleted file mode 100644
index 2238415..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/InterpolationTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-//$Id: InterpolationTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import java.util.MissingResourceException;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Emmanuel Bernard
- */
-public class InterpolationTest extends TestCase {
-    public void testMissingKey() {
-
-        Building b = new Building();
-        b.setAddress( "2323 Younge St");
-		ClassValidator<Building> validator = new ClassValidator<Building>(Building.class);
-		try {
-            validator.getInvalidValues( b );
-        }
-        catch (MissingResourceException e) {
-            fail("message should be interpolated lazily in DefaultMessageInterpolator");
-        }
-
-		b = new Building();
-        b.setAddress("");
-        boolean failure = false;
-		InvalidValue[] invalidValues = validator.getInvalidValues( b );
-		assertNotSame( "Should have a failure here", 0, invalidValues.length );
-		assertEquals( "Missing key should be left unchanged",
-                    "{notpresent.Key} and #{key.notPresent} and {key.notPresent2} 1",
-                    invalidValues[0].getMessage() );
-    }
-}
-
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Serializability.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Serializability.java
deleted file mode 100644
index cde0dbe..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Serializability.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.hibernate.validator.test;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-import org.hibernate.validator.ValidatorClass;
-
-/**
- * Dummy sample of a bean-level validation annotation
- *
- * @author Emmanuel Bernard
- */
- at ValidatorClass(SerializabilityValidator.class)
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Serializability {
-	String message() default "Bean not Serializable";
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/SerializabilityValidator.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/SerializabilityValidator.java
deleted file mode 100644
index 3d37b7e..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/SerializabilityValidator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-//$Id: SerializabilityValidator.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import java.io.Serializable;
-
-import org.hibernate.validator.Validator;
-
-/**
- * Sample of a bean-level validator
- *
- * @author Emmanuel Bernard
- */
-public class SerializabilityValidator implements Validator<Serializability>, Serializable {
-	public boolean isValid(Object value) {
-		return value instanceof Serializable;
-	}
-
-	public void initialize(Serializability parameters) {
-
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Site.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Site.java
deleted file mode 100644
index a5a6967..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Site.java
+++ /dev/null
@@ -1,43 +0,0 @@
-//$Id: Site.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Site {
-	@NotNull
-	private String siteName;
-
-	@Valid
-	private Address address;
-
-	@Valid
-	private Contact contact;
-
-	public String getSiteName() {
-		return siteName;
-	}
-
-	public void setSiteName(String siteName) {
-		this.siteName = siteName;
-	}
-
-	public Address getAddress() {
-		return address;
-	}
-
-	public void setAddress(Address address) {
-		this.address = address;
-	}
-
-	public Contact getContact() {
-		return contact;
-	}
-
-	public void setContact(Contact contact) {
-		this.contact = contact;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Tv.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Tv.java
deleted file mode 100644
index 8cfb882..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Tv.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//$Id: Tv.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import java.math.BigInteger;
-import java.util.Date;
-
-import org.hibernate.validator.Future;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.Min;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Tv {
-	@Length(max = 2)
-	public String serial;
-	public int size;
-	@Length(max = 2)
-	public String name;
-	@Future
-	public Date expDate;
-	@Length(min = 0)
-	public String description;
-	@Min(1000)
-	public BigInteger lifetime;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/TvOwner.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/TvOwner.java
deleted file mode 100644
index abec094..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/TvOwner.java
+++ /dev/null
@@ -1,16 +0,0 @@
-//$Id: TvOwner.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class TvOwner {
-	public Integer id;
-
-	@NotNull
-	@Valid
-	public Tv tv;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/User.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/User.java
deleted file mode 100644
index 42ce8b1..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/User.java
+++ /dev/null
@@ -1,15 +0,0 @@
-//$Id: User.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import org.hibernate.validator.Email;
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class User {
-	@NotNull
-	public String name;
-	@Email
-	public String email;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/ValidatorTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/ValidatorTest.java
deleted file mode 100644
index 20152cc..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/ValidatorTest.java
+++ /dev/null
@@ -1,276 +0,0 @@
-//$Id: ValidatorTest.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-import java.io.Serializable;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-import org.hibernate.validator.MessageInterpolator;
-import org.hibernate.validator.Validator;
-
-/**
- * @author Gavin King
- */
-public class ValidatorTest extends TestCase {
-	public static final String ESCAPING_EL = "(escaping #{el})";
-
-	public void testValidator() {
-		Address a = new Address();
-		Address.blacklistedZipCode = null;
-		a.setCountry( "Australia" );
-		a.setZip( "1221341234123" );
-		a.setState( "Vic" );
-		a.setLine1( "Karbarook Ave" );
-		a.setId( 3 );
-		ClassValidator<Address> classValidator = new ClassValidator<Address>(
-				Address.class, ResourceBundle.getBundle( "messages", Locale.ENGLISH )
-		);
-		InvalidValue[] validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 2, validationMessages.length ); //static field is tested also
-		Address.blacklistedZipCode = "323232";
-		a.setZip( null );
-		a.setState( "Victoria" );
-		validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 2, validationMessages.length );
-		validationMessages = classValidator.getInvalidValues( a, "zip" );
-		assertEquals( 1, validationMessages.length );
-		a.setZip( "3181" );
-		a.setState( "NSW" );
-		validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 0, validationMessages.length );
-		a.setCountry( null );
-		validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 1, validationMessages.length );
-		a.setInternalValid( false );
-		validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 2, validationMessages.length );
-		a.setInternalValid( true );
-		a.setCountry( "France" );
-		a.floor = 4000;
-		validationMessages = classValidator.getInvalidValues( a );
-		assertEquals( 2, validationMessages.length );
-		assertEquals(
-				"Floor cannot " + ESCAPING_EL
-						+ " be lower that -2 and greater than 50 " + ESCAPING_EL,
-				validationMessages[0].getMessage()
-		);
-	}
-
-	public void testCircularity() throws Exception {
-		Brother emmanuel = new Brother();
-		emmanuel.setName( "Emmanuel" );
-		Address.blacklistedZipCode = "666";
-		Address address = new Address();
-		address.setInternalValid( true );
-		address.setCountry( "France" );
-		address.setId( 3 );
-		address.setLine1( "Rue des rosiers" );
-		address.setState( "NYC" );
-		address.setZip( "33333" );
-		address.floor = 4;
-		emmanuel.setAddress( address );
-		Brother christophe = new Brother();
-		christophe.setName( "Christophe" );
-		christophe.setAddress( address );
-		emmanuel.setYoungerBrother( christophe );
-		christophe.setElder( emmanuel );
-		ClassValidator<Brother> classValidator = new ClassValidator<Brother>( Brother.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( emmanuel );
-		assertEquals( 0, invalidValues.length );
-		christophe.setName( null );
-		invalidValues = classValidator.getInvalidValues( emmanuel );
-		assertEquals( 1, invalidValues.length );
-		assertEquals( emmanuel, invalidValues[0].getRootBean() );
-		assertEquals( "youngerBrother.name", invalidValues[0].getPropertyPath() );
-		christophe.setName( "Christophe" );
-		address = new Address();
-		address.setInternalValid( true );
-		address.setCountry( "France" );
-		address.setId( 4 );
-		address.setLine1( "Rue des plantes" );
-		address.setState( "NYC" );
-		address.setZip( "33333" );
-		address.floor = -100;
-		christophe.setAddress( address );
-		invalidValues = classValidator.getInvalidValues( emmanuel );
-		assertEquals( 1, invalidValues.length );
-	}
-
-	public void testAggregationAnnotations() throws Exception {
-		Engine eng = new Engine();
-		eng.setHorsePower( 23 );
-		eng.setSerialNumber( "23-43###4" );
-		ClassValidator<Engine> classValidator = new ClassValidator<Engine>( Engine.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( eng );
-		assertEquals( 2, invalidValues.length );
-
-		eng.setSerialNumber( "1234-5678-9012");
-		invalidValues = classValidator.getInvalidValues( eng );
-		assertEquals( 0, invalidValues.length );
-	}
-
-	public void testDefaultResourceBundle() throws Exception {
-		Tv tv = new Tv();
-		tv.serial = "FS";
-		tv.name = "TooLong";
-		tv.expDate = new Date( new Date().getTime() + 1000 * 60 * 60 * 24 * 10 );
-		ClassValidator<Tv> classValidator = new ClassValidator<Tv>( Tv.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( tv );
-		assertEquals( 1, invalidValues.length );
-		Locale loc = Locale.getDefault();
-		if ( loc.toString().startsWith( "en" ) ) {
-			assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-		else if ( loc.toString().startsWith( "fr" ) ) {
-			String message = invalidValues[0].getMessage();
-			String message2 ="la longueur doit �tre entre 0 et 2"; 
-			assertEquals( message2, message );
-		}
-		else if ( loc.toString().startsWith( "da" ) ) {
-			assertEquals( "l�ngden skal v�re mellem 0 og 2", invalidValues[0].getMessage() );
-		}
-		else {
-			// if default not found then it must be english
-			assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-	}
-
-	public void testSerialization() throws Exception {
-
-		Tv tv = new Tv();
-		tv.serial = "FS";
-		tv.name = "TooLong";
-		tv.expDate = new Date( new Date().getTime() + 1000 * 60 * 60 * 24 * 10 );
-		ClassValidator<Tv> classValidator = new ClassValidator<Tv>( Tv.class );
-
-		ByteArrayOutputStream stream = new ByteArrayOutputStream();
-		ObjectOutput out = new ObjectOutputStream( stream );
-		out.writeObject( classValidator );
-		out.close();
-		byte[] serialized = stream.toByteArray();
-		stream.close();
-		ByteArrayInputStream byteIn = new ByteArrayInputStream( serialized );
-		ObjectInputStream in = new ObjectInputStream( byteIn );
-		classValidator  = (ClassValidator<Tv>) in.readObject();
-		in.close();
-		byteIn.close();
-
-
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( tv );
-		assertEquals( 1, invalidValues.length );
-		Locale loc = Locale.getDefault();
-		if ( loc.toString().startsWith( "en" ) ) {
-			assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-		else if ( loc.toString().startsWith( "fr" ) ) {
-			String message = invalidValues[0].getMessage();
-			String message2 ="la longueur doit �tre entre 0 et 2";
-			assertEquals( message2, message );
-		}
-		else if ( loc.toString().startsWith( "da" ) ) {
-			assertEquals( "l�ngden skal v�re mellem 0 og 2", invalidValues[0].getMessage() );
-		}
-		else {
-			// if default not found then it must be english
-			assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-	}
-
-	public class PrefixMessageInterpolator implements MessageInterpolator, Serializable {
-		private String prefix;
-
-		public PrefixMessageInterpolator(String prefix) {
-			this.prefix = prefix;
-		}
-
-		public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
-			return prefix + defaultInterpolator.interpolate( message, validator, defaultInterpolator );
-		}
-	}
-
-	public void testMessageInterpolator() throws Exception {
-		Tv tv = new Tv();
-		tv.serial = "FS";
-		tv.name = "TooLong";
-		tv.expDate = new Date( new Date().getTime() + 1000 * 60 * 60 * 24 * 10 );
-		String prefix = "Prefix";
-		ClassValidator<Tv> classValidator = new ClassValidator<Tv>( Tv.class, new PrefixMessageInterpolator( prefix )  );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( tv );
-		assertEquals( 1, invalidValues.length );
-		Locale loc = Locale.getDefault();
-		if ( loc.toString().startsWith( "en" ) ) {
-			assertEquals( prefix + "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-		else if ( loc.toString().startsWith( "fr" ) ) {
-			assertEquals( prefix + "la longueur doit �tre entre 0 et 2", invalidValues[0].getMessage() );
-		}
-		else if ( loc.toString().startsWith( "da" ) ) {
-			assertEquals( prefix + "l�ngden skal v�re mellem 0 og 2", invalidValues[0].getMessage() );
-		}
-		else {
-			// if default not found then it must be english
-			assertEquals( prefix + "length must be between 0 and 2", invalidValues[0].getMessage() );
-		}
-	}
-
-	public void testBigInteger() throws Exception {
-		Tv tv = new Tv();
-		tv.lifetime = new BigInteger("9223372036854775808");
-		ClassValidator<Tv> classValidator = new ClassValidator<Tv>( Tv.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( tv );
-		assertEquals( 0, invalidValues.length );
-	}
-
-	public void testBeanValidator() throws Exception {
-		Vase v = new Vase();
-		ClassValidator<Vase> classValidator = new ClassValidator<Vase>( Vase.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( v );
-		assertEquals( 1, invalidValues.length );
-		assertNull( invalidValues[0].getPropertyName() );
-	}
-
-	public void testPotentialInvalidValues() throws Exception {
-		Address a = new Address();
-		Address.blacklistedZipCode = null;
-		a.setCountry( "Australia" );
-		a.setZip( "1221341234123" );
-		a.setState( "Vic" );
-		a.setLine1( "Karbarook Ave" );
-		a.setId( 3 );
-		ClassValidator<Address> classValidator = new ClassValidator<Address>( Address.class );
-		InvalidValue[] validationMessages = classValidator.getPotentialInvalidValues(
-				"blacklistedZipCode", Address.blacklistedZipCode
-		);
-		assertEquals( 1, validationMessages.length );
-	}
-
-	public void testRecursivity() throws Exception {
-		Site site = new Site();
-		site.setSiteName( "Rocky mountains" );
-		Contact contact = new Contact();
-		contact.setName( null ); //1 error
-		contact.setPhone( "01234455" );
-		site.setContact( contact );
-		Address a = new Address();
-		Address.blacklistedZipCode = "222";
-		a.setCountry( "Australia" );
-		a.setZip( "123" );
-		a.setState( "Vic" );
-		a.setLine1( null ); // 1 more error
-		a.setId( 3 );
-		site.setAddress( a );
-		ClassValidator<Site> classValidator = new ClassValidator<Site>( Site.class );
-		InvalidValue[] validationMessages = classValidator.getInvalidValues( site );
-		assertEquals( 2, validationMessages.length );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Vase.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Vase.java
deleted file mode 100644
index 8c37977..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/Vase.java
+++ /dev/null
@@ -1,11 +0,0 @@
-//$Id: Vase.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test;
-
-/**
- * A vase has to be Serializable to fit in luggages
- *
- * @author Emmanuel Bernard
- */
- at Serializability
-public class Vase {
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Movie.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Movie.java
deleted file mode 100644
index 33b7447..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Movie.java
+++ /dev/null
@@ -1,12 +0,0 @@
-//$Id: Movie.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.collections;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Movie {
-	@NotNull
-	public String name;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Presenter.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Presenter.java
deleted file mode 100644
index 32c7d15..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Presenter.java
+++ /dev/null
@@ -1,12 +0,0 @@
-//$Id: Presenter.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.collections;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Presenter {
-	@NotNull
-	public String name;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Show.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Show.java
deleted file mode 100644
index 696fc04..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Show.java
+++ /dev/null
@@ -1,12 +0,0 @@
-//$Id: Show.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.collections;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Show {
-	@NotNull
-	public String name;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Tv.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Tv.java
deleted file mode 100644
index 272ca8b..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/Tv.java
+++ /dev/null
@@ -1,28 +0,0 @@
-//$Id: Tv.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.collections;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Tv {
-	@NotNull
-	public String name;
-
-	@Valid
-	public List<Presenter> presenters = new ArrayList<Presenter>();
-
-	@Valid
-	public Map<String, Show> shows = new HashMap<String, Show>();
-
-	public
-	@Valid
-	Movie[] movies;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/ValidationCollectionTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/ValidationCollectionTest.java
deleted file mode 100644
index 20a7b99..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/collections/ValidationCollectionTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-//$Id: ValidationCollectionTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.collections;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Emmanuel Bernard
- */
-public class ValidationCollectionTest extends TestCase {
-	public void testCollection() throws Exception {
-		Tv tv = new Tv();
-		tv.name = "France 2";
-		Presenter presNok = new Presenter();
-		presNok.name = null;
-		Presenter presOk = new Presenter();
-		presOk.name = "Thierry Ardisson";
-		tv.presenters.add( presOk );
-		tv.presenters.add( presNok );
-		ClassValidator validator = new ClassValidator( Tv.class );
-		InvalidValue[] values = validator.getInvalidValues( tv );
-		assertEquals( 1, values.length );
-		assertEquals( "presenters[1].name", values[0].getPropertyPath() );
-	}
-
-	public void testMap() throws Exception {
-		Tv tv = new Tv();
-		tv.name = "France 2";
-		Show showOk = new Show();
-		showOk.name = "Tout le monde en parle";
-		Show showNok = new Show();
-		showNok.name = null;
-		tv.shows.put( "Midnight", showOk );
-		tv.shows.put( "Primetime", showNok );
-		ClassValidator validator = new ClassValidator( Tv.class );
-		InvalidValue[] values = validator.getInvalidValues( tv );
-		assertEquals( 1, values.length );
-		assertEquals( "shows['Primetime'].name", values[0].getPropertyPath() );
-	}
-
-	public void testArray() throws Exception {
-		Tv tv = new Tv();
-		tv.name = "France 2";
-		Movie movieOk = new Movie();
-		movieOk.name = "Kill Bill";
-		Movie movieNok = new Movie();
-		movieNok.name = null;
-		tv.movies = new Movie[]{
-				movieOk,
-				null,
-				movieNok
-		};
-		ClassValidator validator = new ClassValidator( Tv.class );
-		InvalidValue[] values = validator.getInvalidValues( tv );
-		assertEquals( 1, values.length );
-		assertEquals( "movies[2].name", values[0].getPropertyPath() );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Address.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Address.java
deleted file mode 100644
index 24186c3..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Address.java
+++ /dev/null
@@ -1,108 +0,0 @@
-//$Id: Address.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Transient;
-
-import org.hibernate.validator.AssertTrue;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.Min;
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Pattern;
-import org.hibernate.validator.Range;
-
-/**
- * @author Gavin King
- */
- at Entity
-public class Address {
-	@NotNull
-	public static String blacklistedZipCode;
-
-	private String line1;
-	private String line2;
-	private String zip;
-	private String state;
-	@Length(max = 20)
-	@NotNull
-	private String country;
-	private long id;
-	private boolean internalValid = true;
-	@Range(min = -2, max = 50, message = "{floor.out.of.range} (escaping #{el})")
-	public int floor;
-
-	public String getCountry() {
-		return country;
-	}
-
-	public void setCountry(String country) {
-		this.country = country;
-	}
-
-	@NotNull
-	public String getLine1() {
-		return line1;
-	}
-
-	public void setLine1(String line1) {
-		this.line1 = line1;
-	}
-
-	public String getLine2() {
-		return line2;
-	}
-
-	public void setLine2(String line2) {
-		this.line2 = line2;
-	}
-
-	@Length(max = 3)
-	@NotNull
-	public String getState() {
-		return state;
-	}
-
-	public void setState(String state) {
-		this.state = state;
-	}
-
-	@Length(max = 5, message = "{long}")
-	@Pattern(regex = "[0-9]+")
-	@NotNull
-	public String getZip() {
-		return zip;
-	}
-
-	public void setZip(String zip) {
-		this.zip = zip;
-	}
-
-	@AssertTrue
-	@Transient
-	public boolean isValid() {
-		return true;
-	}
-
-	@AssertTrue
-	@Transient
-	private boolean isInternalValid() {
-		return internalValid;
-	}
-
-	public void setInternalValid(boolean internalValid) {
-		this.internalValid = internalValid;
-	}
-
-	@Id
-	@Min(1)
-	@Range(max = 2000)
-	public long getId() {
-		return id;
-	}
-
-	public void setId(long id) {
-		this.id = id;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/CreditCard.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/CreditCard.java
deleted file mode 100644
index ccee23e..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/CreditCard.java
+++ /dev/null
@@ -1,41 +0,0 @@
-//$Id: CreditCard.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Embedded;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class CreditCard {
-	@Id
-	@GeneratedValue
-	private Integer id;
-	@Embedded
-	@Valid
-	@NotNull
-	private User username;
-
-	public Integer getId() {
-		return id;
-	}
-
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	public User getUsername() {
-		return username;
-	}
-
-	public void setUsername(User username) {
-		this.username = username;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/EmbeddedObjectTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/EmbeddedObjectTest.java
deleted file mode 100644
index f3e5a89..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/EmbeddedObjectTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-//$Id: EmbeddedObjectTest.java 17095 2009-07-15 11:54:34Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.event.PreInsertEventListener;
-import org.hibernate.event.PreUpdateEventListener;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.event.ValidatePreInsertEventListener;
-import org.hibernate.validator.event.ValidatePreUpdateEventListener;
-import org.hibernate.validator.test.HANTestCase;
-
-/**
- * @author Emmanuel Bernard
- */
- at SuppressWarnings({ "deprecation" })
-public class EmbeddedObjectTest extends HANTestCase {
-	public void testNotNullEmbeddedObject() throws Exception {
-		CreditCard cc = new CreditCard();
-		User username = new User();
-		username.setFirstname( "Emmanuel" );
-		username.setMiddlename( "P" );
-		username.setLastname( "Bernard" );
-		cc.setUsername( username );
-		ClassValidator ccValid = new ClassValidator( CreditCard.class );
-		assertEquals( 0, ccValid.getInvalidValues( cc ).length );
-		username.setMiddlename( null );
-		assertEquals( 0, ccValid.getInvalidValues( cc ).length );
-		Session s = openSession();
-		Transaction tx = s.beginTransaction();
-		s.persist( cc );
-		s.flush();
-		tx.rollback();
-		s.close();
-	}
-
-	protected Class[] getMappings() {
-		return new Class[]{
-				CreditCard.class
-		};
-	}
-
-    protected void configure(Configuration cfg) {
-		cfg.getEventListeners()
-				.setPreInsertEventListeners( new PreInsertEventListener[]{new ValidatePreInsertEventListener()} );
-		cfg.getEventListeners()
-				.setPreUpdateEventListeners( new PreUpdateEventListener[]{new ValidatePreUpdateEventListener()} );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/HibernateAnnotationIntegrationTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/HibernateAnnotationIntegrationTest.java
deleted file mode 100644
index 7991be0..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/HibernateAnnotationIntegrationTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-//$Id: HibernateAnnotationIntegrationTest.java 16963 2009-06-29 14:26:51Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.validator.Environment;
-import org.hibernate.validator.InvalidStateException;
-import org.hibernate.validator.test.HANTestCase;
-
-/**
- * Test the validate framework integration with the Hibernate
- * metadata binding
- *
- * @author Emmanuel Bernard
- */
-public class HibernateAnnotationIntegrationTest extends HANTestCase {
-	public void testApply() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( Address.class.getName() );
-		//new ClassValidator( Address.class, ResourceBundle.getBundle("messages", Locale.ENGLISH) ).apply( classMapping );
-		Column stateColumn = (Column) classMapping.getProperty( "state" ).getColumnIterator().next();
-		assertEquals( stateColumn.getLength(), 3 );
-		Column zipColumn = (Column) classMapping.getProperty( "zip" ).getColumnIterator().next();
-		assertEquals( zipColumn.getLength(), 5 );
-		assertFalse( zipColumn.isNullable() );
-	}
-
-	public void testApplyOnIdColumn() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( Tv.class.getName() );
-		Column serialColumn = (Column) classMapping.getIdentifierProperty().getColumnIterator().next();
-		assertEquals( "Vaidator annotation not applied on ids", 2, serialColumn.getLength() );
-	}
-
-	public void testApplyOnManyToOne() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( TvOwner.class.getName() );
-		Column serialColumn = (Column) classMapping.getProperty( "tv" ).getColumnIterator().next();
-		assertEquals( "Validator annotations not applied on associations", false, serialColumn.isNullable() );
-	}
-
-	public void testSingleTableAvoidNotNull() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( Rock.class.getName() );
-		Column serialColumn = (Column) classMapping.getProperty( "bit" ).getColumnIterator().next();
-		assertTrue( "Notnull should not be applised on single tables", serialColumn.isNullable() );
-	}
-
-	public void testEvents() throws Exception {
-		Session s;
-		Transaction tx;
-		Address a = new Address();
-		Address.blacklistedZipCode = "3232";
-		a.setId( 12 );
-		a.setCountry( "Country" );
-		a.setLine1( "Line 1" );
-		a.setZip( "nonnumeric" );
-		a.setState( "NY" );
-		s = openSession();
-		tx = s.beginTransaction();
-		try {
-			s.persist( a );
-			tx.commit();
-			fail( "bean should have been validated" );
-		}
-		catch (InvalidStateException e) {
-			//success
-			assertEquals( 2, e.getInvalidValues().length );
-			assertTrue( "Environment.MESSAGE_INTERPOLATOR_CLASS does not work",
-					e.getInvalidValues()[0].getMessage().startsWith( "prefix_")
-			);
-		}
-		finally {
-			if ( tx != null ) tx.rollback();
-			s.close();
-		}
-
-		a = new Address();
-		Address.blacklistedZipCode = "3232";
-		a.setId( 12 );
-		a.setCountry( "Country" );
-		a.setLine1( "Line 1" );
-		a.setZip( "12345" );
-		a.setState( "NY" );
-		s = openSession();
-		tx = s.beginTransaction();
-		s.persist( a );
-		tx.commit();
-
-		a.setState( "WAYTOOLONG" );
-		s = openSession();
-		tx = s.beginTransaction();
-		try {
-			s.merge( a );
-			tx.commit();
-			fail( "bean should have been validated" );
-		}
-		catch (InvalidStateException e) {
-			//success
-			assertEquals( 1, e.getInvalidValues().length );
-			assertTrue( "Environment.MESSAGE_INTERPOLATOR_CLASS does not work",
-					e.getInvalidValues()[0].getMessage().startsWith( "prefix_")
-			);
-		}
-		finally {
-			if ( tx != null ) tx.rollback();
-			s.close();
-		}
-
-		s = openSession();
-		tx = s.beginTransaction();
-		a.setId( 13 );
-		a.setCountry( "Country" );
-		a.setLine1( "Line 1" );
-		a.setZip( "4343" );
-		a.setState( "NY" );
-		s.persist( a );
-		s.flush();
-		a.setState( "TOOLONG" );
-		try {
-			s.flush();
-			fail( "update should have been checked" );
-		}
-		catch (InvalidStateException e) {
-			assertEquals( 1, e.getInvalidValues().length );
-		}
-		finally {
-			s.clear();
-			for (Object o : s.createCriteria( Address.class  ).list() ) {
-				s.delete( o );
-			}
-			tx.commit();
-			s.close();
-		}
-	}
-
-	public void testComponents() throws Exception {
-		Session s;
-		Transaction tx;
-		s = openSession();
-		tx = s.beginTransaction();
-		Martian martian = new Martian();
-		MartianPk pk = new MartianPk();
-		pk.setColony( "Liberal" ); //one failure
-		pk.setName( "Biboudie" );
-		MarsAddress address = new MarsAddress();
-		address.setContinent( "cont" ); //one failure
-		address.setCanal( "Plus" ); //one failure
-		martian.setId( pk );
-		martian.setAddress( address );
-		s.persist( martian );
-		try {
-			s.flush();
-			fail( "Components are not validated" );
-		}
-		catch (InvalidStateException e) {
-			assertEquals( 2, e.getInvalidValues().length );
-		}
-		finally {
-			tx.rollback();
-			s.close();
-		}
-	}
-
-	public void testIdClass() throws Exception {
-		Session s;
-		Transaction tx;
-		s = openSession();
-		tx = s.beginTransaction();
-		Venusian venus = new Venusian();
-		venus.setName( "bibi" );
-		venus.setRegion( "ts" );
-		s.persist( venus );
-		try {
-			s.flush();
-			fail( "test on embedded properties should have been done" );
-		}
-		catch (InvalidStateException e) {
-			assertEquals( 1, e.getInvalidValues().length );
-		}
-		finally {
-			tx.rollback();
-			s.close();
-		}
-	}
-
-	protected void configure(Configuration cfg) {
-		cfg.setProperty( Environment.MESSAGE_INTERPOLATOR_CLASS, PrefixMessageInterpolator.class.getName() );
-	}
-
-	protected Class[] getMappings() {
-		return new Class[]{
-				Address.class,
-				Martian.class,
-				Venusian.class,
-				Tv.class,
-				TvOwner.class,
-				Music.class,
-				Rock.class
-		};
-	}
-
-	public HibernateAnnotationIntegrationTest(String x) {
-		super( x );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MarsAddress.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MarsAddress.java
deleted file mode 100644
index 4c104b2..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MarsAddress.java
+++ /dev/null
@@ -1,34 +0,0 @@
-//$Id: MarsAddress.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Embeddable;
-
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class MarsAddress {
-	private String continent;
-	private String canal;
-
-	@NotNull
-	public String getContinent() {
-		return continent;
-	}
-
-	public void setContinent(String continent) {
-		this.continent = continent;
-	}
-
-	@Length(min = 5)
-	public String getCanal() {
-		return canal;
-	}
-
-	public void setCanal(String canal) {
-		this.canal = canal;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Martian.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Martian.java
deleted file mode 100644
index cbcee7f..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Martian.java
+++ /dev/null
@@ -1,32 +0,0 @@
-//$Id: Martian.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Martian {
-	private MartianPk id;
-	private MarsAddress address;
-
-	@Id
-	public MartianPk getId() {
-		return id;
-	}
-
-	public void setId(MartianPk id) {
-		this.id = id;
-	}
-
-	public MarsAddress getAddress() {
-		return address;
-	}
-
-	public void setAddress(MarsAddress address) {
-		this.address = address;
-	}
-
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MartianPk.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MartianPk.java
deleted file mode 100644
index 8e5e9e2..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/MartianPk.java
+++ /dev/null
@@ -1,52 +0,0 @@
-//$Id: MartianPk.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import java.io.Serializable;
-import javax.persistence.Embeddable;
-
-import org.hibernate.validator.Length;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class MartianPk implements Serializable {
-	private String name;
-	private String colony;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Length(max = 4)
-	public String getColony() {
-		return colony;
-	}
-
-	public void setColony(String colony) {
-		this.colony = colony;
-	}
-
-	public boolean equals(Object o) {
-		if ( this == o ) return true;
-		if ( o == null || getClass() != o.getClass() ) return false;
-
-		final MartianPk martianPk = (MartianPk) o;
-
-		if ( !colony.equals( martianPk.colony ) ) return false;
-		if ( !name.equals( martianPk.name ) ) return false;
-
-		return true;
-	}
-
-	public int hashCode() {
-		int result;
-		result = name.hashCode();
-		result = 29 * result + colony.hashCode();
-		return result;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Music.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Music.java
deleted file mode 100644
index 03025a1..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Music.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: Music.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Music {
-	@Id
-	public String name;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/NonHibernateAnnotationsIntegrationTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/NonHibernateAnnotationsIntegrationTest.java
deleted file mode 100644
index 40e23f8..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/NonHibernateAnnotationsIntegrationTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-//$Id: NonHibernateAnnotationsIntegrationTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.Column;
-import org.hibernate.event.PreInsertEventListener;
-import org.hibernate.event.PreUpdateEventListener;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.validator.Environment;
-import org.hibernate.validator.test.HANTestCase;
-import org.hibernate.validator.event.ValidateEventListener;
-import org.hibernate.Session;
-
-/**
- * Test the ability to disable DDL update
- *
- * @author Emmanuel Bernard
- */
-public class NonHibernateAnnotationsIntegrationTest extends HANTestCase {
-	public void testNotApplyDll() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( Address.class.getName() );
-		Column stateColumn = (Column) classMapping.getProperty( "state" ).getColumnIterator().next();
-		assertFalse( stateColumn.getLength() == 3 );
-		Column zipColumn = (Column) classMapping.getProperty( "zip" ).getColumnIterator().next();
-		assertFalse( zipColumn.getLength() ==  5 );
-		assertTrue( zipColumn.isNullable() );
-	}
-
-	public void testNotApplyListener() throws Exception {
-		Session s = openSession( );
-		Address a = new Address();
-		s.persist( a ); //shouldn't fail
-		s.flush();
-		s.close();
-	}
-
-	protected void configure(Configuration cfg) {
-		cfg.setProperty( Environment.MESSAGE_INTERPOLATOR_CLASS, PrefixMessageInterpolator.class.getName() );
-		cfg.setProperty( Environment.APPLY_TO_DDL, "false" );
-		cfg.setProperty( Environment.AUTOREGISTER_LISTENERS, "false" );
-	}
-
-	protected Class[] getMappings() {
-		return new Class[]{
-				Address.class,
-		};
-	}
-
-	public NonHibernateAnnotationsIntegrationTest(String x) {
-		super( x );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/PrefixMessageInterpolator.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/PrefixMessageInterpolator.java
deleted file mode 100644
index e1f04c5..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/PrefixMessageInterpolator.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: PrefixMessageInterpolator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import org.hibernate.validator.MessageInterpolator;
-import org.hibernate.validator.Validator;
-
-/**
- * @author Emmanuel Bernard
- */
-public class PrefixMessageInterpolator implements MessageInterpolator {
-	public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
-		return "prefix_" + defaultInterpolator.interpolate( message, validator, defaultInterpolator );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Rock.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Rock.java
deleted file mode 100644
index c9f242c..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Rock.java
+++ /dev/null
@@ -1,15 +0,0 @@
-//$Id: Rock.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Entity;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Rock extends Music {
-	@NotNull
-	public Integer bit;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Tv.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Tv.java
deleted file mode 100644
index a6094e0..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Tv.java
+++ /dev/null
@@ -1,30 +0,0 @@
-//$Id: Tv.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import java.util.Date;
-import java.math.BigInteger;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-import org.hibernate.validator.Future;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.Min;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Tv {
-	@Id
-	@Length(max = 2)
-	public String serial;
-	public int size;
-	@Length(max = 2)
-	public String name;
-	@Future
-	public Date expDate;
-	@Length(min = 0)
-	public String description;
-	@Min(1000)
-	public BigInteger lifetime;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/TvOwner.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/TvOwner.java
deleted file mode 100644
index af8b0bb..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/TvOwner.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: TvOwner.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class TvOwner {
-	@Id
-	@GeneratedValue
-	public Integer id;
-	@ManyToOne
-	@NotNull
-	public Tv tv;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/User.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/User.java
deleted file mode 100644
index fe57c88..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/User.java
+++ /dev/null
@@ -1,42 +0,0 @@
-//$Id: User.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import javax.persistence.Embeddable;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class User {
-	@NotNull
-	private String firstname;
-	private String middlename;
-	@NotNull
-	private String lastname;
-
-	public String getFirstname() {
-		return firstname;
-	}
-
-	public void setFirstname(String firstname) {
-		this.firstname = firstname;
-	}
-
-	public String getLastname() {
-		return lastname;
-	}
-
-	public void setLastname(String lastname) {
-		this.lastname = lastname;
-	}
-
-	public String getMiddlename() {
-		return middlename;
-	}
-
-	public void setMiddlename(String middlename) {
-		this.middlename = middlename;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Venusian.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Venusian.java
deleted file mode 100644
index 2303543..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/Venusian.java
+++ /dev/null
@@ -1,38 +0,0 @@
-//$Id: Venusian.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-
-import org.hibernate.validator.Length;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
- at IdClass(VenusianPk.class)
-public class Venusian implements Serializable {
-	private String region;
-	private String name;
-
-	@Id
-	@Length(min = 3)
-	public String getRegion() {
-		return region;
-	}
-
-	public void setRegion(String region) {
-		this.region = region;
-	}
-
-	@Id
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/VenusianPk.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/VenusianPk.java
deleted file mode 100644
index 019e70b..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/haintegration/VenusianPk.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//$Id: VenusianPk.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.haintegration;
-
-import java.io.Serializable;
-
-/**
- * @author Emmanuel Bernard
- */
-public class VenusianPk implements Serializable {
-	private String region;
-	private String name;
-
-	public String getRegion() {
-		return region;
-	}
-
-	public void setRegion(String region) {
-		this.region = region;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public boolean equals(Object o) {
-		if ( this == o ) return true;
-		if ( o == null || getClass() != o.getClass() ) return false;
-
-		final VenusianPk that = (VenusianPk) o;
-
-		if ( !name.equals( that.name ) ) return false;
-		if ( !region.equals( that.region ) ) return false;
-
-		return true;
-	}
-
-	public int hashCode() {
-		int result;
-		result = region.hashCode();
-		result = 29 * result + name.hashCode();
-		return result;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Animal.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Animal.java
deleted file mode 100644
index 3899859..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Animal.java
+++ /dev/null
@@ -1,19 +0,0 @@
-//$Id: Animal.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import java.io.Serializable;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Animal implements Serializable, Name {
-	private String name;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/BoneEater.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/BoneEater.java
deleted file mode 100644
index af290fd..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/BoneEater.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: BoneEater.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public interface BoneEater extends Eater {
-	@NotNull
-	String getFavoriteBone();
-
-	void setFavoriteBone(String favoriteBone);
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Dog.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Dog.java
deleted file mode 100644
index b4ba901..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Dog.java
+++ /dev/null
@@ -1,31 +0,0 @@
-//$Id: Dog.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import java.io.Serializable;
-
-import org.hibernate.validator.Length;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Dog extends Animal implements Serializable, BoneEater {
-	private String favoriteBone;
-	private int frequency;
-
-	@Length(min = 3)
-	public String getFavoriteBone() {
-		return favoriteBone;
-	}
-
-	public void setFavoriteBone(String favoriteBone) {
-		this.favoriteBone = favoriteBone;
-	}
-
-	public int getFrequency() {
-		return frequency;
-	}
-
-	public void setFrequency(int frequency) {
-		this.frequency = frequency;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Eater.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Eater.java
deleted file mode 100644
index 4e3b2df..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Eater.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: Eater.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import org.hibernate.validator.Min;
-
-/**
- * @author Emmanuel Bernard
- */
-public interface Eater {
-	@Min(2)
-	int getFrequency();
-
-	void setFrequency(int frequency);
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/InheritanceTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/InheritanceTest.java
deleted file mode 100644
index 699fad4..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/InheritanceTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-//$Id: InheritanceTest.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Emmanuel Bernard
- */
-public class InheritanceTest extends TestCase {
-	public void testInheritance() throws Exception {
-		ClassValidator<Dog> classValidator = new ClassValidator<Dog>( Dog.class );
-		Dog dog = new Dog();
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( dog );
-		assertEquals( 3, invalidValues.length );
-		dog.setFavoriteBone( "DE" ); //failure
-		invalidValues = classValidator.getInvalidValues( dog );
-		assertEquals( 3, invalidValues.length );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Name.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Name.java
deleted file mode 100644
index 5ed61b7..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/inheritance/Name.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: Name.java 15765 2009-01-09 14:56:30Z hardy.ferentschik $
-package org.hibernate.validator.test.inheritance;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public interface Name {
-	@NotNull
-	String getName();
-
-	void setName(String name);
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Cat.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Cat.java
deleted file mode 100644
index 630f55a..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Cat.java
+++ /dev/null
@@ -1,48 +0,0 @@
-//$Id: Cat.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-import org.hibernate.validator.Length;
-import org.hibernate.validator.Min;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Cat implements Serializable {
-	private Integer id;
-	private String name;
-	private long length;
-
-	@Id
-	@GeneratedValue
-	public Integer getId() {
-		return id;
-	}
-
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	@Length(min = 4)
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Min(0)
-	public long getLength() {
-		return length;
-	}
-
-	public void setLength(long length) {
-		this.length = length;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Commander.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Commander.java
deleted file mode 100644
index 91cef00..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Commander.java
+++ /dev/null
@@ -1,25 +0,0 @@
-//$Id: Commander.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import javax.persistence.Embeddable;
-import javax.persistence.Column;
-
-import org.hibernate.validator.NotEmpty;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class Commander {
-	@NotEmpty
-	@Column(name="commander_name")
-	private String name;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/HEMAutoWireringTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/HEMAutoWireringTest.java
deleted file mode 100644
index 08b3fc1..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/HEMAutoWireringTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-//$Id: HEMAutoWireringTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import java.util.Date;
-import java.util.Map;
-import javax.persistence.EntityManager;
-
-import org.hibernate.ejb.HibernatePersistence;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.validator.InvalidStateException;
-
-/**
- * @author Emmanuel Bernard
- */
-public class HEMAutoWireringTest extends JPATestCase {
-	public void testPropertyValidation() throws Exception {
-		EntityManager em = factory.createEntityManager();
-		Cat cat = new Cat();
-		cat.setName( "iti" );
-		em.getTransaction().begin();
-		try {
-			em.persist( cat );
-			em.flush();
-			fail( "No validation" );
-		}
-		catch (InvalidStateException e) {
-			//success
-		}
-		finally {
-			em.getTransaction().rollback();
-			em.close();
-		}
-	}
-
-	public void testEventPerProperties() throws Exception {
-		EntityManager em = factory.createEntityManager();
-		assertEquals( "Only validator and explicit NoOp should be present", 2,
-				( (SessionImplementor) em.getDelegate() ).getListeners().getPreInsertEventListeners().length );
-		em.close();
-	}
-
-	public Class[] getAnnotatedClasses() {
-		return new Class[] {
-				Cat.class
-		};
-	}
-
-
-	public Map getConfig() {
-		Map config = super.getConfig();
-		config.put( HibernatePersistence.EVENT_LISTENER_PREFIX + ".pre-insert", NoOpListener.class.getName() );
-		return config;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPATestCase.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPATestCase.java
deleted file mode 100644
index abd9ab9..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPATestCase.java
+++ /dev/null
@@ -1,104 +0,0 @@
-//$Id: JPATestCase.java 17095 2009-07-15 11:54:34Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Properties;
-import java.util.ArrayList;
-import java.io.InputStream;
-import java.io.IOException;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.hibernate.cfg.Environment;
-import org.hibernate.ejb.HibernatePersistence;
-
-/**
- * @author Emmanuel Bernard
- */
- at SuppressWarnings({ "deprecation" })
-public abstract class JPATestCase extends junit.framework.TestCase {
-	protected EntityManagerFactory factory;
-
-	public JPATestCase() {
-		super();
-	}
-
-	public JPATestCase(String name) {
-		super( name );
-	}
-
-	public void setUp() {
-		factory = new HibernatePersistence().createEntityManagerFactory( getConfig() );
-	}
-
-	public void tearDown() {
-		factory.close();
-	}
-
-	public abstract Class[] getAnnotatedClasses();
-
-	public String[] getEjb3DD() {
-		return new String[]{};
-	}
-
-	public Map<Class, String> getCachedClasses() {
-		return new HashMap<Class, String>();
-	}
-
-	public Map<String, String> getCachedCollections() {
-		return new HashMap<String, String>();
-	}
-
-	public static Properties loadProperties() {
-		Properties props = new Properties();
-		InputStream stream = Persistence.class.getResourceAsStream( "/hibernate.properties" );
-		if ( stream != null ) {
-			try {
-				props.load( stream );
-			}
-			catch (Exception e) {
-				throw new RuntimeException( "could not load hibernate.properties" );
-			}
-			finally {
-				try {
-					stream.close();
-				}
-				catch (IOException ioe) {
-				}
-			}
-		}
-		props.setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
-		return props;
-	}
-
-	public Map getConfig() {
-		Map config = loadProperties();
-		ArrayList<Class> classes = new ArrayList<Class>();
-
-		for ( Class clazz : getAnnotatedClasses() ) {
-			classes.add( clazz );
-		}
-		config.put( HibernatePersistence.LOADED_CLASSES, classes );
-		for ( Map.Entry<Class, String> entry : getCachedClasses().entrySet() ) {
-			config.put(
-					HibernatePersistence.CLASS_CACHE_PREFIX + "." + entry.getKey().getName(),
-					entry.getValue()
-			);
-		}
-		for ( Map.Entry<String, String> entry : getCachedCollections().entrySet() ) {
-			config.put(
-					HibernatePersistence.COLLECTION_CACHE_PREFIX + "." + entry.getKey(),
-					entry.getValue()
-			);
-		}
-		if ( getEjb3DD().length > 0 ) {
-			ArrayList<String> dds = new ArrayList<String>();
-			for ( String dd : getEjb3DD() ) {
-				dds.add( dd );
-			}
-			config.put( HibernatePersistence.XML_FILE_NAMES, dds );
-		}
-		return config;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPAValidateListenerTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPAValidateListenerTest.java
deleted file mode 100644
index 11e2460..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/JPAValidateListenerTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-//$Id: JPAValidateListenerTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.ejb.HibernatePersistence;
-import org.hibernate.validator.Environment;
-import org.hibernate.validator.InvalidStateException;
-
-/**
- * @author Emmanuel Bernard
- */
-public class JPAValidateListenerTest extends JPATestCase {
-
-	public void testEventTrigger() {
-		EntityManager em = factory.createEntityManager();
-		em.getTransaction().begin();
-		Commander beetles = new Commander();
-		beetles.setName( "" );
-		Submarine yellowSubmarine = new Submarine();
-		yellowSubmarine.setCommander( beetles );
-		yellowSubmarine.setName( "" );
-		yellowSubmarine.setSize( 3 );
-		try {
-			em.persist( yellowSubmarine );
-			em.flush();
-			fail("Event not wired");
-		}
-		catch(InvalidStateException e) {
-			assertEquals( 3, e.getInvalidValues().length );
-		}
-		finally {
-			em.getTransaction().rollback();
-			em.close();
-		}
-
-		//update trigger
-		em = factory.createEntityManager();
-		em.getTransaction().begin();
-		beetles = new Commander();
-		beetles.setName( "Beetles" );
-		yellowSubmarine = new Submarine();
-		yellowSubmarine.setCommander( beetles );
-		yellowSubmarine.setName( "Yellow" );
-		yellowSubmarine.setSize( 13 );
-		em.persist( yellowSubmarine );
-		em.flush();
-		em.clear();
-		yellowSubmarine = em.find( Submarine.class, yellowSubmarine.getId() );
-		yellowSubmarine.setSize( 3 );
-		try {
-			em.flush();
-			fail("Event not wired");
-		}
-		catch(InvalidStateException e) {
-			assertEquals( 1, e.getInvalidValues().length );
-		}
-		finally {
-			em.getTransaction().rollback();
-			em.close();
-		}
-
-	}
-
-	public Class[] getAnnotatedClasses() {
-		return new Class[]{
-				Commander.class,
-				Submarine.class
-		};
-	}
-
-
-	public Map getConfig() {
-		Map map = super.getConfig();
-		//Remove regular Validator wiring
-		map.put( HibernatePersistence.EVENT_LISTENER_PREFIX + "." + "pre-insert",
-				"" );
-		map.put( HibernatePersistence.EVENT_LISTENER_PREFIX + "." + "pre-update",
-				"" );
-		return map;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/NoOpListener.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/NoOpListener.java
deleted file mode 100644
index 7c59ce6..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/NoOpListener.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: NoOpListener.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import org.hibernate.event.PreInsertEventListener;
-import org.hibernate.event.PreInsertEvent;
-
-/**
- * @author Emmanuel Bernard
- */
-public class NoOpListener implements PreInsertEventListener {
-	public boolean onPreInsert(PreInsertEvent event) {
-		return false;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Submarine.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Submarine.java
deleted file mode 100644
index 663f3bd..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/jpa/Submarine.java
+++ /dev/null
@@ -1,65 +0,0 @@
-//$Id: Submarine.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.jpa;
-
-import javax.persistence.Entity;
-import javax.persistence.EntityListeners;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-import org.hibernate.validator.Min;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.Valid;
-import org.hibernate.validator.event.JPAValidateListener;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
- at EntityListeners( JPAValidateListener.class )
-public class Submarine {
-	@Id
-	@GeneratedValue
-	private Long id;
-
-	@NotEmpty
-	private String name;
-
-	@Valid
-	private Commander commander;
-
-	@Min( 10 )
-	private long size;
-
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public long getSize() {
-		return size;
-	}
-
-	public void setSize(long size) {
-		this.size = size;
-	}
-
-	public Commander getCommander() {
-		return commander;
-	}
-
-	public void setCommander(Commander commander) {
-		this.commander = commander;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Address.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Address.java
deleted file mode 100644
index 87e30a4..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Address.java
+++ /dev/null
@@ -1,17 +0,0 @@
-//$Id: Address.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.valid;
-
-import org.hibernate.validator.NotNull;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Address {
-
-	private String city;
-
-	@NotNull
-	public String getCity() {
-		return city;
-	}
-} 
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Form.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Form.java
deleted file mode 100644
index b29b30a..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Form.java
+++ /dev/null
@@ -1,21 +0,0 @@
-//$Id: Form.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.valid;
-
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Form {
-
-	private Member member;
-
-	@Valid
-	public Member getMember() {
-		return member;
-	}
-
-	public void setMember(Member m) {
-		this.member = m;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Member.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Member.java
deleted file mode 100644
index 579f60d..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/Member.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: Member.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.valid;
-
-import org.hibernate.validator.Valid;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Member {
-
-	private Address address;
-
-	@Valid
-	public Address getAddress() {
-		return address;
-	}
-
-
-	public void setAddress(Address address) {
-		this.address = address;
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/ValidTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/ValidTest.java
deleted file mode 100644
index 14c9e36..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/valid/ValidTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-//$Id: ValidTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.valid;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Emmanuel Bernard
- */
-public class ValidTest extends TestCase {
-	public void testDeepValid() throws Exception {
-		ClassValidator<Form> formValidator = new ClassValidator<Form>(Form.class);
-		Address a = new Address();
-		Member m = new Member();
-		m.setAddress( a );
-		Form f = new Form();
-		f.setMember(m);
-		InvalidValue[] values = formValidator.getInvalidValues( f );
-		assertEquals( 1, values.length );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/Car.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/Car.java
deleted file mode 100644
index d1b5206..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/Car.java
+++ /dev/null
@@ -1,30 +0,0 @@
-//$Id: Car.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.validators;
-
-import java.math.BigDecimal;
-
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Entity;
-
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.Digits;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Car {
-	@Id @GeneratedValue
-	public Long id;
-	@NotEmpty
-	public String name;
-	@NotEmpty
-	public String[] insurances;
-	@Digits(integerDigits = 1, fractionalDigits = 2)
-	public BigDecimal length;
-	@Digits(integerDigits = 2, fractionalDigits = 1)
-	public Double gallons;
-	@Digits(integerDigits = 2, fractionalDigits = 1)
-	public String mpg;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/CreditCard.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/CreditCard.java
deleted file mode 100644
index f4903f0..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/CreditCard.java
+++ /dev/null
@@ -1,14 +0,0 @@
-//$Id: CreditCard.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.validators;
-
-import org.hibernate.validator.EAN;
-
-/**
- * @author Emmanuel Bernard
- */
-public class CreditCard {
-	@org.hibernate.validator.CreditCardNumber
-	public String number;
-	@EAN
-	public String ean;
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/DigitsTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/DigitsTest.java
deleted file mode 100644
index ce658f3..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/DigitsTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-//$Id: DigitsTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.validators;
-
-import java.math.BigDecimal;
-
-import org.hibernate.cfg.Configuration;
-import org.hibernate.event.PreInsertEventListener;
-import org.hibernate.event.PreUpdateEventListener;
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-import org.hibernate.validator.test.HANTestCase;
-import org.hibernate.validator.event.ValidateEventListener;
-
-/**
- * @author Emmanuel Bernard
- */
-public class DigitsTest extends HANTestCase {
-
-	public void testDigits() throws Exception {
-		Car car = new Car();
-		car.name = "350Z";
-		car.insurances = new String[] { "random" };
-		car.length = new BigDecimal(10.2);
-		car.gallons = 100.3;
-		car.mpg = "EFG";
-		ClassValidator<Car> classValidator = new ClassValidator<Car>( Car.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 3, invalidValues.length );
-		car.length = new BigDecimal(1.223); //more than 2
-		car.gallons = 10.300; //1 digit really so not invalid
-		invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 2, invalidValues.length );
-	}
-
-	public void testApply() throws Exception {
-		PersistentClass classMapping = getCfg().getClassMapping( Car.class.getName() );
-		Column stateColumn = (Column) classMapping.getProperty( "gallons" ).getColumnIterator().next();
-		assertEquals( stateColumn.getPrecision(), 3 );
-		assertEquals( stateColumn.getScale(), 1 );
-	}
-
-	protected void configure(Configuration cfg) {
-		cfg.getEventListeners()
-				.setPreInsertEventListeners( new PreInsertEventListener[]{new ValidateEventListener()} );
-		cfg.getEventListeners()
-				.setPreUpdateEventListeners( new PreUpdateEventListener[]{new ValidateEventListener()} );
-	}
-
-	protected Class[] getMappings() {
-		return new Class[] {
-				Car.class
-		};
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/LuhnTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/LuhnTest.java
deleted file mode 100644
index 28c043e..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/LuhnTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-//$Id: LuhnTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.validators;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Emmanuel Bernard
- */
-public class LuhnTest extends TestCase {
-	public void testCreditCard() {
-		CreditCard card = new CreditCard();
-		card.number = "1234567890123456";
-		ClassValidator<CreditCard> classValidator = new ClassValidator<CreditCard>( CreditCard.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( card );
-		assertEquals( 1, invalidValues.length );
-		card.number = "541234567890125"; //right CC (luhn compliant)
-		invalidValues = classValidator.getInvalidValues( card );
-		assertEquals( 0, invalidValues.length );
-		card.ean = "9782266156066"; //right EAN
-		invalidValues = classValidator.getInvalidValues( card );
-		assertEquals( 0, invalidValues.length );
-		card.ean = "9782266156067"; //wrong EAN
-		invalidValues = classValidator.getInvalidValues( card );
-		assertEquals( 1, invalidValues.length );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/NotEmptyTest.java b/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/NotEmptyTest.java
deleted file mode 100644
index 7758196..0000000
--- a/hibernate-validator-legacy/src/test/java/org/hibernate/validator/test/validators/NotEmptyTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-//$Id: NotEmptyTest.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
-package org.hibernate.validator.test.validators;
-
-import junit.framework.TestCase;
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
-
-/**
- * @author Gavin King
- */
-public class NotEmptyTest extends TestCase {
-
-	public void testBigInteger() throws Exception {
-		Car car = new Car();
-		ClassValidator<Car> classValidator = new ClassValidator<Car>( Car.class );
-		InvalidValue[] invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 2, invalidValues.length );
-		car.name = "";
-		invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 2, invalidValues.length );
-		car.name = "350Z";
-		invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 1, invalidValues.length );
-		car.insurances = new String[0];
-		invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 1, invalidValues.length );
-		car.insurances = new String[1];
-		invalidValues = classValidator.getInvalidValues( car );
-		assertEquals( 0, invalidValues.length );
-	}
-}
diff --git a/hibernate-validator-legacy/src/test/resources/ValidatorMessages.properties b/hibernate-validator-legacy/src/test/resources/ValidatorMessages.properties
deleted file mode 100644
index 1a6908f..0000000
--- a/hibernate-validator-legacy/src/test/resources/ValidatorMessages.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#overriding of default keys
-
-#specific to my project
-long=is too damn long
-floor.name=Floor
-out.of.range=lower that {min} and greater than {max}
-floor.out.of.range={floor.name} cannot be {out.of.range}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/resources/ValidatorMessages_da.properties b/hibernate-validator-legacy/src/test/resources/ValidatorMessages_da.properties
deleted file mode 100644
index 1a6908f..0000000
--- a/hibernate-validator-legacy/src/test/resources/ValidatorMessages_da.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#overriding of default keys
-
-#specific to my project
-long=is too damn long
-floor.name=Floor
-out.of.range=lower that {min} and greater than {max}
-floor.out.of.range={floor.name} cannot be {out.of.range}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/resources/ValidatorMessages_fr.properties b/hibernate-validator-legacy/src/test/resources/ValidatorMessages_fr.properties
deleted file mode 100644
index caef3dd..0000000
--- a/hibernate-validator-legacy/src/test/resources/ValidatorMessages_fr.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#overriding of default keys
-
-#specific to my project
-long=est grave trop long
-floor.name=Etage
-out.of.range=plus petit que {min} ou plus grand que {max}
-floor.out.of.range={floor.name} ne peut pas �tre {out.of.range}
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/resources/hibernate.properties b/hibernate-validator-legacy/src/test/resources/hibernate.properties
deleted file mode 100644
index f886dc7..0000000
--- a/hibernate-validator-legacy/src/test/resources/hibernate.properties
+++ /dev/null
@@ -1,472 +0,0 @@
-######################
-### Query Language ###
-######################
-
-## define query language constants / function names
-
-hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'
-
-
-## select the classic query parser
-
-#hibernate.query.factory_class org.hibernate.hql.classic.ClassicQueryTranslatorFactory
-
-hibernate.format_sql true
-
-
-
-#################
-### Platforms ###
-#################
-
-## JNDI Datasource
-
-#hibernate.connection.datasource jdbc/test
-#hibernate.connection.username db2
-#hibernate.connection.password db2
-
-
-## HypersonicSQL
-
-hibernate.dialect org.hibernate.dialect.HSQLDialect
-hibernate.connection.driver_class org.hsqldb.jdbcDriver
-hibernate.connection.username sa
-hibernate.connection.password
-hibernate.connection.url jdbc:hsqldb:hsql://localhost
-hibernate.connection.url jdbc:hsqldb:test
-hibernate.connection.url jdbc:hsqldb:.
-
-
-## MySQL
-
-#hibernate.dialect org.hibernate.dialect.MySQLDialect
-#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
-#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
-#hibernate.connection.driver_class com.mysql.jdbc.Driver
-#hibernate.connection.url jdbc:mysql:///test
-#hibernate.connection.username emmanuel
-#hibernate.connection.password
-
-
-## Oracle
-
-#hibernate.dialect org.hibernate.dialect.OracleDialect
-#hibernate.dialect org.hibernate.dialect.Oracle9Dialect
-#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
-#hibernate.connection.username ora
-#hibernate.connection.password ora
-#hibernate.connection.url jdbc:oracle:thin:@localhost:1521:test
-
-
-## PostgreSQL
-
-#hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
-#hibernate.connection.driver_class org.postgresql.Driver
-#hibernate.connection.url jdbc:postgresql:annotations
-#hibernate.connection.username postgres
-#hibernate.connection.password hibernate
-#hibernate.query.substitutions yes 'Y', no 'N'
-
-
-## DB2
-
-#hibernate.dialect org.hibernate.dialect.DB2Dialect
-#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
-#hibernate.connection.url jdbc:db2:test
-#hibernate.connection.username db2
-#hibernate.connection.password db2
-
-## TimesTen (not supported yet)
-
-#hibernate.dialect org.hibernate.dialect.TimesTenDialect
-#hibernate.connection.driver_class com.timesten.jdbc.TimesTenDriver
-#hibernate.connection.url jdbc:timesten:direct:test
-#hibernate.connection.username
-#hibernate.connection.password 
-
-## DB2/400
-
-#hibernate.dialect org.hibernate.dialect.DB2400Dialect
-#hibernate.connection.username user
-#hibernate.connection.password password
-
-## Native driver
-#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
-#hibernate.connection.url jdbc:db2://systemname
-
-## Toolbox driver
-#hibernate.connection.driver_class com.ibm.as400.access.AS400JDBCDriver
-#hibernate.connection.url jdbc:as400://systemname
-
-
-## Derby (Not supported!)
-
-#hibernate.dialect org.hibernate.dialect.DerbyDialect
-#hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
-#hibernate.connection.username
-#hibernate.connection.password
-#hibernate.connection.url jdbc:derby:/test;create=true
-
-
-## Sybase
-
-#hibernate.dialect org.hibernate.dialect.SybaseDialect
-#hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver
-#hibernate.connection.username sa
-#hibernate.connection.password sasasa
-#hibernate.connection.url jdbc:sybase:Tds:co3061835-a:5000/tempdb
-
-
-## Mckoi SQL
-
-#hibernate.dialect org.hibernate.dialect.MckoiDialect
-#hibernate.connection.driver_class com.mckoi.JDBCDriver
-#hibernate.connection.url jdbc:mckoi:///
-#hibernate.connection.url jdbc:mckoi:local://C:/mckoi1.00/db.conf
-#hibernate.connection.username admin
-#hibernate.connection.password nimda
-
-
-## SAP DB
-
-#hibernate.dialect org.hibernate.dialect.SAPDBDialect
-#hibernate.connection.driver_class com.sap.dbtech.jdbc.DriverSapDB
-#hibernate.connection.url jdbc:sapdb://localhost/TST
-#hibernate.connection.username TEST
-#hibernate.connection.password TEST
-#hibernate.query.substitutions yes 'Y', no 'N'
-
-
-## MS SQL Server
-
-#hibernate.dialect org.hibernate.dialect.SQLServerDialect
-#hibernate.connection.username sa
-#hibernate.connection.password sa
-
-## JSQL Driver
-#hibernate.connection.driver_class com.jnetdirect.jsql.JSQLDriver
-#hibernate.connection.url jdbc:JSQLConnect://1E1/test
-
-## JTURBO Driver
-#hibernate.connection.driver_class com.newatlanta.jturbo.driver.Driver
-#hibernate.connection.url jdbc:JTurbo://1E1:1433/test
-
-## WebLogic Driver
-#hibernate.connection.driver_class weblogic.jdbc.mssqlserver4.Driver
-#hibernate.connection.url jdbc:weblogic:mssqlserver4:1E1:1433
-
-## Microsoft Driver (not recommended!)
-#hibernate.connection.driver_class com.microsoft.jdbc.sqlserver.SQLServerDriver
-#hibernate.connection.url jdbc:microsoft:sqlserver://1E1;DatabaseName=test;SelectMethod=cursor
-
-## jTDS (since version 0.9)
-#hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver
-#hibernate.connection.url jdbc:jtds:sqlserver://1E1/test
-
-## Interbase
-
-#hibernate.dialect org.hibernate.dialect.InterbaseDialect
-#hibernate.connection.username sysdba
-#hibernate.connection.password masterkey
-
-## DO NOT specify hibernate.connection.sqlDialect
-
-## InterClient
-
-#hibernate.connection.driver_class interbase.interclient.Driver
-#hibernate.connection.url jdbc:interbase://localhost:3060/C:/firebird/test.gdb
-
-## Pure Java
-
-#hibernate.connection.driver_class org.firebirdsql.jdbc.FBDriver
-#hibernate.connection.url jdbc:firebirdsql:localhost/3050:/firebird/test.gdb
-
-
-## Pointbase
-
-#hibernate.dialect org.hibernate.dialect.PointbaseDialect
-#hibernate.connection.driver_class com.pointbase.jdbc.jdbcUniversalDriver
-#hibernate.connection.url jdbc:pointbase:embedded:sample
-#hibernate.connection.username PBPUBLIC
-#hibernate.connection.password PBPUBLIC
-
-
-
-#################################
-### Hibernate Connection Pool ###
-#################################
-
-hibernate.connection.pool_size 1
-
-
-
-###########################
-### C3P0 Connection Pool###
-###########################
-
-#hibernate.c3p0.max_size 2
-#hibernate.c3p0.min_size 2
-#hibernate.c3p0.timeout 5000
-#hibernate.c3p0.max_statements 100
-#hibernate.c3p0.idle_test_period 3000
-#hibernate.c3p0.acquire_increment 2
-#hibernate.c3p0.validate false
-
-
-
-##############################
-### Proxool Connection Pool###
-##############################
-
-## Properties for external configuration of Proxool
-
-hibernate.proxool.pool_alias pool1
-
-## Only need one of the following
-
-#hibernate.proxool.existing_pool true
-#hibernate.proxool.xml proxool.xml
-#hibernate.proxool.properties proxool.properties
-
-
-
-#################################
-### Plugin ConnectionProvider ###
-#################################
-
-## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics)
-
-#hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.DBCPConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider
-
-
-
-#######################
-### Transaction API ###
-#######################
-
-## Enable automatic flush during the JTA beforeCompletion() callback
-## (This setting is relevant with or without the Transaction API)
-
-#hibernate.transaction.flush_before_completion
-
-
-## Enable automatic session close at the end of transaction
-## (This setting is relevant with or without the Transaction API)
-
-#hibernate.transaction.auto_close_session
-
-
-## the Transaction API abstracts application code from the underlying JTA or JDBC transactions
-
-#hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory
-#hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory
-
-
-## to use JTATransactionFactory, Hibernate must be able to locate the UserTransaction in JNDI
-## default is java:comp/UserTransaction
-## you do NOT need this setting if you specify hibernate.transaction.manager_lookup_class
-
-#jta.UserTransaction jta/usertransaction
-#jta.UserTransaction javax.transaction.UserTransaction
-#jta.UserTransaction UserTransaction
-
-
-## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager
-
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.JBossTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WebSphereTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.OrionTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.ResinTransactionManagerLookup
-
-
-
-##############################
-### Miscellaneous Settings ###
-##############################
-
-## print all generated SQL to the console
-
-#hibernate.show_sql true
-
-
-## add comments to the generated SQL
-
-#hibernate.use_sql_comments true
-
-
-## generate statistics
-
-#hibernate.generate_statistics true
-
-
-## auto schema export
-
-#hibernate.hbm2ddl.auto create-drop
-#hibernate.hbm2ddl.auto create
-#hibernate.hbm2ddl.auto update
-
-
-## specify a default schema and catalog for unqualified tablenames
-
-#hibernate.default_schema test
-#hibernate.default_catalog test
-
-
-## enable ordering of SQL UPDATEs by primary key
-
-hibernate.order_updates true
-
-
-## set the maximum depth of the outer join fetch tree
-
-hibernate.max_fetch_depth 1
-
-
-## set the default batch size for batch fetching
-
-hibernate.default_batch_fetch_size 100
-
-
-## rollback generated identifier values of deleted entities to default values
-
-#hibernate.use_identifer_rollback true
-
-
-## enable CGLIB reflection optimizer (enabled by default)
-
-#hibernate.cglib.use_reflection_optimizer false
-
-
-
-#####################
-### JDBC Settings ###
-#####################
-
-## specify a JDBC isolation level
-
-#hibernate.connection.isolation 4
-
-
-## enable JDBC autocommit (not recommended!)
-
-#hibernate.connection.autocommit true
-
-
-## set the JDBC fetch size
-
-#hibernate.jdbc.fetch_size 25
-
-
-## set the maximum JDBC 2 batch size (a nonzero value enables batching)
-
-#hibernate.jdbc.batch_size 0
-
-
-## enable batch updates even for versioned data
-
-hibernate.jdbc.batch_versioned_data true
-
-
-## enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default)
-
-#hibernate.jdbc.use_scrollable_resultset true
-
-
-## use streams when writing binary types to / from JDBC
-
-hibernate.jdbc.use_streams_for_binary true
-
-
-## use JDBC 3 PreparedStatement.getGeneratedKeys() to get the identifier of an inserted row
-
-#hibernate.jdbc.use_get_generated_keys false
-
-
-## choose a custom JDBC batcher
-
-# hibernate.jdbc.factory_class
-
-
-## enable JDBC result set column alias caching 
-## (minor performance enhancement for broken JDBC drivers)
-
-# hibernate.jdbc.wrap_result_sets
-
-
-## choose a custom SQL exception converter
-
-#hibernate.jdbc.sql_exception_converter
-
-
-
-##########################
-### Second-level Cache ###
-##########################
-
-## optimize chache for minimal "puts" instead of minimal "gets" (good for clustered cache)
-
-#hibernate.cache.use_minimal_puts true
-
-
-## set a prefix for cache region names
-
-hibernate.cache.region_prefix hibernate.test
-
-
-## disable the second-level cache
-
-#hibernate.cache.use_second_level_cache false
-
-
-## enable the query cache
-
-hibernate.cache.use_query_cache true
-
-
-## store the second-level cache entries in a more human-friendly format
-
-#hibernate.cache.use_structured_entries true
-
-
-## choose a cache implementation
-
-#hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.EmptyCacheProvider
-hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.TreeCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.OSCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.SwarmCacheProvider
-
-
-## choose a custom query cache implementation
-
-#hibernate.cache.query_cache_factory
-
-
-
-############
-### JNDI ###
-############
-
-## specify a JNDI name for the SessionFactory
-
-#hibernate.session_factory_name hibernate/session_factory
-
-
-## Hibernate uses JNDI to bind a name to a SessionFactory and to look up the JTA UserTransaction;
-## if hibernate.jndi.* are not specified, Hibernate will use the default InitialContext() which
-## is the best approach in an application server
-
-#file system
-#hibernate.jndi.class com.sun.jndi.fscontext.RefFSContextFactory
-#hibernate.jndi.url file:/
-
-#WebSphere
-#hibernate.jndi.class com.ibm.websphere.naming.WsnInitialContextFactory
-#hibernate.jndi.url iiop://localhost:900/
-
diff --git a/hibernate-validator-legacy/src/test/resources/log4j.properties b/hibernate-validator-legacy/src/test/resources/log4j.properties
deleted file mode 100644
index bec5958..0000000
--- a/hibernate-validator-legacy/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-
-log4j.rootLogger=warn, stdout
-
-log4j.logger.org.hibernate=warn
-
-
-### log just the SQL
-log4j.logger.org.hibernate.SQL=warn
-
-#log4j.logger.org.hibernate.engine.CascadingAction=debug
-
-### log JDBC bind parameters ###
-#log4j.logger.org.hibernate.type=debug
-
-### log schema export/update ###
-log4j.logger.org.hibernate.tool.hbm2ddl=warn
-
-### log cache activity ###
-#log4j.logger.org.hibernate.cache=debug
-
-### enable the following line if you want to track down connection ###
-### leakages when using DriverManagerConnectionProvider ###
-#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
-
-### annotation logs
-#log4j.logger.org.hibernate.annotation=info
-#log4j.logger.org.hibernate.cfg=info
-#log4j.logger.org.hibernate.cfg.SettingsFactory=info
-#log4j.logger.org.hibernate.cfg.AnnotationBinder=info
-#log4j.logger.org.hibernate.cfg.AnnotationConfiguration=info
-#log4j.logger.org.hibernate.cfg.Ejb3Column=info
\ No newline at end of file
diff --git a/hibernate-validator-legacy/src/test/resources/messages_en.properties b/hibernate-validator-legacy/src/test/resources/messages_en.properties
deleted file mode 100644
index b9ba811..0000000
--- a/hibernate-validator-legacy/src/test/resources/messages_en.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-long=is too damn long
-floor.name=Floor
-out.of.range=lower that {min} and greater than {max}
-floor.out.of.range={floor.name} cannot (escaping #{el}) be {out.of.range}
-
-validator.assertFalse=assertion failed
-validator.assertTrue=assertion failed
-validator.length=length must be between {min} and {max}
-validator.max=must less than or equal to {value}
-validator.min=must greater than or equal to {value}
-validator.notNull=may not be null
-validator.past=must be a past date
-validator.pattern=must match "{regex}"
-validator.range=must be between {min} and {max}
-validator.size=size must be between {min} and {max}
\ No newline at end of file
diff --git a/hibernate-validator-tck-runner/pom.xml b/hibernate-validator-tck-runner/pom.xml
deleted file mode 100644
index c02ba5b..0000000
--- a/hibernate-validator-tck-runner/pom.xml
+++ /dev/null
@@ -1,265 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>hibernate-validator-parent</artifactId>
-        <groupId>org.hibernate</groupId>
-        <version>4.1.0.Final</version>
-    </parent>
-    <artifactId>hibernate-validator-tck-runner</artifactId>
-    <name>Hibernate Validator TCK Runner</name>
-    <description>Aggregates dependencies and run's the JSR-303 TCK</description>
-
-    <dependencies>
-        <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <classifier>jdk15</classifier>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate.jsr303.tck</groupId>
-            <artifactId>jsr303-tck</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.jboss.test-harness</groupId>
-            <artifactId>jboss-test-harness-jboss-as-51</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.hibernate</groupId>
-                    <artifactId>hibernate-entitymanager</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!--
-        Provided dependencies.
-        JAXB is needed when running on Java5. In this environment these dependencies have to be added
-        On Java6 jaxb is part of the runtime environment
-        -->
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <jboss.home>/opt/java/jboss-5.1.0.GA</jboss.home>
-        <validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
-        <remote.debug />
-    </properties>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>generate-test-sources</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <stripVersion>true</stripVersion>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.hibernate.jsr303.tck</groupId>
-                                    <artifactId>jsr303-tck</artifactId>
-                                    <type>xml</type>
-                                    <classifier>suite</classifier>
-                                    <overWrite>false</overWrite>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>javax.validation</groupId>
-                                    <artifactId>validation-api</artifactId>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.hibernate</groupId>
-                                    <artifactId>hibernate-validator</artifactId>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.slf4j</groupId>
-                                    <artifactId>slf4j-log4j12</artifactId>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <suiteXmlFiles>
-                        <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
-                    </suiteXmlFiles>
-                    <argLine>-Xmx128m</argLine>
-                    <forkMode>once</forkMode>
-                    <systemProperties>
-                        <property>
-                            <name>validation.provider</name>
-                            <value>${validation.provider}</value>
-                        </property>
-                    </systemProperties>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-report-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-test-report</id>
-                        <phase>test</phase>
-                        <goals>
-                            <goal>report-only</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
-                    <outputName>test-report</outputName>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-    <profiles>
-        <profile>
-            <id>incontainer-debug</id>
-            <activation>
-                <property>
-                    <name>debug</name>
-                </property>
-            </activation>
-            <properties>
-                <remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
-                    -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
-                </remote.debug>
-            </properties>
-        </profile>
-        <profile>
-            <id>incontainer</id>
-            <activation>
-                <property>
-                    <name>incontainer</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <suiteXmlFiles>
-                                <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
-                            </suiteXmlFiles>
-                            <systemProperties>
-                                <property>
-                                    <name>validation.provider</name>
-                                    <value>${validation.provider}</value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.standalone</name>
-                                    <value>false</value>
-                                </property>
-                                <property>
-                                    <name>jboss.home</name>
-                                    <value>${jboss.home}</value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.container.javaOpts</name>
-                                    <value>-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true
-                                        -Dvalidation.provider=${validation.provider} ${remote.debug}
-                                    </value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.container.forceRestart</name>
-                                    <value>true</value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.runIntegrationTests</name>
-                                    <value>true</value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.libraryDirectory</name>
-                                    <value>target/dependency/lib</value>
-                                </property>
-                                <property>
-                                    <name>org.jboss.testharness.outputDirectory</name>
-                                    <value>target</value>
-                                </property>
-                            </systemProperties>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <id>write-artifacts-to-disk</id>
-            <activation>
-                <property>
-                    <name>dumpArtifacts</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>exec-maven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>generate-jsr-303-artifacts</id>
-                                <phase>test-compile</phase>
-                                <goals>
-                                    <goal>java</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <configuration>
-                            <classpathScope>test</classpathScope>
-                            <mainClass>org.jboss.testharness.api.TCK</mainClass>
-                            <systemProperties>
-                                <systemProperty>
-                                    <key>dumpArtifacts</key>
-                                    <value>true</value>
-                                </systemProperty>
-                                <systemProperty>
-                                    <key>org.jboss.testharness.outputDirectory</key>
-                                    <value>target/jsr303-artifacts</value>
-                                </systemProperty>
-                                <systemProperty>
-                                    <key>org.jboss.testharness.libraryDirectory</key>
-                                    <value>target/jsr303-artifacts/dependencies</value>
-                                </systemProperty>
-                            </systemProperties>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-</project>
diff --git a/hibernate-validator-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties b/hibernate-validator-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
deleted file mode 100644
index 70dafc5..0000000
--- a/hibernate-validator-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-org.jboss.testharness.spi.StandaloneContainers=org.hibernate.jsr303.tck.util.StandaloneContainersImpl
-org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.servlet.ServletTestLauncher
-org.jboss.testharness.testPackage=org.hibernate.jsr303.tck.tests
\ No newline at end of file
diff --git a/hibernate-validator-tck-runner/src/test/resources/jndi.properties b/hibernate-validator-tck-runner/src/test/resources/jndi.properties
deleted file mode 100644
index c5425b4..0000000
--- a/hibernate-validator-tck-runner/src/test/resources/jndi.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#jboss JNDI properties
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
diff --git a/hibernate-validator/license.txt b/hibernate-validator/license.txt
deleted file mode 100644
index d645695..0000000
--- a/hibernate-validator/license.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/hibernate-validator/pom.xml b/hibernate-validator/pom.xml
deleted file mode 100644
index 207d307..0000000
--- a/hibernate-validator/pom.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <artifactId>hibernate-validator-parent</artifactId>
-        <groupId>org.hibernate</groupId>
-        <version>4.1.0.Final</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator</artifactId>
-    <name>Hibernate Validator</name>
-    <description>
-        Hibernate's Bean Validation (JSR-303) reference implementation.
-    </description>
-    <distributionManagement>
-        <site>
-            <id>site</id>
-            <url>http://validator.hibernate.org</url>
-        </site>
-    </distributionManagement>
-    <dependencies>
-        <!--
-        Compile time dependencies
-        -->
-        <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.googlecode.jtype</groupId>
-            <artifactId>jtype</artifactId>
-        </dependency>
-
-        <!--
-        Runtime dependencies
-        -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>runtime</scope>
-            <optional>true</optional>
-        </dependency>
-
-        <!--
-        Provided dependencies.
-        JAXB is needed when running on Java5. In this environment these dependencies have to be added (unless
-        xml configuration is explicitly disabled via Configuration.ignoreXmlConfiguration)
-        On Java6 jaxb is part of the runtime environment                                                                                                           
-        -->
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <!--
-        Optional dependencies
-        -->
-        <dependency>
-            <groupId>org.hibernate.javax.persistence</groupId>
-            <artifactId>hibernate-jpa-2.0-api</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <!--
-        Test dependencies
-        -->
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-            <classifier>jdk15</classifier>
-        </dependency>
-        <dependency>
-          <groupId>org.easymock</groupId>
-          <artifactId>easymock</artifactId>
-          <scope>test</scope>
-        </dependency>        
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-entitymanager</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
-        <jdbc.driver>org.h2.Driver</jdbc.driver>
-        <jdbc.url>jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1</jdbc.url>
-        <jdbc.user>sa</jdbc.user>
-        <jdbc.pass />
-        <jdbc.isolation />
-    </properties>
-
-    <build>
-        <defaultGoal>test</defaultGoal>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-            <resource>
-                <directory>src/main/xsd</directory>
-                <targetPath>META-INF</targetPath>
-            </resource>
-        </resources>
-        <testResources>
-            <testResource>
-                <filtering>true</filtering>
-                <directory>src/test/resources</directory>
-                <includes>
-                    <include>**/*.properties</include>
-                    <include>**/*.xml</include>
-                </includes>
-            </testResource>
-        </testResources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jaxb2-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>xjc</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <packageName>org.hibernate.validator.xml</packageName>
-                    <outputDirectory>${basedir}/target/generated-sources</outputDirectory>
-                    <extension>true</extension>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestFile>${pom.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-                    </archive>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Import-Package>
-                            javax.persistence.*;version="[2.0.0,3.0.0)";resolution:=optional,
-                            javax.validation.*;version="[1.0.0,2.0.0)",
-                            javax.xml.*;version="0",
-                            org.xml.sax.*;version="0",
-                            org.slf4j.*;version="[1.5.6,2.0.0)"
-                        </Import-Package>
-                        <Export-Package>
-                            org.hibernate.validator;version="${pom.version}",
-                            org.hibernate.validator.constraints;version="${pom.version}",
-                            org.hibernate.validator.messageinterpolation;version="${pom.version}",
-                            org.hibernate.validator.resourceloading;version="${pom.version}",
-                        </Export-Package>
-                    </instructions>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>bundle-manifest</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>manifest</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <suiteXmlFiles>
-                        <suiteXmlFile>${basedir}/src/test/suite/unit-tests.xml</suiteXmlFile>
-                    </suiteXmlFiles>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-report-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <artifactSet>
-                                <includes>
-                                    <include>com.googlecode.jtype:jtype</include>
-                                </includes>
-                            </artifactSet>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.googlecode.jtype</pattern>
-                                    <shadedPattern>org.hibernate.validator.jtype</shadedPattern>
-                                </relocation>
-                            </relocations>
-                            <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <docfilessubdirs>true</docfilessubdirs>
-                    <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
-                    <links>
-                        <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
-                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api/</link>
-                    </links>
-                    <packagesheader>Hibernate Validator Packages</packagesheader>
-                    <doctitle>Hibernate Validator ${project.version}</doctitle>
-                    <windowtitle>Hibernate Validator ${project.version}</windowtitle>
-                    <bottom>
-                        <![CDATA[Copyright © ${inceptionYear}-{currentYear} <a href="http://redhat.com">Red Hat Middleware, LLC.</a>  All Rights Reserved]]></bottom>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.jboss.maven.plugins</groupId>
-                <artifactId>maven-jdocbook-plugin</artifactId>
-                <extensions>true</extensions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.hibernate</groupId>
-                        <artifactId>hibernate-jdocbook-style</artifactId>
-                        <version>2.0.1</version>
-                        <type>jdocbook-style</type>
-                    </dependency>
-                </dependencies>
-                <configuration>
-                    <sourceDocumentName>master.xml</sourceDocumentName>
-                    <sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
-                    <masterTranslation>en-US</masterTranslation>
-                    <imageResource>
-                        <directory>${basedir}/src/main/docbook/en-US/images</directory>
-                    </imageResource>
-                    <formats>
-                        <format>
-                            <formatName>pdf</formatName>
-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl</stylesheetResource>
-                            <finalName>hibernate_validator_reference.pdf</finalName>
-                        </format>
-                        <format>
-                            <formatName>html_single</formatName>
-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl
-                            </stylesheetResource>
-                            <finalName>index.html</finalName>
-                        </format>
-                        <format>
-                            <formatName>html</formatName>
-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl
-                            </stylesheetResource>
-                            <finalName>index.html</finalName>
-                        </format>
-                    </formats>
-                    <options>
-                        <xincludeSupported>true</xincludeSupported>
-                        <xmlTransformerType>saxon</xmlTransformerType>
-                        <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
-                        <!--     could also locate the docbook dependency and inspect its version... -->
-                        <docbookVersion>1.72.0</docbookVersion>
-                        <localeSeparator>-</localeSeparator>
-                    </options>
-                    <profiling>
-                        <enabled>true</enabled>
-                    </profiling>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-doc</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>resources</goal>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.jboss.maven.plugins</groupId>
-                <artifactId>maven-jdocbook-style-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptors>
-                        <descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
-                    </descriptors>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-release-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.twdata.maven</groupId>
-                <artifactId>maven-cli-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </reporting>
-</project>
diff --git a/hibernate-validator/readme.txt b/hibernate-validator/readme.txt
deleted file mode 100644
index d74ef63..0000000
--- a/hibernate-validator/readme.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-
-                          Hibernate Validator
-
-  What is it?
-  -----------
-
-  This is the reference implementation of JSR 303 - Bean Validation. 
-  Bean Validation defines a metadata model and API for JavaBean validation. 
-  The default metadata source is annotations, with the ability to override and extend 
-  the meta-data through the use of XML validation descriptors.
-
-  History
-  -------
-
-  Prior to version 4.x Hibernate Validators was based on a different source base which 
-  is not based on JSR 303. This code can be accessed via 
-  http://anonsvn.jboss.org/repos/hibernate/validator/trunk/hibernate-validator-legacy
-
-  Documentation
-  -------------
-
-  The documentation for this release is included in the docs directory of distribution package
-  or online under http://www.hibernate.org/subprojects/validator/docs.html
-
-  Release Notes
-  -------------
-
-  The full list of changes for this release can be found at
-  http://opensource.atlassian.com/projects/hibernate/secure/ReleaseNote.jspa?projectId=10060&version=11091
-
-  System Requirements
-  -------------------
-
-  JDK 1.5 or above.
-
-  Using Hibernate Validator
-  -------------------------
-
-  - In case you use the distribution archive from the download site, copy hibernate-validator-*.jar together
-    with all jar files from lib into the classpath of your application. You can switch the slf4j binding
-    jars for log4j (log4j-<version>.jar and slf4j-log4j12-<version>.jar) with the slf4j binding files of
-    your choice. See http://www.slf4j.org/manual.html
-    In case you are using Java 5 you have to also include all the jar files from the jdk5 subdirectory.
-    The jar files contain the classes needed for using JAXB. If XML configuration is disabled via
-    Configuration.ignoreXmlConfiguration the jar files from the jdk5 subdirectory don't have to be added. 
-
-  or 
-
-  - Add the following to your maven or ivy dependency list:
-
-    <dependency>
-        <groupId>org.hibernate</groupId>
-        <artifactId>hibernate-validator</artifactId>
-        <version>${project.version}</version>
-    </dependency>
-
-    Hibernate Validator can be found in the JBoss Maven repository: http://repository.jboss.com/maven2/
-
-  Licensing
-  ---------
-
-  Please see the file called license.txt
-
-  Hibernate Validator URLs
-  ------------------------
-
-  Home Page:          http://validator.hibernate.org
-  Downloads:          http://www.hibernate.org/subprojects/validator/download.html
-  Mailing Lists:      http://www.hibernate.org/community/mailinglists.html
-  Source Code:        http://anonsvn.jboss.org/repos/hibernate/validator/trunk/
-  Issue Tracking:     http://opensource.atlassian.com/projects/hibernate/browse/HV
diff --git a/hibernate-validator/src/main/assembly/dist.xml b/hibernate-validator/src/main/assembly/dist.xml
deleted file mode 100644
index 6015fa4..0000000
--- a/hibernate-validator/src/main/assembly/dist.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<assembly>
-    <id>dist</id>
-    <formats>
-        <format>tar.gz</format>
-        <format>zip</format>
-    </formats>
-
-    <dependencySets>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib</outputDirectory>
-            <scope>runtime</scope>
-            <excludes>
-                <exclude>com.googlecode.jtype:jtype</exclude>
-                <exclude>javax.xml.bind:jaxb-api</exclude>
-                <exclude>com.sun.xml.bind:jaxb-impl</exclude>
-                <exclude>javax.xml.stream:stax-api</exclude>
-                <exclude>javax.activation:activation</exclude>
-                <exclude>org.hibernate.java-persistence:jpa-api</exclude>
-            </excludes>
-        </dependencySet>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib/jdk5</outputDirectory>
-            <scope>provided</scope>
-            <includes>
-                <include>javax.xml.bind:jaxb-api</include>
-                <include>com.sun.xml.bind:jaxb-impl</include>
-                <include>javax.xml.stream:stax-api</include>
-                <include>javax.activation:activation</include>
-            </includes>
-        </dependencySet>      
-    </dependencySets>
-
-    <files>
-      <file>
-        <source>readme.txt</source>
-        <outputDirectory>/</outputDirectory>
-        <filtered>true</filtered>
-      </file>
-      <file>
-        <source>license.txt</source>
-        <outputDirectory>/</outputDirectory>
-      </file>
-    </files>
-
-    <fileSets>
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory/>
-            <excludes>
-                <exclude>*-javadoc.jar</exclude>
-                <exclude>*-sources.jar</exclude>
-            </excludes>
-            <includes>
-                <include>hibernate-*.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target/apidocs</directory>
-            <outputDirectory>docs/api</outputDirectory>
-        </fileSet>  
-        <fileSet>
-            <directory>target/docbook/publish</directory>
-            <outputDirectory>docs/reference</outputDirectory>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <outputDirectory/>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <excludes>
-                <exclude>dependency-reduced-pom.xml</exclude>
-                <exclude>*.txt</exclude>
-                <exclude>**/target/**</exclude>
-                <exclude>*.iml</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-
-</assembly>
diff --git a/hibernate-validator/src/main/docbook/en-US/hv.ent b/hibernate-validator/src/main/docbook/en-US/hv.ent
deleted file mode 100644
index cd7d8f9..0000000
--- a/hibernate-validator/src/main/docbook/en-US/hv.ent
+++ /dev/null
@@ -1,5 +0,0 @@
-<!ENTITY version "WORKING">
-<!ENTITY bvVersion "1.0.0.GA">
-<!ENTITY today "TODAY">
-<!ENTITY copyrightYear "2009, 2010">
-<!ENTITY copyrightHolder "Red Hat, Inc. & Gunnar Morling">
\ No newline at end of file
diff --git a/hibernate-validator/src/main/docbook/en-US/images/hibernate_logo_a.png b/hibernate-validator/src/main/docbook/en-US/images/hibernate_logo_a.png
deleted file mode 100644
index 0a343c4..0000000
Binary files a/hibernate-validator/src/main/docbook/en-US/images/hibernate_logo_a.png and /dev/null differ
diff --git a/hibernate-validator/src/main/docbook/en-US/master.xml b/hibernate-validator/src/main/docbook/en-US/master.xml
deleted file mode 100644
index 7d195f9..0000000
--- a/hibernate-validator/src/main/docbook/en-US/master.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: master.xml 19639 2010-06-01 11:52:20Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "hv.ent">
-%BOOK_ENTITIES;
-]>
-
-<book>
-    <bookinfo>
-        <title>Hibernate Validator</title>
-        <subtitle>JSR 303 Reference Implementation</subtitle>
-        <subtitle>Reference Guide</subtitle>
-        <releaseinfo>&version;</releaseinfo>
-        <pubdate>&today;</pubdate>
-        <productnumber>&version;</productnumber>
-        <copyright>
-            <year>©rightYear;</year>
-            <holder>©rightHolder;</holder>
-        </copyright>
-        <authorgroup>
-            <author>
-                <firstname>Hardy</firstname>
-                <surname>Ferentschik</surname>
-            </author>
-            <author>
-                <firstname>Gunnar</firstname>
-                <surname>Morling</surname>
-            </author>
-        </authorgroup>
-    </bookinfo>
-
-    <toc></toc>
-
-    <xi:include href="modules/preface.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/gettingstarted.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/usingvalidator.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/customconstraints.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/xmlconfiguration.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/bootstrapping.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/integration.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/programmaticapi.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-	<xi:include href="modules/annotationprocessor.xml"
-			    xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-    <xi:include href="modules/furtherreading.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude"/>
-</book>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml b/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
deleted file mode 100644
index 004e9ce..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
+++ /dev/null
@@ -1,484 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: annotationprocessor.xml 19639 2010-06-01 11:52:20Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter>
-  <title id="annotation-processor">Annotation Processor (EXPERIMENTAL)</title>
-
-  <para>Have you ever caught yourself by unintentionally doing things
-  like</para>
-
-  <itemizedlist>
-    <listitem>
-      <para>annotating Strings with @Min to specify a minimum length (instead
-      of using @Size)</para>
-    </listitem>
-
-    <listitem>
-      <para>annotating the setter of a JavaBean property (instead of the
-      getter method)</para>
-    </listitem>
-
-    <listitem>
-      <para>annotating static fields/methods with constraint annotations
-      (which is not supported)?</para>
-    </listitem>
-  </itemizedlist>
-
-  <para>Then the Hibernate Validator Annotation Processor is the right thing
-  for you. It helps preventing such mistakes by plugging into the build
-  process and raising compilation errors whenever constraint annotations are
-  incorrectly used.</para>
-
-  <warning>
-    <para>A first version of the Hibernate Validator Annotation Processor is
-    part of Hibernate Validator since release 4.1. It is currently still under
-    development and should therefore be considered as an experimental feature.
-    Some <link linkend="section-known-issues">known issues</link> can be found
-    at the end of this chapter. In case any problems arise when using the
-    processor feel free to ask for help at the <ulink
-    url="https://forum.hibernate.org/viewforum.php?f=9">forum</ulink> or
-    create an issue within<ulink
-    url="http://opensource.atlassian.com/projects/hibernate/browse/HV/component/10356">
-    JIRA</ulink>.</para>
-  </warning>
-
-  <section>
-    <title>Prerequisites</title>
-
-    <para>The Hibernate Validator Annotation Processor is based on the
-    "Pluggable Annotation Processing API" as defined by <ulink
-    url="http://jcp.org/en/jsr/detail?id=269">JSR 269</ulink>. This API is
-    part of the Java Platform since Java 6. So be sure to use this or a later
-    version.</para>
-  </section>
-
-  <section id="section-features-of-the-ap">
-    <title>Features</title>
-
-    <para>As of Hibernate Validator 4.1 the Hibernate Validator Annotation
-    Processor checks that:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>constraint annotations are allowed for the type of the annotated
-        element</para>
-      </listitem>
-
-      <listitem>
-        <para>JavaBean getter methods are annotated in case of property
-        validation</para>
-      </listitem>
-
-      <listitem>
-        <para>only non-static fields or properties are annotated with
-        constraint annotations</para>
-      </listitem>
-
-      <listitem>
-        <para>only non-primitive fields or properties are annotated with
-        @Valid</para>
-      </listitem>
-
-      <listitem>
-        <para>only such annotation types are annotated with constraint
-        annotations which are constraint annotations themselves</para>
-      </listitem>
-    </itemizedlist>
-  </section>
-
-  <section>
-    <title>Options</title>
-
-    <para>The behavior of the Hibernate Validator Annotation Processor can be
-    controlled using the <ulink
-    url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
-    options</ulink> listed in table<xref
-    linkend="table_processor_options" />:</para>
-
-    <table id="table_processor_options">
-      <title>Hibernate Validator Annotation Processor options</title>
-
-      <tgroup cols="2">
-        <thead>
-          <row>
-            <entry align="center">Option</entry>
-
-            <entry align="center">Explanation</entry>
-          </row>
-        </thead>
-
-        <tbody>
-          <row>
-            <entry><varname>diagnosticKind</varname></entry>
-
-            <entry>Controls how constraint problems are reported. Must be the
-            string representation of one of the values from the enum
-            <classname>javax.tools.Diagnostic.Kind</classname>, e.g.
-            <classname>WARNING</classname>. A value of
-            <classname>ERROR</classname> will cause compilation to halt
-            whenever the AP detects a constraint problem. Defaults to
-            <classname>ERROR</classname>.</entry>
-          </row>
-
-          <row>
-            <entry><varname>verbose</varname></entry>
-
-            <entry>Controls whether detailed processing information shall be
-            displayed or not, useful for debugging purposes. Must be either
-            <varname>true</varname> or<varname>false</varname>. Defaults to
-            <varname>false</varname>.</entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-
-  <section>
-    <title>Using the Annotation Processor</title>
-
-    <para>This section shows in detail how to integrate the Hibernate
-    Validator Annotation Processor into command line builds (javac, Ant,
-    Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA,
-    NetBeans).</para>
-
-    <section>
-      <title>Command line builds</title>
-
-      <section>
-        <title>javac</title>
-
-        <para>When compiling on the command line using <ulink
-        url="http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html">javac</ulink>,
-        specify the following JARs using the "processorpath" option:</para>
-
-        <itemizedlist>
-          <listitem>
-            <para>validation-api-&bvVersion;.jar</para>
-          </listitem>
-
-          <listitem>
-            <para>hibernate-validator-annotation-processor-&version;.jar</para>
-          </listitem>
-        </itemizedlist>
-
-        <para>The following listing shows an example. The processor will be
-        detected automatically by the compiler and invoked during
-        compilation.</para>
-
-        <example>
-          <title>Using the annotation processor with javac</title>
-
-          <programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java \
-   -cp /path/to/validation-api-&bvVersion;.jar \ 
-   -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar                  </programlisting>
-        </example>
-      </section>
-
-      <section>
-        <title>Apache Ant</title>
-
-        <para>Similar to directly working with javac, the annotation processor
-        can be added as as compiler argument when invoking the <ulink
-        url="http://ant.apache.org/manual/CoreTasks/javac.html">javac
-        task</ulink> for <ulink url="http://ant.apache.org/">Apache
-        Ant</ulink>:</para>
-
-        <example>
-          <title>Using the annotation processor with Ant</title>
-
-          <programlisting><javac srcdir="src/main"
-       destdir="build/classes"
-       classpath="/path/to/validation-api-&bvVersion;.jar">
-       <compilerarg value="-processorpath" />
-       <compilerarg value="/path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"/>
-</javac></programlisting>
-        </example>
-      </section>
-
-      <section>
-        <title>Maven</title>
-
-        <para>There are several options for integrating the annotation
-        processor with <ulink url="http://maven.apache.org/">Apache
-        Maven</ulink>. Generally it is sufficient to add the Hibernate
-        Validator Annotation Processor as dependency to your project:</para>
-
-        <example>
-          <title>Adding the HV Annotation Processor as dependency</title>
-
-          <programlisting>...
-<dependency>
-    <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator-annotation-processor</artifactId>
-    <version>&version;</version>
-    <scope>compile</scope>
-</dependency>
-...        </programlisting>
-        </example>
-
-        <para>The processor will then be executed automatically by the
-        compiler. This basically works, but comes with the disadavantage that
-        in some cases messages from the annotation processor are not displayed
-        (see <ulink
-        url="http://jira.codehaus.org/browse/MCOMPILER-66">MCOMPILER-66</ulink>).</para>
-
-        <para>Another option is using the <ulink
-        url="http://code.google.com/p/maven-annotation-plugin/">Maven
-        Annotation Plugin</ulink>. At the time of this writing the plugin is
-        not yet available in any of the well-known repositories. Therefore you
-        have to add the project's own repository to your settings.xml or
-        pom.xml:</para>
-
-        <para><example>
-            <title>Adding the Maven Annotation Plugin repository</title>
-
-            <programlisting>...
-<pluginRepositories>
-    <pluginRepository>
-        <id>maven-annotation-plugin-repo</id>
-        <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>
-    </pluginRepository>
-</pluginRepositories>
-...                      </programlisting>
-          </example> Now disable the standard annotation processing performed
-        by the compiler plugin and configure the annotation plugin by
-        specifying an execution and adding the Hibernate Validator Annotation
-        Processor as plugin dependency (that way the AP is not visible on the
-        project's actual classpath):</para>
-
-        <example>
-          <title>Configuring the Maven Annotation Plugin</title>
-
-          <programlisting>...
-<plugin>
-    <artifactId>maven-compiler-plugin</artifactId>
-    <configuration>
-        <source>1.6</source>
-        <target>1.6</target>
-        <compilerArgument>-proc:none</compilerArgument>
-    </configuration>
-</plugin>
-<plugin>
-    <groupId>org.bsc.maven</groupId>
-    <artifactId>maven-processor-plugin</artifactId>
-    <version>1.3.4</version>
-    <executions>
-        <execution>
-            <id>process</id>
-            <goals>
-                <goal>process</goal>
-            </goals>
-            <phase>process-sources</phase>
-        </execution>
-    </executions>
-    <dependencies>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator-annotation-processor</artifactId>
-            <version>&version;</version>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
-</plugin>
-...
-                    </programlisting>
-        </example>
-      </section>
-    </section>
-
-    <section>
-      <title>IDE builds</title>
-
-      <section>
-        <title>Eclipse</title>
-
-        <para>Do the following to use the annotation processor within the
-        <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE:</para>
-
-        <itemizedlist>
-          <listitem>
-            <para>Right-click your project, choose "Properties"</para>
-          </listitem>
-
-          <listitem>
-            <para>Go to "Java Compiler" and make sure, that "Compiler
-            compliance level" is set to "1.6". Otherwise the processor won't
-            be activated</para>
-          </listitem>
-
-          <listitem>
-            <para>Go to "Java Compiler - Annotation Processing" and choose
-            "Enable annotation processing"</para>
-          </listitem>
-
-          <listitem>
-            <para>Go to "Java Compiler - Annotation Processing - Factory Path"
-            and add the following JARs:</para>
-
-            <itemizedlist>
-              <listitem>
-                <para>validation-api-&bvVersion;.jar</para>
-              </listitem>
-
-              <listitem>
-                <para>hibernate-validator-annotation-processor-&version;.jar</para>
-              </listitem>
-            </itemizedlist>
-          </listitem>
-
-          <listitem>
-            <para>Confirm the workspace rebuild</para>
-          </listitem>
-        </itemizedlist>
-
-        <para>You now should see any annotation problems as regular error
-        markers within the editor and in the "Problem" view:</para>
-
-        <mediaobject>
-          <imageobject>
-            <imagedata align="center" arch="" contentwidth="150mm"
-                       fileref="annotation_processor_eclipse.png" />
-          </imageobject>
-        </mediaobject>
-      </section>
-
-      <section>
-        <title>IntelliJ IDEA</title>
-
-        <para>The following steps must be followed to use the annotation
-        processor within <ulink url="http://www.jetbrains.com/idea/">IntelliJ
-        IDEA</ulink> (version 9 and above):</para>
-
-        <itemizedlist>
-          <listitem>
-            <para>Go to "File", then "Settings",</para>
-          </listitem>
-
-          <listitem>
-            <para>Expand the node "Compiler", then "Annotation
-            Processors"</para>
-          </listitem>
-
-          <listitem>
-            <para>Choose "Enable annotation processing" and enter the
-            following as "Processor path":
-            /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar</para>
-          </listitem>
-
-          <listitem>
-            <para>Add the processor's fully qualified name
-            <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>
-            to the "Annotation Processors" list</para>
-          </listitem>
-
-          <listitem>
-            <para>If applicable add you module to the "Processed Modules"
-            list</para>
-          </listitem>
-        </itemizedlist>
-
-        <para>Rebuilding your project then should show any erronous constraint
-        annotations:</para>
-
-        <mediaobject>
-          <imageobject>
-            <imagedata align="center" arch="" contentwidth="150mm"
-                       fileref="annotation_processor_intellij.png" />
-          </imageobject>
-        </mediaobject>
-      </section>
-
-      <section>
-        <title>NetBeans</title>
-
-        <para>Starting with version 6.9, also the <ulink
-        url="http://www.netbeans.org/">NetBeans</ulink> IDE supports using
-        annotation processors within the IDE build. To do so, do the
-        following:</para>
-
-        <itemizedlist>
-          <listitem>
-            <para>Right-click your project, choose "Properties"</para>
-          </listitem>
-
-          <listitem>
-            <para>Go to "Libraries", tab "Processor", and add the following
-            two JARs:</para>
-
-            <itemizedlist>
-              <listitem>
-                <para>validation-api-&bvVersion;.jar</para>
-              </listitem>
-
-              <listitem>
-                <para>hibernate-validator-annotation-processor-&version;.jar</para>
-              </listitem>
-            </itemizedlist>
-          </listitem>
-
-          <listitem>
-            <para>Go to "Build - Compiling", select "Enable Annotation
-            Processing" and "Enable Annotation Processing in Editor". Add the
-            annotation processor by specifying its fully qualified name
-            <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname></para>
-          </listitem>
-        </itemizedlist>
-
-        <para>Any constraint annotation problems will then be marked directly
-        within the editor:</para>
-
-        <mediaobject>
-          <imageobject>
-            <imagedata align="center" arch="" contentwidth="150mm"
-                       fileref="annotation_processor_netbeans.png" />
-          </imageobject>
-        </mediaobject>
-      </section>
-    </section>
-  </section>
-
-  <section id="section-known-issues">
-    <title>Known issues</title>
-
-    <para>The following known issues exist as of May 2010:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para><ulink
-        url="http://opensource.atlassian.com/projects/hibernate/browse/HV-308">HV-308</ulink>:
-        Additional validators registered for a constraint <ulink
-        url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/#d0e1957">using
-        XML</ulink> are not evaluated by the annotation processor.</para>
-      </listitem>
-
-      <listitem>
-        <para>Sometimes custom constraints can't be <ulink
-        url="http://opensource.atlassian.com/projects/hibernate/browse/HV-293">properly
-        evaluated</ulink> when using the processor within Eclipse. Cleaning
-        the project can help in these situations. This seems to be an issue
-        with the Eclipse JSR 269 API implementation, but further investigation
-        is required here.</para>
-      </listitem>
-    </itemizedlist>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml b/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml
deleted file mode 100644
index 9a59cb3..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: bootstrapping.xml 19512 2010-05-14 10:27:26Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-bootstrapping">
-  <title>Bootstrapping</title>
-
-  <para>We already seen in <xref linkend="section-validator-instance" /> the
-  easiest way to create a <classname>Validator</classname> instance -
-  <methodname>Validation.buildDefaultValidatorFactory</methodname>. In this
-  chapter we have a look at the other methods in
-  <classname>javax.validation.Validation</classname> and how they allow to
-  configure several aspects of Bean Validation at bootstrapping time.</para>
-
-  <para>The different bootstrapping options allow, amongst other things, to
-  bootstrap any Bean Validation implementation on the classpath. Generally, an
-  available provider is discovered by the <ulink
-  url="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">Java
-  Service Provider</ulink> mechanism. A Bean Validation implementation
-  includes the file
-  <filename>javax.validation.spi.ValidationProvider</filename> in
-  <filename>META-INF/services</filename>. This file contains the fully
-  qualified classname of the <classname>ValidationProvider</classname> of the
-  implementation. In the case of Hibernate Validator this is
-  <classname>org.hibernate.validator.HibernateValidator</classname>.</para>
-
-  <note>
-    <para>If there are more than one Bean Validation implementation providers
-    in the classpath and
-    <methodname>Validation.buildDefaultValidatorFactory()</methodname> is
-    used, there is no guarantee which provider will be chosen. To enforce the
-    provider <methodname>Validation.byProvider()</methodname> should be
-    used.</para>
-  </note>
-
-  <section id="section-validator-instance">
-    <title><classname>Configuration</classname> and
-    <classname>ValidatorFactory</classname></title>
-
-    <para>There are three different methods in the Validation class to create
-    a Validator instance. The easiest in shown in <xref
-    linkend="example-build-default-validator-factory" />.</para>
-
-    <example id="example-build-default-validator-factory">
-      <title>Validation.buildDefaultValidatorFactory()</title>
-
-      <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-Validator validator = factory.getValidator();</programlisting>
-    </example>
-
-    <para>You can also use the method
-    <methodname>Validation.byDefaultProvider()</methodname> which will allow
-    you to configure several aspects of the created Validator instance:</para>
-
-    <example>
-      <title>Validation.byDefaultProvider()</title>
-
-      <programlisting language="JAVA" role="JAVA">Configuration<?> config = Validation.byDefaultProvider().configure();
-config.messageInterpolator(new MyMessageInterpolator())
-    .traversableResolver( new MyTraversableResolver())
-    .constraintValidatorFactory(new MyConstraintValidatorFactory());
-
-ValidatorFactory factory = config.buildValidatorFactory();
-Validator validator = factory.getValidator();
-</programlisting>
-    </example>
-
-    <para>We will learn more about <classname>MessageInterpolator</classname>,
-    <classname>TraversableResolver</classname> and
-    <classname>ConstraintValidatorFactory</classname> in the following
-    sections.</para>
-
-    <para>Last but not least you can ask for a Configuration object of a
-    specific Bean Validation provider. This is useful if you have more than
-    one Bean Validation provider in your classpath. In this situation you can
-    make an explicit choice about which implementation to use. In the case of
-    Hibernate Validator the <classname>Validator</classname> creation looks
-    like:</para>
-
-    <example>
-      <title>Validation.byProvider( HibernateValidator.class )</title>
-
-      <programlisting language="JAVA" role="JAVA">HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
-config.messageInterpolator(new MyMessageInterpolator())
-    .traversableResolver( new MyTraversableResolver())
-    .constraintValidatorFactory(new MyConstraintValidatorFactory());
-
-ValidatorFactory factory = config.buildValidatorFactory();
-Validator validator = factory.getValidator();</programlisting>
-    </example>
-
-    <para><tip>
-        <para>The generated <classname>Validator</classname> instance is
-        thread safe and can be cached.</para>
-      </tip></para>
-  </section>
-
-  <section>
-    <title><classname>ValidationProviderResolver</classname></title>
-
-    <para>In the case that the Java Service Provider mechanism does not work
-    in your environment or you have a special classloader setup, you are able
-    to provide a custom <classname>ValidationProviderResolver</classname>. An
-    example in an OSGi environment you could plug your custom provider
-    resolver like seen in <xref linkend="example-provider-resolver" />.</para>
-
-    <example id="example-provider-resolver">
-      <title>Providing a custom ValidationProviderResolver</title>
-
-      <programlisting language="JAVA" role="JAVA">Configuration<?> config = Validation.byDefaultProvider()
-    .providerResolver( new OSGiServiceDiscoverer() )
-    .configure();
-
-ValidatorFactory factory = config.buildValidatorFactory();
-Validator validator = factory.getValidator();
-</programlisting>
-    </example>
-
-    <para>Your <classname>OSGiServiceDiscoverer</classname> must in this case
-    implement the interface
-    <classname>ValidationProviderResolver</classname>:</para>
-
-    <example>
-      <title>ValidationProviderResolver interface</title>
-
-      <programlisting language="JAVA" role="JAVA">public interface ValidationProviderResolver {
-    /**
-     * Returns a list of ValidationProviders available in the runtime environment.
-     *
-     * @return list of validation providers.  
-     */
-    List<ValidationProvider<?>> getValidationProviders();
-}
-</programlisting>
-    </example>
-  </section>
-
-  <section>
-    <title><classname>MessageInterpolator</classname></title>
-
-    <para><xref linkend="section-message-interpolation" /> already discussed
-    the default message interpolation algorithm. If you have special
-    requirements for your message interpolation you can provide a custom
-    interpolator using
-    <methodname>Configuration.messageInterpolator()</methodname>. This message
-    interpolator will be shared by all validators generated by the
-    <classname>ValidatorFactory</classname> created from this
-    <classname>Configuration</classname>(see <xref
-    linkend="example-message-interpolator" />).</para>
-
-    <example id="example-message-interpolator">
-      <title>Providing a custom MessageInterpolator</title>
-
-      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
-ValidatorFactory factory = configuration
-    .messageInterpolator(new ContextualMessageInterpolator(configuration.getDefaultMessageInterpolator()))
-    .buildValidatorFactory();
-
-Validator validator = factory.getValidator();
-</programlisting>
-    </example>
-
-    <tip>
-      <para>It is recommended that <classname>MessageInterpolator</classname>
-      implementations delegate final interpolation to the Bean Validation
-      default <classname>MessageInterpolator</classname> to ensure standard
-      Bean Validation interpolation rules are followed. The default
-      implementation is accessible through
-      <methodname>Configuration.getDefaultMessageInterpolator()</methodname>.</para>
-    </tip>
-
-    <section>
-      <title>ResourceBundleLocator</title>
-
-      <para>A common use case is the ability to specify your own resource
-      bundles for message interpolation. The default
-      <classname>MessageInterpolator</classname> implementation in Hibernate
-      Validator is called
-      <classname>ResourceBundleMessageInterpolator</classname> and per default
-      loads resource bundles via
-      <methodname>ResourceBundle.getBundle</methodname>. However,
-      <classname>ResourceBundleMessageInterpolator</classname> also allows you
-      to specify a custom implementation of
-      <classname>ResourceBundleLocator</classname> allowing you to provide
-      your own resource bundles. <xref
-      linkend="example-resource-bundle-locator" /> shows an example. In the
-      example<methodname>
-      HibernateValidatorConfiguration.getDefaultResourceBundleLocator</methodname>
-      is used to retrieve the default
-      <classname>ResourceBundleLocator</classname> which then can be passed to
-      the custom implementation in order implement delegation. </para>
-
-      <example id="example-resource-bundle-locator">
-        <title>Providing a custom ResourceBundleLocator</title>
-
-        <programlisting language="JAVA" role="JAVA">HibernateValidatorConfiguration configure = Validation.byProvider(HibernateValidator.class).configure();
-
-ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator(); 
-ResourceBundleLocator myResourceBundleLocator = new MyCustomResourceBundleLocator(defaultResourceBundleLocator);
-
-configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBundleLocator));
-</programlisting>
-      </example>
-
-      <para>Hibernate Validator provides the following implementation of
-      <classname>ResourceBundleLocator</classname> -
-      <classname>PlatformResourceBundleLocator</classname> (the default) and
-      <classname>AggregateResourceBundleLocator</classname>. The latter can be
-      used to specify a list of resource bundle names which will get loaded
-      and merged into a single resource bundle. Refer to the JavaDoc
-      documentation for more information.</para>
-    </section>
-  </section>
-
-  <section>
-    <title><classname>TraversableResolver</classname></title>
-
-    <para>The usage of the <classname>TraversableResolver</classname> has so
-    far not been discussed. The idea is that in some cases, the state of a
-    property should not be accessed. The most obvious example for that is a
-    lazy loaded property or association of a Java Persistence provider.
-    Validating this lazy property or association would mean that its state
-    would have to be accessed triggering a load from the database. Bean
-    Validation controls which property can and cannot be accessed via the
-    <classname>TraversableResolver</classname> interface (see <xref
-    linkend="example-traversable-resolver" />). In the example
-    HibernateValidatorConfiguration.</para>
-
-    <example id="example-traversable-resolver">
-      <title>TraversableResolver interface</title>
-
-      <programlisting language="JAVA" role="JAVA">/**
- * Contract determining if a property can be accessed by the Bean Validation provider
- * This contract is called for each property that is being either validated or cascaded.
- *
- * A traversable resolver implementation must be thread-safe.
- *
- */
-public interface TraversableResolver {
-    /**
-     * Determine if the Bean Validation provider is allowed to reach the property state
-     *
-     * @param traversableObject object hosting <code>traversableProperty</code> or null  
-     *                          if validateValue is called
-     * @param traversableProperty the traversable property.
-     * @param rootBeanType type of the root object passed to the Validator.
-     * @param pathToTraversableObject path from the root object to
-     *        <code>traversableObject</code>
-     *        (using the path specification defined by Bean Validator).
-     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.
-     *
-     * @return <code>true</code> if the Bean Validation provider is allowed to
-     *         reach the property state, <code>false</code> otherwise.
-     */
-     boolean isReachable(Object traversableObject,
-                         Path.Node traversableProperty,
-                         Class<?> rootBeanType,
-                         Path pathToTraversableObject,
-                         ElementType elementType);
-
-    /**
-     * Determine if the Bean Validation provider is allowed to cascade validation on
-     * the bean instance returned by the property value
-     * marked as <code>@Valid</code>.
-     * Note that this method is called only if isReachable returns true for the same set of
-     * arguments and if the property is marked as <code>@Valid</code>
-     *
-     * @param traversableObject object hosting <code>traversableProperty</code> or null
-     *                          if validateValue is called
-     * @param traversableProperty the traversable property.
-     * @param rootBeanType type of the root object passed to the Validator.
-     * @param pathToTraversableObject path from the root object to
-     *        <code>traversableObject</code>
-     *        (using the path specification defined by Bean Validator).
-     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.
-     *
-     * @return <code>true</code> if the Bean Validation provider is allowed to
-     *         cascade validation, <code>false</code> otherwise.
-     */
-     boolean isCascadable(Object traversableObject,
-                          Path.Node traversableProperty,
-                          Class<?> rootBeanType,
-                          Path pathToTraversableObject,
-                          ElementType elementType);
-}
-</programlisting>
-    </example>
-
-    <para>Hibernate Validator provides two
-    <classname>TraversableResolver</classname>s out of the box which will be
-    enabled automatically depending on your environment. The first is the
-    <classname>DefaultTraversableResolver</classname> which will always return
-    true for <methodname>isReachable()</methodname> and
-    i<methodname>sTraversable()</methodname>. The second is the
-    <classname>JPATraversableResolver</classname> which gets enabled when
-    Hibernate Validator gets used in combination with JPA 2. In case you have
-    to provide your own resolver you can do so again using the
-    <classname>Configuration</classname> object as seen in <xref
-    linkend="example-traversable-resolver-config" />.</para>
-
-    <example id="example-traversable-resolver-config">
-      <title>Providing a custom TraversableResolver</title>
-
-      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
-ValidatorFactory factory = configuration
-    .traversableResolver(new MyTraversableResolver())
-    .buildValidatorFactory();
-
-Validator validator = factory.getValidator();
-</programlisting>
-    </example>
-  </section>
-
-  <section>
-    <title><classname>ConstraintValidatorFactory</classname></title>
-
-    <para>Last but not least, there is one more configuration option to
-    discuss, the <classname>ConstraintValidatorFactory</classname>. The
-    default <classname>ConstraintValidatorFactory</classname> provided by
-    Hibernate Validator requires a public no-arg constructor to instantiate
-    <classname>ConstraintValidator</classname> instances (see <xref
-    linkend="section-constraint-validator" />). Using a custom
-    <classname>ConstraintValidatorFactory</classname> offers for example the
-    possibility to use dependency injection in constraint implementations. The
-    configuration of the custom factory is once more via the
-    <classname>Configuration</classname> (<xref
-    linkend="example-constraint-validator-factory" />).</para>
-
-    <example id="example-constraint-validator-factory">
-      <title>Providing a custom ConstraintValidatorFactory</title>
-
-      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
-ValidatorFactory factory = configuration
-    .constraintValidatorFactory(new IOCConstraintValidatorFactory())
-    .buildValidatorFactory();
-
-Validator validator = factory.getValidator();
-</programlisting>
-    </example>
-
-    <para>The interface you have to implement is:</para>
-
-    <example>
-      <title>ConstraintValidatorFactory interface</title>
-
-      <programlisting language="JAVA" role="JAVA">public interface ConstraintValidatorFactory {
-    /**
-     * @param key The class of the constraint validator to instantiate.
-     *
-     * @return A constraint validator instance of the specified class.
-     */
-     <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key);
-}
-</programlisting>
-    </example>
-
-    <warning>
-      <para>Any constraint implementation relying on
-      <classname>ConstraintValidatorFactory</classname> behaviors specific to
-      an implementation (dependency injection, no no-arg constructor and so
-      on) are not considered portable.</para>
-    </warning>
-
-    <note>
-      <para>ConstraintValidatorFactory should not cache instances as the state
-      of each instance can be altered in the initialize method.</para>
-    </note>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml b/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
deleted file mode 100644
index 0f22b8c..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
+++ /dev/null
@@ -1,600 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: customconstraints.xml 19521 2010-05-15 12:33:09Z gunnar.morling $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-customconstraints">
-  <title>Creating custom constraints</title>
-
-  <para>Though the Bean Validation API defines a whole set of standard
-  constraint annotations one can easily think of situations in which these
-  standard annotations won't suffice. For these cases you are able to create
-  custom constraints tailored to your specific validation requirements in a
-  simple manner.</para>
-
-  <section id="validator-customconstraints-simple">
-    <title>Creating a simple constraint</title>
-
-    <para>To create a custom constraint, the following three steps are
-    required:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>Create a constraint annotation</para>
-      </listitem>
-
-      <listitem>
-        <para>Implement a validator</para>
-      </listitem>
-
-      <listitem>
-        <para>Define a default error message</para>
-      </listitem>
-    </itemizedlist>
-
-    <section id="validator-customconstraints-constraintannotation">
-      <title>The constraint annotation</title>
-
-      <para>Let's write a constraint annotation, that can be used to express
-      that a given string shall either be upper case or lower case. We'll
-      apply it later on to the <property>licensePlate</property> field of the
-      <classname>Car</classname> class from <xref
-      linkend="validator-gettingstarted" /> to ensure, that the field is
-      always an upper-case string.</para>
-
-      <para>First we need a way to express the two case modes. We might use
-      <classname>String</classname> constants, but a better way to go is to
-      use a Java 5 enum for that purpose:</para>
-
-      <example>
-        <title>Enum <classname>CaseMode</classname> to express upper vs. lower
-        case</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-public enum CaseMode {
-    UPPER, 
-    LOWER;
-}</programlisting>
-      </example>
-
-      <para>Now we can define the actual constraint annotation. If you've
-      never designed an annotation before, this may look a bit scary, but
-      actually it's not that hard:</para>
-
-      <example>
-        <title>Defining CheckCase constraint annotation</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
- at Target( { METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = CheckCaseValidator.class)
- at Documented
-public @interface CheckCase {
-
-    String message() default "{com.mycompany.constraints.checkcase}";
-
-    Class<?>[] groups() default {};
-
-    Class<? extends Payload>[] payload() default {};
-    
-    CaseMode value();
-
-}</programlisting>
-      </example>
-
-      <para>An annotation type is defined using the <code>@interface</code>
-      keyword. All attributes of an annotation type are declared in a
-      method-like manner. The specification of the Bean Validation API
-      demands, that any constraint annotation defines</para>
-
-      <itemizedlist>
-        <listitem>
-          <para>an attribute <property>message</property> that returns the
-          default key for creating error messages in case the constraint is
-          violated</para>
-        </listitem>
-
-        <listitem>
-          <para>an attribute <property>groups</property> that allows the
-          specification of validation groups, to which this constraint belongs
-          (see <xref linkend="validator-usingvalidator-validationgroups" />).
-          This must default to an empty array of type
-          <classname>Class<?></classname>.</para>
-        </listitem>
-
-        <listitem>
-          <para>an attribute <classname>payload</classname> that can be used
-          by clients of the Bean Validation API to assign custom payload
-          objects to a constraint. This attribute is not used by the API
-          itself. <tip>
-              <para>An example for a custom payload could be the definition of
-              a severity.</para>
-
-              <programlisting>public class Severity {
-    public static class Info extends Payload {};
-    public static class Error extends Payload {};
-}
-
-public class ContactDetails {
-    @NotNull(message="Name is mandatory", payload=Severity.Error.class)
-    private String name;
-
-    @NotNull(message="Phone number not specified, but not mandatory", payload=Severity.Info.class)
-    private String phoneNumber;
-
-    // ...
-}</programlisting>
-
-              <para>Now a client can after the validation of a
-              <classname>ContactDetails</classname> instance access the
-              severity of a constraint using
-              <methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</methodname>
-              and adjust its behaviour depending on the severity.</para>
-            </tip></para>
-        </listitem>
-      </itemizedlist>
-
-      <para>Besides those three mandatory attributes
-      (<property>message</property>, <property>groups</property> and
-      <property>payload</property>) we add another one allowing for the
-      required case mode to be specified. The name <property>value</property>
-      is a special one, which can be omitted upon using the annotation, if it
-      is the only attribute specified, as e.g. in
-      <code>@CheckCase(CaseMode.UPPER)</code>.</para>
-
-      <para>In addition we annotate the annotation type with a couple of
-      so-called meta annotations:</para>
-
-      <itemizedlist>
-        <listitem>
-          <para><code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>:
-          Says, that methods, fields and annotation declarations may be
-          annotated with @CheckCase (but not type declarations e.g.)</para>
-        </listitem>
-
-        <listitem>
-          <para><code>@Retention(RUNTIME)</code>: Specifies, that annotations
-          of this type will be available at runtime by the means of
-          reflection</para>
-        </listitem>
-
-        <listitem>
-          <para><code>@Constraint(validatedBy =
-          CheckCaseValidator.class)</code>: Specifies the validator to be used
-          to validate elements annotated with @CheckCase</para>
-        </listitem>
-
-        <listitem>
-          <para><code>@Documented</code>: Says, that the use of
-          <code>@CheckCase</code> will be contained in the JavaDoc of elements
-          annotated with it</para>
-        </listitem>
-      </itemizedlist>
-    </section>
-
-    <section id="validator-customconstraints-validator">
-      <title id="section-constraint-validator">The constraint
-      validator</title>
-
-      <para>Next, we need to implement a constraint validator, that's able to
-      validate elements with a <classname>@CheckCase</classname> annotation.
-      To do so, we implement the interface ConstraintValidator as shown
-      below:</para>
-
-      <example id="example-constraint-validator">
-        <title>Implementing a constraint validator for the constraint
-        <classname>CheckCase</classname></title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
-
-    private CaseMode caseMode;
-
-    public void initialize(CheckCase constraintAnnotation) {
-        this.caseMode = constraintAnnotation.value();
-    }
-
-    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
-
-        if (object == null)
-            return true;
-
-        if (caseMode == CaseMode.UPPER)
-            return object.equals(object.toUpperCase());
-        else
-            return object.equals(object.toLowerCase());
-    }
-
-}</programlisting>
-      </example>
-
-      <para>The <classname>ConstraintValidator</classname> interface defines
-      two type parameters, which we set in our implementation. The first one
-      specifies the annotation type to be validated (in our example
-      <classname>CheckCase</classname>), the second one the type of elements,
-      which the validator can handle (here
-      <classname>String</classname>).</para>
-
-      <para>In case a constraint annotation is allowed at elements of
-      different types, a <classname>ConstraintValidator</classname> for each
-      allowed type has to be implemented and registered at the constraint
-      annotation as shown above.</para>
-
-      <para>The implementation of the validator is straightforward. The
-      <methodname>initialize()</methodname> method gives us access to the
-      attribute values of the annotation to be validated. In the example we
-      store the <classname>CaseMode</classname> in a field of the validator
-      for further usage.</para>
-
-      <para>In the <methodname>isValid()</methodname> method we implement the
-      logic, that determines, whether a <classname>String</classname> is valid
-      according to a given <classname>@CheckCase</classname> annotation or
-      not. This decision depends on the case mode retrieved in
-      <classname>initialize()</classname>. As the Bean Validation
-      specification recommends, we consider <code>null</code> values as being
-      valid. If <code>null</code> is not a valid value for an element, it
-      should be annotated with <code>@NotNull</code> explicitly.</para>
-
-      <section>
-        <title>The ConstraintValidatorContext</title>
-
-        <para><xref linkend="example-constraint-validator" /> relies on the
-        default error message generation by just returning
-        <constant>true</constant> or <constant>false</constant> from the
-        <methodname>isValid</methodname> call. Using the passed
-        <classname>ConstraintValidatorContext</classname> object it is
-        possible to either add additional error messages or completely disable
-        the default error message generation and solely define custom error
-        messages. The <classname>ConstraintValidatorContext</classname> API is
-        modeled as fluent interface and is best demonstrated with an
-        example:</para>
-
-        <example id="example-constraint-validator-context">
-          <title>Use of ConstraintValidatorContext to define custom error
-          messages</title>
-
-          <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
-
-    private CaseMode caseMode;
-
-    public void initialize(CheckCase constraintAnnotation) {
-        this.caseMode = constraintAnnotation.value();
-    }
-
-    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
-
-        if (object == null)
-            return true;
-        
-        boolean isValid;
-        if (caseMode == CaseMode.UPPER) {
-            isValid = object.equals(object.toUpperCase());
-        }
-        else {
-            isValid = object.equals(object.toLowerCase());
-        }
-        
-        if(!isValid) {
-            constraintContext.disableDefaultConstraintViolation();
-            constraintContext.buildConstraintViolationWithTemplate( "{com.mycompany.constraints.CheckCase.message}"  ).addConstraintViolation();
-        }
-        return result;
-    }
-
-}</programlisting>
-        </example>
-
-        <para><xref linkend="example-constraint-validator-context" os="" />
-        shows how you can disable the default error message generation and add
-        a custom error message using a specified message template. In this
-        example the use of the
-        <classname>ConstraintValidatorContext</classname> results in the same
-        error message as the default error message generation. <tip>
-            <para>It is important to end each new constraint violation with
-            <methodname>addConstraintViolation</methodname>. Only after that
-            the new constraint violation will be created.</para>
-          </tip></para>
-
-        <para>In case you are implementing a
-        <classname>ConstraintValidator</classname> a class level constraint it
-        is also possible to adjust set the property path for the created
-        constraint violations. This is important for the case where you
-        validate multiple properties of the class or even traverse the object
-        graph. A custom property path creation could look like <xref
-        linkend="example-custom-error" />.</para>
-
-        <example id="example-custom-error">
-          <title>Adding new <classname>ConstraintViolation</classname> with
-          custom property path</title>
-
-          <programlisting language="JAVA" role="JAVA">public boolean isValid(Group group, ConstraintValidatorContext constraintValidatorContext) {
-    boolean isValid = false;
-    ...
-
-    if(!isValid) {
-        constraintValidatorContext
-            .buildConstraintViolationWithTemplate( "{my.custom.template}" )
-            .addNode( "myProperty" ).addConstraintViolation();
-    }
-    return isValid;
-}
-
-</programlisting>
-        </example>
-      </section>
-    </section>
-
-    <section id="validator-customconstraints-errormessage">
-      <title>The error message</title>
-
-      <para>Finally we need to specify the error message, that shall be used,
-      in case a <classname>@CheckCase</classname> constraint is violated. To
-      do so, we add the following to our custom
-      <filename>ValidationMessages.properties</filename> (see also <xref
-      linkend="section-message-interpolation" />)</para>
-
-      <example>
-        <title>Defining a custom error message for the
-        <classname>CheckCase</classname> constraint</title>
-
-        <programlisting>com.mycompany.constraints.CheckCase.message=Case mode must be {value}.</programlisting>
-      </example>
-
-      <para>If a validation error occurs, the validation runtime will use the
-      default value, that we specified for the message attribute of the
-      <classname>@CheckCase</classname> annotation to look up the error
-      message in this file.</para>
-    </section>
-
-    <section id="validator-customconstraints-using">
-      <title>Using the constraint</title>
-
-      <para>Now that our first custom constraint is completed, we can use it
-      in the <classname>Car</classname> class from the <xref
-      linkend="validator-gettingstarted" /> chapter to specify that the
-      <property>licensePlate</property> field shall only contain upper-case
-      strings:</para>
-
-      <example id="example-car-with-checkcase">
-        <title>Applying the <classname>CheckCase</classname>
-        constraint</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-public class Car {
-
-    @NotNull
-    private String manufacturer;
-
-    @NotNull
-    @Size(min = 2, max = 14)
-    @CheckCase(CaseMode.UPPER)
-    private String licensePlate;
-
-    @Min(2)
-    private int seatCount;
-    
-    public Car(String manufacturer, String licencePlate, int seatCount) {
-
-        this.manufacturer = manufacturer;
-        this.licensePlate = licencePlate;
-        this.seatCount = seatCount;
-    }
-
-    //getters and setters ...
-
-}</programlisting>
-      </example>
-
-      <para>Finally let's demonstrate in a little test that the
-      <classname>@CheckCase</classname> constraint is properly
-      validated:</para>
-
-      <example>
-        <title>Testcase demonstrating the <classname>CheckCase</classname>
-        validation</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import static org.junit.Assert.*;
-
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class CarTest {
-
-    private static Validator validator;
-
-    @BeforeClass
-    public static void setUp() {
-        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-        validator = factory.getValidator();
-    }
-
-    @Test
-    public void testLicensePlateNotUpperCase() {
-
-        Car car = new Car("Morris", "dd-ab-123", 4);
-
-        Set<ConstraintViolation<Car>> constraintViolations =
-            validator.validate(car);
-        assertEquals(1, constraintViolations.size());
-        assertEquals(
-            "Case mode must be UPPER.", 
-            constraintViolations.iterator().next().getMessage());
-    }
-
-    @Test
-    public void carIsValid() {
-
-        Car car = new Car("Morris", "DD-AB-123", 4);
-
-        Set<ConstraintViolation<Car>> constraintViolations =
-            validator.validate(car);
-
-        assertEquals(0, constraintViolations.size());
-    }
-}</programlisting>
-      </example>
-    </section>
-  </section>
-
-  <section id="validator-customconstraints-compound">
-    <title>Constraint composition</title>
-
-    <para>Looking at the <property>licensePlate</property> field of the
-    <classname>Car</classname> class in <xref
-    linkend="example-car-with-checkcase" />, we see three constraint
-    annotations already. In complexer scenarios, where even more constraints
-    could be applied to one element, this might become a bit confusing easily.
-    Furthermore, if we had a <property>licensePlate</property> field in
-    another class, we would have to copy all constraint declarations to the
-    other class as well, violating the DRY principle.</para>
-
-    <para>This problem can be tackled using compound constraints. In the
-    following we create a new constraint annotation
-    <classname>@ValidLicensePlate</classname>, that comprises the constraints
-    <classname>@NotNull</classname>, <classname>@Size</classname> and
-    <classname>@CheckCase</classname>:</para>
-
-    <example>
-      <title>Creating a composing constraint
-      <classname>ValidLicensePlate</classname></title>
-
-      <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
- at NotNull
- at Size(min = 2, max = 14)
- at CheckCase(CaseMode.UPPER)
- at Target( { METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = {})
- at Documented
-public @interface ValidLicensePlate {
-
-    String message() default "{com.mycompany.constraints.validlicenseplate}";
-
-    Class<?>[] groups() default {};
-
-    Class<? extends Payload>[] payload() default {};
-
-}</programlisting>
-    </example>
-
-    <para>To do so, we just have to annotate the constraint declaration with
-    its comprising constraints (btw. that's exactly why we allowed annotation
-    types as target for the <classname>@CheckCase</classname> annotation). As
-    no additional validation is required for the
-    <classname>@ValidLicensePlate</classname> annotation itself, we don't
-    declare a validator within the <classname>@Constraint </classname>meta
-    annotation.</para>
-
-    <para>Using the new compound constraint at the
-    <property>licensePlate</property> field now is fully equivalent to the
-    previous version, where we declared the three constraints directly at the
-    field itself:</para>
-
-    <example>
-      <title>Application of composing constraint
-      <classname>ValidLicensePlate</classname></title>
-
-      <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-public class Car {
-
-    @ValidLicensePlate
-    private String licensePlate;
-
-    //...
-
-}</programlisting>
-    </example>
-
-    <para>The set of <classname>ConstraintViolations</classname> retrieved
-    when validating a <classname>Car</classname> instance will contain an
-    entry for each violated composing constraint of the
-    <classname>@ValidLicensePlate</classname> constraint. If you rather prefer
-    a single <classname>ConstraintViolation</classname> in case any of the
-    composing constraints is violated, the
-    <classname>@ReportAsSingleViolation</classname> meta constraint can be
-    used as follows:</para>
-
-    <example>
-      <title>Usage of <classname>@ReportAsSingleViolation</classname></title>
-
-      <programlisting language="JAVA" role="JAVA">//...
- at ReportAsSingleViolation
-public @interface ValidLicensePlate {
-
-    String message() default "{com.mycompany.constraints.validlicenseplate}";
-
-    Class<?>[] groups() default {};
-
-    Class<? extends Payload>[] payload() default {};
-
-}</programlisting>
-    </example>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml b/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml
deleted file mode 100644
index 9739820..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: furtherreading.xml 19637 2010-05-31 14:55:26Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter>
-  <title id="chapter-further-reading">Further reading</title>
-
-  <para>Last but not least, a few pointers to further information. A great
-  source for examples is the Bean Validation TCK which can is available for
-  anonymous access in the Hibernate <ulink
-  url="http://anonsvn.jboss.org/repos/hibernate/validator/trunk">SVN
-  repository</ulink>. Alternatively you can view the tests using <ulink
-  url="http://fisheye.jboss.org/browse/Hibernate/beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests">Hibernate's
-  fisheye</ulink> installation. <ulink
-  url="http://jcp.org/en/jsr/detail?id=303">The JSR 303</ulink> specification
-  itself is also a great way to deepen your understanding of Bean Validation
-  resp. Hibernate Validator.</para>
-
-  <para>If you have any further questions to Hibernate Validator or want to
-  share some of your use cases have a look at the <ulink
-  url="http://community.jboss.org/en/hibernate/validator">Hibernate Validator
-  Wiki</ulink> and the <ulink
-  url="https://forum.hibernate.org/viewforum.php?f=9">Hibernate Validator
-  Forum</ulink>.</para>
-
-  <para>In case you would like to report a bug use <ulink
-  url="http://opensource.atlassian.com/projects/hibernate/browse/HV">Hibernate's
-  Jira</ulink> instance. Feedback is always welcome!</para>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml b/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
deleted file mode 100644
index 517ce53..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: gettingstarted.xml 19641 2010-06-01 12:46:16Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-gettingstarted">
-  <title id="getting-started">Getting started</title>
-
-  <para>This chapter will show you how to get started with Hibernate
-  Validator, the reference implementation (RI) of Bean Validation. For the
-  following quickstart you need:</para>
-
-  <itemizedlist>
-    <listitem>
-      <para>A JDK >= 5</para>
-    </listitem>
-
-    <listitem>
-      <para><ulink url="http://maven.apache.org/">Apache Maven</ulink></para>
-    </listitem>
-
-    <listitem>
-      <para>An Internet connection (Maven has to download all required
-      libraries)</para>
-    </listitem>
-
-    <listitem>
-      <para>A properly configured remote repository. Add the following to your
-      <filename>settings.xml</filename>: <example>
-          <title>Configuring the JBoss Maven repository in
-          <filename>settings.xml</filename></title>
-
-          <programlisting><repositories>
-    <repository>
-        <id>jboss</id>
-        <url>http://repository.jboss.com/maven2</url>
-        <releases>
-            <enabled>true</enabled>
-        </releases>
-        <snapshots>
-            <enabled>false</enabled>
-        </snapshots>
-    </repository>
-</repositories></programlisting>
-        </example>More information about <filename>settings.xml</filename> can
-      be found in the <ulink
-      url="http://maven.apache.org/ref/2.0.8/maven-settings/settings.html">Maven
-      Local Settings Model</ulink>.</para>
-    </listitem>
-  </itemizedlist>
-
-  <note>
-    <para>Hibernate Validator uses JAXB for XML parsing. JAXB is part of the
-    Java Class Library since Java 6 which means that if you run Hibernate
-    Validator with Java 5 you will have to add additional JAXB dependencies.
-    Using maven you have to add the following dependencies:<programlisting><dependency>
-    <groupId>javax.xml.bind</groupId>
-    <artifactId>jaxb-api</artifactId>
-    <version>2.2</version>
-</dependency>
-<dependency>
-    <groupId>com.sun.xml.bind</groupId>
-    <artifactId>jaxb-impl</artifactId>
-    <version>2.1.12</version>
-</dependency>
-</programlisting> if you are using the SourceForge package you find the
-    necessary libraries in the <filename>lib/jdk5</filename> directory. In
-    case you are not using the XML configuration you can also disable it
-    explicitly by calling
-    <methodname>Configuration.ignoreXmlConfiguration()</methodname> during
-    <classname>ValidationFactory</classname> creation. In this case the JAXB
-    dependencies are not needed.</para>
-  </note>
-
-  <section id="validator-gettingstarted-createproject">
-    <title>Setting up a new Maven project</title>
-
-    <para>Start by creating new Maven project using the Maven archetype plugin
-    as follows:</para>
-
-    <para><example>
-        <title>Using Maven's archetype plugin to create a sample project using
-        Hibernate Validator</title>
-
-        <programlisting>mvn archetype:create -DarchetypeGroupId=org.hibernate \
-                     -DarchetypeArtifactId=hibernate-validator-quickstart-archetype \
-                     -DarchetypeVersion=&version; \
-                     -DgroupId=com.mycompany 
-                     -DartifactId=hv-quickstart</programlisting>
-      </example></para>
-
-    <para>Maven will create your project in the directory hv-quickstart.
-    Change into this directory and run:</para>
-
-    <para><programlisting>mvn test</programlisting>Maven will compile the
-    example code and run the implemented unit tests. Let's have a look at the
-    actual code.</para>
-  </section>
-
-  <section id="validator-gettingstarted-createmodel">
-    <title>Applying constraints</title>
-
-    <para>Open the project in the IDE of your choice and have a look at the
-    class <classname>Car</classname>:</para>
-
-    <example id="example-class-car">
-      <title>Class Car annotated with constraints</title>
-
-      <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-public class Car {
-
-    @NotNull
-    private String manufacturer;
-
-    @NotNull
-    @Size(min = 2, max = 14)
-    private String licensePlate;
-
-    @Min(2)
-    private int seatCount;
-    
-    public Car(String manufacturer, String licencePlate, int seatCount) {
-        this.manufacturer = manufacturer;
-        this.licensePlate = licencePlate;
-        this.seatCount = seatCount;
-    }
-
-    //getters and setters ...
-}</programlisting>
-    </example>
-
-    <para><classname>@NotNull</classname>, <classname>@Size</classname> and
-    <classname>@Min</classname> are so-called constraint annotations, that we
-    use to declare constraints, which shall be applied to the fields of a
-    <classname>Car</classname> instance:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para><property>manufacturer</property> shall never be null</para>
-      </listitem>
-
-      <listitem>
-        <para><property>licensePlate</property> shall never be null and must
-        be between 2 and 14 characters long</para>
-      </listitem>
-
-      <listitem>
-        <para><property>seatCount</property> shall be at least 2.</para>
-      </listitem>
-    </itemizedlist>
-  </section>
-
-  <section>
-    <title>Validating constraints</title>
-
-    <para>To perform a validation of these constraints, we use a
-    <classname>Validator</classname> instance. Let's have a look at the
-    <classname>CarTest</classname> class:</para>
-
-    <example>
-      <title>Class CarTest showing validation examples</title>
-
-      <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import static org.junit.Assert.*;
-
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class CarTest {
-
-    private static Validator validator;
-
-    @BeforeClass
-    public static void setUp() {
-        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-        validator = factory.getValidator();
-    }
-
-    @Test
-    public void manufacturerIsNull() {
-        Car car = new Car(null, "DD-AB-123", 4);
-
-        Set<ConstraintViolation<Car>> constraintViolations =
-            validator.validate(car);
-
-        assertEquals(1, constraintViolations.size());
-        assertEquals("may not be null", constraintViolations.iterator().next().getMessage());
-    }
-
-    @Test
-    public void licensePlateTooShort() {
-        Car car = new Car("Morris", "D", 4);
-
-        Set<ConstraintViolation<Car>> constraintViolations = 
-            validator.validate(car);
-
-        assertEquals(1, constraintViolations.size());
-        assertEquals("size must be between 2 and 14", constraintViolations.iterator().next().getMessage());
-    }
-    
-    @Test
-    public void seatCountTooLow() {
-        Car car = new Car("Morris", "DD-AB-123", 1);
-
-        Set<ConstraintViolation<Car>> constraintViolations =
-            validator.validate(car);
-
-        assertEquals(1, constraintViolations.size());
-        assertEquals("must be greater than or equal to 2", constraintViolations.iterator().next().getMessage());
-    }
-
-    @Test
-    public void carIsValid() {
-        Car car = new Car("Morris", "DD-AB-123", 2);
-
-        Set<ConstraintViolation<Car>> constraintViolations =
-            validator.validate(car);
-
-        assertEquals(0, constraintViolations.size());
-    }
-}</programlisting>
-    </example>
-
-    <para>In the <methodname>setUp()</methodname> method we get a
-    <classname>Validator</classname> instance from the
-    <classname>ValidatorFactory</classname>. A
-    <classname>Validator</classname> instance is thread-safe and may be reused
-    multiple times. For this reason we store it as field of our test class. We
-    can use the <classname>Validator</classname> now to validate the different
-    car instances in the test methods.</para>
-
-    <para>The <methodname>validate()</methodname> method returns a set of
-    <classname>ConstraintViolation</classname> instances, which we can iterate
-    in order to see which validation errors occurred. The first three test
-    methods show some expected constraint violations:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>The <classname>@NotNull</classname> constraint on manufacturer
-        is violated in <methodname>manufacturerIsNull()</methodname></para>
-      </listitem>
-
-      <listitem>
-        <para>The <classname>@Size</classname> constraint on licensePlate is
-        violated in <methodname>licensePlateTooShort()</methodname></para>
-      </listitem>
-
-      <listitem>
-        <para>The <classname>@Min</classname> constraint on seatCount is
-        violated in <methodname>seatCountTooLow()</methodname></para>
-      </listitem>
-    </itemizedlist>
-
-    <para>If the object validates successfully,
-    <methodname>validate()</methodname> returns an empty set.</para>
-
-    <para>Note that we only use classes from the package
-    <package>javax.validation</package> from the Bean Validation API. As we
-    don't reference any classes of the RI directly, it would be no problem to
-    switch to another implementation of the API, should that need
-    arise.</para>
-  </section>
-
-  <section id="validator-gettingstarted-whatsnext">
-    <title>Where to go next?</title>
-
-    <para>That concludes our 5 minute tour through the world of Hibernate
-    Validator. Continue exploring the code examples or look at further
-    examples referenced in <xref linkend="chapter-further-reading" />. To
-    deepen your understanding of Hibernate Validator just continue reading
-    <xref linkend="validator-usingvalidator" />. In case your application has
-    specific validation requirements have a look at <xref
-    linkend="validator-customconstraints" />.</para>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/integration.xml b/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
deleted file mode 100644
index 3d706fd..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: integration.xml 19521 2010-05-15 12:33:09Z gunnar.morling $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-checkconstraints">
-  <title>Integration with other frameworks</title>
-
-  <para>Hibernate Validator is intended to be used to implement multi-layered
-  data validation, where constraints are expressed in a single place (the
-  annotated domain model) and checked in various different layers of the
-  application.</para>
-
-  <section>
-    <title>OSGi</title>
-
-    <para>The Hibernate Validator jar file is conform to the OSGi
-    specification and can be used within any OSGi container. The classes in
-    the following packages are exported by Hibernate Validator and are
-    considered part of the public API -
-    <package>org.hibernate.validator</package>,
-    <package>org.hibernate.validator.constraints</package>,
-    <package>org.hibernate.validator.messageinterpolation</package> and
-    <package>org.hibernate.validator.resourceloading</package>.</para>
-  </section>
-
-  <section id="validator-checkconstraints-db">
-    <title>Database schema-level validation</title>
-
-    <para>Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will
-    translate the constraints you have defined for your entities into mapping
-    metadata. For example, if a property of your entity is annotated
-    <literal>@NotNull</literal>, its columns will be declared as <literal>not
-    null</literal> in the DDL schema generated by Hibernate.</para>
-
-    <para>If, for some reason, the feature needs to be disabled, set
-    <literal>hibernate.validator.apply_to_ddl</literal> to
-    <literal>false</literal>. See also <xref
-    linkend="table-builtin-constraints" />.</para>
-
-    <para>You can also limit the DDL constraint generation to a subset of the
-    defined constraints by setting the property
-    <property>org.hibernate.validator.group.ddl</property>. The property
-    specifies the comma-separated, fully specified class names of the groups a
-    constraint has to be part of in order to be considered for DDL schema
-    generation.</para>
-  </section>
-
-  <section id="validator-checkconstraints-orm">
-    <title>ORM integration</title>
-
-    <para>Hibernate Validator integrates with both Hibernate and all pure Java
-    Persistence providers.</para>
-
-    <section id="validator-checkconstraints-orm-hibernateevent">
-      <title>Hibernate event-based validation</title>
-
-      <para>Hibernate Validator has a built-in Hibernate event listener -
-      <ulink
-      url="http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</classname></ulink>
-      - which is part of Hibernate Annotations (as of Hibernate 3.5.x).
-      Whenever a <literal>PreInsertEvent</literal>,
-      <literal>PreUpdateEvent</literal> or
-      <classname>PreDeleteEvent</classname> occurs, the listener will verify
-      all constraints of the entity instance and throw an exception if any
-      constraint is violated. Per default objects will be checked before any
-      inserts or updates are made by Hibernate. Pre deletion events will per
-      default not trigger a validation. You can configure the groups to be
-      validated per event type using the properties
-      <property>javax.persistence.validation.group.pre-persist</property>,
-      <property>javax.persistence.validation.group.pre-update</property> and
-      <property>javax.persistence.validation.group.pre-remove</property>. The
-      values of these properties are the comma-separated, fully specified
-      class names of the groups to validate. <xref
-      linkend="example-beanvalidationeventlistener-config" /> shows the
-      default values for these properties. In this case they could also be
-      omitted.</para>
-
-      <para>On constraint violation, the event will raise a runtime
-      <classname>ConstraintViolationException</classname> which contains a set
-      of <literal>ConstraintViolation</literal>s describing each
-      failure.</para>
-
-      <para>If Hibernate Validator is present in the classpath, Hibernate
-      Annotations (or Hibernate EntityManager) will use it transparently. To
-      avoid validation even though Hibernate Validator is in the classpath set
-      <property>javax.persistence.validation.mode</property> to
-      <constant>none</constant>.</para>
-
-      <para><note>
-          <para>If the beans are not annotated with validation annotations,
-          there is no runtime performance cost.</para>
-        </note></para>
-
-      <para>In case you need to manually set the event listeners for Hibernate
-      Core, use the following configuration in
-      <literal>hibernate.cfg.xml</literal>:</para>
-
-      <example id="example-beanvalidationeventlistener-config">
-        <title>Manual configuration of
-        <classname>BeanValidationEvenListener</classname></title>
-
-        <programlisting language="XML" role="XML"><hibernate-configuration>
-    <session-factory>
-       ...
-       <property name="javax.persistence.validation.group.pre-persist">javax.validation.groups.Default</property>
-       <property name="javax.persistence.validation.group.pre-update">javax.validation.groups.Default</property>
-       <property name="javax.persistence.validation.group.pre-remove"></property>
-       ...
-       <event type="pre-update">
-         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
-       </event>
-       <event type="pre-insert">
-         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
-       </event>
-       <event type="pre-delete">
-         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
-       </event>
-    </session-factory>
-</hibernate-configuration></programlisting>
-      </example>
-    </section>
-
-    <section>
-      <title>JPA</title>
-
-      <para>If you are using JPA 2 and Hibernate Validator is in the classpath
-      the JPA2 specification requires that Bean Validation gets enabled. The
-      properties
-      <property>javax.persistence.validation.group.pre-persist</property>,
-      <property>javax.persistence.validation.group.pre-update</property> and
-      <property>javax.persistence.validation.group.pre-remove</property> as
-      described in <xref
-      linkend="validator-checkconstraints-orm-hibernateevent" /> can in this
-      case be configured in <filename>persistence.xml</filename>.
-      <filename>persistence.xml</filename> also defines a node validation-mode
-      while can be set to <constant>AUTO</constant>,
-      <constant>CALLBACK</constant>, <constant>NONE</constant>. The default is
-      <constant>AUTO</constant>.</para>
-
-      <para>In a JPA 1 you will have to create and register Hibernate
-      Validator yourself. In case you are using Hibernate EntityManager you
-      can add a customized version of the
-      <classname>BeanValidationEventListener</classname> described in <xref
-      linkend="validator-checkconstraints-orm-hibernateevent" /> to your
-      project and register it manually.</para>
-    </section>
-  </section>
-
-  <section id="section-presentation-layer">
-    <title>Presentation layer validation</title>
-
-    <para>When working with JSF2 or <productname>JBoss Seam</productname> and
-    Hibernate Validator (Bean Validation) is present in the runtime
-    environment validation is triggered for every field in the application.
-    <xref linkend="example-jsf2" /> shows an example of the f:validateBean tag
-    in a JSF page. For more information refer to the Seam documentation or the
-    JSF 2 specification.</para>
-
-    <example id="example-jsf2">
-      <title>Usage of Bean Validation within JSF2</title>
-
-      <programlisting><h:form>
-  <emphasis role="bold"><f:validateBean></emphasis>
-    <h:inputText value=”#{model.property}” />
-    <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:selectOneRadio>
-    <!-- other input components here -->
-  <emphasis role="bold"></f:validateBean></emphasis>
-</h:form>
-</programlisting>
-    </example>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/preface.xml b/hibernate-validator/src/main/docbook/en-US/modules/preface.xml
deleted file mode 100644
index f3ddaec..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/preface.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: preface.xml 19520 2010-05-15 12:27:18Z gunnar.morling $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-  <preface id="preface">
-    <title>Preface</title>
-
-    <para>Validating data is a common task that occurs throughout any
-    application, from the presentation layer to the persistence layer. Often
-    the same validation logic is implemented in each layer, proving time
-    consuming and error-prone. To avoid duplication of these validations in
-    each layer, developers often bundle validation logic directly into the
-    domain model, cluttering domain classes with validation code which is
-    really metadata about the class itself.</para>
-
-    <mediaobject>
-      <imageobject role="fo">
-        <imagedata align="center" contentdepth="" contentwidth="150mm"
-                   fileref="application-layers.png" scalefit="" />
-      </imageobject>
-
-      <imageobject role="html">
-        <imagedata depth="" fileref="application-layers.png" scalefit="1" />
-      </imageobject>
-    </mediaobject>
-
-    <para>JSR 303 - Bean Validation - defines a metadata model and API for
-    entity validation. The default metadata source is annotations, with the
-    ability to override and extend the meta-data through the use of XML. The
-    API is not tied to a specific application tier or programming model. It is
-    specifically not tied to either the web tier or the persistence tier, and
-    is available for both server-side application programming, as well as rich
-    client Swing application developers.</para>
-
-    <para><mediaobject>
-        <imageobject role="fo">
-          <imagedata align="center" contentdepth="" contentwidth="150mm"
-                     fileref="application-layers2.png" scalefit="" />
-        </imageobject>
-
-        <imageobject role="html">
-          <imagedata depth="" fileref="application-layers2.png" scalefit="1" />
-        </imageobject>
-      </mediaobject></para>
-
-    <para>Hibernate Validator is the reference implementation of this
-    JSR.</para>
-  </preface>
-
-
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/programmaticapi.xml b/hibernate-validator/src/main/docbook/en-US/modules/programmaticapi.xml
deleted file mode 100644
index 62fc3c9..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/programmaticapi.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: programmaticapi.xml 19639 2010-06-01 11:52:20Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="programmaticapi">
-  <title>Programmatic constraint definition</title>
-
-  <note>
-    <para>Use of the features described in the following sections is not
-    portable between Bean Validation providers/implementations.</para>
-  </note>
-
-  <para>Hibernate Validator allows to configure constraints not only via
-  annotations and xml, but also via a programmatic API. This API can be used
-  exclusively or in combination with annotations and xml. If used in
-  combination programmatic constraints are additive to otherwise configured
-  constraints.</para>
-
-  <para>The programmatic API is centered around the
-  <classname>ConstraintMapping</classname> class which can be found together
-  with its supporting classes in the
-  <package>org.hibernate.validator.cfg</package> package.
-  <classname>ConstraintMapping</classname> is the entry point to a fluent API
-  allowing the definition of constraints. <xref lang=""
-  linkend="example-constraint-mapping" /> shows how the API can be
-  used.</para>
-
-  <para><example id="example-constraint-mapping">
-      <title>Programmatic constraint definition</title>
-
-      <programlisting>ConstraintMapping mapping = new ConstraintMapping();
-mapping.type( Car.class )
-    .property( "manufacturer", FIELD )
-        .constraint( NotNullDef.class )
-    .property( "licensePlate", FIELD )
-        .constraint( NotNullDef.class )
-        .constraint( SizeDef.class )
-            .min( 2 )
-            .max( 14 )
-    .property( "seatCount", FIELD )
-        .constraint( MinDef.class )
-            .value ( 2 )
-.type( RentalCar.class )
-    .property( "rentalStation", METHOD)
-        .constraint( NotNullDef.class );      </programlisting>
-    </example></para>
-
-  <para>As you can see you can configure constraints on multiple classes and
-  properties using method chaining. The constraint definition classes
-  <classname>NotNullDef</classname>, <classname>SizeDef</classname> and
-  <classname>MinDef</classname> are helper classes which allow to configure
-  constraint parameters in a type-safe fashion. Definition classes exists for
-  all built-in constraints in the
-  <classname>org.hibernate.validator.cfg.defs</classname> package. For a
-  custom constraint you can either create your own definition class extending
-  <classname>ConstraintDef</classname> or you can use
-  <classname>GenericConstraintDef</classname> as seen in <xref
-  linkend="example-generic-constraint-mapping" />.</para>
-
-  <para><example id="example-generic-constraint-mapping">
-      <title>Programmatic constraint definition using
-      <classname>GenericConstraintDef</classname></title>
-
-      <programlisting>ConstraintMapping mapping = new ConstraintMapping();
-mapping.type( Car.class )
-    .property( "licensePlate", FIELD )
-        .constraint( GenericConstraintDef.class )
-            .constraintType( CheckCase.class )
-            .param( "value", CaseMode.UPPER );   </programlisting>
-    </example></para>
-
-  <para>Last but not least, you can also define cascading constraints as well
-  as the default group sequence of an entity.</para>
-
-  <para><example>
-      <title>Cascading constraints and group redefinition</title>
-
-      <programlisting>ConstraintMapping mapping = new ConstraintMapping();
-mapping.type( Car.class )
-    .valid( "driver", FIELD )
-.type( RentalCar.class)
-    .defaultGroupSequence( RentalCar.class, CarChecks.class ); </programlisting>
-    </example></para>
-
-  <para>Once you have your <classname>ConstraintMapping</classname> you will
-  have to pass it to the configuration. Since the programmatic configuration
-  is not part of the official Bean Validation specification you will have to
-  get hold of the Hibernate Validator specific configuration instance. See
-  <xref linkend="example-hibernate-specific-config" />.</para>
-
-  <para><example id="example-hibernate-specific-config">
-      <title>Creating a Hibernate Validator specific configuration</title>
-
-      <programlisting>ConstraintMapping mapping = new ConstraintMapping();
-// configure mapping instance
-
-HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
-config.addMapping( mapping );
-ValidatorFactory factory = config.buildValidatorFactory();
-Validator validator = factory.getValidator();</programlisting>
-    </example></para>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml b/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
deleted file mode 100644
index 57239e3..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
+++ /dev/null
@@ -1,1381 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: usingvalidator.xml 19778 2010-06-21 13:50:17Z hardy.ferentschik $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-usingvalidator">
-  <title>Validation step by step</title>
-
-  <para>In this chapter we will see in more detail how to use Hibernate
-  Validator to validate constraints for a given entity model. We will also
-  learn which default constraints the Bean Validation specification provides
-  and which additional constraints are only provided by Hibernate Validator.
-  Let's start with how to add constraints to an entity.</para>
-
-  <section id="validator-usingvalidator-annotate">
-    <title>Defining constraints</title>
-
-    <para>Constraints in Bean Validation are expressed via Java annotations.
-    In this section we show how to annotate an object model with these
-    annotations. We have to differentiate between three different type of
-    constraint annotations - field-, property-, and class-level
-    annotations.</para>
-
-    <note>
-      <para>Not all constraints can be placed on all of these levels. In fact,
-      none of the default constraints defined by Bean Validation can be placed
-      at class level. The <classname>java.lang.annotation.Target</classname>
-      annotation in the constraint annotation itself determines on which
-      elements a constraint can be placed. See <xref
-      linkend="validator-customconstraints" /> for more information.</para>
-    </note>
-
-    <section>
-      <title>Field-level constraints</title>
-
-      <para>Constraints can be expressed by annotating a field of a class.
-      <xref linkend="example-field-level" /> shows a field level configuration
-      example:</para>
-
-      <example id="example-field-level">
-        <title>Field level constraint</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.NotNull;
-
-public class Car {
-
-    @NotNull
-    private String manufacturer;
-
-    @AssertTrue
-    private boolean isRegistered;
-
-    public Car(String manufacturer, boolean isRegistered) {
-        super();
-        this.manufacturer = manufacturer;
-        this.isRegistered = isRegistered;
-    }
-}</programlisting>
-      </example>
-
-      <para>When using field level constraints field access strategy is used
-      to access the value to be validated. This means the bean validation
-      provider directly accesses the instance variable and does not invoke the
-      property accessor method also if such a method exists.</para>
-
-      <note>
-        <para>The access type (private, protected or public) does not
-        matter.</para>
-      </note>
-
-      <note>
-        <para>Static fields and properties cannot be validated.</para>
-      </note>
-    </section>
-
-    <section>
-      <title>Property-level constraints</title>
-
-      <para>If your model class adheres to the <ulink type=""
-      url="http://java.sun.com/javase/technologies/desktop/javabeans/index.jsp">JavaBeans</ulink>
-      standard, it is also possible to annotate the properties of a bean class
-      instead of its fields. <xref linkend="example-property-level" /> uses
-      the same entity as in <xref linkend="example-field-level" />, however,
-      property level constraints are used.<note>
-          <para>The property's getter method has to be annotated, not its
-          setter.</para>
-        </note></para>
-
-      <example id="example-property-level">
-        <title>Property level constraint</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.NotNull;
-
-public class Car {
-
-    private String manufacturer;
-
-    private boolean isRegistered;
-      
-    public Car(String manufacturer, boolean isRegistered) {
-        super();
-        this.manufacturer = manufacturer;
-        this.isRegistered = isRegistered;
-    }
-
-    @NotNull
-    public String getManufacturer() {
-        return manufacturer;
-    }
-
-    public void setManufacturer(String manufacturer) {
-        this.manufacturer = manufacturer;
-    }
-
-    @AssertTrue
-    public boolean isRegistered() {
-        return isRegistered;
-    }
-
-    public void setRegistered(boolean isRegistered) {
-        this.isRegistered = isRegistered;
-    }
-}</programlisting>
-      </example>
-
-      <para>When using property level constraints property access strategy is
-      used to access the value to be validated. This means the bean validation
-      provider accesses the state via the property accessor method.</para>
-
-      <tip>
-        <para>It is recommended to stick either to field
-        <emphasis>or</emphasis> property annotation within one class. It is
-        not recommended to annotate a field <emphasis>and</emphasis> the
-        accompanying getter method as this would cause the field to be
-        validated twice.</para>
-      </tip>
-    </section>
-
-    <section>
-      <title id="validator-usingvalidator-classlevel">Class-level
-      constraints</title>
-
-      <para>Last but not least, a constraint can also be placed on class
-      level. When a constraint annotation is placed on this level the class
-      instance itself passed to the
-      <classname>ConstraintValidator</classname>. Class level constraints are
-      useful if it is necessary to inspect more than a single property of the
-      class to validate it or if a correlation between different state
-      variables has to be evaluated. In <xref linkend="example-class-level" />
-      we add the property <property>passengers</property> to the class
-      <classname>Car</classname>. We also add the constraint
-      <classname>PassengerCount</classname> on the class level. We will later
-      see how we can actually create this custom constraint (see <xref
-      linkend="validator-customconstraints" />). For now we it is enough to
-      know that <classname>PassengerCount</classname> will ensure that there
-      cannot be more passengers in a car than there are seats.</para>
-
-      <example id="example-class-level">
-        <title>Class level constraint</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
- at PassengerCount
-public class Car {
-
-    @NotNull
-    private String manufacturer;
-
-    @NotNull
-    @Size(min = 2, max = 14)
-    private String licensePlate;
-
-    @Min(2)
-    private int seatCount;
-    
-    private List<Person> passengers;
-    
-    public Car(String manufacturer, String licencePlate, int seatCount) {
-        this.manufacturer = manufacturer;
-        this.licensePlate = licencePlate;
-        this.seatCount = seatCount;
-    }
-
-    //getters and setters ...
-}</programlisting>
-      </example>
-    </section>
-
-    <section>
-      <title>Constraint inheritance</title>
-
-      <para>When validating an object that implements an interface or extends
-      another class, all constraint annotations on the implemented interface
-      and parent class apply in the same manner as the constraints specified
-      on the validated object itself. To make things clearer let's have a look
-      at the following example:</para>
-
-      <example>
-        <title>Constraint inheritance using RentalCar</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.NotNull;
-
-public class RentalCar extends Car {
-
-    private String rentalStation;
-    
-    public RentalCar(String manufacturer, String rentalStation) {
-        super(manufacturer);
-        this.rentalStation = rentalStation;
-    }
-    
-    @NotNull
-    public String getRentalStation() {
-        return rentalStation;
-    }
-
-    public void setRentalStation(String rentalStation) {
-        this.rentalStation = rentalStation;
-    }
-}</programlisting>
-      </example>
-
-      <para>Our well-known class <classname>Car</classname> is now extended by
-      <classname>RentalCar</classname> with the additional property
-      <property>rentalStation</property>. If an instance of
-      <classname>RentalCar</classname> is validated, not only the
-      <classname>@NotNull</classname> constraint on
-      <property>rentalStation</property> is validated, but also the constraint
-      on <property>manufacturer</property> from the parent class.</para>
-
-      <para>The same would hold true, if <classname>Car</classname> were an
-      interface implemented by <classname>RentalCar</classname>.</para>
-
-      <para>Constraint annotations are aggregated if methods are overridden.
-      If <classname>RentalCar</classname> would override the
-      <methodname>getManufacturer()</methodname> method from
-      <classname>Car</classname> any constraints annotated at the overriding
-      method would be evaluated in addition to the
-      <classname>@NotNull</classname> constraint from the super-class.</para>
-    </section>
-
-    <section>
-      <title>Object graphs</title>
-
-      <para>The Bean Validation API does not only allow to validate single
-      class instances but also complete object graphs. To do so, just annotate
-      a field or property representing a reference to another object with
-      <classname>@Valid</classname>. If the parent object is validated, all
-      referenced objects annotated with <classname>@Valid</classname> will be
-      validated as well (as will be their children etc.). See <xref
-      linkend="example-car-with-driver" />.</para>
-
-      <example>
-        <title>Class Person</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.constraints.NotNull;
-
-public class Person {
-
-    @NotNull
-    private String name;
-    
-    public Person(String name) {
-        super();
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}</programlisting>
-      </example>
-
-      <example id="example-car-with-driver">
-        <title>Adding a driver to the car</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
-public class Car {
-
-    @NotNull
-    @Valid
-    private Person driver;
-    
-    public Car(Person driver) {
-        this.driver = driver;
-    }
-
-    //getters and setters ...
-}</programlisting>
-      </example>
-
-      <para>If an instance of <classname>Car</classname> is validated, the
-      referenced <classname>Person</classname> object will be validated as
-      well, as the <property>driver</property> field is annotated with
-      <classname>@Valid</classname>. Therefore the validation of a
-      <classname>Car</classname> will fail if the <property>name</property>
-      field of the referenced <classname>Person</classname> instance is
-      <code>null</code>.</para>
-
-      <para>Object graph validation also works for collection-typed fields.
-      That means any attributes that</para>
-
-      <itemizedlist>
-        <listitem>
-          <para>are arrays</para>
-        </listitem>
-
-        <listitem>
-          <para>implement <classname>java.lang.Iterable</classname>
-          (especially <classname>Collection</classname>,
-          <classname>List</classname> and <classname>Set</classname>)</para>
-        </listitem>
-
-        <listitem>
-          <para>implement <classname>java.util.Map</classname></para>
-        </listitem>
-      </itemizedlist>
-
-      <para>can be annotated with <classname>@Valid</classname>, which will
-      cause each contained element to be validated, when the parent object is
-      validated.</para>
-
-      <example>
-        <title>Car with a list of passengers</title>
-
-        <programlisting language="JAVA" role="JAVA">package com.mycompany;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
-public class Car {
-
-    @NotNull
-    @Valid
-    private List<Person> passengers = new ArrayList<Person>();
-
-    public Car(List<Person> passengers) {
-        this.passengers = passengers;
-    }
-
-    //getters and setters ...
-}</programlisting>
-      </example>
-
-      <para>If a <classname>Car</classname> instance is validated, a
-      <classname>ConstraintValidation</classname> will be created, if any of
-      the <classname>Person</classname> objects contained in the
-      <property>passengers</property> list has a <code>null</code> name.<note>
-          <para><classname>null</classname> values are getting ignored when
-          validating object graphs.</para>
-        </note></para>
-    </section>
-  </section>
-
-  <section id="validator-usingvalidator-validate">
-    <title>Validating constraints</title>
-
-    <para>The <classname>Validator</classname> interface is the main entry
-    point to Bean Validation. In <xref linkend="section-validator-instance" />
-    we will first show how to obtain an <classname>Validator</classname>
-    instance. Afterwards we will learn how to use the different methods of the
-    <classname>Validator</classname> interface.</para>
-
-    <section id="section-obtaining-validator">
-      <title>Obtaining a <classname>Validator</classname> instance</title>
-
-      <para>The first step towards validating an entity instance is to get
-      hold of a <classname>Validator</classname> instance. The road to this
-      instance leads via the <classname>Validation</classname> class and a
-      <classname>ValidatorFactory</classname>. The easiest way is to use the
-      static
-      <methodname>Validation.buildDefaultValidatorFactory()</methodname>
-      method:</para>
-
-      <example>
-        <title>Validation.buildDefaultValidatorFactory()</title>
-
-        <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-Validator validator = factory.getValidator();</programlisting>
-      </example>
-
-      <para>For other ways of obtaining a Validator instance see <xref
-      linkend="validator-bootstrapping" />. For now we just want to see how we
-      can use the <classname>Validator</classname> instance to validate entity
-      instances.</para>
-    </section>
-
-    <section>
-      <title>Validator methods</title>
-
-      <para>The <classname>Validator</classname> interface contains three
-      methods that can be used to either validate entire entities or just a
-      single properties of the entity.</para>
-
-      <para>All three methods return a
-      <classname>Set<ConstraintViolation></classname>. The set is empty,
-      if the validation succeeds. Otherwise a
-      <classname>ConstraintViolation</classname> instance is added for each
-      violated constraint.</para>
-
-      <para>All the validation methods have a var-args parameter which can be
-      used to specify, which validation groups shall be considered when
-      performing the validation. If the parameter is not specified the default
-      validation group
-      (<classname>javax.validation.groups.Default</classname>) will be used.
-      We will go into more detail on the topic of validation groups in <xref
-      linkend="validator-usingvalidator-validationgroups" /></para>
-
-      <section>
-        <title><methodname>validate</methodname></title>
-
-        <para>Use the <methodname>validate()</methodname> method to perform
-        validation of all constraints of a given entity instance (see <xref
-        linkend="example-validator-validate" /> ).</para>
-
-        <example id="example-validator-validate">
-          <title>Usage of
-          <methodname>Validator.validate()</methodname></title>
-
-          <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-Validator validator = factory.getValidator();
-
-Car car = new Car(null);
-
-Set<ConstraintViolation<Car>> constraintViolations = validator.validate(car);
-
-assertEquals(1, constraintViolations.size());
-assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
-        </example>
-      </section>
-
-      <section>
-        <title><methodname>validateProperty</methodname></title>
-
-        <para>With help of the <methodname>validateProperty()</methodname> a
-        single named property of a given object can be validated. The property
-        name is the JavaBeans property name.</para>
-
-        <example>
-          <title>Usage of
-          <methodname>Validator.validateProperty()</methodname></title>
-
-          <programlisting language="JAVA" role="JAVA">Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
-
-Car car = new Car(null);
-
-Set<ConstraintViolation<Car>> constraintViolations = validator.validateProperty(car, "manufacturer");
-
-assertEquals(1, constraintViolations.size());
-assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
-        </example>
-
-        <para><methodname>Validator.validateProperty</methodname> is for
-        example used in the integration of Bean Validation into JSF 2 (see
-        <xref linkend="section-presentation-layer" />).</para>
-      </section>
-
-      <section>
-        <title><methodname>validateValue</methodname></title>
-
-        <para>Using the <methodname>validateValue() </methodname>method you
-        can check, whether a single property of a given class can be validated
-        successfully, if the property had the specified value:</para>
-
-        <example>
-          <title>Usage of
-          <methodname>Validator.validateValue()</methodname></title>
-
-          <programlisting language="JAVA" role="JAVA">Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
-
-Set<ConstraintViolation<Car>> constraintViolations = validator.validateValue(Car.class, "manufacturer", null);
-
-assertEquals(1, constraintViolations.size());
-assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
-        </example>
-
-        <note>
-          <para><classname>@Valid</classname> is not honored by
-          <methodname>validateProperty()</methodname> or
-          <methodname>validateValue()</methodname>.</para>
-        </note>
-      </section>
-    </section>
-
-    <section>
-      <title><classname>ConstraintViolation</classname> methods</title>
-
-      <para>Now it is time to have a closer look at what a
-      <classname>ConstraintViolation</classname>. Using the different methods
-      of <classname>ConstraintViolation</classname> a lot of useful
-      information about the cause of the validation failure can be determined.
-      <xref linkend="table-constraint-violation" /> gives an overview of these
-      methods:</para>
-
-      <table id="table-constraint-violation">
-        <title>The various <classname>ConstraintViolation</classname>
-        methods</title>
-
-        <tgroup cols="3">
-          <thead>
-            <row>
-              <entry>Method</entry>
-
-              <entry>Usage</entry>
-
-              <entry>Example (referring to <xref
-              linkend="example-validator-validate" />)</entry>
-            </row>
-          </thead>
-
-          <tbody>
-            <row>
-              <entry><methodname>getMessage()</methodname></entry>
-
-              <entry>The interpolated error message.</entry>
-
-              <entry>may not be null</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getMessageTemplate()</methodname></entry>
-
-              <entry>The non-interpolated error message.</entry>
-
-              <entry>{javax.validation.constraints.NotNull.message}</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getRootBean()</methodname></entry>
-
-              <entry>The root bean being validated.</entry>
-
-              <entry>car</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getRootBeanClass()</methodname></entry>
-
-              <entry>The class of the root bean being validated.</entry>
-
-              <entry>Car.class</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getLeafBean()</methodname></entry>
-
-              <entry>If a bean constraint, the bean instance the constraint is
-              applied on. If a property constraint, the bean instance hosting
-              the property the constraint is applied on.</entry>
-
-              <entry>car</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getPropertyPath()</methodname></entry>
-
-              <entry>The property path to the value from root bean.</entry>
-
-              <entry></entry>
-            </row>
-
-            <row>
-              <entry><methodname>getInvalidValue()</methodname></entry>
-
-              <entry>The value failing to pass the constraint.</entry>
-
-              <entry>passengers</entry>
-            </row>
-
-            <row>
-              <entry><methodname>getConstraintDescriptor()</methodname></entry>
-
-              <entry>Constraint metadata reported to fail.</entry>
-
-              <entry></entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </table>
-    </section>
-
-    <section id="section-message-interpolation">
-      <title>Message interpolation</title>
-
-      <para>As we will see in <xref linkend="validator-customconstraints" />
-      each constraint definition must define a default message descriptor.
-      This message can be overridden at declaration time using the
-      <methodname>message</methodname> attribute of the constraint. You can
-      see this in <xref linkend="example-driver" />. This message descriptors
-      get interpolated when a constraint validation fails using the configured
-      <classname>MessageInterpolator</classname>. The interpolator will try to
-      resolve any message parameters, meaning string literals enclosed in
-      braces. In order to resolve these parameters Hibernate Validator's
-      default <classname>MessageInterpolator</classname> first recursively
-      resolves parameters against a custom
-      <classname>ResourceBundle</classname> called
-      <filename>ValidationMessages.properties</filename> at the root of the
-      classpath (It is up to you to create this file). If no further
-      replacements are possible against the custom bundle the default
-      <classname>ResourceBundle</classname> under
-      <filename>/org/hibernate/validator/ValidationMessages.properties</filename>
-      gets evaluated. If a replacement occurs against the default bundle the
-      algorithm looks again at the custom bundle (and so on). Once no further
-      replacements against these two resource bundles are possible remaining
-      parameters are getting resolved against the attributes of the constraint
-      to be validated.</para>
-
-      <para>Since the braces { and } have special meaning in the messages they
-      need to be escaped if they are used literally. The following The
-      following rules apply:<itemizedlist>
-          <listitem>
-            <para>\{ is considered as the literal {</para>
-          </listitem>
-
-          <listitem>
-            <para>\} is considered as the literal }</para>
-          </listitem>
-
-          <listitem>
-            <para>\\ is considered as the literal \</para>
-          </listitem>
-        </itemizedlist></para>
-
-      <para>If the default message interpolator does not fit your requirements
-      it is possible to plug a custom
-      <classname>MessageInterpolator</classname> when the
-      <classname>ValidatorFactory</classname> gets created. This can be seen
-      in <xref linkend="validator-bootstrapping" />.</para>
-    </section>
-  </section>
-
-  <section id="validator-usingvalidator-validationgroups">
-    <title>Validating groups</title>
-
-    <para>Groups allow you to restrict the set of constraints applied during
-    validation. This makes for example wizard like validation possible where
-    in each step only a specified subset of constraints get validated. The
-    groups targeted are passed as var-args parameters to
-    <methodname>validate</methodname>,
-    <methodname>validateProperty</methodname> and
-    <methodname>validateValue</methodname>. Let's have a look at an extended
-    <classname>Car</classname> with <classname>Driver</classname> example.
-    First we have the class <classname>Person</classname> (<xref
-    linkend="example-person" />) which has a <classname>@NotNull
-    </classname>constraint on <property>name</property>. Since no group is
-    specified for this annotation its default group is
-    <classname>javax.validation.groups.Default</classname>.</para>
-
-    <note>
-      <para>When more than one group is requested, the order in which the
-      groups are evaluated is not deterministic. If no group is specified the
-      default group <classname>javax.validation.groups.Default</classname> is
-      assumed.</para>
-    </note>
-
-    <example id="example-person">
-      <title>Person</title>
-
-      <programlisting language="JAVA" role="JAVA">public class Person {
-    @NotNull
-    private String name;
-
-    public Person(String name) {
-        this.name = name;
-    }
-    // getters and setters ...
-}</programlisting>
-    </example>
-
-    <para>Next we have the class <classname>Driver</classname> (<xref
-    linkend="example-driver" />) extending <classname>Person</classname>. Here
-    we are adding the properties <property>age</property> and
-    <property>hasDrivingLicense</property>. In order to drive you must be at
-    least 18 (<classname>@Min(18)</classname>) and you must have a driving
-    license (<classname>@AssertTrue</classname>). Both constraints defined on
-    these properties belong to the group <classname>DriverChecks</classname>.
-    As you can see in <xref linkend="example-group-interfaces" /> the group
-    <classname>DriverChecks</classname> is just a simple tagging interface.
-    Using interfaces makes the usage of groups type safe and allows for easy
-    refactoring. It also means that groups can inherit from each other via
-    class inheritance.</para>
-
-    <note>
-      <para>The Bean Validation specification does not enforce that groups
-      have to be interfaces. Non interface classes could be used as well, but
-      we recommend to stick to interfaces.</para>
-    </note>
-
-    <example id="example-driver">
-      <title>Driver</title>
-
-      <programlisting language="JAVA" role="JAVA">public class Driver extends Person {
-    @Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class)
-    public int age;
-
-    @AssertTrue(message = "You first have to pass the driving test", groups = DriverChecks.class)
-    public boolean hasDrivingLicense;
-
-    public Driver(String name) {
-        super( name );
-    }
-
-    public void passedDrivingTest(boolean b) {
-        hasDrivingLicense = b;
-    }
-
-    public int getAge() {
-        return age;
-    }
-
-    public void setAge(int age) {
-        this.age = age;
-    }
-}</programlisting>
-    </example>
-
-    <example id="example-group-interfaces">
-      <title>Group interfaces</title>
-
-      <programlisting language="JAVA" role="JAVA">public interface DriverChecks {
-}
-
-public interface CarChecks {
-}</programlisting>
-    </example>
-
-    <para>Last but not least we add the property
-    <property>passedVehicleInspection</property> to the
-    <classname>Car</classname> class (<xref linkend="example-car" />)
-    indicating whether a car passed the road worthy tests.</para>
-
-    <example id="example-car">
-      <title>Car</title>
-
-      <programlisting language="JAVA" role="JAVA">public class Car {
-    @NotNull
-    private String manufacturer;
-
-    @NotNull
-    @Size(min = 2, max = 14)
-    private String licensePlate;
-
-    @Min(2)
-    private int seatCount;
-
-    @AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
-    private boolean passedVehicleInspection;
-
-    @Valid
-    private Driver driver;
-
-    public Car(String manufacturer, String licencePlate, int seatCount) {
-        this.manufacturer = manufacturer;
-        this.licensePlate = licencePlate;
-        this.seatCount = seatCount;
-    }
-}</programlisting>
-    </example>
-
-    <para>Overall three different groups are used in our example.
-    <property>Person.name</property>, <property>Car.manufacturer</property>,
-    <property>Car.licensePlate</property> and
-    <property>Car.seatCount</property> all belong to the
-    <classname>Default</classname> group. <property>Driver.age</property> and
-    <property>Driver.hasDrivingLicense</property> belong to
-    <classname>DriverChecks</classname> and last but not least
-    <property>Car.passedVehicleInspection</property> belongs to the group
-    <classname>CarChecks</classname>. <xref linkend="example-drive-away" />
-    shows how passing different group combinations to the
-    <methodname>Validator.validate</methodname> method result in different
-    validation results.</para>
-
-    <example id="example-drive-away">
-      <title>Drive away</title>
-
-      <programlisting language="JAVA" role="JAVA">public class GroupTest {
-
-    private static Validator validator;
-
-    @BeforeClass
-    public static void setUp() {
-        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-        validator = factory.getValidator();
-    }
-
-    @Test
-    public void driveAway() {
-        // create a car and check that everything is ok with it.
-        Car car = new Car( "Morris", "DD-AB-123", 2 );
-        Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
-        assertEquals( 0, constraintViolations.size() );
-
-        // but has it passed the vehicle inspection?
-        constraintViolations = validator.validate( car, CarChecks.class );
-        assertEquals( 1, constraintViolations.size() );
-        assertEquals("The car has to pass the vehicle inspection first", constraintViolations.iterator().next().getMessage());
-
-        // let's go to the vehicle inspection
-        car.setPassedVehicleInspection( true );
-        assertEquals( 0, validator.validate( car ).size() );
-
-        // now let's add a driver. He is 18, but has not passed the driving test yet
-        Driver john = new Driver( "John Doe" );
-        john.setAge( 18 );
-        car.setDriver( john );
-        constraintViolations = validator.validate( car, DriverChecks.class );
-        assertEquals( 1, constraintViolations.size() );
-        assertEquals( "You first have to pass the driving test", constraintViolations.iterator().next().getMessage() );
-
-        // ok, John passes the test
-        john.passedDrivingTest( true );
-        assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );
-
-        // just checking that everything is in order now
-        assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );
-    }
-}</programlisting>
-    </example>
-
-    <para>First we create a car and validate it using no explicit group. There
-    are no validation errors, even though the property
-    <property>passedVehicleInspection</property> is per default
-    <constant>false</constant>. However, the constraint defined on this
-    property does not belong to the default group. Next we just validate the
-    <classname>CarChecks</classname> group which will fail until we make sure
-    that the car passes the vehicle inspection. When we then add a driver to
-    the car and validate against <classname>DriverChecks</classname> we get
-    again a constraint violation due to the fact that the driver has not yet
-    passed the driving test. Only after setting
-    <property>passedDrivingTest</property> to true the validation against
-    <classname>DriverChecks</classname> will pass.</para>
-
-    <para>Last but not least, we show that all constraints are passing by
-    validating against all defined groups.</para>
-
-    <section>
-      <title>Group sequences</title>
-
-      <para>By default, constraints are evaluated in no particular order and
-      this regardless of which groups they belong to. In some situations,
-      however, it is useful to control the order of the constraints
-      evaluation. In our example from <xref
-      linkend="validator-usingvalidator-validationgroups" /> we could for
-      example require that first all default car constraints are passing
-      before we check the road worthiness of the car. Finally before we drive
-      away we check the actual driver constraints. In order to implement such
-      an order one would define a new interface and annotate it with
-      <classname>@GroupSequence</classname> defining the order in which the
-      groups have to be validated.</para>
-
-      <note>
-        <para>If at least one constraints fails in a sequenced group none of
-        the constraints of the following groups in the sequence get
-        validated.</para>
-      </note>
-
-      <example>
-        <title>Interface with @GroupSequence</title>
-
-        <programlisting language="JAVA" role="JAVA">@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})
-public interface OrderedChecks {
-}</programlisting>
-      </example>
-
-      <para><warning>
-          <para>Groups defining a sequence and groups composing a sequence
-          must not be involved in a cyclic dependency either directly or
-          indirectly, either through cascaded sequence definition or group
-          inheritance. If a group containing such a circularity is evaluated,
-          a <classname>GroupDefinitionException</classname> is raised.</para>
-        </warning>The usage of the new sequence could then look like in <xref
-      linkend="example-group-sequence" />.</para>
-
-      <example id="example-group-sequence">
-        <title>Usage of a group sequence</title>
-
-        <programlisting language="JAVA" role="JAVA">@Test
-public void testOrderedChecks() {
-    Car car = new Car( "Morris", "DD-AB-123", 2 );
-    car.setPassedVehicleInspection( true );
-
-    Driver john = new Driver( "John Doe" );
-    john.setAge( 18 );
-    john.passedDrivingTest( true );
-    car.setDriver( john );
-
-    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );
-}</programlisting>
-      </example>
-    </section>
-
-    <section id="section-default-group-class">
-      <title>Redefining the default group sequence of a class</title>
-
-      <para>The @GroupSequence annotation also fulfills a second purpose. It
-      allows you to redefine what the Default group means for a given class.
-      To redefine <classname>Default</classname> for a class, place a
-      <classname>@GroupSequence</classname> annotation on the class. The
-      defined groups in the annotation express the sequence of groups that
-      substitute <classname>Default</classname> for this class. <xref
-      linkend="example-rental-car" /> introduces a new class RentalCar with a
-      redfined default group. With this definition the check for all three
-      groups can be rewritten as seen in <xref
-      linkend="example-testOrderedChecksWithRedefinedDefault" />.</para>
-
-      <example id="example-rental-car">
-        <title>RentalCar</title>
-
-        <programlisting language="JAVA" role="JAVA">@GroupSequence({ RentalCar.class, CarChecks.class })
-public class RentalCar extends Car {
-    public RentalCar(String manufacturer, String licencePlate, int seatCount) {
-        super( manufacturer, licencePlate, seatCount );
-    }
-}</programlisting>
-      </example>
-
-      <example id="example-testOrderedChecksWithRedefinedDefault">
-        <title>testOrderedChecksWithRedefinedDefault</title>
-
-        <programlisting language="JAVA" role="JAVA">@Test
-public void testOrderedChecksWithRedefinedDefault() {
-    RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
-    rentalCar.setPassedVehicleInspection( true );
-
-    Driver john = new Driver( "John Doe" );
-    john.setAge( 18 );
-    john.passedDrivingTest( true );
-    rentalCar.setDriver( john );
-
-    assertEquals( 0, validator.validate( rentalCar, Default.class, DriverChecks.class ).size() );
-}</programlisting>
-      </example>
-
-      <note>
-        <para>Due to the fact that there cannot be a cyclic dependency in the
-        group and group sequence definitions one cannot just add
-        <classname>Default</classname> to the sequence redefining
-        <classname>Default</classname> for a class. Instead the class itself
-        should be added!</para>
-      </note>
-    </section>
-  </section>
-
-  <section id="validator-defineconstraints-builtin">
-    <title>Built-in constraints</title>
-
-    <para>Hibernate Validator implements all of the default constraints
-    specified in Bean Validation as well as some custom ones. <xref
-    linkend="table-builtin-constraints" /> list all constraints available in
-    Hibernate Validator.</para>
-
-    <table id="table-builtin-constraints">
-      <title>Built-in constraints</title>
-
-      <tgroup cols="5">
-        <colspec align="left" />
-
-        <thead>
-          <row>
-            <entry>Annotation</entry>
-
-            <entry>Part of Bean Validation Specification</entry>
-
-            <entry>Apply on</entry>
-
-            <entry>Use</entry>
-
-            <entry>Hibernate Metadata impact</entry>
-          </row>
-        </thead>
-
-        <tbody>
-          <row>
-            <entry>@AssertFalse</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property</entry>
-
-            <entry>Check that the annotated element is
-            <constant>false</constant>.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@AssertTrue</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property</entry>
-
-            <entry>Check that the annotated element is
-            <constant>true</constant>.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@CreditCardNumber</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. The supported type is
-            <classname>String</classname>.</entry>
-
-            <entry>Check that the annotated string passes the Luhn checksum
-            test. Note, this validation aims to check for user mistake, not
-            credit card validity! See also <ulink
-            url="http://www.merriampark.com/anatomycc.htm">Anatomy of Credit
-            Card Numbers</ulink>.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@DecimalMax</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>The annotated element must be a number whose value must be
-            lower or equal to the specified maximum. The parameter value is
-            the string representation of the max value according to the
-            <classname>BigDecimal</classname> string representation.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@DecimalMin</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>The annotated element must be a number whose value must be
-            higher or equal to the specified minimum. The parameter value is
-            the string representation of the min value according to the
-            <classname>BigDecimal</classname> string representation.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Digits(integer=, fraction=)</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>Check whether the property is a number having up to
-            <literal>integer</literal> digits and <literal>fraction</literal>
-            fractional digits.</entry>
-
-            <entry>Define column precision and scale.</entry>
-          </row>
-
-          <row>
-            <entry>@Email</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. Needs to be a string.</entry>
-
-            <entry>Check whether the specified string is a valid email
-            address.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Future</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>java.util.Date</classname> and
-            <classname>java.util.Calendar</classname>.</entry>
-
-            <entry>Checks whether the annotated date is in the future.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Length(min=, max=)</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. Needs to be a string.</entry>
-
-            <entry>Validate that the annotated string is between
-            <parameter>min</parameter> and <parameter>max</parameter>
-            included.</entry>
-
-            <entry>Column length will be set to max.</entry>
-          </row>
-
-          <row>
-            <entry>@Max</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>Checks whether the annotated value is less than or equal to
-            the specified maximum.</entry>
-
-            <entry>Add a check constraint on the column.</entry>
-          </row>
-
-          <row>
-            <entry>@Min</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>Checks whether the annotated value is higher than or equal
-            to the specified minimum.</entry>
-
-            <entry>Add a check constraint on the column.</entry>
-          </row>
-
-          <row>
-            <entry>@NotNull</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property</entry>
-
-            <entry>Check that the annotated value is not
-            <constant>null.</constant></entry>
-
-            <entry>Column(s) are not null.</entry>
-          </row>
-
-          <row>
-            <entry>@NotBlank</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property</entry>
-
-            <entry>Check that the annotated string is not null and the trimmed
-            length is greater than 0. The difference to @NotEmpty is that this
-            constraint can only be applied on strings and that trailing
-            whitespaces are ignored.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@NotEmpty</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. Supported types are String, Collection, Map
-            and arrays.</entry>
-
-            <entry>Check whether the annotated element is not
-            <constant>null</constant> nor empty.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Null</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property</entry>
-
-            <entry>Check that the annotated value is
-            <constant>null.</constant></entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Past</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>java.util.Date</classname> and
-            <classname>java.util.Calendar</classname>.</entry>
-
-            <entry>Checks whether the annotated date is in the past.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Pattern(regex=, flag=)</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Needs to be a string.</entry>
-
-            <entry>Checks if the annotated string matches the regular
-            expression <parameter>regex</parameter> considering the given flag
-            <parameter>match</parameter>.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Range(min=, max=)</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. Supported types are
-            <classname>BigDecimal</classname>,
-            <classname>BigInteger</classname>, <classname>String</classname>,
-            <classname>byte</classname>, <classname>short</classname>,
-            <classname>int</classname>, <classname>long</classname> and the
-            respective wrappers of the primitive types.</entry>
-
-            <entry>Check whether the annotated value lies between (inclusive)
-            the specified minimum and maximum.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Size(min=, max=)</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Supported types are
-            <classname>String</classname>, <classname>Collection</classname>,
-            <classname>Map</classname> and
-            <classname>arrays</classname>.</entry>
-
-            <entry>Check if the annotated element size is between min and max
-            (inclusive).</entry>
-
-            <entry>Column length will be set to max.</entry>
-          </row>
-
-          <row>
-            <entry>@ScriptAssert(lang=, script=, alias=)</entry>
-
-            <entry>no</entry>
-
-            <entry>type</entry>
-
-            <entry>Checks whether the given script can successfully be
-            evaluated against the annotated element. In order to use this
-            constraint, an implementation of the Java Scripting API as defined
-            by JSR 223 ("Scripting for the Java<superscript>TM</superscript>
-            Platform") must part of the class path. This is automatically the
-            case when running on Java 6. For older Java versions, the JSR 223
-            RI can be added manually to the class path.The expressions to be
-            evaluated can be written in any scripting or expression language,
-            for which a JSR 223 compatible engine can be found in the class
-            path.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@URL(protocol=, host=, port=)</entry>
-
-            <entry>no</entry>
-
-            <entry>field/property. The supported type is
-            <classname>String</classname>.</entry>
-
-            <entry>Check if the annotated string is a valid URL. If any of
-            parameters <parameter>protocol</parameter>,
-            <parameter>host</parameter> or <parameter>port</parameter> is
-            specified the URL must match the specified values in the according
-            part.</entry>
-
-            <entry>none</entry>
-          </row>
-
-          <row>
-            <entry>@Valid</entry>
-
-            <entry>yes</entry>
-
-            <entry>field/property. Any non-primitive types are
-            supported.</entry>
-
-            <entry>Performs validation recursively on the associated object.
-            If the object is a collection or an array, the elements are
-            validated recursively. If the object is a map, the value elements
-            are validated recursively.</entry>
-
-            <entry>none</entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-
-    <note>
-      <para>On top of the parameters indicated in <xref
-      linkend="table-builtin-constraints" /> each constraint supports the
-      parameters <parameter>message</parameter>, <parameter>groups</parameter>
-      and <parameter>payload</parameter>. This is a requirement of the Bean
-      Validation specification.</para>
-    </note>
-
-    <para>In some cases these built-in constraints will not fulfill your
-    requirements. In this case you can literally in a minute write your own
-    constraints. We will discuss this in <xref
-    linkend="validator-customconstraints" /></para>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml b/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
deleted file mode 100644
index c504e3d..0000000
--- a/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: xmlconfiguration.xml 19521 2010-05-15 12:33:09Z gunnar.morling $ -->
-<!--
-	~ JBoss, Home of Professional Open Source
-	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-	~ by the @authors tag. See the copyright.txt in the distribution for a
-	~ full listing of individual contributors.
-	~
-	~ Licensed under the Apache License, Version 2.0 (the "License");
-	~ you may not use this file except in compliance with the License.
-	~ You may obtain a copy of the License at
-	~ http://www.apache.org/licenses/LICENSE-2.0
-	~ Unless required by applicable law or agreed to in writing, software
-	~ distributed under the License is distributed on an "AS IS" BASIS,
-	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	~ See the License for the specific language governing permissions and
-	~ limitations under the License.
--->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
-%BOOK_ENTITIES;
-]>
-<chapter id="validator-xmlconfiguration">
-  <title>XML configuration</title>
-
-  <section>
-    <title><filename>validation.xml</filename></title>
-
-    <para>The key to enable XML configuration for Hibernate Validator is the
-    file <filename>validation.xml</filename>. If this file exists in the
-    classpath its configuration will be applied when the
-    <classname>ValidationFactory</classname> gets created. <xref
-    linkend="image-validation-configuration" /> shows a model view of the xsd
-    <filename>valiation.xml</filename> has to adhere to.<example
-        id="image-validation-configuration">
-        <title>validation-configuration-1.0.xsd</title>
-
-        <mediaobject>
-          <imageobject role="fo">
-            <imagedata align="center"
-                       fileref="validation-configuration-1.0.png" scalefit="1" />
-          </imageobject>
-
-          <imageobject role="html">
-            <imagedata depth="" fileref="validation-configuration-1.0.png"
-                       scalefit="1" />
-          </imageobject>
-        </mediaobject>
-      </example></para>
-
-    <para><xref linkend="example-validation-xml" /> shows the several
-    configuration options of <filename>validation.xml</filename>.</para>
-
-    <example id="example-validation-xml">
-      <title>validation.xml</title>
-
-      <programlisting role="XML" language="XML"><validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration">
-    <default-provider>org.hibernate.validator.HibernateValidator</default-provider>
-    <message-interpolator>org.hibernate.validator.engine.ResourceBundleMessageInterpolator</message-interpolator>
-    <traversable-resolver>org.hibernate.validator.engine.resolver.DefaultTraversableResolver</traversable-resolver>
-    <constraint-validator-factory>org.hibernate.validator.engine.ConstraintValidatorFactoryImpl</constraint-validator-factory>
-    <constraint-mapping>/constraints-car.xml</constraint-mapping>
-    <property name="prop1">value1</property>
-    <property name="prop2">value2</property>
-</validation-config></programlisting>
-    </example>
-
-    <warning>
-      <para>There can only be one <filename>validation.xml</filename> in the
-      classpath. If more than one is found an exception is thrown.</para>
-    </warning>
-
-    <para>All settings shown in the <filename>validation.xml</filename> are
-    optional and in the case of <xref linkend="example-validation-xml" /> show
-    the defaults used within Hibernate Validator. The node
-    <property>default-provider</property> allows to choose the Bean Validation
-    provider. This is useful if there is more than one provider in the
-    classpath. <property>message-interpolator</property>,
-    <property>traversable-resolver</property> and
-    <property>constraint-validator-factory</property> allow to customize the
-    <classname>javax.validation.MessageInterpolator</classname>,
-    <classname>javax.validation.TraversableResolver</classname> resp.
-    <classname>javax.validation.ConstraintValidatorFactory</classname>. The
-    same configuration options are also available programmatically through the
-    <classname>javax.validation.Configuration</classname>. In fact XML
-    configuration will be overridden by values explicitly specified via the
-    API. It is even possible to ignore the XML configuration completely via
-    <methodname> Configuration.ignoreXmlConfiguration()</methodname>. See also
-    <xref linkend="validator-bootstrapping" />.</para>
-
-    <para>Via the <property>constraint-mapping</property> you can list an
-    arbitrary number of additional XML files containing the actual constraint
-    configuration. See <xref linkend="section-mapping-constraints" />.</para>
-
-    <para>Last but not least, you can specify provider specific properties via
-    the <property>property</property> nodes. Hibernate Validator does
-    currently not make use of any custom properties.</para>
-  </section>
-
-  <section>
-    <title id="section-mapping-constraints">Mapping constraints</title>
-
-    <para>Expressing constraints in XML is possible via files adhering to the
-    xsd seen in <xref linkend="image-mapping-configuration" />. Note that
-    these mapping files are only processed if listed via
-    <property>constraint-mapping</property> in your
-    <filename>validation.xml</filename>.</para>
-
-    <example id="image-mapping-configuration">
-      <title>validation-mapping-1.0.xsd</title>
-
-      <mediaobject>
-        <imageobject role="fo">
-          <imagedata align="center" contentdepth="240mm"
-                     fileref="validation-mapping-1.0.png" scalefit="" />
-        </imageobject>
-
-        <imageobject role="html">
-          <imagedata depth="" fileref="validation-mapping-1.0.png"
-                     scalefit="1" />
-        </imageobject>
-      </mediaobject>
-    </example>
-
-    <para><xref linkend="example-constraints-car" /> shows how our classes Car
-    and RentalCar from <xref linkend="example-car" /> resp. <xref
-    linkend="example-rental-car" /> could be mapped in XML.</para>
-
-    <example id="example-constraints-car">
-      <title>constraints-car.xml</title>
-
-      <programlisting role="XML" language="XML"><constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
-                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-    <default-package>org.hibernate.validator.quickstart</default-package>
-    <bean class="Car" ignore-annotations="true">
-        <field name="manufacturer">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </field>
-        <field name="licensePlate">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </field>
-        <field name="seatCount">
-            <constraint annotation="javax.validation.constraints.Min">
-                <element name="value">2</element>
-            </constraint>
-        </field>
-        <field name="driver">
-            <valid/>
-        </field>
-        <getter name="passedVehicleInspection" ignore-annotations="true">
-            <constraint annotation="javax.validation.constraints.AssertTrue">
-                <message>The car has to pass the vehicle inspection first</message>
-                <groups>
-                    <value>CarChecks</value>
-                </groups>
-                <element name="max">10</element>
-            </constraint>
-        </getter>
-    </bean>
-    <bean class="RentalCar" ignore-annotations="true">
-        <class ignore-annotations="true">
-            <group-sequence>
-                <value>RentalCar</value>
-                <value>CarChecks</value>
-            </group-sequence>
-        </class>
-    </bean>
-    <constraint-definition annotation="org.mycompany.CheckCase" include-existing-validator="false">
-        <validated-by include-existing-validators="false">
-            <value>org.mycompany.CheckCaseValidator</value>
-        </validated-by>
-    </constraint-definition>
-</constraint-mappings></programlisting>
-    </example>
-
-    <para>The XML configuration is closely mirroring the programmatic API. For
-    this reason it should suffice to just add some comments.
-    <property>default-package</property> is used for all fields where a
-    classname is expected. If the specified class is not fully qualified the
-    configured default package will be used. Every mapping file can then have
-    several <property>bean</property> nodes, each describing the constraints
-    on the entity with the specified class name.<warning>
-        <para>A given entity can only be configured once across all
-        configuration files. If the same class is configured more than once an
-        exception is thrown.</para>
-      </warning>Settings <property>ignore-annotations</property> to true means
-    that constraint annotations placed on the configured bean are ignored. The
-    default for this value is <constant>true</constant>. ignore-annotations is
-    also available for the nodes <property>class</property>,
-    <property>fields</property> and <property>getter</property>. If not
-    explicitly specified on these levels the configured
-    <property>bean</property> value applies. Otherwise do the nodes
-    <property>class</property>, <property>fields</property> and
-    <property>getter</property> determine on which level the constraints are
-    placed (see <xref linkend="validator-usingvalidator-annotate" />). The
-    <property>constraint</property> node is then used to add a constraint on
-    the corresponding level. Each constraint definition must define the class
-    via the annotation attribute. The constraint attributes required by the
-    Bean Validation specification (<property>message</property>,
-    <property>groups</property> and <property>payload</property>) have
-    dedicated nodes. All other constraint specific attributes are configured
-    using the the <property>element</property> node.</para>
-
-    <para>The class node also allows to reconfigure the default group sequence
-    (see <xref linkend="section-default-group-class" />) via the
-    <property>group-sequence</property> node.</para>
-
-    <para>Last but not least, the list of
-    <classname>ConstraintValidator</classname>s associated to a given
-    constraint can be altered via the
-    <property>constraint-definition</property> node. The
-    <property>annotation</property> attribute represents the constraint
-    annotation being altered. The <property>validated-by</property> elements
-    represent the (ordered) list of <classname>ConstraintValidator</classname>
-    implementations associated to the constraint. If
-    <property>include-existing-validator</property> is set to
-    <constant>false</constant>, validators defined on the constraint
-    annotation are ignored. If set to <constant>true</constant>, the list of
-    ConstraintValidators described in XML are concatenated to the list of
-    validators described on the annotation.</para>
-  </section>
-</chapter>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidator.java
deleted file mode 100755
index fa5717b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id: HibernateValidator.java 19553 2010-05-19 15:47:21Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator;
-
-import javax.validation.Configuration;
-import javax.validation.ValidatorFactory;
-import javax.validation.spi.BootstrapState;
-import javax.validation.spi.ConfigurationState;
-import javax.validation.spi.ValidationProvider;
-
-import org.hibernate.validator.engine.ConfigurationImpl;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.engine.ValidatorFactoryImpl;
-
-/**
- * Default implementation of {@code ValidationProvider} within Hibernate Validator.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class HibernateValidator implements ValidationProvider<HibernateValidatorConfiguration> {
-
-	public HibernateValidatorConfiguration createSpecializedConfiguration(BootstrapState state) {
-		return HibernateValidatorConfiguration.class.cast( new ConfigurationImpl( this ) );
-	}
-
-	public Configuration<?> createGenericConfiguration(BootstrapState state) {
-		return new ConfigurationImpl( state );
-	}
-
-	public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState) {
-		return new ValidatorFactoryImpl( configurationState );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java b/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java
deleted file mode 100644
index afd7e4a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id: HibernateValidatorConfiguration.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator;
-
-import javax.validation.Configuration;
-
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-
-/**
- * Uniquely identifies Hibernate Validator in the Bean Validation bootstrap
- * strategy. Also contains Hibernate Validator specific configurations.
- *
- * @author Emmanuel Bernard
- * @author Gunnar Morling
- */
-public interface HibernateValidatorConfiguration extends Configuration<HibernateValidatorConfiguration> {
-
-	/**
-	 * <p>
-	 * Returns the {@link ResourceBundleLocator} used by the
-	 * {@link Configuration#getDefaultMessageInterpolator() default message
-	 * interpolator} to load user-provided resource bundles. In conformance with
-	 * the specification this default locator retrieves the bundle
-	 * "ValidationMessages".
-	 * </p>
-	 * <p>
-	 * This locator can be used as delegate for custom locators when setting a
-	 * customized {@link org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator}:
-	 * </p>
-	 * <p/>
-	 * <pre>
-	 * {@code
-	 * 	HibernateValidatorConfiguration configure =
-	 *    Validation.byProvider(HibernateValidator.class).configure();
-	 * <p/>
-	 *  ResourceBundleLocator defaultResourceBundleLocator =
-	 *    configure.getDefaultResourceBundleLocator();
-	 *  ResourceBundleLocator myResourceBundleLocator =
-	 *    new MyResourceBundleLocator(defaultResourceBundleLocator);
-	 * <p/>
-	 *  configure.messageInterpolator(
-	 *    new ResourceBundleMessageInterpolator(myResourceBundleLocator));
-	 * }
-	 * </pre>
-	 *
-	 * @return The default {@link ResourceBundleLocator}. Never null.
-	 */
-	ResourceBundleLocator getDefaultResourceBundleLocator();
-
-	/**
-	 * Adds the specified {@link ConstraintMapping} instance to the configuration. Constraints configured in {@code mapping}
-	 * will be added to the constraints configured via annotations and/or xml.
-	 *
-	 * @param mapping {@code ConstraintMapping} instance containing programmatic configured constraints
-	 *
-	 * @return {@code this} following the chaining method pattern
-	 *
-	 * @throws IllegalArgumentException if {@code mapping} is {@code null}
-	 */
-	HibernateValidatorConfiguration addMapping(ConstraintMapping mapping);
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java
deleted file mode 100644
index 5eeafc6..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id: CascadeDef.java 19606 2010-05-25 18:21:27Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.ValidationException;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CascadeDef {
-	private final Class<?> beanType;
-	private final ElementType elementType;
-	private final String property;
-
-	public CascadeDef(Class<?> beanType, String property, ElementType elementType) {
-		if ( beanType == null ) {
-			throw new ValidationException( "Null is not a valid bean type" );
-		}
-
-		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
-			if ( property == null || property.length() == 0 ) {
-				throw new ValidationException( "A valid property name has to be specified" );
-			}
-
-			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
-				throw new ValidationException(
-						"The class " + beanType + " does not have a property '"
-								+ property + "' with access " + elementType
-				);
-			}
-		}
-
-		this.beanType = beanType;
-		this.property = property;
-		this.elementType = elementType;
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public Class<?> getBeanType() {
-		return beanType;
-	}
-
-	public String getProperty() {
-		return property;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "CascadeDefinition" );
-		sb.append( "{beanType=" ).append( beanType );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( ", property='" ).append( property ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
deleted file mode 100644
index e019818..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// $Id: ConstraintDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Constructor;
-import java.util.HashMap;
-import java.util.Map;
-import javax.validation.Payload;
-import javax.validation.ValidationException;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * @author Hardy Ferentschik
- */
-public abstract class ConstraintDef<A extends Annotation> {
-	protected Class<A> constraintType;
-	protected final Map<String, Object> parameters;
-	protected final Class<?> beanType;
-	protected final ElementType elementType;
-	protected final String property;
-	protected final ConstraintMapping mapping;
-
-	public ConstraintDef(Class<?> beanType, Class<A> constraintType, String property, ElementType elementType, ConstraintMapping mapping) {
-		this( beanType, constraintType, property, elementType, new HashMap<String, Object>(), mapping );
-	}
-
-	protected ConstraintDef(Class<?> beanType, Class<A> constraintType, String property, ElementType elementType, Map<String, Object> parameters, ConstraintMapping mapping) {
-		if ( beanType == null ) {
-			throw new ValidationException( "Null is not a valid bean type" );
-		}
-
-		if ( mapping == null ) {
-			throw new ValidationException( "ConstraintMapping cannot be null" );
-		}
-
-		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
-			if ( property == null || property.length() == 0 ) {
-				throw new ValidationException( "A property level constraint cannot have a null or empty property name" );
-			}
-
-			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
-				throw new ValidationException(
-						"The class " + beanType + " does not have a property '"
-								+ property + "' with access " + elementType
-				);
-			}
-		}
-
-		this.beanType = beanType;
-		this.constraintType = constraintType;
-		this.parameters = parameters;
-		this.property = property;
-		this.elementType = elementType;
-		this.mapping = mapping;
-	}
-
-	protected ConstraintDef addParameter(String key, Object value) {
-		parameters.put( key, value );
-		return this;
-	}
-
-	public ConstraintDef message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public ConstraintDef groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public ConstraintDef payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public <A extends Annotation, T extends ConstraintDef<A>> T constraint(Class<T> definition) {
-		final Constructor<T> constructor = ReflectionHelper.getConstructor(
-				definition, Class.class, String.class, ElementType.class, ConstraintMapping.class
-		);
-
-		final T constraintDefinition = ReflectionHelper.newConstructorInstance(
-				constructor, beanType, property, elementType, mapping
-		);
-
-		mapping.addConstraintConfig( constraintDefinition );
-		return constraintDefinition;
-	}
-
-	public ConstraintsForType property(String property, ElementType type) {
-		return new ConstraintsForType( beanType, property, type, mapping );
-	}
-
-	public ConstraintsForType type(Class<?> type) {
-		return new ConstraintsForType( type, mapping );
-	}
-
-	public ConstraintsForType valid(String property, ElementType type) {
-		mapping.addCascadeConfig( new CascadeDef( beanType, property, type ) );
-		return new ConstraintsForType( beanType, mapping );
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( this.getClass().getName() );
-		sb.append( "{beanType=" ).append( beanType );
-		sb.append( ", constraintType=" ).append( constraintType );
-		sb.append( ", parameters=" ).append( parameters );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( ", property='" ).append( property ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefWrapper.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefWrapper.java
deleted file mode 100644
index 98940b3..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefWrapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id: ConstraintDefWrapper.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.util.Map;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintDefWrapper<A extends Annotation> extends ConstraintDef<A> {
-
-	public ConstraintDefWrapper(Class<?> beanType, Class<A> constraintType, String property, ElementType elementType, Map<String, Object> parameters, ConstraintMapping mapping) {
-		super( beanType, constraintType, property, elementType, parameters, mapping );
-	}
-
-	public Class<A> getConstraintType() {
-		return constraintType;
-	}
-
-	public Map<String, Object> getParameters() {
-		return this.parameters;
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public Class<?> getBeanType() {
-		return beanType;
-	}
-
-	public String getProperty() {
-		return property;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
deleted file mode 100644
index c708b60..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id: ConstraintMapping.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Top level class for constraints configured via the programmatic API.
- *
- * @author Hardy Ferentschik
- */
-public class ConstraintMapping {
-	private final Map<Class<?>, List<ConstraintDef<?>>> constraintConfig;
-	private final Map<Class<?>, List<CascadeDef>> cascadeConfig;
-	private final Set<Class<?>> configuredClasses;
-	private final Map<Class<?>, List<Class<?>>> defaultGroupSequences;
-
-	public ConstraintMapping() {
-		this.constraintConfig = new HashMap<Class<?>, List<ConstraintDef<?>>>();
-		this.cascadeConfig = new HashMap<Class<?>, List<CascadeDef>>();
-		this.configuredClasses = new HashSet<Class<?>>();
-		this.defaultGroupSequences = new HashMap<Class<?>, List<Class<?>>>();
-	}
-
-	/**
-	 * Starts defining constraints on the specified bean class.
-	 *
-	 * @param beanClass The bean class on which to define constraints. All constraints defined after calling this method
-	 * are added to the bean of the type {@code beanClass} until the next call of {@code type}.
-	 *
-	 * @return Instance allowing for defining constraints on the specified class.
-	 */
-	public final ConstraintsForType type(Class<?> beanClass) {
-		return new ConstraintsForType( beanClass, this );
-	}
-
-	public final <A extends Annotation> Map<Class<?>, List<ConstraintDefWrapper<?>>> getConstraintConfig() {
-		Map<Class<?>, List<ConstraintDefWrapper<?>>> newDefinitions = new HashMap<Class<?>, List<ConstraintDefWrapper<?>>>();
-		for ( Map.Entry<Class<?>, List<ConstraintDef<?>>> entry : constraintConfig.entrySet() ) {
-
-			List<ConstraintDefWrapper<?>> newList = new ArrayList<ConstraintDefWrapper<?>>();
-			for ( ConstraintDef<?> definition : entry.getValue() ) {
-				Class<?> beanClass = definition.beanType;
-				@SuppressWarnings("unchecked")
-				ConstraintDefWrapper<A> defAccessor = new ConstraintDefWrapper<A>(
-						beanClass,
-						( Class<A> ) definition.constraintType,
-						definition.property,
-						definition.elementType,
-						definition.parameters,
-						this
-				);
-				newList.add( defAccessor );
-			}
-			newDefinitions.put( entry.getKey(), newList );
-		}
-		return newDefinitions;
-	}
-
-	public final Map<Class<?>, List<CascadeDef>> getCascadeConfig() {
-		return cascadeConfig;
-	}
-
-	public final Collection<Class<?>> getConfiguredClasses() {
-		return configuredClasses;
-	}
-
-	public final List<Class<?>> getDefaultSequence(Class<?> beanType) {
-		if ( defaultGroupSequences.containsKey( beanType ) ) {
-			return defaultGroupSequences.get( beanType );
-		}
-		else {
-			return Collections.emptyList();
-		}
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ConstraintMapping" );
-		sb.append( "{cascadeConfig=" ).append( cascadeConfig );
-		sb.append( ", constraintConfig=" ).append( constraintConfig );
-		sb.append( ", configuredClasses=" ).append( configuredClasses );
-		sb.append( ", defaultGroupSequences=" ).append( defaultGroupSequences );
-		sb.append( '}' );
-		return sb.toString();
-	}
-
-	protected final void addCascadeConfig(CascadeDef cascade) {
-		Class<?> beanClass = cascade.getBeanType();
-		configuredClasses.add( beanClass );
-		if ( cascadeConfig.containsKey( beanClass ) ) {
-			cascadeConfig.get( beanClass ).add( cascade );
-		}
-		else {
-			List<CascadeDef> cascadeList = new ArrayList<CascadeDef>();
-			cascadeList.add( cascade );
-			cascadeConfig.put( beanClass, cascadeList );
-		}
-	}
-
-	protected final void addDefaultGroupSequence(Class<?> beanClass, List<Class<?>> defaultGroupSequence) {
-		defaultGroupSequences.put( beanClass, defaultGroupSequence );
-	}
-
-	protected final void addConstraintConfig(ConstraintDef<?> definition) {
-		Class<?> beanClass = definition.beanType;
-		configuredClasses.add( beanClass );
-		if ( constraintConfig.containsKey( beanClass ) ) {
-			constraintConfig.get( beanClass ).add( definition );
-		}
-		else {
-			List<ConstraintDef<?>> definitionList = new ArrayList<ConstraintDef<?>>();
-			definitionList.add( definition );
-			constraintConfig.put( beanClass, definitionList );
-		}
-	}
-}
-
-
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
deleted file mode 100644
index 104e150..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id: ConstraintsForType.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Constructor;
-import java.util.Arrays;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-import static java.lang.annotation.ElementType.TYPE;
-
-/**
- * Via instances of this class constraints and cascading properties can be configured for a single bean class.
- *
- * @author Hardy Ferentschik
- */
-public final class ConstraintsForType {
-	private static final String EMPTY_PROPERTY = "";
-
-	private final ConstraintMapping mapping;
-	private final Class<?> beanClass;
-	private String property;
-	private ElementType elementType;
-
-	public ConstraintsForType(Class<?> beanClass, ConstraintMapping mapping) {
-		this( beanClass, EMPTY_PROPERTY, TYPE, mapping );
-	}
-
-	public ConstraintsForType(Class<?> beanClass, String property, ElementType type, ConstraintMapping mapping) {
-		this.beanClass = beanClass;
-		this.mapping = mapping;
-		this.property = property;
-		this.elementType = type;
-	}
-
-	/**
-	 * Add a new constraint.
-	 *
-	 * @param definition The constraint definition class
-	 *
-	 * @return A constraint definition class allowing to specify additional constraint parameters.
-	 */
-	public <A extends Annotation, T extends ConstraintDef<A>> T constraint(Class<T> definition) {
-		final Constructor<T> constructor = ReflectionHelper.getConstructor(
-				definition, Class.class, String.class, ElementType.class, ConstraintMapping.class
-		);
-
-		final T constraintDefinition = ReflectionHelper.newConstructorInstance(
-				constructor, beanClass, property, elementType, mapping
-		);
-		mapping.addConstraintConfig( constraintDefinition );
-		return constraintDefinition;
-	}
-
-	/**
-	 * Changes the property for which added constraints apply. Until this method is called constraints apply on
-	 * class level. After calling this method constraints apply on the specified property with the given access type.
-	 *
-	 * @param property The property on which to apply the following constraints (Java Bean notation)
-	 * @param type The access type (field/property)
-	 *
-	 * @return Returns itself for method chaining
-	 */
-	public ConstraintsForType property(String property, ElementType type) {
-		return new ConstraintsForType( beanClass, property, type, mapping );
-	}
-
-	public ConstraintsForType valid(String property, ElementType type) {
-		mapping.addCascadeConfig( new CascadeDef( beanClass, property, type ) );
-		return this;
-	}
-
-	/**
-	 * Defines the default groups sequence for the bean class of this instance.
-	 *
-	 * @param defaultGroupSequence the default group sequence.
-	 *
-	 * @return Returns itself for method chaining.
-	 */
-	public ConstraintsForType defaultGroupSequence(Class<?>... defaultGroupSequence) {
-		mapping.addDefaultGroupSequence( beanClass, Arrays.asList( defaultGroupSequence ) );
-		return this;
-	}
-
-	/**
-	 * Creates a new {@code ConstraintsForType} in order to define constraints on a new bean type.
-	 *
-	 * @param type the bean type
-	 *
-	 * @return a new {@code ConstraintsForType} instance
-	 */
-	public ConstraintsForType type(Class<?> type) {
-		return new ConstraintsForType( type, mapping );
-	}
-}
-
-
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
deleted file mode 100644
index 62e1e17..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: AssertFalseDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.AssertFalse;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class AssertFalseDef extends ConstraintDef<AssertFalse> {
-	public AssertFalseDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, AssertFalse.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
deleted file mode 100644
index 33a37d6..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: AssertTrueDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.AssertTrue;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class AssertTrueDef extends ConstraintDef<AssertTrue> {
-	public AssertTrueDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, AssertTrue.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
deleted file mode 100644
index 94bd21b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: CreditCardNumberDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.CreditCardNumber;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CreditCardNumberDef extends ConstraintDef<CreditCardNumber> {
-	public CreditCardNumberDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, CreditCardNumber.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
deleted file mode 100644
index 169c0ad..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id: DecimalMaxDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.DecimalMax;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMaxDef extends ConstraintDef<DecimalMax> {
-
-	public DecimalMaxDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, DecimalMax.class, property, elementType, mapping );
-	}
-
-	public DecimalMaxDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public DecimalMaxDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public DecimalMaxDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public DecimalMaxDef value(String max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
deleted file mode 100644
index 5dfbbdb..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id: DecimalMinDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.DecimalMin;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMinDef extends ConstraintDef<DecimalMin> {
-
-	public DecimalMinDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, DecimalMin.class, property, elementType, mapping );
-	}
-
-	public DecimalMinDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public DecimalMinDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public DecimalMinDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public DecimalMinDef value(String min) {
-		addParameter( "value", min );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
deleted file mode 100644
index 05aade1..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id: DigitsDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Digits;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class DigitsDef extends ConstraintDef<Digits> {
-
-	public DigitsDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Digits.class, property, elementType, mapping );
-	}
-
-	public DigitsDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public DigitsDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public DigitsDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public DigitsDef integer(int integer) {
-		addParameter( "integer", integer );
-		return this;
-	}
-
-	public DigitsDef fraction(int fraction) {
-		addParameter( "fraction", fraction );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
deleted file mode 100644
index eb6cce3..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: EmailDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.Email;
-
-/**
- * @author Hardy Ferentschik
- */
-public class EmailDef extends ConstraintDef<Email> {
-	public EmailDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Email.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
deleted file mode 100644
index 4c8865d..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: FutureDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.Future;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class FutureDef extends ConstraintDef<Future> {
-	public FutureDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Future.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/GenericConstraintDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/GenericConstraintDef.java
deleted file mode 100644
index 21a768d..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/GenericConstraintDef.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: GenericConstraintDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * A {@code ConstraintDef} class which can be used to configure any constraint type. For this purpose the class defines
- * a {@code constraintType}  method to specify the constraint type and a generic {@code param(String key,Object value)}
- * to add arbitrary constraint parameters.
- *
- * @author Hardy Ferentschik
- */
-public class GenericConstraintDef extends ConstraintDef {
-
-	public GenericConstraintDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, null, property, elementType, mapping );
-	}
-
-	public GenericConstraintDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public GenericConstraintDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public GenericConstraintDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public GenericConstraintDef param(String key, Object value) {
-		addParameter( key, value );
-		return this;
-	}
-
-	public GenericConstraintDef constraintType(Class<?> constraintType) {
-		this.constraintType = constraintType;
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
deleted file mode 100644
index 2fdf5e0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id: LengthDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.Length;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class LengthDef extends ConstraintDef<Length> {
-
-	public LengthDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Length.class, property, elementType, mapping );
-	}
-
-	public LengthDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public LengthDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public LengthDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public LengthDef min(int min) {
-		addParameter( "min", min );
-		return this;
-	}
-
-	public LengthDef max(int max) {
-		addParameter( "max", max );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
deleted file mode 100644
index 5b18e21..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id: MaxDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Max;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MaxDef extends ConstraintDef<Max> {
-
-	public MaxDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Max.class, property, elementType, mapping );
-	}
-
-	public MaxDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public MaxDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public MaxDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public MaxDef value(long max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
deleted file mode 100644
index 07cd076..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id: MinDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Min;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MinDef extends ConstraintDef<Min> {
-
-	public MinDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Min.class, property, elementType, mapping );
-	}
-
-	public MinDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public MinDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public MinDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public MinDef value(long min) {
-		addParameter( "value", min );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
deleted file mode 100644
index cbf3bd9..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: NotBlankDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.NotBlank;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotBlankDef extends ConstraintDef<NotBlank> {
-	public NotBlankDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotBlank.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
deleted file mode 100644
index 5c584e7..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: NotEmptyDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.NotEmpty;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotEmptyDef extends ConstraintDef<NotEmpty> {
-	public NotEmptyDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotEmpty.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
deleted file mode 100644
index f6ddc00..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: NotNullDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.NotNull;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotNullDef extends ConstraintDef<NotNull> {
-	public NotNullDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotNull.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
deleted file mode 100644
index 8da048e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: NullDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.Null;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NullDef extends ConstraintDef<Null> {
-	public NullDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Null.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
deleted file mode 100644
index f741da3..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id: PastDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.constraints.Past;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PastDef extends ConstraintDef<Past> {
-	public PastDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Past.class, property, elementType, mapping );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
deleted file mode 100644
index c19dfd0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id: PatternDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Pattern;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class PatternDef extends ConstraintDef<Pattern> {
-
-	public PatternDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Pattern.class, property, elementType, mapping );
-	}
-
-	public PatternDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public PatternDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public PatternDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public PatternDef flags(Pattern.Flag[] flags) {
-		addParameter( "flags", flags );
-		return this;
-	}
-
-	public PatternDef regexp(String regexp) {
-		addParameter( "regexp", regexp );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
deleted file mode 100644
index 69d9a9e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id: RangeDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.Range;
-
-/**
- * @author Hardy Ferentschik
- */
-public class RangeDef extends ConstraintDef<Range> {
-
-	public RangeDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Range.class, property, elementType, mapping );
-	}
-
-	public RangeDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public RangeDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public RangeDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public RangeDef min(long min) {
-		addParameter( "value", min );
-		return this;
-	}
-
-	public RangeDef max(long max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
deleted file mode 100644
index da7c4a2..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id: ScriptAssertDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.ScriptAssert;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ScriptAssertDef extends ConstraintDef<ScriptAssert> {
-
-	public ScriptAssertDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, ScriptAssert.class, property, elementType, mapping );
-	}
-
-	public ScriptAssertDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public ScriptAssertDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public ScriptAssertDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public ScriptAssertDef lang(String lang) {
-		addParameter( "lang", lang );
-		return this;
-	}
-
-	public ScriptAssertDef script(String script) {
-		addParameter( "script", script );
-		return this;
-	}
-
-	public ScriptAssertDef alias(String alias) {
-		addParameter( "alias", alias );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
deleted file mode 100644
index 46d9adf..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: SizeDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Size;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SizeDef extends ConstraintDef<Size> {
-
-	public SizeDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Size.class, property, elementType, mapping );
-	}
-
-	public SizeDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public SizeDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public SizeDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public SizeDef min(int min) {
-		addParameter( "min", min );
-		return this;
-	}
-
-	public SizeDef max(int max) {
-		addParameter( "max", max );
-		return this;
-	}
-}
-
-
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
deleted file mode 100644
index b1ba8b7..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id: URLDef.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg.defs;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.cfg.ConstraintDef;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.constraints.URL;
-
-/**
- * @author Hardy Ferentschik
- */
-public class URLDef extends ConstraintDef<URL> {
-
-	public URLDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, URL.class, property, elementType, mapping );
-	}
-
-	public URLDef message(String message) {
-		super.message( message );
-		return this;
-	}
-
-	public URLDef groups(Class<?>... groups) {
-		super.groups( groups );
-		return this;
-	}
-
-	public URLDef payload(Class<? extends Payload>... payload) {
-		super.payload( payload );
-		return this;
-	}
-
-	public URLDef protocol(String protocol) {
-		addParameter( "protocol", protocol );
-		return this;
-	}
-
-	public URLDef host(String host) {
-		addParameter( "host", host );
-		return this;
-	}
-
-	public URLDef port(int port) {
-		addParameter( "port", port );
-		return this;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html
deleted file mode 100644
index 4b33510..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Helper classes for programmatic constraint definition API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
deleted file mode 100644
index 661ec82..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19606 2010-05-25 18:21:27Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Programmatic constraint definition API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java
deleted file mode 100644
index 08da11f..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java
+++ /dev/null
@@ -1,63 +0,0 @@
-//$Id: CreditCardNumber.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.impl.CreditCardNumberValidator;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * The annotated element has to represent a valid
- * credit card number. This is the Luhn algorithm implementation
- * which aims to check for user mistake, not credit card validity!
- *
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
- at Documented
- at Constraint(validatedBy = CreditCardNumberValidator.class)
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
-public @interface CreditCardNumber {
-	public abstract String message() default "{org.hibernate.validator.constraints.CreditCardNumber.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @CreditCardNumber} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		CreditCardNumber[] value();
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Email.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Email.java
deleted file mode 100644
index bd0016a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Email.java
+++ /dev/null
@@ -1,61 +0,0 @@
-//$Id: Email.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.impl.EmailValidator;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * The string has to be a well-formed email address.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = EmailValidator.class)
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
-public @interface Email {
-	String message() default "{org.hibernate.validator.constraints.Email.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @Email} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		Email[] value();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Length.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Length.java
deleted file mode 100644
index ac7e6e8..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Length.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id: Length.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.impl.LengthValidator;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Validate that the string is between min and max included.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = LengthValidator.class)
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
-public @interface Length {
-	int min() default 0;
-
-	int max() default Integer.MAX_VALUE;
-
-	String message() default "{org.hibernate.validator.constraints.Length.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @Length} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		Length[] value();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotBlank.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotBlank.java
deleted file mode 100644
index 199ef8e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotBlank.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * $Id: NotBlank.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.NotNull;
-
-import org.hibernate.validator.constraints.impl.NotBlankValidator;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Validate that the annotated string is not {@code null} or empty.
- * The difference to {@code NotEmpty} is that trailing whitespaces are getting ignored.
- *
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = { NotBlankValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
- at ReportAsSingleViolation
- at NotNull
-public @interface NotBlank {
-	public abstract String message() default "{org.hibernate.validator.constraints.NotBlank.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @NotBlank} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		NotBlank[] value();
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotEmpty.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotEmpty.java
deleted file mode 100644
index 8704cfa..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/NotEmpty.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id: NotEmpty.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Asserts that the annotated string, collection, map or array is not {@code null} or empty.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = { })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
- at ReportAsSingleViolation
- at NotNull
- at Size(min = 1)
-public @interface NotEmpty {
-	String message() default "{org.hibernate.validator.constraints.NotEmpty.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @NotEmpty} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		NotEmpty[] value();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Range.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Range.java
deleted file mode 100644
index c2142bb..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/Range.java
+++ /dev/null
@@ -1,70 +0,0 @@
-//$Id: Range.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.OverridesAttribute;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * The annotated element has to be in the appropriate range. Apply on numeric values or string
- * representation of the numeric value.
- *
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = { })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
- at Min(0)
- at Max(Long.MAX_VALUE)
- at ReportAsSingleViolation
-public @interface Range {
-	@OverridesAttribute(constraint = Min.class, name = "value") long min() default 0;
-
-	@OverridesAttribute(constraint = Max.class, name = "value") long max() default Long.MAX_VALUE;
-
-	String message() default "{org.hibernate.validator.constraints.Range.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @Range} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		Range[] value();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java
deleted file mode 100644
index c59cd52..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id: ScriptAssert.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.script.ScriptContext;
-import javax.script.ScriptEngineManager;
-import javax.validation.Constraint;
-import javax.validation.ConstraintDeclarationException;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.impl.ScriptAssertValidator;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * <p>
- * A class-level constraint, that evaluates a script expression against the
- * annotated element. This constraint can be used to implement validation
- * routines, that depend on multiple attributes of the annotated element.
- * </p>
- * <p>
- * For evaluation of expressions the Java Scripting API as defined by <a
- * href="http://jcp.org/en/jsr/detail?id=223">JSR 223</a>
- * ("Scripting for the Java<sup>TM</sup> Platform") is used. Therefore an
- * implementation of that API must part of the class path. This is automatically
- * the case when running on Java 6. For older Java versions, the JSR 223 RI can
- * be added manually to the class path.
- * </p>
- * The expressions to be evaluated can be written in any scripting or expression
- * language, for which a JSR 223 compatible engine can be found in the class
- * path. The following listing shows an example using the JavaScript engine,
- * which comes with Java 6: </p>
- * <p/>
- * <pre>
- * @ScriptAssert(lang = "javascript", script = "_this.startDate.before(_this.endDate)")
- * public class CalendarEvent {
- * <p/>
- * 	private Date startDate;
- * <p/>
- * 	private Date endDate;
- * <p/>
- * 	//...
- * <p/>
- * }
- * </pre>
- * <p>
- * Using a real expression language in conjunction with a shorter object alias allows
- * for very compact expressions:
- * </p>
- * <pre>
- * @ScriptAssert(lang = "jexl", script = "_.startDate < _.endDate", alias = "_")
- * public class CalendarEvent {
- * <p/>
- * 	private Date startDate;
- * <p/>
- * 	private Date endDate;
- * <p/>
- * 	//...
- * <p/>
- * }
- * </pre>
- * <p>
- * Accepts any type.
- * </p>
- *
- * @author Gunnar Morling
- */
- at Target({ TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = ScriptAssertValidator.class)
- at Documented
-public @interface ScriptAssert {
-
-	String message() default "{org.hibernate.validator.constraints.ScriptAssert.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * @return The name of the script language used by this constraint as
-	 *         expected by the JSR 223 {@link ScriptEngineManager}. A
-	 *         {@link ConstraintDeclarationException} will be thrown upon script
-	 *         evaluation, if no engine for the given language could be found.
-	 */
-	String lang();
-
-	/**
-	 * @return The script to be executed. The script must return
-	 *         <code>Boolean.TRUE</code>, if the annotated element could
-	 *         successfully be validated, otherwise <code>Boolean.FALSE</code>.
-	 *         Returning null or any type other than Boolean will cause a
-	 *         {@link ConstraintDeclarationException} upon validation. Any
-	 *         exception occurring during script evaluation will be wrapped into
-	 *         a ConstraintDeclarationException, too. Within the script, the
-	 *         validated object can be accessed from the {@link ScriptContext
-	 *         script context} using the name specified in the
-	 *         <code>alias</code> attribute.
-	 */
-	String script();
-
-	/**
-	 * @return The name, under which the annotated element shall be registered
-	 *         within the script context. Defaults to "_this".
-	 */
-	String alias() default "_this";
-
-	/**
-	 * Defines several {@code @ScriptAssert} annotations on the same element.
-	 */
-	@Target({ TYPE })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		ScriptAssert[] value();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/URL.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/URL.java
deleted file mode 100644
index 3b7d5bf..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/URL.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id: URL.java 19327 2010-04-30 08:11:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.impl.URLValidator;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Validate that the string is a valid URL.
- *
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = URLValidator.class)
- at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
- at Retention(RUNTIME)
-public @interface URL {
-	public abstract String protocol() default "";
-
-	public abstract String host() default "";
-
-	public abstract int port() default -1;
-
-	public abstract String message() default "{org.hibernate.validator.constraints.URL.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-
-	/**
-	 * Defines several {@code @URL} annotations on the same element.
-	 */
-	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
-	@Retention(RUNTIME)
-	@Documented
-	public @interface List {
-		URL[] value();
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertFalseValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertFalseValidator.java
deleted file mode 100644
index d5b5b07..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertFalseValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: AssertFalseValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.AssertFalse;
-
-/**
- * Validates that the value passed is false
- *
- * @author Alaa Nassef
- */
-public class AssertFalseValidator implements ConstraintValidator<AssertFalse, Boolean> {
-
-	public void initialize(AssertFalse constraintAnnotation) {
-	}
-
-	public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		return bool == null || !bool;
-	}
-
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertTrueValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertTrueValidator.java
deleted file mode 100644
index 31b3ebc..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/AssertTrueValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: AssertTrueValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.AssertTrue;
-
-/**
- * Validates that the value passed is true
- *
- * @author Alaa Nassef
- */
-public class AssertTrueValidator implements ConstraintValidator<AssertTrue, Boolean> {
-
-	public void initialize(AssertTrue constraintAnnotation) {
-	}
-
-	public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		return bool == null || bool;
-	}
-
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/CreditCardNumberValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/CreditCardNumberValidator.java
deleted file mode 100644
index 45b5349..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/CreditCardNumberValidator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-//$Id: CreditCardNumberValidator.java 18982 2010-03-11 19:31:30Z hardy.ferentschik $
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.CreditCardNumber;
-
-/**
- * Check a credit card number through the Luhn algorithm.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class CreditCardNumberValidator implements ConstraintValidator<CreditCardNumber, String> {
-	private LuhnValidator luhnValidator;
-
-	public CreditCardNumberValidator() {
-		luhnValidator = new LuhnValidator( 2 );
-	}
-
-	public void initialize(CreditCardNumber annotation) {
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext context) {
-		if ( value == null ) {
-			return true;
-		}
-		return luhnValidator.passesLuhnTest( value );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForNumber.java
deleted file mode 100644
index 1ac34c5..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForNumber.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id: DecimalMaxValidatorForNumber.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.DecimalMax;
-
-/**
- * Check that the number being validated is less than or equal to the maximum
- * value specified.
- *
- * @author Hardy Ferentschik
- */
-public class DecimalMaxValidatorForNumber implements ConstraintValidator<DecimalMax, Number> {
-
-	private BigDecimal maxValue;
-
-	public void initialize(DecimalMax maxValue) {
-		try {
-			this.maxValue = new BigDecimal( maxValue.value() );
-		}
-		catch ( NumberFormatException nfe ) {
-			throw new IllegalArgumentException(
-					maxValue.value() + " does not represent a valid BigDecimal format", nfe
-			);
-		}
-	}
-
-	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-
-		if ( value instanceof BigDecimal ) {
-			return ( ( BigDecimal ) value ).compareTo( maxValue ) != 1;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( new BigDecimal( ( BigInteger ) value ) ).compareTo( maxValue ) != 1;
-		}
-		else {
-			return ( BigDecimal.valueOf( value.longValue() ).compareTo( maxValue ) ) != 1;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForString.java
deleted file mode 100644
index 631ff0e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMaxValidatorForString.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id: DecimalMaxValidatorForString.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.DecimalMax;
-
-/**
- * Check that the String being validated represents a number, and has a value
- * less than or equal to the maximum value specified.
- *
- * @author Alaa Nassef
- */
-public class DecimalMaxValidatorForString implements ConstraintValidator<DecimalMax, String> {
-
-	private BigDecimal maxValue;
-
-	public void initialize(DecimalMax maxValue) {
-		try {
-			this.maxValue = new BigDecimal( maxValue.value() );
-		}
-		catch ( NumberFormatException nfe ) {
-			throw new IllegalArgumentException(
-					maxValue.value() + " does not represent a valid BigDecimal format", nfe
-			);
-		}
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		try {
-			return new BigDecimal( value ).compareTo( maxValue ) != 1;
-		}
-		catch ( NumberFormatException nfe ) {
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForNumber.java
deleted file mode 100644
index 0f8e5bd..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForNumber.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id: DecimalMinValidatorForNumber.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.DecimalMin;
-
-/**
- * Check that the number being validated is less than or equal to the maximum
- * value specified.
- *
- * @author Hardy Ferentschik
- */
-public class DecimalMinValidatorForNumber implements ConstraintValidator<DecimalMin, Number> {
-
-	private BigDecimal minValue;
-
-	public void initialize(DecimalMin minValue) {
-		try {
-			this.minValue = new BigDecimal( minValue.value() );
-		}
-		catch ( NumberFormatException nfe ) {
-			throw new IllegalArgumentException(
-					minValue.value() + " does not represent a valid BigDecimal format", nfe
-			);
-		}
-	}
-
-	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
-
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-
-		if ( value instanceof BigDecimal ) {
-			return ( ( BigDecimal ) value ).compareTo( minValue ) != -1;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( new BigDecimal( ( BigInteger ) value ) ).compareTo( minValue ) != -1;
-		}
-		else {
-			return ( BigDecimal.valueOf( value.longValue() ).compareTo( minValue ) ) != -1;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForString.java
deleted file mode 100644
index 4b6aca2..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DecimalMinValidatorForString.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id: DecimalMinValidatorForString.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.DecimalMin;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMinValidatorForString implements ConstraintValidator<DecimalMin, String> {
-
-	private BigDecimal minValue;
-
-	public void initialize(DecimalMin minValue) {
-		try {
-			this.minValue = new BigDecimal( minValue.value() );
-		}
-		catch ( NumberFormatException nfe ) {
-			throw new IllegalArgumentException(
-					minValue.value() + " does not represent a valid BigDecimal format", nfe
-			);
-		}
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		try {
-			return new BigDecimal( value ).compareTo( minValue ) != -1;
-		}
-		catch ( NumberFormatException nfe ) {
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForNumber.java
deleted file mode 100644
index bcc7675..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForNumber.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id: DigitsValidatorForNumber.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Digits;
-
-/**
- * Validates that the <code>Number</code> being validates matches the pattern
- * defined in the constraint.
- *
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class DigitsValidatorForNumber implements ConstraintValidator<Digits, Number> {
-
-	private int maxIntegerLength;
-	private int maxFractionLength;
-
-	public void initialize(Digits constraintAnnotation) {
-		this.maxIntegerLength = constraintAnnotation.integer();
-		this.maxFractionLength = constraintAnnotation.fraction();
-		validateParameters();
-	}
-
-	public boolean isValid(Number num, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( num == null ) {
-			return true;
-		}
-
-		BigDecimal bigNum;
-		if ( num instanceof BigDecimal ) {
-			bigNum = ( BigDecimal ) num;
-		}
-		else {
-			bigNum = new BigDecimal( num.toString() ).stripTrailingZeros();
-		}
-
-		int integerPartLength = bigNum.precision() - bigNum.scale();
-		int fractionPartLength = bigNum.scale() < 0 ? 0 : bigNum.scale();
-
-		return ( maxIntegerLength >= integerPartLength && maxFractionLength >= fractionPartLength );
-	}
-
-	private void validateParameters() {
-		if ( maxIntegerLength < 0 ) {
-			throw new IllegalArgumentException( "The length of the integer part cannot be negative." );
-		}
-		if ( maxFractionLength < 0 ) {
-			throw new IllegalArgumentException( "The length of the fraction part cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForString.java
deleted file mode 100644
index 6ec1740..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/DigitsValidatorForString.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id: DigitsValidatorForString.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.ValidationException;
-import javax.validation.constraints.Digits;
-
-/**
- * Validates that the <code>String</code> being validated consists of digits,
- * and matches the pattern defined in the constraint.
- *
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class DigitsValidatorForString implements ConstraintValidator<Digits, String> {
-
-	private int maxIntegerLength;
-	private int maxFractionLength;
-
-	public void initialize(Digits constraintAnnotation) {
-		this.maxIntegerLength = constraintAnnotation.integer();
-		this.maxFractionLength = constraintAnnotation.fraction();
-		validateParameters();
-	}
-
-	public boolean isValid(String str, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( str == null ) {
-			return true;
-		}
-
-		BigDecimal bigNum = getBigDecimalValue( str );
-		if ( bigNum == null ) {
-			return false;
-		}
-
-		int integerPartLength = bigNum.precision() - bigNum.scale();
-		int fractionPartLength = bigNum.scale() < 0 ? 0 : bigNum.scale();
-
-		return ( maxIntegerLength >= integerPartLength && maxFractionLength >= fractionPartLength );
-	}
-
-	private BigDecimal getBigDecimalValue(String str) {
-		BigDecimal bd;
-		try {
-			bd = new BigDecimal( str );
-		}
-		catch ( NumberFormatException nfe ) {
-			return null;
-		}
-		return bd;
-	}
-
-	private void validateParameters() {
-		if ( maxIntegerLength < 0 ) {
-			throw new IllegalArgumentException( "The length of the integer part cannot be negative." );
-		}
-		if ( maxFractionLength < 0 ) {
-			throw new IllegalArgumentException( "The length of the fraction part cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/EmailValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/EmailValidator.java
deleted file mode 100644
index 6ff16ef..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/EmailValidator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-//$Id: EmailValidator.java 19796 2010-06-23 11:23:07Z hardy.ferentschik $
-package org.hibernate.validator.constraints.impl;
-
-import java.util.regex.Matcher;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.Email;
-
-/**
- * Checks that a given string is a well-formed email address.
- * <p>
- * The specification of a valid email can be found in
- * <a href="http://www.faqs.org/rfcs/rfc2822.html">RFC 2822</a>
- * and one can come up with a regular expression matching <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html">
- * all valid email addresses</a> as per specification. However, as this
- * <a href="http://www.regular-expressions.info/email.html">article</a> discusses it is not necessarily practical to
- * implement a 100% compliant email validator. This implementation is a trade-off trying to match most email while ignoring
- * for example emails with double quotes or comments.
- * </p>
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class EmailValidator implements ConstraintValidator<Email, String> {
-	private static String ATOM = "[a-z0-9!#$%&'*+/=?^_`{|}~-]";
-	private static String DOMAIN = "(" + ATOM + "+(\\." + ATOM + "+)*";
-	private static String IP_DOMAIN = "\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\]";
-
-	private java.util.regex.Pattern pattern = java.util.regex.Pattern.compile(
-			"^" + ATOM + "+(\\." + ATOM + "+)*@"
-					+ DOMAIN
-					+ "|"
-					+ IP_DOMAIN
-					+ ")$",
-			java.util.regex.Pattern.CASE_INSENSITIVE
-	);
-
-	public void initialize(Email annotation) {
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext context) {
-		if ( value == null || value.length() == 0 ) {
-			return true;
-		}
-		Matcher m = pattern.matcher( value );
-		return m.matches();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForCalendar.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForCalendar.java
deleted file mode 100644
index 53196f3..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForCalendar.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: FutureValidatorForCalendar.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Calendar;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Future;
-
-/**
- * Check that the <code>java.util.Calendar</code> passed to be validated is in
- * the future.
- *
- * @author Alaa Nassef
- */
-public class FutureValidatorForCalendar implements ConstraintValidator<Future, Calendar> {
-
-	public void initialize(Future constraintAnnotation) {
-	}
-
-	public boolean isValid(Calendar cal, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( cal == null ) {
-			return true;
-		}
-		return cal.after( Calendar.getInstance() );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForDate.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForDate.java
deleted file mode 100644
index 8bccf46..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/FutureValidatorForDate.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: FutureValidatorForDate.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Date;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Future;
-
-/**
- * Check that the <code>java.util.Date</code> passed to be validated is in the
- * future.
- *
- * @author Alaa Nassef
- */
-public class FutureValidatorForDate implements ConstraintValidator<Future, Date> {
-
-	public void initialize(Future constraintAnnotation) {
-	}
-
-	public boolean isValid(Date date, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( date == null ) {
-			return true;
-		}
-		return date.after( new Date() );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LengthValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LengthValidator.java
deleted file mode 100644
index 32a6d8a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LengthValidator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id: LengthValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.Length;
-
-/**
- * Check that a string's length is between min and max.
- *
- * @author Emmanuel Bernard
- * @author Gavin King
- */
-public class LengthValidator implements ConstraintValidator<Length, String> {
-	private int min;
-	private int max;
-
-	public void initialize(Length parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		if ( value == null ) {
-			return true;
-		}
-		int length = value.length();
-		return length >= min && length <= max;
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LuhnValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LuhnValidator.java
deleted file mode 100644
index 5c64981..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/LuhnValidator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id: LuhnValidator.java 19090 2010-03-23 15:22:59Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implement the Luhn algorithm (with Luhn key on the last digit). See also {@link http://en.wikipedia.org/wiki/Luhn_algorithm}
- * and {@link http://www.merriampark.com/anatomycc.htm}.
- *
- * @author Hardy Ferentschik
- */
-public class LuhnValidator {
-	private final int multiplicator;
-
-	public LuhnValidator(int multiplicator) {
-		this.multiplicator = multiplicator;
-	}
-
-	public boolean passesLuhnTest(String value) {
-		char[] chars = value.toCharArray();
-
-		List<Integer> digits = new ArrayList<Integer>();
-		for ( char c : chars ) {
-			if ( Character.isDigit( c ) ) {
-				digits.add( c - '0' );
-			}
-		}
-		int length = digits.size();
-		int sum = 0;
-		boolean even = false;
-		for ( int index = length - 1; index >= 0; index-- ) {
-			int digit = digits.get( index );
-			if ( even ) {
-				digit *= multiplicator;
-			}
-			if ( digit > 9 ) {
-				digit = digit / 10 + digit % 10;
-			}
-			sum += digit;
-			even = !even;
-		}
-		return sum % 10 == 0;
-	}
-}
-
-
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForNumber.java
deleted file mode 100644
index b0b4850..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForNumber.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// $Id: MaxValidatorForNumber.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Max;
-
-/**
- * Check that the number being validated is less than or equal to the maximum
- * value specified.
- *
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class MaxValidatorForNumber implements ConstraintValidator<Max, Number> {
-
-	private long maxValue;
-
-	public void initialize(Max maxValue) {
-		this.maxValue = maxValue.value();
-	}
-
-	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		if ( value instanceof BigDecimal ) {
-			return ( ( BigDecimal ) value ).compareTo( BigDecimal.valueOf( maxValue ) ) != 1;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( ( BigInteger ) value ).compareTo( BigInteger.valueOf( maxValue ) ) != 1;
-		}
-		else {
-			long longValue = value.longValue();
-			return longValue <= maxValue;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForString.java
deleted file mode 100644
index 691a34f..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MaxValidatorForString.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id: MaxValidatorForString.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Max;
-
-/**
- * Check that the String being validated represents a number, and has a value
- * less than or equal to the maximum value specified.
- *
- * @author Alaa Nassef
- */
-public class MaxValidatorForString implements ConstraintValidator<Max, String> {
-
-	private long maxValue;
-
-	public void initialize(Max maxValue) {
-		this.maxValue = maxValue.value();
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		try {
-			return new BigDecimal( value ).compareTo( BigDecimal.valueOf( maxValue ) ) != 1;
-		}
-		catch ( NumberFormatException nfe ) {
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForNumber.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForNumber.java
deleted file mode 100644
index ae7ae2d..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForNumber.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// $Id: MinValidatorForNumber.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Min;
-
-/**
- * Check that the number being validated is greater than or equal to the minimum
- * value specified.
- *
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class MinValidatorForNumber implements ConstraintValidator<Min, Number> {
-
-	private long minValue;
-
-	public void initialize(Min minValue) {
-		this.minValue = minValue.value();
-	}
-
-	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		if ( value instanceof BigDecimal ) {
-			return ( ( BigDecimal ) value ).compareTo( BigDecimal.valueOf( minValue ) ) != -1;
-		}
-		else if ( value instanceof BigInteger ) {
-			return ( ( BigInteger ) value ).compareTo( BigInteger.valueOf( minValue ) ) != -1;
-		}
-		else {
-			long longValue = value.longValue();
-			return longValue >= minValue;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForString.java
deleted file mode 100644
index b3c9aae..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/MinValidatorForString.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id: MinValidatorForString.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Min;
-
-/**
- * Check that the String being validated represents a number, and has a value
- * more than or equal to the minimum value specified.
- *
- * @author Alaa Nassef
- */
-public class MinValidatorForString implements ConstraintValidator<Min, String> {
-
-	private long minValue;
-
-	public void initialize(Min minValue) {
-		this.minValue = minValue.value();
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( value == null ) {
-			return true;
-		}
-		try {
-			return new BigDecimal( ( String ) value ).compareTo( BigDecimal.valueOf( minValue ) ) != -1;
-		}
-		catch ( NumberFormatException nfe ) {
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotBlankValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotBlankValidator.java
deleted file mode 100644
index c6229c3..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotBlankValidator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * $Id: NotBlankValidator.java 19090 2010-03-23 15:22:59Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.NotBlank;
-
-/**
- * Check that a string's trimmed length is not empty.
- *
- * @author Hardy Ferentschik
- */
-public class NotBlankValidator implements ConstraintValidator<NotBlank, String> {
-
-	public void initialize(NotBlank annotation) {
-	}
-
-	/**
-	 * Checks that the trimmed string is not empty.
-	 *
-	 * @param s The string to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the string is <code>null</code> or the length of <code>s</code> between the specified
-	 *         <code>min</code> and <code>max</code> values (inclusive), <code>false</code> otherwise.
-	 */
-	public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
-		if ( s == null ) {
-			return true;
-		}
-
-		return s.trim().length() > 0;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotNullValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotNullValidator.java
deleted file mode 100644
index cf0f2da..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NotNullValidator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id: NotNullValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.NotNull;
-
-/**
- * Validate that the object is not <code>null</code>.
- *
- * @author Emmanuel Bernard
- */
-public class NotNullValidator implements ConstraintValidator<NotNull, Object> {
-
-	public void initialize(NotNull parameters) {
-	}
-
-	public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
-		return object != null;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NullValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NullValidator.java
deleted file mode 100644
index 0fdd939..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/NullValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id: NullValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Null;
-
-/**
- * Validate that the object is <code>null</code>
- *
- * @author Alaa Nassef
- */
-public class NullValidator implements ConstraintValidator<Null, Object> {
-
-	public void initialize(Null constraintAnnotation) {
-	}
-
-	public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
-		return object == null;
-	}
-
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForCalendar.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForCalendar.java
deleted file mode 100644
index 5253662..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForCalendar.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: PastValidatorForCalendar.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Calendar;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Past;
-
-/**
- * Check that the <code>java.util.Calendar</code> passed to be validated is in the
- * past.
- *
- * @author Alaa Nassef
- */
-public class PastValidatorForCalendar implements ConstraintValidator<Past, Calendar> {
-
-	public void initialize(Past constraintAnnotation) {
-	}
-
-	public boolean isValid(Calendar cal, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( cal == null ) {
-			return true;
-		}
-		return cal.before( Calendar.getInstance() );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForDate.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForDate.java
deleted file mode 100644
index 77765cc..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PastValidatorForDate.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: PastValidatorForDate.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Date;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Past;
-
-/**
- * Check that the <code>java.util.Date</code> passed to be validated is in the
- * past.
- *
- * @author Alaa Nassef
- */
-public class PastValidatorForDate implements ConstraintValidator<Past, Date> {
-
-	public void initialize(Past constraintAnnotation) {
-	}
-
-	public boolean isValid(Date date, ConstraintValidatorContext constraintValidatorContext) {
-		//null values are valid
-		if ( date == null ) {
-			return true;
-		}
-		return date.before( new Date() );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PatternValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PatternValidator.java
deleted file mode 100644
index 123a424..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/PatternValidator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id: PatternValidator.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.regex.Matcher;
-import java.util.regex.PatternSyntaxException;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Pattern;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PatternValidator implements ConstraintValidator<Pattern, String> {
-
-	private java.util.regex.Pattern pattern;
-
-	public void initialize(Pattern parameters) {
-		Pattern.Flag flags[] = parameters.flags();
-		int intFlag = 0;
-		for ( Pattern.Flag flag : flags ) {
-			intFlag = intFlag | flag.getValue();
-		}
-
-		try {
-			pattern = java.util.regex.Pattern.compile( parameters.regexp(), intFlag );
-		}
-		catch ( PatternSyntaxException e ) {
-			throw new IllegalArgumentException( "Invalid regular expression.", e );
-		}
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		if ( value == null ) {
-			return true;
-		}
-		Matcher m = pattern.matcher( value );
-		return m.matches();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/ScriptAssertValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/ScriptAssertValidator.java
deleted file mode 100644
index 85d722e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/ScriptAssertValidator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: ScriptAssertValidator.java 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.ScriptAssert;
-import org.hibernate.validator.constraints.impl.scriptassert.ScriptEvaluator;
-import org.hibernate.validator.constraints.impl.scriptassert.ScriptEvaluatorFactory;
-
-/**
- * Validator for the {@link ScriptAssert} constraint annotation.
- *
- * @author Gunnar Morling.
- */
-public class ScriptAssertValidator implements ConstraintValidator<ScriptAssert, Object> {
-
-	private String script;
-
-	private String languageName;
-
-	private String alias;
-
-	public void initialize(ScriptAssert constraintAnnotation) {
-
-		validateParameters( constraintAnnotation );
-
-		this.script = constraintAnnotation.script();
-		this.languageName = constraintAnnotation.lang();
-		this.alias = constraintAnnotation.alias();
-	}
-
-	public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {
-
-		ScriptEvaluator scriptEvaluator = ScriptEvaluatorFactory.getInstance()
-				.getScriptEvaluatorByLanguageName( languageName );
-
-		return scriptEvaluator.evaluate( script, value, alias );
-	}
-
-	private void validateParameters(ScriptAssert constraintAnnotation) {
-
-		if ( constraintAnnotation.script().isEmpty() ) {
-			throw new IllegalArgumentException( "The parameter \"script\" must not be empty." );
-		}
-		if ( constraintAnnotation.lang().isEmpty() ) {
-			throw new IllegalArgumentException( "The parameter \"lang\" must not be empty." );
-		}
-		if ( constraintAnnotation.alias().isEmpty() ) {
-			throw new IllegalArgumentException( "The parameter \"alias\" must not be empty." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArray.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArray.java
deleted file mode 100644
index 8d446a0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArray.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: SizeValidatorForArray.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * Check that the length of an array is between <i>min</i> and <i>max</i>
- *
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForArray implements ConstraintValidator<Size, Object[]> {
-	private int min;
-	private int max;
-
-	public void initialize(Size parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(Object[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfBoolean.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfBoolean.java
deleted file mode 100644
index 8b3bb44..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfBoolean.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfBoolean.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfBoolean extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, boolean[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(boolean[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfByte.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfByte.java
deleted file mode 100644
index 932ca33..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfByte.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfByte.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForArraysOfByte extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, byte[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(byte[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfChar.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfChar.java
deleted file mode 100644
index c7fc379..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfChar.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfChar.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForArraysOfChar extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, char[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(char[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfDouble.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfDouble.java
deleted file mode 100644
index 3236e8e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfDouble.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfDouble.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfDouble extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, double[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(double[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfFloat.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfFloat.java
deleted file mode 100644
index 4521444..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfFloat.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfFloat.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfFloat extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, float[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(float[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfInt.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfInt.java
deleted file mode 100644
index 3573a4a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfInt.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfInt.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfInt extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, int[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(int[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfLong.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfLong.java
deleted file mode 100644
index 5255c05..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfLong.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfLong.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfLong extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, long[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(long[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfPrimitives.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfPrimitives.java
deleted file mode 100644
index bb8234c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfPrimitives.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfPrimitives.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.constraints.Size;
-
-/**
- * Check that the length of an array is between <i>min</i> and <i>max</i>
- *
- * @author Hardy Ferentschik
- */
-public abstract class SizeValidatorForArraysOfPrimitives {
-	protected int min;
-	protected int max;
-
-	public void initialize(Size parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfShort.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfShort.java
deleted file mode 100644
index b833f3e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfShort.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: SizeValidatorForArraysOfShort.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.lang.reflect.Array;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
-*/
-public class SizeValidatorForArraysOfShort extends SizeValidatorForArraysOfPrimitives
-		implements ConstraintValidator<Size, short[]> {
-
-	/**
-	 * Checks the number of entries in an array.
-	 *
-	 * @param array The array to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
-	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(short[] array, ConstraintValidatorContext constraintValidatorContext) {
-		if ( array == null ) {
-			return true;
-		}
-		int length = Array.getLength( array );
-		return length >= min && length <= max;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForCollection.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForCollection.java
deleted file mode 100644
index a4e734c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForCollection.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: SizeValidatorForCollection.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Collection;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * Check that a string's length is between min and max.
- *
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForCollection implements ConstraintValidator<Size, Collection> {
-	private int min;
-	private int max;
-
-	public void initialize(Size parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	/**
-	 * Checks the number of entries in a map.
-	 *
-	 * @param collection The collection to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the collection is <code>null</code> or the number of entries in
-	 *         <code>collection</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(Collection collection, ConstraintValidatorContext constraintValidatorContext) {
-		if ( collection == null ) {
-			return true;
-		}
-		int length = collection.size();
-		return length >= min && length <= max;
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForMap.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForMap.java
deleted file mode 100644
index def4ea0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForMap.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: SizeValidatorForMap.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.util.Map;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * Check that a string's length is between min and max.
- *
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForMap implements ConstraintValidator<Size, Map> {
-	private int min;
-	private int max;
-
-	public void initialize(Size parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	/**
-	 * Checks the number of entries in a map.
-	 *
-	 * @param map The map to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the map is <code>null</code> or the number of entries in <code>map</code>
-	 *         is between the specified <code>min</code> and <code>max</code> values (inclusive),
-	 *         <code>false</code> otherwise.
-	 */
-	public boolean isValid(Map map, ConstraintValidatorContext constraintValidatorContext) {
-		if ( map == null ) {
-			return true;
-		}
-		int size = map.size();
-		return size >= min && size <= max;
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForString.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForString.java
deleted file mode 100644
index af7bddc..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/SizeValidatorForString.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: SizeValidatorForString.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.constraints.Size;
-
-/**
- * Check that a string's length is between min and max.
- *
- * @author Emmanuel Bernard
- * @author Gavin King
- * @author Hardy Ferentschik
- */
-public class SizeValidatorForString implements ConstraintValidator<Size, String> {
-	private int min;
-	private int max;
-
-	public void initialize(Size parameters) {
-		min = parameters.min();
-		max = parameters.max();
-		validateParameters();
-	}
-
-	/**
-	 * Checks the length of the specified string.
-	 *
-	 * @param s The string to validate.
-	 * @param constraintValidatorContext context in which the constraint is evaluated.
-	 *
-	 * @return Returns <code>true</code> if the string is <code>null</code> or the length of <code>s</code> between the specified
-	 *         <code>min</code> and <code>max</code> values (inclusive), <code>false</code> otherwise.
-	 */
-	public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
-		if ( s == null ) {
-			return true;
-		}
-		int length = s.length();
-		return length >= min && length <= max;
-	}
-
-	private void validateParameters() {
-		if ( min < 0 ) {
-			throw new IllegalArgumentException( "The min parameter cannot be negative." );
-		}
-		if ( max < 0 ) {
-			throw new IllegalArgumentException( "The max parameter cannot be negative." );
-		}
-		if ( max < min ) {
-			throw new IllegalArgumentException( "The length cannot be negative." );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/URLValidator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/URLValidator.java
deleted file mode 100644
index 568560c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/URLValidator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: URLValidator.java 19527 2010-05-17 12:47:14Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.net.MalformedURLException;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.URL;
-
-/**
- * Validate that the string is a valid URL.
- *
- * @author Hardy Ferentschik
- */
-public class URLValidator implements ConstraintValidator<URL, String> {
-	private String protocol;
-	private String host;
-	private int port;
-
-	public void initialize(URL url) {
-		this.protocol = url.protocol();
-		this.host = url.host();
-		this.port = url.port();
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
-		if ( value == null || value.length() == 0 ) {
-			return true;
-		}
-
-		java.net.URL url;
-		try {
-			url = new java.net.URL( value );
-		}
-		catch ( MalformedURLException e ) {
-			return false;
-		}
-
-		if ( protocol != null && protocol.length() > 0 && !url.getProtocol().equals( protocol ) ) {
-			return false;
-		}
-
-		if ( host != null && host.length() > 0 && !url.getHost().equals( host ) ) {
-			return false;
-		}
-
-		if ( port != -1 && url.getPort() != port ) {
-			return false;
-		}
-
-		return true;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html
deleted file mode 100644
index d65c366..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Implementations of the Bean Validation built-in as well as Hibernate Validator specific constraints.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluator.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluator.java
deleted file mode 100644
index 01b7439..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// $Id: ScriptEvaluator.java 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl.scriptassert;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-import javax.validation.ConstraintDeclarationException;
-
-/**
- * A wrapper around JSR 223 {@link ScriptEngine}s. This class is thread-safe.
- *
- * @author Gunnar Morling
- */
-public class ScriptEvaluator {
-
-	private final ScriptEngine engine;
-
-	/**
-	 * Creates a new script executor.
-	 *
-	 * @param engine The engine to be wrapped.
-	 */
-	public ScriptEvaluator(ScriptEngine engine) {
-		this.engine = engine;
-	}
-
-	/**
-	 * Makes the given object available in then engine-scoped script context and executes the given script.
-	 * The execution of the script happens either synchronized or unsynchronized, depending on the engine's
-	 * threading abilities.
-	 *
-	 * @param script The script to be executed.
-	 * @param obj The object to be put into the context.
-	 * @param objectAlias The name under which the given object shall be put into the context.
-	 *
-	 * @return The script's result.
-	 *
-	 * @throws ConstraintDeclarationException In case of any errors during script execution or if the script
-	 *                                        returned null or another type than Boolean.
-	 */
-	public boolean evaluate(String script, Object obj, String objectAlias) {
-
-		if ( engineAllowsParallelAccessFromMultipleThreads() ) {
-			return doEvaluate( script, obj, objectAlias );
-		}
-		else {
-			synchronized ( engine ) {
-				return doEvaluate( script, obj, objectAlias );
-			}
-		}
-	}
-
-	private boolean doEvaluate(String script, Object obj, String objectAlias) {
-
-		engine.put( objectAlias, obj );
-
-		Object evaluationResult;
-
-		try {
-			evaluationResult = engine.eval( script );
-		}
-		catch ( ScriptException e ) {
-			throw new ConstraintDeclarationException(
-					"Error during execution of script \"" + script + "\" occured.", e
-			);
-		}
-
-		if ( evaluationResult == null ) {
-			throw new ConstraintDeclarationException( "Script \"" + script + "\" returned null, but must return either true or false." );
-		}
-
-		if ( !( evaluationResult instanceof Boolean ) ) {
-			throw new ConstraintDeclarationException(
-					"Script \"" + script + "\" returned " + evaluationResult + " (of type " + evaluationResult.getClass()
-							.getCanonicalName() + "), but must return either true or false."
-			);
-		}
-
-		return Boolean.TRUE.equals( evaluationResult );
-	}
-
-	/**
-	 * Checks, whether the given engine is thread-safe or not.
-	 *
-	 * @return True, if the given engine is thread-safe, false otherwise.
-	 */
-	private boolean engineAllowsParallelAccessFromMultipleThreads() {
-
-		String threadingType = ( String ) engine.getFactory().getParameter( "THREADING" );
-
-		return "THREAD-ISOLATED".equals( threadingType ) || "STATELESS".equals( threadingType );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluatorFactory.java b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluatorFactory.java
deleted file mode 100644
index e49d80b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/ScriptEvaluatorFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id: ScriptEvaluatorFactory.java 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl.scriptassert;
-
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import javax.validation.ConstraintDeclarationException;
-
-/**
- * Factory responsible for the creation of {@link ScriptEvaluator}s. This
- * class is thread-safe.
- *
- * @author Gunnar Morling
- */
-public class ScriptEvaluatorFactory {
-
-	/**
-	 * A reference with an instance of this factory. Allows the factory to be reused several times, but can be GC'ed if required.
-	 */
-	private static Reference<ScriptEvaluatorFactory> INSTANCE = new SoftReference<ScriptEvaluatorFactory>( new ScriptEvaluatorFactory() );
-
-	/**
-	 * A cache of script executors (keyed by language name).
-	 */
-	private ConcurrentMap<String, ScriptEvaluator> scriptExecutorCache = new ConcurrentHashMap<String, ScriptEvaluator>();
-
-	private ScriptEvaluatorFactory() {
-	}
-
-	/**
-	 * Retrieves an instance of this factory.
-	 *
-	 * @return A script evaluator factory. Never null.
-	 */
-	public static synchronized ScriptEvaluatorFactory getInstance() {
-
-		ScriptEvaluatorFactory theValue = INSTANCE.get();
-
-		if ( theValue == null ) {
-			theValue = new ScriptEvaluatorFactory();
-			INSTANCE = new SoftReference<ScriptEvaluatorFactory>( theValue );
-		}
-
-		return theValue;
-	}
-
-	/**
-	 * Retrieves a script executor for the given language.
-	 *
-	 * @param languageName The name of a scripting language as expected by {@link ScriptEngineManager#getEngineByName(String)}.
-	 *
-	 * @return A script executor for the given language. Never null.
-	 *
-	 * @throws ConstraintDeclarationException In case no JSR 223 compatible engine for the given language could be found.
-	 */
-	public ScriptEvaluator getScriptEvaluatorByLanguageName(String languageName) {
-
-		if ( !scriptExecutorCache.containsKey( languageName ) ) {
-
-			ScriptEvaluator scriptExecutor = createNewScriptEvaluator( languageName );
-			scriptExecutorCache.putIfAbsent( languageName, scriptExecutor );
-		}
-
-		return scriptExecutorCache.get( languageName );
-	}
-
-	/**
-	 * Creates a new script executor for the given language.
-	 *
-	 * @param languageName A JSR 223 language name.
-	 *
-	 * @return A newly created script executor for the given language.
-	 */
-	private ScriptEvaluator createNewScriptEvaluator(String languageName) {
-
-		ScriptEngine engine = new ScriptEngineManager().getEngineByName( languageName );
-
-		if ( engine == null ) {
-			throw new ConstraintDeclarationException(
-					"No JSR 223 script engine found for language \"" + languageName + "\"."
-			);
-		}
-
-		return new ScriptEvaluator( engine );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html
deleted file mode 100644
index c207acc..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Classes related to the evaluation of the @ScriptAssert constraint.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html
deleted file mode 100644
index f894a55..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Hibernate Validator specific constraints. Classes in this package are part of the public Hibernate
-Validator API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConfigurationImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConfigurationImpl.java
deleted file mode 100755
index d92bf68..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConfigurationImpl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-// $Id: ConfigurationImpl.java 19642 2010-06-01 12:53:13Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.ValidationException;
-import javax.validation.ValidationProviderResolver;
-import javax.validation.ValidatorFactory;
-import javax.validation.spi.BootstrapState;
-import javax.validation.spi.ConfigurationState;
-import javax.validation.spi.ValidationProvider;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.engine.resolver.DefaultTraversableResolver;
-import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
-import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.Version;
-import org.hibernate.validator.xml.ValidationBootstrapParameters;
-import org.hibernate.validator.xml.ValidationXmlParser;
-
-/**
- * Hibernate specific {@code Configuration} implementation.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- * @author Gunnar Morling
- */
-public class ConfigurationImpl implements HibernateValidatorConfiguration, ConfigurationState {
-
-	static {
-		Version.touch();
-	}
-
-	private static final Logger log = LoggerFactory.make();
-
-	private final ResourceBundleLocator defaultResourceBundleLocator = new PlatformResourceBundleLocator(
-			ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES
-	);
-	private final MessageInterpolator defaultMessageInterpolator = new ResourceBundleMessageInterpolator(
-			defaultResourceBundleLocator
-	);
-	private final TraversableResolver defaultTraversableResolver = new DefaultTraversableResolver();
-	private final ConstraintValidatorFactory defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl();
-	private final ValidationProviderResolver providerResolver;
-
-	private ValidationBootstrapParameters validationBootstrapParameters;
-	private boolean ignoreXmlConfiguration = false;
-	private Set<InputStream> configurationStreams = new HashSet<InputStream>();
-	private ConstraintMapping mapping;
-
-	public ConfigurationImpl(BootstrapState state) {
-		if ( state.getValidationProviderResolver() == null ) {
-			this.providerResolver = state.getDefaultValidationProviderResolver();
-		}
-		else {
-			this.providerResolver = state.getValidationProviderResolver();
-		}
-		validationBootstrapParameters = new ValidationBootstrapParameters();
-	}
-
-	public ConfigurationImpl(ValidationProvider provider) {
-		if ( provider == null ) {
-			throw new ValidationException( "Assertion error: inconsistent ConfigurationImpl construction" );
-		}
-		this.providerResolver = null;
-		validationBootstrapParameters = new ValidationBootstrapParameters();
-		validationBootstrapParameters.provider = provider;
-	}
-
-	public HibernateValidatorConfiguration ignoreXmlConfiguration() {
-		ignoreXmlConfiguration = true;
-		return this;
-	}
-
-	public ConfigurationImpl messageInterpolator(MessageInterpolator interpolator) {
-		this.validationBootstrapParameters.messageInterpolator = interpolator;
-		return this;
-	}
-
-	public ConfigurationImpl traversableResolver(TraversableResolver resolver) {
-		this.validationBootstrapParameters.traversableResolver = resolver;
-		return this;
-	}
-
-	public ConfigurationImpl constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory) {
-		this.validationBootstrapParameters.constraintValidatorFactory = constraintValidatorFactory;
-		return this;
-	}
-
-	public HibernateValidatorConfiguration addMapping(InputStream stream) {
-		if ( stream == null ) {
-			throw new IllegalArgumentException( "The stream cannot be null." );
-		}
-		validationBootstrapParameters.mappings.add( stream );
-		return this;
-	}
-
-	public HibernateValidatorConfiguration addMapping(ConstraintMapping mapping) {
-		if ( mapping == null ) {
-			throw new IllegalArgumentException( "The mapping cannot be null." );
-		}
-		this.mapping = mapping;
-		return this;
-	}
-
-	public HibernateValidatorConfiguration addProperty(String name, String value) {
-		if ( value != null ) {
-			validationBootstrapParameters.configProperties.put( name, value );
-		}
-		return this;
-	}
-
-
-	public ValidatorFactory buildValidatorFactory() {
-		parseValidationXml();
-		ValidatorFactory factory = null;
-		try {
-			if ( isSpecificProvider() ) {
-				factory = validationBootstrapParameters.provider.buildValidatorFactory( this );
-			}
-			else {
-				final Class<? extends ValidationProvider<?>> providerClass = validationBootstrapParameters.providerClass;
-				if ( providerClass != null ) {
-					for ( ValidationProvider provider : providerResolver.getValidationProviders() ) {
-						if ( providerClass.isAssignableFrom( provider.getClass() ) ) {
-							factory = provider.buildValidatorFactory( this );
-							break;
-						}
-					}
-					if ( factory == null ) {
-						throw new ValidationException( "Unable to find provider: " + providerClass );
-					}
-				}
-				else {
-					List<ValidationProvider<?>> providers = providerResolver.getValidationProviders();
-					assert providers.size() != 0; // I run therefore I am
-					factory = providers.get( 0 ).buildValidatorFactory( this );
-				}
-			}
-		}
-		finally {
-			// close all input streams opened by this configuration
-			for ( InputStream in : configurationStreams ) {
-				try {
-					in.close();
-				}
-				catch ( IOException io ) {
-					log.warn( "Unable to close input stream." );
-				}
-			}
-		}
-
-		// reset the param holder
-		validationBootstrapParameters = new ValidationBootstrapParameters();
-		return factory;
-	}
-
-	public boolean isIgnoreXmlConfiguration() {
-		return ignoreXmlConfiguration;
-	}
-
-	public MessageInterpolator getMessageInterpolator() {
-		return validationBootstrapParameters.messageInterpolator;
-	}
-
-	public Set<InputStream> getMappingStreams() {
-		return validationBootstrapParameters.mappings;
-	}
-
-	public ConstraintValidatorFactory getConstraintValidatorFactory() {
-		return validationBootstrapParameters.constraintValidatorFactory;
-	}
-
-	public TraversableResolver getTraversableResolver() {
-		return validationBootstrapParameters.traversableResolver;
-	}
-
-	public Map<String, String> getProperties() {
-		return validationBootstrapParameters.configProperties;
-	}
-
-	public MessageInterpolator getDefaultMessageInterpolator() {
-		return defaultMessageInterpolator;
-	}
-
-	public TraversableResolver getDefaultTraversableResolver() {
-		return defaultTraversableResolver;
-	}
-
-	public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
-		return defaultConstraintValidatorFactory;
-	}
-
-	public ResourceBundleLocator getDefaultResourceBundleLocator() {
-		return defaultResourceBundleLocator;
-	}
-
-	public ConstraintMapping getMapping() {
-		return mapping;
-	}
-
-	private boolean isSpecificProvider() {
-		return validationBootstrapParameters.provider != null;
-	}
-
-	/**
-	 * Tries to check whether a validation.xml file exists and parses it using JAXB
-	 */
-	private void parseValidationXml() {
-		if ( ignoreXmlConfiguration ) {
-			log.info( "Ignoring XML configuration." );
-			// make sure we use the defaults in case they haven't been provided yet
-			if ( validationBootstrapParameters.messageInterpolator == null ) {
-				validationBootstrapParameters.messageInterpolator = defaultMessageInterpolator;
-			}
-			if ( validationBootstrapParameters.traversableResolver == null ) {
-				validationBootstrapParameters.traversableResolver = defaultTraversableResolver;
-			}
-			if ( validationBootstrapParameters.constraintValidatorFactory == null ) {
-				validationBootstrapParameters.constraintValidatorFactory = defaultConstraintValidatorFactory;
-			}
-		}
-		else {
-			ValidationBootstrapParameters xmlParameters = new ValidationXmlParser().parseValidationXml();
-			applyXmlSettings( xmlParameters );
-		}
-	}
-
-	private void applyXmlSettings(ValidationBootstrapParameters xmlParameters) {
-		validationBootstrapParameters.providerClass = xmlParameters.providerClass;
-
-		if ( validationBootstrapParameters.messageInterpolator == null ) {
-			if ( xmlParameters.messageInterpolator != null ) {
-				validationBootstrapParameters.messageInterpolator = xmlParameters.messageInterpolator;
-			}
-			else {
-				validationBootstrapParameters.messageInterpolator = defaultMessageInterpolator;
-			}
-		}
-
-		if ( validationBootstrapParameters.traversableResolver == null ) {
-			if ( xmlParameters.traversableResolver != null ) {
-				validationBootstrapParameters.traversableResolver = xmlParameters.traversableResolver;
-			}
-			else {
-				validationBootstrapParameters.traversableResolver = defaultTraversableResolver;
-			}
-		}
-
-		if ( validationBootstrapParameters.constraintValidatorFactory == null ) {
-			if ( xmlParameters.constraintValidatorFactory != null ) {
-				validationBootstrapParameters.constraintValidatorFactory = xmlParameters.constraintValidatorFactory;
-			}
-			else {
-				validationBootstrapParameters.constraintValidatorFactory = defaultConstraintValidatorFactory;
-			}
-		}
-
-		validationBootstrapParameters.mappings.addAll( xmlParameters.mappings );
-		configurationStreams.addAll( xmlParameters.mappings );
-
-		for ( Map.Entry<String, String> entry : xmlParameters.configProperties.entrySet() ) {
-			if ( validationBootstrapParameters.configProperties.get( entry.getKey() ) == null ) {
-				validationBootstrapParameters.configProperties.put( entry.getKey(), entry.getValue() );
-			}
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java
deleted file mode 100644
index 9dbe98e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * $Id: ConstraintTree.java 19781 2010-06-22 16:30:24Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: ConstraintTree.java 19781 2010-06-22 16:30:24Z hardy.ferentschik $
-
-package org.hibernate.validator.engine;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.ConstraintViolation;
-import javax.validation.UnexpectedTypeException;
-import javax.validation.ValidationException;
-import javax.validation.metadata.ConstraintDescriptor;
-
-import com.googlecode.jtype.TypeUtils;
-import org.slf4j.Logger;
-
-import org.hibernate.validator.metadata.ConstraintDescriptorImpl;
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ValidatorTypeHelper;
-
-/**
- * Due to constraint composition a single constraint annotation can lead to a whole constraint tree being validated.
- * This class encapsulates such a tree.
- *
- * @author Hardy Ferentschik
- */
-public class ConstraintTree<A extends Annotation> {
-
-	private static final Logger log = LoggerFactory.make();
-
-	private final ConstraintTree<?> parent;
-	private final List<ConstraintTree<?>> children;
-	private final ConstraintDescriptorImpl<A> descriptor;
-
-	private final Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorTypes;
-
-	private final Map<ValidatorCacheKey, ConstraintValidator<A, ?>> constraintValidatorCache;
-
-	public ConstraintTree(ConstraintDescriptorImpl<A> descriptor) {
-		this( descriptor, null );
-	}
-
-	private ConstraintTree(ConstraintDescriptorImpl<A> descriptor, ConstraintTree<?> parent) {
-		this.parent = parent;
-		this.descriptor = descriptor;
-		this.constraintValidatorCache = new ConcurrentHashMap<ValidatorCacheKey, ConstraintValidator<A, ?>>();
-
-		final Set<ConstraintDescriptorImpl<?>> composingConstraints = new HashSet<ConstraintDescriptorImpl<?>>();
-		for ( ConstraintDescriptor<?> composingConstraint : descriptor.getComposingConstraints() ) {
-			composingConstraints.add( ( ConstraintDescriptorImpl<?> ) composingConstraint );
-		}
-
-		children = new ArrayList<ConstraintTree<?>>( composingConstraints.size() );
-
-		for ( ConstraintDescriptorImpl<?> composingDescriptor : composingConstraints ) {
-			ConstraintTree<?> treeNode = createConstraintTree( composingDescriptor );
-			children.add( treeNode );
-		}
-
-		validatorTypes = ValidatorTypeHelper.getValidatorsTypes( descriptor.getConstraintValidatorClasses() );
-	}
-
-	private <U extends Annotation> ConstraintTree<U> createConstraintTree(ConstraintDescriptorImpl<U> composingDescriptor) {
-		return new ConstraintTree<U>( composingDescriptor, this );
-	}
-
-	public List<ConstraintTree<?>> getChildren() {
-		return children;
-	}
-
-	public ConstraintDescriptorImpl<A> getDescriptor() {
-		return descriptor;
-	}
-
-	public <T, U, V> void validateConstraints(Type type, ValidationContext<T> executionContext, ValueContext<U, V> valueContext, List<ConstraintViolation<T>> constraintViolations) {
-		// first validate composing constraints (recursively)
-		for ( ConstraintTree<?> tree : getChildren() ) {
-			List<ConstraintViolation<T>> tmpViolations = new ArrayList<ConstraintViolation<T>>();
-			tree.validateConstraints( type, executionContext, valueContext, tmpViolations );
-			constraintViolations.addAll( tmpViolations );
-		}
-
-		ConstraintValidatorContextImpl constraintValidatorContext = new ConstraintValidatorContextImpl(
-				valueContext.getPropertyPath(), descriptor
-		);
-
-		// check whether we have constraints violations, but we should only report the single message of the
-		// main constraint. We already have to generate the message here, since the composing constraints might
-		// not have its own ConstraintValidator.
-		// Also we want to leave it open to the final ConstraintValidator to generate a custom message. 
-		if ( constraintViolations.size() > 0 && reportAsSingleViolation() ) {
-			constraintViolations.clear();
-			final String message = ( String ) getDescriptor().getAttributes().get( "message" );
-			MessageAndPath messageAndPath = new MessageAndPath( message, valueContext.getPropertyPath() );
-			ConstraintViolation<T> violation = executionContext.createConstraintViolation(
-					valueContext, messageAndPath, descriptor
-			);
-			constraintViolations.add( violation );
-		}
-
-		// we could have a composing constraint which does not need its own validator.
-		if ( !descriptor.getConstraintValidatorClasses().isEmpty() ) {
-			if ( log.isTraceEnabled() ) {
-				log.trace(
-						"Validating value {} against constraint defined by {}",
-						valueContext.getCurrentValidatedValue(),
-						descriptor
-				);
-			}
-			ConstraintValidator<A, V> validator = getInitializedValidator(
-					type,
-					executionContext.getConstraintValidatorFactory()
-			);
-
-			validateSingleConstraint(
-					executionContext,
-					valueContext,
-					constraintViolations,
-					constraintValidatorContext,
-					validator
-			);
-		}
-	}
-
-	private <T, U, V> void validateSingleConstraint(ValidationContext<T> executionContext, ValueContext<U, V> valueContext, List<ConstraintViolation<T>> constraintViolations, ConstraintValidatorContextImpl constraintValidatorContext, ConstraintValidator<A, V> validator) {
-		boolean isValid;
-		try {
-			isValid = validator.isValid( valueContext.getCurrentValidatedValue(), constraintValidatorContext );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Unexpected exception during isValid call", e );
-		}
-		if ( !isValid ) {
-			constraintViolations.addAll(
-					executionContext.createConstraintViolations(
-							valueContext, constraintValidatorContext
-					)
-			);
-		}
-	}
-
-	private boolean reportAsSingleViolation() {
-		return getDescriptor().isReportAsSingleViolation();
-	}
-
-	/**
-	 * @param type The type of the value to be validated (the type of the member/class the constraint was placed on).
-	 * @param constraintFactory constraint factory used to instantiate the constraint validator.
-	 *
-	 * @return A initialized constraint validator matching the type of the value to be validated.
-	 */
-	@SuppressWarnings("unchecked")
-	private <V> ConstraintValidator<A, V> getInitializedValidator(Type type, ConstraintValidatorFactory constraintFactory) {
-		Class<? extends ConstraintValidator<?, ?>> validatorClass = findMatchingValidatorClass( type );
-
-		// check if we have the default validator factory. If not we don't use caching (see HV-242)
-		if ( !( constraintFactory instanceof ConstraintValidatorFactoryImpl ) ) {
-			return createAndInitializeValidator( constraintFactory, validatorClass );
-		}
-
-		ConstraintValidator<A, V> constraintValidator;
-		ValidatorCacheKey key = new ValidatorCacheKey( constraintFactory, validatorClass );
-		if ( !constraintValidatorCache.containsKey( key ) ) {
-			constraintValidator = createAndInitializeValidator( constraintFactory, validatorClass );
-			constraintValidatorCache.put( key, constraintValidator );
-		}
-		else {
-			if ( log.isTraceEnabled() ) {
-				log.trace( "Constraint validator {} found in cache" );
-			}
-			constraintValidator = ( ConstraintValidator<A, V> ) constraintValidatorCache.get( key );
-		}
-		return constraintValidator;
-	}
-
-	@SuppressWarnings("unchecked")
-	private <V> ConstraintValidator<A, V> createAndInitializeValidator(ConstraintValidatorFactory constraintFactory, Class<? extends ConstraintValidator<?, ?>> validatorClass) {
-		ConstraintValidator<A, V> constraintValidator;
-		constraintValidator = ( ConstraintValidator<A, V> ) constraintFactory.getInstance(
-				validatorClass
-		);
-		if ( constraintValidator == null ) {
-			throw new ValidationException(
-					"Constraint factory returned null when trying to create instance of " + validatorClass.getName()
-			);
-		}
-		initializeConstraint( descriptor, constraintValidator );
-		return constraintValidator;
-	}
-
-	/**
-	 * Runs the validator resolution algorithm.
-	 *
-	 * @param type The type of the value to be validated (the type of the member/class the constraint was placed on).
-	 *
-	 * @return The class of a matching validator.
-	 */
-	private Class<? extends ConstraintValidator<?, ?>> findMatchingValidatorClass(Type type) {
-		List<Type> suitableTypes = findSuitableValidatorTypes( type );
-
-		resolveAssignableTypes( suitableTypes );
-		verifyResolveWasUnique( type, suitableTypes );
-
-		return validatorTypes.get( suitableTypes.get( 0 ) );
-	}
-
-	private void verifyResolveWasUnique(Type valueClass, List<Type> assignableClasses) {
-		if ( assignableClasses.size() == 0 ) {
-			String className = valueClass.toString();
-			if ( valueClass instanceof Class ) {
-				Class<?> clazz = ( Class<?> ) valueClass;
-				if ( clazz.isArray() ) {
-					className = clazz.getComponentType().toString() + "[]";
-				}
-				else {
-					className = clazz.getName();
-				}
-			}
-			throw new UnexpectedTypeException( "No validator could be found for type: " + className );
-		}
-		else if ( assignableClasses.size() > 1 ) {
-			StringBuilder builder = new StringBuilder();
-			builder.append( "There are multiple validator classes which could validate the type " );
-			builder.append( valueClass );
-			builder.append( ". The validator classes are: " );
-			for ( Type clazz : assignableClasses ) {
-				builder.append( clazz );
-				builder.append( ", " );
-			}
-			builder.delete( builder.length() - 2, builder.length() );
-			throw new UnexpectedTypeException( builder.toString() );
-		}
-	}
-
-	private List<Type> findSuitableValidatorTypes(Type type) {
-		List<Type> suitableTypes = new ArrayList<Type>();
-		for ( Type validatorType : validatorTypes.keySet() ) {
-			if ( TypeUtils.isAssignable( validatorType, type ) && !suitableTypes.contains( validatorType ) ) {
-				suitableTypes.add( validatorType );
-			}
-		}
-		return suitableTypes;
-	}
-
-	/**
-	 * Tries to reduce all assignable classes down to a single class.
-	 *
-	 * @param assignableTypes The set of all classes which are assignable to the class of the value to be validated and
-	 * which are handled by at least one of the  validators for the specified constraint.
-	 */
-	private void resolveAssignableTypes(List<Type> assignableTypes) {
-		if ( assignableTypes.size() == 0 || assignableTypes.size() == 1 ) {
-			return;
-		}
-
-		List<Type> typesToRemove = new ArrayList<Type>();
-		do {
-			typesToRemove.clear();
-			Type type = assignableTypes.get( 0 );
-			for ( int i = 1; i < assignableTypes.size(); i++ ) {
-				if ( TypeUtils.isAssignable( type, assignableTypes.get( i ) ) ) {
-					typesToRemove.add( type );
-				}
-				else if ( TypeUtils.isAssignable( assignableTypes.get( i ), type ) ) {
-					typesToRemove.add( assignableTypes.get( i ) );
-				}
-			}
-			assignableTypes.removeAll( typesToRemove );
-		} while ( typesToRemove.size() > 0 );
-	}
-
-	private <V> void initializeConstraint
-			(ConstraintDescriptor<A>
-					descriptor, ConstraintValidator<A, V>
-					constraintValidator) {
-		try {
-			constraintValidator.initialize( descriptor.getAnnotation() );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Unable to initialize " + constraintValidator.getClass().getName(), e );
-		}
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ConstraintTree" );
-		sb.append( "{ descriptor=" ).append( descriptor );
-		sb.append( ", isRoot=" ).append( parent == null );
-		sb.append( ", constraintValidatorCache=" ).append( constraintValidatorCache );
-		sb.append( '}' );
-		return sb.toString();
-	}
-
-	private static class ValidatorCacheKey {
-		private ConstraintValidatorFactory constraintValidatorFactory;
-		private Class<? extends ConstraintValidator<?, ?>> validatorType;
-
-		private ValidatorCacheKey(ConstraintValidatorFactory constraintValidatorFactory, Class<? extends ConstraintValidator<?, ?>> validatorType) {
-			this.constraintValidatorFactory = constraintValidatorFactory;
-			this.validatorType = validatorType;
-		}
-
-		@Override
-		public boolean equals(Object o) {
-			if ( this == o ) {
-				return true;
-			}
-			if ( o == null || getClass() != o.getClass() ) {
-				return false;
-			}
-
-			ValidatorCacheKey that = ( ValidatorCacheKey ) o;
-
-			if ( constraintValidatorFactory != null ? !constraintValidatorFactory.equals( that.constraintValidatorFactory ) : that.constraintValidatorFactory != null ) {
-				return false;
-			}
-			if ( validatorType != null ? !validatorType.equals( that.validatorType ) : that.validatorType != null ) {
-				return false;
-			}
-
-			return true;
-		}
-
-		@Override
-		public int hashCode() {
-			int result = constraintValidatorFactory != null ? constraintValidatorFactory.hashCode() : 0;
-			result = 31 * result + ( validatorType != null ? validatorType.hashCode() : 0 );
-			return result;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorContextImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorContextImpl.java
deleted file mode 100644
index 8e8f28b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorContextImpl.java
+++ /dev/null
@@ -1,198 +0,0 @@
-// $Id: ConstraintValidatorContextImpl.java 17746 2009-10-14 17:05:10Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.ValidationException;
-import javax.validation.metadata.ConstraintDescriptor;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintValidatorContextImpl implements ConstraintValidatorContext {
-
-	private final List<MessageAndPath> messageAndPaths = new ArrayList<MessageAndPath>( 3 );
-	private final PathImpl propertyPath;
-	private final ConstraintDescriptor<?> constraintDescriptor;
-	private boolean defaultDisabled;
-
-
-	public ConstraintValidatorContextImpl(PathImpl propertyPath, ConstraintDescriptor<?> constraintDescriptor) {
-		this.propertyPath = propertyPath;
-		this.constraintDescriptor = constraintDescriptor;
-	}
-
-	public void disableDefaultConstraintViolation() {
-		defaultDisabled = true;
-	}
-
-	public String getDefaultConstraintMessageTemplate() {
-		return ( String ) constraintDescriptor.getAttributes().get( "message" );
-	}
-
-	public ConstraintViolationBuilder buildConstraintViolationWithTemplate(String messageTemplate) {
-		return new ErrorBuilderImpl( messageTemplate, propertyPath );
-	}
-
-	public ConstraintDescriptor<?> getConstraintDescriptor() {
-		return constraintDescriptor;
-	}
-
-	public List<MessageAndPath> getMessageAndPathList() {
-		if ( defaultDisabled && messageAndPaths.size() == 0 ) {
-			throw new ValidationException(
-					"At least one custom message must be created if the default error message gets disabled."
-			);
-		}
-
-		List<MessageAndPath> returnedMessageAndPaths = new ArrayList<MessageAndPath>( messageAndPaths );
-		if ( !defaultDisabled ) {
-			returnedMessageAndPaths.add(
-					new MessageAndPath( getDefaultConstraintMessageTemplate(), propertyPath )
-			);
-		}
-		return returnedMessageAndPaths;
-	}
-
-	class ErrorBuilderImpl implements ConstraintViolationBuilder {
-		String messageTemplate;
-		PathImpl propertyPath;
-
-		ErrorBuilderImpl(String template, PathImpl path) {
-			messageTemplate = template;
-			propertyPath = path;
-		}
-
-		public NodeBuilderDefinedContext addNode(String name) {
-			PathImpl path;
-			if ( propertyPath.isRootPath() ) {
-				path = PathImpl.createNewPath( name );
-			}
-			else {
-				path = PathImpl.createShallowCopy( propertyPath );
-				path.addNode( new NodeImpl( name ) );
-			}
-			return new NodeBuilderImpl( messageTemplate, path );
-		}
-
-		public ConstraintValidatorContext addConstraintViolation() {
-			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
-			return ConstraintValidatorContextImpl.this;
-		}
-	}
-
-	class NodeBuilderImpl implements ConstraintViolationBuilder.NodeBuilderDefinedContext {
-		String messageTemplate;
-		PathImpl propertyPath;
-
-		NodeBuilderImpl(String template, PathImpl path) {
-			messageTemplate = template;
-			propertyPath = path;
-		}
-
-		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
-			// we need to defer the adding of the new node, since we don't know yet whether the new node  will be iterable
-			return new InIterableNodeBuilderImpl( messageTemplate, propertyPath, name );
-		}
-
-		public ConstraintValidatorContext addConstraintViolation() {
-			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
-			return ConstraintValidatorContextImpl.this;
-		}
-	}
-
-	class InIterableNodeBuilderImpl implements ConstraintViolationBuilder.NodeBuilderCustomizableContext {
-		String messageTemplate;
-		PathImpl propertyPath;
-		String deferredNodeName;
-
-		InIterableNodeBuilderImpl(String template, PathImpl path, String deferredNodeName) {
-			this.messageTemplate = template;
-			this.propertyPath = path;
-			this.deferredNodeName = deferredNodeName;
-		}
-
-		public ConstraintViolationBuilder.NodeContextBuilder inIterable() {
-			this.propertyPath.getLeafNode().setInIterable( true );
-			return new InIterablePropertiesBuilderImpl( messageTemplate, propertyPath, deferredNodeName );
-		}
-
-		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
-			addDeferredNode(); // now that we add another node we can add the deferred parent node
-			deferredNodeName = name;
-			return this;
-		}
-
-		public ConstraintValidatorContext addConstraintViolation() {
-			addDeferredNode();
-			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
-			return ConstraintValidatorContextImpl.this;
-		}
-
-		private void addDeferredNode() {
-			if ( deferredNodeName != null ) {
-				NodeImpl node = new NodeImpl( deferredNodeName );
-				propertyPath.addNode( node );
-			}
-		}
-	}
-
-	class InIterablePropertiesBuilderImpl implements ConstraintViolationBuilder.NodeContextBuilder {
-		String messageTemplate;
-		PathImpl propertyPath;
-		String deferredNodeName;
-
-		InIterablePropertiesBuilderImpl(String template, PathImpl path, String deferredNodeName) {
-			this.messageTemplate = template;
-			this.propertyPath = path;
-			this.deferredNodeName = deferredNodeName;
-		}
-
-		public ConstraintViolationBuilder.NodeBuilderDefinedContext atKey(Object key) {
-			propertyPath.getLeafNode().setKey( key );
-			addDeferredNode();
-			return new NodeBuilderImpl( messageTemplate, propertyPath );
-		}
-
-		public ConstraintViolationBuilder.NodeBuilderDefinedContext atIndex(Integer index) {
-			propertyPath.getLeafNode().setIndex( index );
-			addDeferredNode();
-			return new NodeBuilderImpl( messageTemplate, propertyPath );
-		}
-
-		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
-			addDeferredNode();
-			return new InIterableNodeBuilderImpl( messageTemplate, propertyPath, name );
-		}
-
-		public ConstraintValidatorContext addConstraintViolation() {
-			addDeferredNode();
-			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
-			return ConstraintValidatorContextImpl.this;
-		}
-
-		private void addDeferredNode() {
-			if ( deferredNodeName != null ) {
-				NodeImpl node = new NodeImpl( deferredNodeName );
-				propertyPath.addNode( node );
-			}
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorFactoryImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorFactoryImpl.java
deleted file mode 100644
index 8ce550c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintValidatorFactoryImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: ConstraintValidatorFactoryImpl.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorFactory;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * Default <code>ConstraintValidatorFactory</code> using a no-arg constructor.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ConstraintValidatorFactoryImpl implements ConstraintValidatorFactory {
-
-	public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
-		return ReflectionHelper.newInstance( key, "" );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintViolationImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintViolationImpl.java
deleted file mode 100644
index 6cbf189..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintViolationImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-// $Id: ConstraintViolationImpl.java 19021 2010-03-18 18:17:05Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.lang.annotation.ElementType;
-import javax.validation.ConstraintViolation;
-import javax.validation.Path;
-import javax.validation.metadata.ConstraintDescriptor;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ConstraintViolationImpl<T> implements ConstraintViolation<T>, java.io.Serializable {
-	private final String interpolatedMessage;
-	private final T rootBean;
-	private final Object value;
-	private final Path propertyPath;
-	private final Object leafBeanInstance;
-	private final ConstraintDescriptor constraintDescriptor;
-	private final String messageTemplate;
-	private final Class<T> rootBeanClass;
-	private final ElementType elementType;
-
-
-	public ConstraintViolationImpl(String messageTemplate, String interpolatedMessage, Class<T> rootBeanClass,
-								   T rootBean, Object leafBeanInstance, Object value,
-								   Path propertyPath, ConstraintDescriptor constraintDescriptor, ElementType elementType) {
-		this.messageTemplate = messageTemplate;
-		this.interpolatedMessage = interpolatedMessage;
-		this.rootBean = rootBean;
-		this.value = value;
-		this.propertyPath = propertyPath;
-		this.leafBeanInstance = leafBeanInstance;
-		this.constraintDescriptor = constraintDescriptor;
-		this.rootBeanClass = rootBeanClass;
-		this.elementType = elementType;
-	}
-
-	public String getMessage() {
-		return interpolatedMessage;
-	}
-
-	public String getMessageTemplate() {
-		return messageTemplate;
-	}
-
-	public T getRootBean() {
-		return rootBean;
-	}
-
-	public Class<T> getRootBeanClass() {
-		return rootBeanClass;
-	}
-
-	public Object getLeafBean() {
-		return leafBeanInstance;
-	}
-
-	public Object getInvalidValue() {
-		return value;
-	}
-
-	public Path getPropertyPath() {
-		return propertyPath;
-	}
-
-	public ConstraintDescriptor getConstraintDescriptor() {
-		return this.constraintDescriptor;
-	}
-
-	@Override
-	@SuppressWarnings("SimplifiableIfStatement")
-	// IMPORTANT - some behaviour of Validator depends on the correct implementation of this equals method!
-	public boolean equals(Object o) {
-		if ( this == o ) {
-			return true;
-		}
-		if ( !( o instanceof ConstraintViolationImpl ) ) {
-			return false;
-		}
-
-		ConstraintViolationImpl that = ( ConstraintViolationImpl ) o;
-
-		if ( interpolatedMessage != null ? !interpolatedMessage.equals( that.interpolatedMessage ) : that.interpolatedMessage != null ) {
-			return false;
-		}
-		if ( propertyPath != null ? !propertyPath.equals( that.propertyPath ) : that.propertyPath != null ) {
-			return false;
-		}
-		if ( rootBean != null ? !rootBean.equals( that.rootBean ) : that.rootBean != null ) {
-			return false;
-		}
-		if ( leafBeanInstance != null ? !leafBeanInstance.equals( that.leafBeanInstance ) : that.leafBeanInstance != null ) {
-			return false;
-		}
-		if ( elementType != null ? !elementType.equals( that.elementType ) : that.elementType != null ) {
-			return false;
-		}
-		if ( value != null ? !value.equals( that.value ) : that.value != null ) {
-			return false;
-		}
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		int result = interpolatedMessage != null ? interpolatedMessage.hashCode() : 0;
-		result = 31 * result + ( propertyPath != null ? propertyPath.hashCode() : 0 );
-		result = 31 * result + ( rootBean != null ? rootBean.hashCode() : 0 );
-		result = 31 * result + ( leafBeanInstance != null ? leafBeanInstance.hashCode() : 0 );
-		result = 31 * result + ( value != null ? value.hashCode() : 0 );
-		result = 31 * result + ( elementType != null ? elementType.hashCode() : 0 );
-		return result;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ConstraintViolationImpl" );
-		sb.append( "{interpolatedMessage='" ).append( interpolatedMessage ).append( '\'' );
-		sb.append( ", propertyPath=" ).append( propertyPath );
-		sb.append( ", rootBeanClass=" ).append( rootBeanClass );
-		sb.append( ", messageTemplate='" ).append( messageTemplate ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageAndPath.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageAndPath.java
deleted file mode 100644
index 2c68c32..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageAndPath.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: MessageAndPath.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import javax.validation.Path;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MessageAndPath {
-	private final String message;
-	private final Path propertyPath;
-
-	public MessageAndPath(String message, Path property) {
-		this.message = message;
-		this.propertyPath = property;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public Path getPath() {
-		return propertyPath;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageInterpolatorContext.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageInterpolatorContext.java
deleted file mode 100644
index 8a07a84..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/MessageInterpolatorContext.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id: MessageInterpolatorContext.java 19735 2010-06-15 09:40:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import javax.validation.metadata.ConstraintDescriptor;
-import javax.validation.MessageInterpolator;
-
-/**
- * Implementation of the context used during message interpolation.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class MessageInterpolatorContext implements MessageInterpolator.Context {
-	private final ConstraintDescriptor<?> constraintDescriptor;
-	private final Object validatedValue;
-
-	public MessageInterpolatorContext(ConstraintDescriptor<?> constraintDescriptor, Object validatedValue) {
-		this.constraintDescriptor = constraintDescriptor;
-		this.validatedValue = validatedValue;
-	}
-
-	public ConstraintDescriptor<?> getConstraintDescriptor() {
-		return constraintDescriptor;
-	}
-
-	public Object getValidatedValue() {
-		return validatedValue;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if ( this == o ) {
-			return true;
-		}
-		if ( o == null || getClass() != o.getClass() ) {
-			return false;
-		}
-
-		MessageInterpolatorContext that = ( MessageInterpolatorContext ) o;
-
-		if ( constraintDescriptor != null ? !constraintDescriptor.equals( that.constraintDescriptor ) : that.constraintDescriptor != null ) {
-			return false;
-		}
-		if ( validatedValue != null ? !validatedValue.equals( that.validatedValue ) : that.validatedValue != null ) {
-			return false;
-		}
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		int result = constraintDescriptor != null ? constraintDescriptor.hashCode() : 0;
-		result = 31 * result + ( validatedValue != null ? validatedValue.hashCode() : 0 );
-		return result;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "MessageInterpolatorContext" );
-		sb.append( "{constraintDescriptor=" ).append( constraintDescriptor );
-		sb.append( ", validatedValue=" ).append( validatedValue );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/NodeImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/NodeImpl.java
deleted file mode 100644
index 951edb4..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/NodeImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-// $Id: NodeImpl.java 17748 2009-10-14 19:53:42Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.io.Serializable;
-import javax.validation.Path;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NodeImpl implements Path.Node, Serializable {
-
-	private static final long serialVersionUID = 2075466571633860499L;
-
-	private static final String INDEX_OPEN = "[";
-	private static final String INDEX_CLOSE = "]";
-
-	private final String name;
-	private boolean isInIterable;
-	private Integer index;
-	private Object key;
-
-	public NodeImpl(String name) {
-		this.name = name;
-	}
-
-	NodeImpl(Path.Node node) {
-		this.name = node.getName();
-		this.isInIterable = node.isInIterable();
-		this.index = node.getIndex();
-		this.key = node.getKey();
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public boolean isInIterable() {
-		return isInIterable;
-	}
-
-	public void setInIterable(boolean inIterable) {
-		isInIterable = inIterable;
-	}
-
-	public Integer getIndex() {
-		return index;
-	}
-
-	public void setIndex(Integer index) {
-		isInIterable = true;
-		this.index = index;
-	}
-
-	public Object getKey() {
-		return key;
-	}
-
-	public void setKey(Object key) {
-		isInIterable = true;
-		this.key = key;
-	}
-
-	@Override
-	public String toString() {
-		StringBuilder builder = new StringBuilder( name == null ? "" : name );
-		if ( isInIterable ) {
-			builder.append( INDEX_OPEN );
-			if ( getIndex() != null ) {
-				builder.append( getIndex() );
-			}
-			else if ( getKey() != null ) {
-				builder.append( getKey() );
-			}
-			builder.append( INDEX_CLOSE );
-		}
-		return builder.toString();
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if ( this == o ) {
-			return true;
-		}
-		if ( o == null || getClass() != o.getClass() ) {
-			return false;
-		}
-
-		NodeImpl node = ( NodeImpl ) o;
-
-		if ( isInIterable != node.isInIterable ) {
-			return false;
-		}
-		if ( index != null ? !index.equals( node.index ) : node.index != null ) {
-			return false;
-		}
-		if ( key != null ? !key.equals( node.key ) : node.key != null ) {
-			return false;
-		}
-		if ( name != null ? !name.equals( node.name ) : node.name != null ) {
-			return false;
-		}
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		int result = name != null ? name.hashCode() : 0;
-		result = 31 * result + ( isInIterable ? 1 : 0 );
-		result = 31 * result + ( index != null ? index.hashCode() : 0 );
-		result = 31 * result + ( key != null ? key.hashCode() : 0 );
-		return result;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/PathImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/PathImpl.java
deleted file mode 100644
index 1eab260..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/PathImpl.java
+++ /dev/null
@@ -1,222 +0,0 @@
-// $Id: PathImpl.java 17744 2009-10-14 14:38:57Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.validation.Path;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PathImpl implements Path, Serializable {
-
-	private static final long serialVersionUID = 7564511574909882392L;
-
-	/**
-	 * Regular expression used to split a string path into its elements.
-	 *
-	 * @see <a href="http://www.regexplanet.com/simple/index.jsp">Regular expression tester</a>
-	 */
-	private static final Pattern pathPattern = Pattern.compile( "(\\w+)(\\[(\\w*)\\])?(\\.(.*))*" );
-
-	private static final String PROPERTY_PATH_SEPERATOR = ".";
-
-	private final List<Node> nodeList;
-
-	/**
-	 * Returns a {@code Path} instance representing the path described by the given string. To create a root node the empty string should be passed.
-	 *
-	 * @param propertyPath the path as string representation.
-	 *
-	 * @return a {@code Path} instance representing the path described by the given string.
-	 *
-	 * @throws IllegalArgumentException in case {@code property == null} or {@code property} cannot be parsed.
-	 */
-	public static PathImpl createPathFromString(String propertyPath) {
-		if ( propertyPath == null ) {
-			throw new IllegalArgumentException( "null is not allowed as property path." );
-		}
-
-		if ( propertyPath.length() == 0 ) {
-			return createNewPath( null );
-		}
-
-		return parseProperty( propertyPath );
-	}
-
-	public static PathImpl createNewPath(String name) {
-		PathImpl path = new PathImpl();
-		NodeImpl node = new NodeImpl( name );
-		path.addNode( node );
-		return path;
-	}
-
-	public static PathImpl createShallowCopy(Path path) {
-		return path == null ? null : new PathImpl( path );
-	}
-
-	private PathImpl(Path path) {
-		this.nodeList = new ArrayList<Node>();
-		for ( Object aPath : path ) {
-			nodeList.add( new NodeImpl( ( Node ) aPath ) );
-		}
-	}
-
-	private PathImpl() {
-		nodeList = new ArrayList<Node>();
-	}
-
-	private PathImpl(List<Node> nodeList) {
-		this.nodeList = new ArrayList<Node>();
-		for ( Node node : nodeList ) {
-			this.nodeList.add( new NodeImpl( node ) );
-		}
-	}
-
-	public boolean isRootPath() {
-		return nodeList.size() == 1 && nodeList.get( 0 ).getName() == null;
-	}
-
-	public PathImpl getPathWithoutLeafNode() {
-		List<Node> nodes = new ArrayList<Node>( nodeList );
-		PathImpl path = null;
-		if ( nodes.size() > 1 ) {
-			nodes.remove( nodes.size() - 1 );
-			path = new PathImpl( nodes );
-		}
-		return path;
-	}
-
-	public void addNode(Node node) {
-		nodeList.add( node );
-	}
-
-	public Node removeLeafNode() {
-		if ( nodeList.size() == 0 ) {
-			throw new IllegalStateException( "No nodes in path!" );
-		}
-		if ( nodeList.size() == 1 ) {
-			throw new IllegalStateException( "Root node cannot be removed!" );
-		}
-		return nodeList.remove( nodeList.size() - 1 );
-	}
-
-	public NodeImpl getLeafNode() {
-		if ( nodeList.size() == 0 ) {
-			throw new IllegalStateException( "No nodes in path!" );
-		}
-		return ( NodeImpl ) nodeList.get( nodeList.size() - 1 );
-	}
-
-	public Iterator<Path.Node> iterator() {
-		return nodeList.iterator();
-	}
-
-	public boolean isSubPathOf(Path path) {
-		Iterator<Node> pathIter = path.iterator();
-		Iterator<Node> thisIter = iterator();
-		while ( pathIter.hasNext() ) {
-			Node pathNode = pathIter.next();
-			if ( !thisIter.hasNext() ) {
-				return false;
-			}
-			Node thisNode = thisIter.next();
-			if ( !thisNode.equals( pathNode ) ) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	@Override
-	public String toString() {
-		StringBuilder builder = new StringBuilder();
-		Iterator<Path.Node> iter = iterator();
-		while ( iter.hasNext() ) {
-			Node node = iter.next();
-			builder.append( node.toString() );
-			if ( iter.hasNext() ) {
-				builder.append( PROPERTY_PATH_SEPERATOR );
-			}
-		}
-		return builder.toString();
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if ( this == o ) {
-			return true;
-		}
-		if ( o == null || getClass() != o.getClass() ) {
-			return false;
-		}
-
-		PathImpl path = ( PathImpl ) o;
-		if ( nodeList != null && !nodeList.equals( path.nodeList ) ) {
-			return false;
-		}
-		if ( nodeList == null && path.nodeList != null ) {
-			return false;
-		}
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		return nodeList != null ? nodeList.hashCode() : 0;
-	}
-
-	private static PathImpl parseProperty(String property) {
-		PathImpl path = new PathImpl();
-		String tmp = property;
-		do {
-			Matcher matcher = pathPattern.matcher( tmp );
-			if ( matcher.matches() ) {
-				String value = matcher.group( 1 );
-				String indexed = matcher.group( 2 );
-				String index = matcher.group( 3 );
-				NodeImpl node = new NodeImpl( value );
-				if ( indexed != null ) {
-					node.setInIterable( true );
-				}
-				if ( index != null && index.length() > 0 ) {
-					try {
-						Integer i = Integer.parseInt( index );
-						node.setIndex( i );
-					}
-					catch ( NumberFormatException e ) {
-						node.setKey( index );
-					}
-				}
-				path.addNode( node );
-				tmp = matcher.group( 5 );
-			}
-			else {
-				throw new IllegalArgumentException( "Unable to parse property path " + property );
-			}
-		} while ( tmp != null );
-		return path;
-	}
-
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidationContext.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidationContext.java
deleted file mode 100644
index 85f3d4c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidationContext.java
+++ /dev/null
@@ -1,266 +0,0 @@
-// $Id: ValidationContext.java 19735 2010-06-15 09:40:40Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.ConstraintViolation;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.metadata.ConstraintDescriptor;
-
-import org.hibernate.validator.util.IdentitySet;
-
-/**
- * Context object keeping track of all important data for a top level {@link javax.validation.Validator#validate(Object, Class[])} },
- * {@link javax.validation.Validator#validateValue(Class, String, Object, Class[])}  } or {@link javax.validation.Validator#validateProperty(Object, String, Class[])}  call.
- * <p/>
- * we use this object to collect all failing constraints, but also to cache the caching traversable resolver for a full stack call.
- *
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
-public class ValidationContext<T> {
-
-	/**
-	 * The root bean of the validation.
-	 */
-	private final T rootBean;
-
-	/**
-	 * The root bean class of the validation.
-	 */
-	private final Class<T> rootBeanClass;
-
-	/**
-	 * Maps a group to an identity set to keep track of already validated objects. We have to make sure
-	 * that each object gets only validated once per group and property path.
-	 */
-	private final Map<Class<?>, IdentitySet> processedObjects;
-
-	/**
-	 * Maps an object to a list of paths in which it has been invalidated.
-	 */
-	private final Map<Object, Set<PathImpl>> processedPaths;
-
-	/**
-	 * A list of all failing constraints so far.
-	 */
-	private final List<ConstraintViolation<T>> failingConstraintViolations;
-
-	/**
-	 * Flag indicating whether an object can only be validated once per group or once per group AND validation path.
-	 *
-	 * @todo Make this boolean a configurable item.
-	 */
-	private boolean allowOneValidationPerPath = true;
-
-	/**
-	 * The message resolver which should be used in this context.
-	 */
-	private final MessageInterpolator messageInterpolator;
-
-	/**
-	 * The constraint factory which should be used in this context.
-	 */
-	private final ConstraintValidatorFactory constraintValidatorFactory;
-
-	/**
-	 * Allows a JPA provider to decide whether a property should be validated.
-	 */
-	private final TraversableResolver traversableResolver;
-
-	public static <T> ValidationContext<T> getContextForValidate(T object, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver) {
-		@SuppressWarnings("unchecked")
-		Class<T> rootBeanClass = ( Class<T> ) object.getClass();
-		return new ValidationContext<T>(
-				rootBeanClass, object, messageInterpolator, constraintValidatorFactory, traversableResolver
-		);
-	}
-
-	public static <T> ValidationContext<T> getContextForValidateProperty(T rootBean, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver) {
-		@SuppressWarnings("unchecked")
-		Class<T> rootBeanClass = ( Class<T> ) rootBean.getClass();
-		return new ValidationContext<T>(
-				rootBeanClass, rootBean, messageInterpolator, constraintValidatorFactory, traversableResolver
-		);
-	}
-
-	public static <T> ValidationContext<T> getContextForValidateValue(Class<T> rootBeanClass, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver) {
-		return new ValidationContext<T>(
-				rootBeanClass,
-				null,
-				messageInterpolator,
-				constraintValidatorFactory,
-				traversableResolver
-		);
-	}
-
-	private ValidationContext(Class<T> rootBeanClass, T rootBean, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver) {
-		this.rootBean = rootBean;
-		this.rootBeanClass = rootBeanClass;
-		this.messageInterpolator = messageInterpolator;
-		this.constraintValidatorFactory = constraintValidatorFactory;
-		this.traversableResolver = traversableResolver;
-
-		processedObjects = new HashMap<Class<?>, IdentitySet>();
-		processedPaths = new IdentityHashMap<Object, Set<PathImpl>>();
-		failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
-	}
-
-	public T getRootBean() {
-		return rootBean;
-	}
-
-	public Class<T> getRootBeanClass() {
-		return rootBeanClass;
-	}
-
-	public TraversableResolver getTraversableResolver() {
-		return traversableResolver;
-	}
-
-	public MessageInterpolator getMessageInterpolator() {
-		return messageInterpolator;
-	}
-
-	public <U, V> ConstraintViolationImpl<T> createConstraintViolation(ValueContext<U, V> localContext, MessageAndPath messageAndPath, ConstraintDescriptor<?> descriptor) {
-		String messageTemplate = messageAndPath.getMessage();
-		String interpolatedMessage = messageInterpolator.interpolate(
-				messageTemplate,
-				new MessageInterpolatorContext( descriptor, localContext.getCurrentValidatedValue() )
-		);
-		return new ConstraintViolationImpl<T>(
-				messageTemplate,
-				interpolatedMessage,
-				getRootBeanClass(),
-				getRootBean(),
-				localContext.getCurrentBean(),
-				localContext.getCurrentValidatedValue(),
-				messageAndPath.getPath(),
-				descriptor,
-				localContext.getElementType()
-		);
-	}
-
-	public <U, V> List<ConstraintViolationImpl<T>> createConstraintViolations(ValueContext<U, V> localContext, ConstraintValidatorContextImpl constraintValidatorContext) {
-		List<ConstraintViolationImpl<T>> constraintViolations = new ArrayList<ConstraintViolationImpl<T>>();
-		for ( MessageAndPath messageAndPath : constraintValidatorContext.getMessageAndPathList() ) {
-			ConstraintViolationImpl<T> violation = createConstraintViolation(
-					localContext, messageAndPath, constraintValidatorContext.getConstraintDescriptor()
-			);
-			constraintViolations.add( violation );
-		}
-		return constraintViolations;
-	}
-
-	public ConstraintValidatorFactory getConstraintValidatorFactory() {
-		return constraintValidatorFactory;
-	}
-
-	public boolean isAlreadyValidated(Object value, Class<?> group, PathImpl path) {
-		boolean alreadyValidated;
-		alreadyValidated = isAlreadyValidatedForCurrentGroup( value, group );
-
-		if ( alreadyValidated && allowOneValidationPerPath ) {
-			alreadyValidated = isAlreadyValidatedForPath( value, path );
-		}
-		return alreadyValidated;
-	}
-
-	public void markProcessed(Object value, Class<?> group, PathImpl path) {
-		markProcessForCurrentGroup( value, group );
-		if ( allowOneValidationPerPath ) {
-			markProcessedForCurrentPath( value, path );
-		}
-	}
-
-	private void addConstraintFailure(ConstraintViolation<T> failingConstraintViolation) {
-		// NOTE: we are relying on the fact that ConstraintViolation.equals() is implemented correctly.
-		int i = failingConstraintViolations.indexOf( failingConstraintViolation );
-		if ( i == -1 ) {
-			failingConstraintViolations.add( failingConstraintViolation );
-		}
-	}
-
-	public void addConstraintFailures(List<ConstraintViolation<T>> failingConstraintViolations) {
-		for ( ConstraintViolation<T> violation : failingConstraintViolations ) {
-			addConstraintFailure( violation );
-		}
-	}
-
-	public List<ConstraintViolation<T>> getFailingConstraints() {
-		return failingConstraintViolations;
-	}
-
-	private boolean isAlreadyValidatedForPath(Object value, PathImpl path) {
-		Set<PathImpl> pathSet = processedPaths.get( value );
-		if ( pathSet == null ) {
-			return false;
-		}
-
-		for ( PathImpl p : pathSet ) {
-			if ( p.isRootPath() || path.isRootPath() || p.isSubPathOf( path ) || path.isSubPathOf( p ) ) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	private boolean isAlreadyValidatedForCurrentGroup(Object value, Class<?> group) {
-		final IdentitySet objectsProcessedInCurrentGroups = processedObjects.get( group );
-		return objectsProcessedInCurrentGroups != null && objectsProcessedInCurrentGroups.contains( value );
-	}
-
-	private void markProcessedForCurrentPath(Object value, PathImpl path) {
-		// hmm - not sure if the current definiton of Path and Node are consistent. Shouldn't a simple property
-		// of a entity have a parent node?
-		PathImpl parentPath = path.getPathWithoutLeafNode();
-		if ( parentPath == null ) {
-			parentPath = PathImpl.createNewPath( null );
-		}
-
-		if ( processedPaths.containsKey( value ) ) {
-			processedPaths.get( value ).add( parentPath );
-		}
-		else {
-			Set<PathImpl> set = new HashSet<PathImpl>();
-			set.add( parentPath );
-			processedPaths.put( value, set );
-		}
-	}
-
-
-	private void markProcessForCurrentGroup(Object value, Class<?> group) {
-		if ( processedObjects.containsKey( group ) ) {
-			processedObjects.get( group ).add( value );
-		}
-		else {
-			IdentitySet set = new IdentitySet();
-			set.add( value );
-			processedObjects.put( group, set );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorContextImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorContextImpl.java
deleted file mode 100644
index f7add76..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorContextImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id: ValidatorContextImpl.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.Validator;
-import javax.validation.ValidatorContext;
-
-import org.hibernate.validator.metadata.BeanMetaDataCache;
-import org.hibernate.validator.metadata.ConstraintHelper;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ValidatorContextImpl implements ValidatorContext {
-	private MessageInterpolator messageInterpolator;
-	private TraversableResolver traversableResolver;
-	private ConstraintValidatorFactory constraintValidatorFactory;
-	private final MessageInterpolator factoryMessageInterpolator;
-	private final TraversableResolver factoryTraversableResolver;
-	private final ConstraintValidatorFactory factoryConstraintValidatorFactory;
-	private final ConstraintHelper constraintHelper;
-	private final BeanMetaDataCache beanMetaDataCache;
-
-	public ValidatorContextImpl(ConstraintValidatorFactory constraintValidatorFactory,
-								MessageInterpolator factoryMessageInterpolator,
-								TraversableResolver factoryTraversableResolver,
-								ConstraintHelper constraintHelper,
-								BeanMetaDataCache beanMetaDataCache) {
-		this.factoryConstraintValidatorFactory = constraintValidatorFactory;
-		this.factoryMessageInterpolator = factoryMessageInterpolator;
-		this.factoryTraversableResolver = factoryTraversableResolver;
-		this.constraintHelper = constraintHelper;
-		this.beanMetaDataCache = beanMetaDataCache;
-		messageInterpolator( factoryMessageInterpolator );
-		traversableResolver( factoryTraversableResolver );
-		constraintValidatorFactory( factoryConstraintValidatorFactory );
-	}
-
-	public ValidatorContext messageInterpolator(MessageInterpolator messageInterpolator) {
-		if ( messageInterpolator == null ) {
-			this.messageInterpolator = factoryMessageInterpolator;
-		}
-		else {
-			this.messageInterpolator = messageInterpolator;
-		}
-		return this;
-	}
-
-	public ValidatorContext traversableResolver(TraversableResolver traversableResolver) {
-		if ( traversableResolver == null ) {
-			this.traversableResolver = factoryTraversableResolver;
-		}
-		else {
-			this.traversableResolver = traversableResolver;
-		}
-		return this;
-	}
-
-	public ValidatorContext constraintValidatorFactory(ConstraintValidatorFactory factory) {
-		if ( constraintValidatorFactory == null ) {
-			this.constraintValidatorFactory = factoryConstraintValidatorFactory;
-		}
-		else {
-			this.constraintValidatorFactory = factory;
-		}
-		return this;
-	}
-
-	public Validator getValidator() {
-		return new ValidatorImpl(
-				constraintValidatorFactory,
-				messageInterpolator,
-				traversableResolver,
-				constraintHelper,
-				beanMetaDataCache
-		);
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
deleted file mode 100755
index 2e499e0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
+++ /dev/null
@@ -1,327 +0,0 @@
-// $Id: ValidatorFactoryImpl.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-import javax.validation.ValidatorContext;
-import javax.validation.ValidatorFactory;
-import javax.validation.spi.ConfigurationState;
-
-import org.hibernate.validator.cfg.CascadeDef;
-import org.hibernate.validator.cfg.ConstraintDefWrapper;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.metadata.AnnotationIgnores;
-import org.hibernate.validator.metadata.BeanMetaDataCache;
-import org.hibernate.validator.metadata.BeanMetaDataImpl;
-import org.hibernate.validator.metadata.ConstraintDescriptorImpl;
-import org.hibernate.validator.metadata.ConstraintHelper;
-import org.hibernate.validator.metadata.ConstraintOrigin;
-import org.hibernate.validator.metadata.MetaConstraint;
-import org.hibernate.validator.util.ReflectionHelper;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-import org.hibernate.validator.xml.XmlMappingParser;
-
-/**
- * Factory returning initialized {@code Validator} instances. This is Hibernate Validator's default
- * implementation of the {@code ValidatorFactory} interface.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ValidatorFactoryImpl implements ValidatorFactory {
-
-	private final MessageInterpolator messageInterpolator;
-	private final TraversableResolver traversableResolver;
-	private final ConstraintValidatorFactory constraintValidatorFactory;
-	private final ConstraintHelper constraintHelper;
-
-	/**
-	 * Used to cache the constraint meta data for validated entities
-	 */
-	private final BeanMetaDataCache beanMetaDataCache;
-
-	public ValidatorFactoryImpl(ConfigurationState configurationState) {
-
-		this.messageInterpolator = configurationState.getMessageInterpolator();
-		this.constraintValidatorFactory = configurationState.getConstraintValidatorFactory();
-		this.traversableResolver = configurationState.getTraversableResolver();
-		this.constraintHelper = new ConstraintHelper();
-		this.beanMetaDataCache = new BeanMetaDataCache();
-
-		// HV-302; don't load XmlMappingParser if not necessary
-		if ( !configurationState.getMappingStreams().isEmpty() ) {
-			initXmlConfiguration( configurationState.getMappingStreams() );
-		}
-
-		if ( configurationState instanceof ConfigurationImpl ) {
-			ConfigurationImpl hibernateSpecificConfig = ( ConfigurationImpl ) configurationState;
-			if ( hibernateSpecificConfig.getMapping() != null ) {
-				initProgrammaticConfiguration( hibernateSpecificConfig.getMapping() );
-			}
-		}
-	}
-
-	public Validator getValidator() {
-		return usingContext().getValidator();
-	}
-
-	public MessageInterpolator getMessageInterpolator() {
-		return messageInterpolator;
-	}
-
-	public TraversableResolver getTraversableResolver() {
-		return traversableResolver;
-	}
-
-	public ConstraintValidatorFactory getConstraintValidatorFactory() {
-		return constraintValidatorFactory;
-	}
-
-	public <T> T unwrap(Class<T> type) {
-		throw new ValidationException( "Type " + type + " not supported" );
-	}
-
-	public ValidatorContext usingContext() {
-		return new ValidatorContextImpl(
-				constraintValidatorFactory,
-				messageInterpolator,
-				traversableResolver,
-				constraintHelper,
-				beanMetaDataCache
-		);
-	}
-
-	/**
-	 * Reads the configuration from {@code mapping} and creates the appropriate meta-data structures.
-	 *
-	 * @param mapping The constraint configuration created via the programmatic API.
-	 */
-	private <T> void initProgrammaticConfiguration(ConstraintMapping mapping) {
-		for ( Class<?> clazz : mapping.getConfiguredClasses() ) {
-			@SuppressWarnings("unchecked")
-			Class<T> beanClass = ( Class<T> ) clazz;
-
-			// for each configured entity we have to check whether any of the interfaces or super classes is configured
-			// vua the programmatic api as well
-			List<Class<?>> classes = ReflectionHelper.computeClassHierarchy( beanClass );
-
-			Map<Class<?>, List<MetaConstraint<T, ?>>> constraints = createEmptyConstraintMap();
-			List<Member> cascadedMembers = new ArrayList<Member>();
-
-			for ( Class<?> classInHierarchy : classes ) {
-				// if the programmatic config contains constraints for the class in the hierarchy create a meta constraint
-				if ( mapping.getConstraintConfig().keySet().contains( classInHierarchy ) ) {
-					addProgrammaticConfiguredConstraints(
-							mapping.getConstraintConfig().get( classInHierarchy ),
-							beanClass,
-							classInHierarchy,
-							constraints
-					);
-				}
-
-				if ( mapping.getCascadeConfig().keySet().contains( classInHierarchy ) ) {
-					addProgrammaticConfiguredCascade(
-							mapping.getCascadeConfig().get( classInHierarchy ), cascadedMembers
-					);
-				}
-			}
-
-			BeanMetaDataImpl<T> metaData = new BeanMetaDataImpl<T>(
-					beanClass,
-					constraintHelper,
-					mapping.getDefaultSequence( beanClass ),
-					constraints,
-					cascadedMembers,
-					new AnnotationIgnores(),
-					beanMetaDataCache
-			);
-
-			beanMetaDataCache.addBeanMetaData( beanClass, metaData );
-		}
-	}
-
-	private <T> void initXmlConfiguration(Set<InputStream> mappingStreams) {
-
-		XmlMappingParser mappingParser = new XmlMappingParser( constraintHelper );
-		mappingParser.parse( mappingStreams );
-
-		Set<Class<?>> xmlConfiguredClasses = mappingParser.getXmlConfiguredClasses();
-		AnnotationIgnores annotationIgnores = mappingParser.getAnnotationIgnores();
-		for ( Class<?> clazz : xmlConfiguredClasses ) {
-			@SuppressWarnings("unchecked")
-			Class<T> beanClass = ( Class<T> ) clazz;
-
-			List<Class<?>> classes = ReflectionHelper.computeClassHierarchy( beanClass );
-			Map<Class<?>, List<MetaConstraint<T, ?>>> constraints = createEmptyConstraintMap();
-			List<Member> cascadedMembers = new ArrayList<Member>();
-			// we need to collect all constraints which apply for a single class. Due to constraint inheritance
-			// some constraints might be configured in super classes or interfaces. The xml configuration does not
-			// imply any order so we have to check whether any of the super classes or interfaces of a given bean has
-			// as well been configured via xml
-			for ( Class<?> classInHierarchy : classes ) {
-				if ( xmlConfiguredClasses.contains( classInHierarchy ) ) {
-					addXmlConfiguredConstraints( mappingParser, beanClass, classInHierarchy, constraints );
-					addXmlCascadedMember( mappingParser, classInHierarchy, cascadedMembers );
-				}
-			}
-
-			BeanMetaDataImpl<T> metaData = new BeanMetaDataImpl<T>(
-					beanClass,
-					constraintHelper,
-					mappingParser.getDefaultSequenceForClass( beanClass ),
-					constraints,
-					cascadedMembers,
-					annotationIgnores,
-					beanMetaDataCache
-			);
-
-			beanMetaDataCache.addBeanMetaData( beanClass, metaData );
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private <T, A extends Annotation> void addXmlConfiguredConstraints(XmlMappingParser mappingParser,
-																	   Class<T> rootClass,
-																	   Class<?> hierarchyClass, Map<Class<?>, List<MetaConstraint<T, ?>>> constraints) {
-		for ( MetaConstraint<?, ? extends Annotation> constraint : mappingParser.getConstraintsForClass( hierarchyClass ) ) {
-			ConstraintOrigin definedIn = definedIn( rootClass, hierarchyClass );
-			ConstraintDescriptorImpl<A> descriptor = new ConstraintDescriptorImpl<A>(
-					( A ) constraint.getDescriptor().getAnnotation(),
-					constraintHelper,
-					constraint.getElementType(),
-					definedIn
-			);
-			MetaConstraint<T, A> newMetaConstraint = new MetaConstraint<T, A>(
-					rootClass, constraint.getMember(), descriptor
-			);
-
-			addConstraintToMap( hierarchyClass, newMetaConstraint, constraints );
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private <T, A extends Annotation> void addProgrammaticConfiguredConstraints(List<ConstraintDefWrapper<?>> definitions,
-																				Class<T> rootClass, Class<?> hierarchyClass,
-																				Map<Class<?>, List<MetaConstraint<T, ?>>> constraints) {
-		for ( ConstraintDefWrapper<?> config : definitions ) {
-			A annotation = ( A ) createAnnotationProxy( config );
-			ConstraintOrigin definedIn = definedIn( rootClass, hierarchyClass );
-			ConstraintDescriptorImpl<A> constraintDescriptor = new ConstraintDescriptorImpl<A>(
-					annotation, constraintHelper, config.getElementType(), definedIn
-			);
-
-			Member member = null;
-			if ( !config.getProperty().isEmpty() ) {
-				member = ReflectionHelper.getMember(
-						config.getBeanType(), config.getProperty(), config.getElementType()
-				);
-			}
-
-			MetaConstraint<T, ?> metaConstraint = new MetaConstraint(
-					config.getBeanType(), member, constraintDescriptor
-			);
-			addConstraintToMap( hierarchyClass, metaConstraint, constraints );
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private <T, A extends Annotation> void addConstraintToMap(Class<?> hierarchyClass,
-															  MetaConstraint<T, A> constraint,
-															  Map<Class<?>, List<MetaConstraint<T, ?>>> constraints) {
-		List<MetaConstraint<T, ?>> constraintList = constraints.get( hierarchyClass );
-		if ( constraintList == null ) {
-			constraintList = new ArrayList<MetaConstraint<T, ?>>();
-			constraints.put( hierarchyClass, constraintList );
-		}
-		constraintList.add( constraint );
-	}
-
-	private void addXmlCascadedMember(XmlMappingParser mappingParser,
-									  Class<?> hierarchyClass,
-									  List<Member> cascadedMembers) {
-		for ( Member m : mappingParser.getCascadedMembersForClass( hierarchyClass ) ) {
-			cascadedMembers.add( m );
-		}
-	}
-
-	private void addProgrammaticConfiguredCascade(List<CascadeDef> cascades,
-												  List<Member> cascadedMembers) {
-		if ( cascades == null ) {
-			return;
-		}
-		for ( CascadeDef cascade : cascades ) {
-			Member m = ReflectionHelper.getMember(
-					cascade.getBeanType(), cascade.getProperty(), cascade.getElementType()
-			);
-			cascadedMembers.add( m );
-		}
-	}
-
-	/**
-	 * @param rootClass The root class. That is the class for which we currently create a  {@code BeanMetaData}
-	 * @param hierarchyClass The class on which the current constraint is defined on
-	 *
-	 * @return Returns {@code ConstraintOrigin.DEFINED_LOCALLY} if the constraint was defined on the root bean,
-	 *         {@code ConstraintOrigin.DEFINED_IN_HIERARCHY} otherwise.
-	 */
-	private ConstraintOrigin definedIn(Class<?> rootClass, Class<?> hierarchyClass) {
-		if ( hierarchyClass.equals( rootClass ) ) {
-			return ConstraintOrigin.DEFINED_LOCALLY;
-		}
-		else {
-			return ConstraintOrigin.DEFINED_IN_HIERARCHY;
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private <A extends Annotation> Annotation createAnnotationProxy(ConstraintDefWrapper<?> config) {
-		Class<A> constraintType = ( Class<A> ) config.getConstraintType();
-		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( constraintType );
-		for ( Map.Entry<String, Object> parameter : config.getParameters().entrySet() ) {
-			annotationDescriptor.setValue( parameter.getKey(), parameter.getValue() );
-		}
-
-		A annotation;
-		try {
-			annotation = AnnotationFactory.create( annotationDescriptor );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException(
-					"Unable to create annotation for configured constraint: " + e.getMessage(), e
-			);
-		}
-		return annotation;
-	}
-
-	private <T> Map<Class<?>, List<MetaConstraint<T, ?>>> createEmptyConstraintMap() {
-		return new HashMap<Class<?>, List<MetaConstraint<T, ?>>>();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorImpl.java
deleted file mode 100644
index f8d0af5..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorImpl.java
+++ /dev/null
@@ -1,810 +0,0 @@
-// $Id: ValidatorImpl.java 19380 2010-05-06 10:31:32Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.ConstraintViolation;
-import javax.validation.MessageInterpolator;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-import javax.validation.groups.Default;
-import javax.validation.metadata.BeanDescriptor;
-
-import com.googlecode.jtype.TypeUtils;
-
-import org.hibernate.validator.engine.groups.Group;
-import org.hibernate.validator.engine.groups.GroupChain;
-import org.hibernate.validator.engine.groups.GroupChainGenerator;
-import org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver;
-import org.hibernate.validator.metadata.BeanMetaData;
-import org.hibernate.validator.metadata.BeanMetaDataCache;
-import org.hibernate.validator.metadata.BeanMetaDataImpl;
-import org.hibernate.validator.metadata.ConstraintHelper;
-import org.hibernate.validator.metadata.MetaConstraint;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * The main Bean Validation class. This is the core processing class of Hibernate Validator.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ValidatorImpl implements Validator {
-
-	/**
-	 * The default group array used in case any of the validate methods is called without a group.
-	 */
-	private static final Class<?>[] DEFAULT_GROUP_ARRAY = new Class<?>[] { Default.class };
-
-	/**
-	 * Used to resolve the group execution order for a validate call.
-	 */
-	private final transient GroupChainGenerator groupChainGenerator;
-
-	private final ConstraintValidatorFactory constraintValidatorFactory;
-
-	/**
-	 * {@link MessageInterpolator} as passed to the constructor of this instance.
-	 */
-	private final MessageInterpolator messageInterpolator;
-
-	/**
-	 * {@link TraversableResolver} as passed to the constructor of this instance.
-	 * Never use it directly, always use {@link #getCachingTraversableResolver()} to retrieved the single threaded caching wrapper.
-	 */
-	private final TraversableResolver traversableResolver;
-
-	/**
-	 * Passed at creation time of this validator instance.
-	 */
-	private final ConstraintHelper constraintHelper;
-
-	/**
-	 * Used to get access to the bean meta data. Used to avoid to parsing the constraint configuration for each call
-	 * of a given entity.
-	 */
-	private final BeanMetaDataCache beanMetaDataCache;
-
-	public ValidatorImpl(ConstraintValidatorFactory constraintValidatorFactory, MessageInterpolator messageInterpolator, TraversableResolver traversableResolver, ConstraintHelper constraintHelper, BeanMetaDataCache beanMetaDataCache) {
-		this.constraintValidatorFactory = constraintValidatorFactory;
-		this.messageInterpolator = messageInterpolator;
-		this.traversableResolver = traversableResolver;
-		this.constraintHelper = constraintHelper;
-		this.beanMetaDataCache = beanMetaDataCache;
-
-		groupChainGenerator = new GroupChainGenerator();
-	}
-
-	public final <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
-		if ( object == null ) {
-			throw new IllegalArgumentException( "Validation of a null object" );
-		}
-
-		GroupChain groupChain = determineGroupExecutionOrder( groups );
-
-		ValidationContext<T> context = ValidationContext.getContextForValidate(
-				object, messageInterpolator, constraintValidatorFactory, getCachingTraversableResolver()
-		);
-
-		List<ConstraintViolation<T>> list = validateInContext( object, context, groupChain, null );
-		return new HashSet<ConstraintViolation<T>>( list );
-	}
-
-	public final <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
-		if ( object == null ) {
-			throw new IllegalArgumentException( "Validated object cannot be null." );
-		}
-		sanityCheckPropertyPath( propertyName );
-		GroupChain groupChain = determineGroupExecutionOrder( groups );
-
-		List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
-		validateProperty(
-				object, PathImpl.createPathFromString( propertyName ), failingConstraintViolations, groupChain
-		);
-		return new HashSet<ConstraintViolation<T>>( failingConstraintViolations );
-	}
-
-	public final <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
-		if ( beanType == null ) {
-			throw new IllegalArgumentException( "The bean type cannot be null." );
-		}
-
-		sanityCheckPropertyPath( propertyName );
-		GroupChain groupChain = determineGroupExecutionOrder( groups );
-
-		List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
-		validateValue(
-				beanType, value, PathImpl.createPathFromString( propertyName ), failingConstraintViolations, groupChain
-		);
-		return new HashSet<ConstraintViolation<T>>( failingConstraintViolations );
-	}
-
-	public final BeanDescriptor getConstraintsForClass(Class<?> clazz) {
-		return getBeanMetaData( clazz ).getBeanDescriptor();
-	}
-
-	public final <T> T unwrap(Class<T> type) {
-		throw new ValidationException( "Type " + type + " not supported" );
-	}
-
-	private void sanityCheckPropertyPath(String propertyName) {
-		if ( propertyName == null || propertyName.length() == 0 ) {
-			throw new IllegalArgumentException( "Invalid property path." );
-		}
-	}
-
-	private GroupChain determineGroupExecutionOrder(Class<?>[] groups) {
-		if ( groups == null ) {
-			throw new IllegalArgumentException( "null passed as group name" );
-		}
-
-		// if no groups is specified use the default
-		if ( groups.length == 0 ) {
-			groups = DEFAULT_GROUP_ARRAY;
-		}
-
-		return groupChainGenerator.getGroupChainFor( Arrays.asList( groups ) );
-	}
-
-	/**
-	 * Validates the given object using the available context information.
-	 *
-	 * @param value The value to validate.
-	 * @param context the validation context.
-	 * @param groupChain Contains the information which and in which order groups have to be executed
-	 * @param path The current path of the validation.
-	 * @param <T> The root bean type.
-	 * @param <V> The type of the current object on the validation stack.
-	 *
-	 * @return List of constraint violations or the empty set if there were no violations.
-	 */
-	private <T, U, V> List<ConstraintViolation<T>> validateInContext(U value, ValidationContext<T> context, GroupChain groupChain, PathImpl path) {
-		if ( value == null ) {
-			return Collections.emptyList();
-		}
-
-		path = PathImpl.createShallowCopy( path );
-		ValueContext<U, V> valueContext = ValueContext.getLocalExecutionContext( value );
-
-		BeanMetaData<U> beanMetaData = getBeanMetaData( valueContext.getCurrentBeanType() );
-		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
-			groupChain.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence() );
-		}
-
-		// process first single groups. For these we can optimise object traversal by first running all validations on the current bean
-		// before traversing the object.
-		Iterator<Group> groupIterator = groupChain.getGroupIterator();
-		while ( groupIterator.hasNext() ) {
-			Group group = groupIterator.next();
-			valueContext.setCurrentGroup( group.getGroup() );
-			validateConstraintsForCurrentGroup( context, valueContext, path );
-		}
-		groupIterator = groupChain.getGroupIterator();
-		while ( groupIterator.hasNext() ) {
-			Group group = groupIterator.next();
-			valueContext.setCurrentGroup( group.getGroup() );
-			validateCascadedConstraints( context, valueContext, path );
-		}
-
-		// now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
-		Iterator<List<Group>> sequenceIterator = groupChain.getSequenceIterator();
-		while ( sequenceIterator.hasNext() ) {
-			List<Group> sequence = sequenceIterator.next();
-			for ( Group group : sequence ) {
-				int numberOfViolations = context.getFailingConstraints().size();
-				valueContext.setCurrentGroup( group.getGroup() );
-
-				validateConstraintsForCurrentGroup( context, valueContext, path );
-				validateCascadedConstraints( context, valueContext, path );
-
-				if ( context.getFailingConstraints().size() > numberOfViolations ) {
-					break;
-				}
-			}
-		}
-		return context.getFailingConstraints();
-	}
-
-	private <T, U, V> void validateConstraintsForCurrentGroup(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, PathImpl path) {
-		BeanMetaData<U> beanMetaData = getBeanMetaData( valueContext.getCurrentBeanType() );
-		boolean validatingDefault = valueContext.validatingDefault();
-		boolean validatedBeanRedefinesDefault = beanMetaData.defaultGroupSequenceIsRedefined();
-
-		// if we are not validating the default group there is nothing special to consider
-		if ( !validatingDefault ) {
-			validateConstraintsForNonDefaultGroup( validationContext, valueContext, path );
-			return;
-		}
-
-		// if we are validating the default group we have to distinguish between the case where the main entity type redefines the default group and where not
-		if ( validatedBeanRedefinesDefault ) {
-			validateConstraintsForRedefinedDefaultGroupOnMainEntity(
-					validationContext, valueContext, path, beanMetaData
-			);
-		}
-		else {
-			validateConstraintsForRedefinedDefaultGroup(
-					validationContext, valueContext, path, beanMetaData
-			);
-		}
-	}
-
-	private <T, U, V> void validateConstraintsForRedefinedDefaultGroup(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, PathImpl path, BeanMetaData<U> beanMetaData) {
-		for ( Map.Entry<Class<?>, List<MetaConstraint<U, ? extends Annotation>>> entry : beanMetaData.getMetaConstraintsAsMap()
-				.entrySet() ) {
-			Class<?> hostingBeanClass = entry.getKey();
-			List<MetaConstraint<U, ? extends Annotation>> constraints = entry.getValue();
-
-			List<Class<?>> defaultGroupSequence = getBeanMetaData( hostingBeanClass ).getDefaultGroupSequence();
-			for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
-				valueContext.setCurrentGroup( defaultSequenceMember );
-				boolean validationSuccessful = true;
-				for ( MetaConstraint<U, ? extends Annotation> metaConstraint : constraints ) {
-					boolean tmp = validateConstraint(
-							validationContext, valueContext, metaConstraint, path
-					);
-					validationSuccessful = validationSuccessful && tmp;
-				}
-				if ( !validationSuccessful ) {
-					break;
-				}
-			}
-		}
-	}
-
-	private <T, U, V> void validateConstraintsForRedefinedDefaultGroupOnMainEntity(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, PathImpl path, BeanMetaData<U> beanMetaData) {
-		List<Class<?>> defaultGroupSequence = beanMetaData.getDefaultGroupSequence();
-		for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
-			valueContext.setCurrentGroup( defaultSequenceMember );
-			boolean validationSuccessful = true;
-			for ( MetaConstraint<U, ? extends Annotation> metaConstraint : beanMetaData.getMetaConstraintsAsList() ) {
-				boolean tmp = validateConstraint(
-						validationContext, valueContext, metaConstraint, path
-				);
-				validationSuccessful = validationSuccessful && tmp;
-			}
-			if ( !validationSuccessful ) {
-				break;
-			}
-		}
-	}
-
-	private <T, U, V> void validateConstraintsForNonDefaultGroup(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, PathImpl path) {
-		BeanMetaData<U> beanMetaData = getBeanMetaData( valueContext.getCurrentBeanType() );
-		for ( MetaConstraint<U, ? extends Annotation> metaConstraint : beanMetaData.getMetaConstraintsAsList() ) {
-			validateConstraint( validationContext, valueContext, metaConstraint, path );
-		}
-	}
-
-	private <T, U, V> boolean validateConstraint(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, MetaConstraint<U, ?> metaConstraint, PathImpl path) {
-		boolean validationSuccessful = true;
-		PathImpl newPath;
-
-		if ( path == null ) {
-			newPath = PathImpl.createNewPath( metaConstraint.getPropertyName() );
-		}
-		else {
-			newPath = PathImpl.createShallowCopy( path );
-			if ( metaConstraint.getElementType() != ElementType.TYPE ) {
-				newPath.addNode( new NodeImpl( metaConstraint.getPropertyName() ) );
-			}
-		}
-
-		valueContext.setPropertyPath( newPath );
-		if ( isValidationRequired( validationContext, valueContext, metaConstraint ) ) {
-			Object valueToValidate = metaConstraint.getValue( valueContext.getCurrentBean() );
-			valueContext.setCurrentValidatedValue( ( V ) valueToValidate );
-			validationSuccessful = metaConstraint.validateConstraint( validationContext, valueContext );
-		}
-		validationContext.markProcessed(
-				valueContext.getCurrentBean(),
-				valueContext.getCurrentGroup(),
-				valueContext.getPropertyPath()
-		);
-
-		return validationSuccessful;
-	}
-
-	/**
-	 * Validates all cascaded constraints for the given bean using the current group set in the execution context.
-	 * This method must always be called after validateConstraints for the same context.
-	 *
-	 * @param validationContext The execution context
-	 * @param valueContext Collected information for single validation
-	 * @param path The current path of the validation.
-	 */
-	private <T, U, V> void validateCascadedConstraints(ValidationContext<T> validationContext, ValueContext<U, V> valueContext, PathImpl path) {
-		List<Member> cascadedMembers = getBeanMetaData( valueContext.getCurrentBeanType() )
-				.getCascadedMembers();
-		for ( Member member : cascadedMembers ) {
-			Type type = ReflectionHelper.typeOf( member );
-			PathImpl newPath;
-			if ( path == null ) {
-				newPath = PathImpl.createNewPath( ReflectionHelper.getPropertyName( member ) );
-			}
-			else {
-				newPath = PathImpl.createShallowCopy( path );
-				newPath.addNode( new NodeImpl( ReflectionHelper.getPropertyName( member ) ) );
-			}
-			valueContext.setPropertyPath( newPath );
-			if ( isCascadeRequired( validationContext, valueContext, member ) ) {
-				Object value = ReflectionHelper.getValue( member, valueContext.getCurrentBean() );
-				if ( value != null ) {
-					Iterator<?> iter = createIteratorForCascadedValue( valueContext, type, value );
-					boolean isIndexable = isIndexable( type );
-					validateCascadedConstraint(
-							validationContext,
-							iter,
-							isIndexable,
-							valueContext.getCurrentGroup(),
-							valueContext.getPropertyPath()
-					);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Called when processing cascaded constraints. This methods inspects the type of the cascaded constraints and in case
-	 * of a list or array creates an iterator in order to validate each element.
-	 *
-	 * @param context the validation context.
-	 * @param type the type of the cascaded field or property.
-	 * @param value the actual value.
-	 *
-	 * @return An iterator over the value of a cascaded property.
-	 */
-	private <U, V> Iterator<?> createIteratorForCascadedValue(ValueContext<U, V> context, Type type, Object value) {
-		Iterator<?> iter;
-		if ( ReflectionHelper.isIterable( type ) ) {
-			iter = ( ( Iterable<?> ) value ).iterator();
-			context.markCurrentPropertyAsIterable();
-		}
-		else if ( ReflectionHelper.isMap( type ) ) {
-			Map<?, ?> map = ( Map<?, ?> ) value;
-			iter = map.entrySet().iterator();
-			context.markCurrentPropertyAsIterable();
-		}
-		else if ( TypeUtils.isArray( type ) ) {
-			List<?> arrayList = Arrays.asList( ( Object[] ) value );
-			iter = arrayList.iterator();
-			context.markCurrentPropertyAsIterable();
-		}
-		else {
-			List<Object> list = new ArrayList<Object>();
-			list.add( value );
-			iter = list.iterator();
-		}
-		return iter;
-	}
-
-	/**
-	 * Called when processing cascaded constraints. This methods inspects the type of the cascaded constraints and in case
-	 * of a list or array creates an iterator in order to validate each element.
-	 *
-	 * @param type the type of the cascaded field or property.
-	 *
-	 * @return An iterator over the value of a cascaded property.
-	 */
-	private boolean isIndexable(Type type) {
-		boolean isIndexable = false;
-		if ( ReflectionHelper.isList( type ) ) {
-			isIndexable = true;
-		}
-		else if ( ReflectionHelper.isMap( type ) ) {
-			isIndexable = true;
-		}
-		else if ( TypeUtils.isArray( type ) ) {
-			isIndexable = true;
-		}
-		return isIndexable;
-	}
-
-	@SuppressWarnings("RedundantArrayCreation")
-	private <T> void validateCascadedConstraint(ValidationContext<T> context, Iterator<?> iter, boolean isIndexable, Class<?> currentGroup, PathImpl currentPath) {
-		Object value;
-		Integer index;
-		Object mapKey;
-		int i = 0;
-		while ( iter.hasNext() ) {
-			value = iter.next();
-			index = i;
-			if ( value instanceof Map.Entry ) {
-				mapKey = ( ( Map.Entry ) value ).getKey();
-				value = ( ( Map.Entry ) value ).getValue();
-				currentPath.getLeafNode().setKey( mapKey );
-			}
-			else if ( isIndexable ) {
-				currentPath.getLeafNode().setIndex( index );
-			}
-
-			if ( !context.isAlreadyValidated( value, currentGroup, currentPath ) ) {
-				GroupChain groupChain = groupChainGenerator.getGroupChainFor(
-						Arrays.asList(
-								new Class<?>[] {
-										currentGroup
-								}
-						)
-				);
-				validateInContext( value, context, groupChain, currentPath );
-			}
-			i++;
-		}
-	}
-
-	private <T> void validateProperty(T object, PathImpl propertyPath, List<ConstraintViolation<T>> failingConstraintViolations, GroupChain groupChain) {
-
-		@SuppressWarnings("unchecked")
-		final Class<T> beanType = ( Class<T> ) object.getClass();
-
-		Set<MetaConstraint<T, ?>> metaConstraints = new HashSet<MetaConstraint<T, ?>>();
-		Object hostingBeanInstance = collectMetaConstraintsForPath(
-				beanType, object, propertyPath.iterator(), metaConstraints
-		);
-
-		if ( hostingBeanInstance == null ) {
-			throw new IllegalArgumentException( "Invalid property path." );
-		}
-
-		if ( metaConstraints.size() == 0 ) {
-			return;
-		}
-
-		//this method is at the root of validateProperty calls, share the same cachedTR
-		TraversableResolver cachedResolver = getCachingTraversableResolver();
-
-		Iterator<Group> groupIterator = groupChain.getGroupIterator();
-		while ( groupIterator.hasNext() ) {
-			Group group = groupIterator.next();
-			validatePropertyForGroup(
-					object,
-					propertyPath,
-					failingConstraintViolations,
-					metaConstraints,
-					hostingBeanInstance,
-					group,
-					cachedResolver
-			);
-		}
-
-		Iterator<List<Group>> sequenceIterator = groupChain.getSequenceIterator();
-		while ( sequenceIterator.hasNext() ) {
-			List<Group> sequence = sequenceIterator.next();
-			int numberOfConstraintViolationsBefore = failingConstraintViolations.size();
-			for ( Group group : sequence ) {
-				validatePropertyForGroup(
-						object,
-						propertyPath,
-						failingConstraintViolations,
-						metaConstraints,
-						hostingBeanInstance,
-						group,
-						cachedResolver
-				);
-
-				if ( failingConstraintViolations.size() > numberOfConstraintViolationsBefore ) {
-					break;
-				}
-			}
-		}
-	}
-
-	private <T, U, V> void validatePropertyForGroup(
-			T object,
-			PathImpl path,
-			List<ConstraintViolation<T>> failingConstraintViolations,
-			Set<MetaConstraint<T, ?>> metaConstraints,
-			U hostingBeanInstance,
-			Group group,
-			TraversableResolver cachedTraversableResolver) {
-		int numberOfConstraintViolationsBefore = failingConstraintViolations.size();
-		BeanMetaData<T> beanMetaData = getBeanMetaData( metaConstraints.iterator().next().getBeanClass() );
-
-		List<Class<?>> groupList;
-		if ( group.isDefaultGroup() ) {
-			groupList = beanMetaData.getDefaultGroupSequence();
-		}
-		else {
-			groupList = new ArrayList<Class<?>>();
-			groupList.add( group.getGroup() );
-		}
-
-		for ( Class<?> groupClass : groupList ) {
-			for ( MetaConstraint<T, ?> metaConstraint : metaConstraints ) {
-				ValidationContext<T> context = ValidationContext.getContextForValidateProperty(
-						object,
-						messageInterpolator,
-						constraintValidatorFactory,
-						cachedTraversableResolver
-				);
-				ValueContext<U, V> valueContext = ValueContext.getLocalExecutionContext(
-						hostingBeanInstance
-				);
-				valueContext.setPropertyPath( path );
-				valueContext.setCurrentGroup( groupClass );
-				if ( isValidationRequired( context, valueContext, metaConstraint ) ) {
-					Object valueToValidate = metaConstraint.getValue( valueContext.getCurrentBean() );
-					valueContext.setCurrentValidatedValue( ( V ) valueToValidate );
-					metaConstraint.validateConstraint( context, valueContext );
-					failingConstraintViolations.addAll( context.getFailingConstraints() );
-				}
-			}
-			if ( failingConstraintViolations.size() > numberOfConstraintViolationsBefore ) {
-				break;
-			}
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private <T> void validateValue(Class<T> beanType, Object value, PathImpl propertyPath, List<ConstraintViolation<T>> failingConstraintViolations, GroupChain groupChain) {
-		Set<MetaConstraint<T, ?>> metaConstraints = new HashSet<MetaConstraint<T, ?>>();
-		collectMetaConstraintsForPath( beanType, null, propertyPath.iterator(), metaConstraints );
-
-		if ( metaConstraints.size() == 0 ) {
-			return;
-		}
-
-		//root of validateValue calls, share the same cached TraversableResolver
-		TraversableResolver cachedTraversableResolver = getCachingTraversableResolver();
-
-		// process groups
-		Iterator<Group> groupIterator = groupChain.getGroupIterator();
-		while ( groupIterator.hasNext() ) {
-			Group group = groupIterator.next();
-			validateValueForGroup(
-					beanType,
-					value,
-					propertyPath,
-					failingConstraintViolations,
-					metaConstraints,
-					group,
-					cachedTraversableResolver
-			);
-		}
-
-		// process sequences
-		Iterator<List<Group>> sequenceIterator = groupChain.getSequenceIterator();
-		while ( sequenceIterator.hasNext() ) {
-			List<Group> sequence = sequenceIterator.next();
-			int numberOfConstraintViolations = failingConstraintViolations.size();
-			for ( Group group : sequence ) {
-				validateValueForGroup(
-						beanType,
-						value,
-						propertyPath,
-						failingConstraintViolations,
-						metaConstraints,
-						group,
-						cachedTraversableResolver
-				);
-
-				if ( failingConstraintViolations.size() > numberOfConstraintViolations ) {
-					break;
-				}
-			}
-		}
-	}
-
-	private <U, V> void validateValueForGroup(
-			Class<U> beanType,
-			V value,
-			PathImpl path,
-			List<ConstraintViolation<U>> failingConstraintViolations,
-			Set<MetaConstraint<U, ?>> metaConstraints,
-			Group group,
-			TraversableResolver cachedTraversableResolver) {
-		int numberOfConstraintViolations = failingConstraintViolations.size();
-		BeanMetaData<U> beanMetaData = getBeanMetaData( metaConstraints.iterator().next().getBeanClass() );
-
-		List<Class<?>> groupList;
-		if ( group.isDefaultGroup() ) {
-			groupList = beanMetaData.getDefaultGroupSequence();
-		}
-		else {
-			groupList = new ArrayList<Class<?>>();
-			groupList.add( group.getGroup() );
-		}
-
-		for ( Class<?> groupClass : groupList ) {
-			for ( MetaConstraint<U, ?> metaConstraint : metaConstraints ) {
-				ValidationContext<U> context = ValidationContext.getContextForValidateValue(
-						beanType, messageInterpolator, constraintValidatorFactory, cachedTraversableResolver
-				);
-				ValueContext<U, V> valueContext = ValueContext.getLocalExecutionContext( beanType );
-				valueContext.setPropertyPath( path );
-				valueContext.setCurrentGroup( groupClass );
-				valueContext.setCurrentValidatedValue( value );
-				if ( isValidationRequired( context, valueContext, metaConstraint ) ) {
-					metaConstraint.validateConstraint( context, valueContext );
-					failingConstraintViolations.addAll( context.getFailingConstraints() );
-				}
-			}
-			if ( failingConstraintViolations.size() > numberOfConstraintViolations ) {
-				break;
-			}
-		}
-	}
-
-	/**
-	 * Collects all <code>MetaConstraint</code>s which match the given path relative to the specified root class.
-	 * <p>
-	 * This method is called recursively.
-	 * </p>
-	 *
-	 * @param clazz the class type to check for constraints.
-	 * @param value While resolving the property path this instance points to the current object. Might be <code>null</code>.
-	 * @param propertyIter an instance of <code>PropertyIterator</code> in order to iterate the items of the original property path.
-	 * @param metaConstraints Set of <code>MetaConstraint</code>s to collect all matching constraints.
-	 *
-	 * @return Returns the bean hosting the constraints which match the specified property path.
-	 */
-	private <T> Object collectMetaConstraintsForPath(Class<T> clazz, Object value, Iterator<Path.Node> propertyIter, Set<MetaConstraint<T, ?>> metaConstraints) {
-		Path.Node elem = propertyIter.next();
-
-		final BeanMetaData<T> metaData = getBeanMetaData( clazz );
-		//use precomputed method list as ReflectionHelper#containsMember is slow
-		if ( !metaData.isPropertyPresent( elem.getName() ) ) {
-			throw new IllegalArgumentException(
-					"Invalid property path. There is no property " + elem.getName() + " in entity " + metaData.getBeanClass()
-							.getName()
-			);
-		}
-
-		if ( !propertyIter.hasNext() ) {
-			List<MetaConstraint<T, ? extends Annotation>> metaConstraintList = metaData.getMetaConstraintsAsList();
-			for ( MetaConstraint<T, ?> metaConstraint : metaConstraintList ) {
-				if ( elem.getName() != null && elem.getName().equals( metaConstraint.getPropertyName() ) ) {
-					metaConstraints.add( metaConstraint );
-				}
-			}
-		}
-		else {
-			List<Member> cascadedMembers = metaData.getCascadedMembers();
-			for ( Member m : cascadedMembers ) {
-				if ( ReflectionHelper.getPropertyName( m ).equals( elem.getName() ) ) {
-					Type type = ReflectionHelper.typeOf( m );
-					value = value == null ? null : ReflectionHelper.getValue( m, value );
-					if ( elem.isInIterable() ) {
-						if ( value != null && elem.getIndex() != null ) {
-							value = ReflectionHelper.getIndexedValue( value, elem.getIndex() );
-						}
-						else if ( value != null && elem.getKey() != null ) {
-							value = ReflectionHelper.getMappedValue( value, elem.getKey() );
-						}
-						else if ( value != null ) {
-							throw new IllegalArgumentException( "Property path must provide index or map key" );
-						}
-						type = ReflectionHelper.getIndexedType( type );
-					}
-
-					@SuppressWarnings("unchecked")
-					Class<T> valueClass = ( Class<T> ) ( value == null ? type : value.getClass() );
-
-					return collectMetaConstraintsForPath(
-							valueClass,
-							value,
-							propertyIter,
-							metaConstraints
-					);
-				}
-			}
-		}
-		return value;
-	}
-
-	private <U> BeanMetaData<U> getBeanMetaData(Class<U> beanClass) {
-		BeanMetaDataImpl<U> beanMetaData = beanMetaDataCache.getBeanMetaData( beanClass );
-		if ( beanMetaData == null ) {
-			beanMetaData = new BeanMetaDataImpl<U>( beanClass, constraintHelper, beanMetaDataCache );
-			beanMetaDataCache.addBeanMetaData( beanClass, beanMetaData );
-		}
-		return beanMetaData;
-	}
-
-	/**
-	 * Must be called and stored for the duration of the stack call
-	 * A new instance is returned each time
-	 *
-	 * @return The resolver for the duration of a full validation.
-	 */
-	private TraversableResolver getCachingTraversableResolver() {
-		return new SingleThreadCachedTraversableResolver( traversableResolver );
-	}
-
-	private boolean isValidationRequired(ValidationContext validationContext, ValueContext valueContext, MetaConstraint metaConstraint) {
-		if ( !metaConstraint.getGroupList().contains( valueContext.getCurrentGroup() ) ) {
-			return false;
-		}
-
-		boolean isReachable;
-
-		Path pathToObject = valueContext.getPropertyPath().getPathWithoutLeafNode();
-		if ( pathToObject == null ) {
-			pathToObject = PathImpl.createNewPath( null );
-		}
-
-		try {
-			isReachable = validationContext.getTraversableResolver().isReachable(
-					valueContext.getCurrentBean(),
-					valueContext.getPropertyPath().getLeafNode(),
-					validationContext.getRootBeanClass(),
-					pathToObject,
-					metaConstraint.getElementType()
-			);
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Call to TraversableResolver.isReachable() threw an exception", e );
-		}
-
-		return isReachable;
-	}
-
-	private boolean isCascadeRequired(ValidationContext validationContext, ValueContext valueContext, Member member) {
-		final ElementType type = member instanceof Field ? ElementType.FIELD : ElementType.METHOD;
-		boolean isReachable;
-		boolean isCascadable;
-
-		Path pathToObject = valueContext.getPropertyPath().getPathWithoutLeafNode();
-		if ( pathToObject == null ) {
-			pathToObject = PathImpl.createNewPath( null );
-		}
-
-		try {
-			isReachable = validationContext.getTraversableResolver().isReachable(
-					valueContext.getCurrentBean(),
-					valueContext.getPropertyPath().getLeafNode(),
-					validationContext.getRootBeanClass(),
-					pathToObject,
-					type
-			);
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Call to TraversableResolver.isReachable() threw an exception", e );
-		}
-
-		try {
-			isCascadable = validationContext.getTraversableResolver().isCascadable(
-					valueContext.getCurrentBean(),
-					valueContext.getPropertyPath().getLeafNode(),
-					validationContext.getRootBeanClass(),
-					pathToObject,
-					type
-			);
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Call to TraversableResolver.isCascadable() threw an exception", e );
-		}
-
-		return isReachable && isCascadable;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValueContext.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValueContext.java
deleted file mode 100644
index 46a54b9..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValueContext.java
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id: ValueContext.java 19313 2010-04-28 11:05:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine;
-
-import java.lang.annotation.ElementType;
-import javax.validation.groups.Default;
-
-/**
- * An instance of this class is used to collect all the relevant information for validating a single entity/bean.
- *
- * @author Hardy Ferentschik
- */
-public class ValueContext<T, V> {
-
-	/**
-	 * The current bean which gets validated. This is the bean hosting the constraints which get validated.
-	 */
-	private final T currentBean;
-
-	/**
-	 * The class of the current bean.
-	 */
-	private final Class<T> currentBeanType;
-
-	/**
-	 * The current property path we are validating.
-	 */
-	private PathImpl propertyPath;
-
-	/**
-	 * The current group we are validating.
-	 */
-	private Class<?> currentGroup;
-
-	/**
-	 * The value which gets currently evaluated.
-	 */
-	private V currentValue;
-
-	/**
-	 * The {@code ElementType} the constraint was defined on
-	 */
-	private ElementType elementType;
-
-	public static <T, V> ValueContext<T, V> getLocalExecutionContext(T value) {
-		@SuppressWarnings("unchecked")
-		Class<T> rootBeanClass = ( Class<T> ) value.getClass();
-		return new ValueContext<T, V>( value, rootBeanClass );
-	}
-
-	public static <T, V> ValueContext<T, V> getLocalExecutionContext(Class<T> type) {
-		return new ValueContext<T, V>( null, type );
-	}
-
-	public ValueContext(T currentBean, Class<T> currentBeanType) {
-		this.currentBean = currentBean;
-		this.currentBeanType = currentBeanType;
-	}
-
-	public PathImpl getPropertyPath() {
-		return propertyPath;
-	}
-
-	public Class<?> getCurrentGroup() {
-		return currentGroup;
-	}
-
-	public T getCurrentBean() {
-		return currentBean;
-	}
-
-	public Class<T> getCurrentBeanType() {
-		return currentBeanType;
-	}
-
-	public V getCurrentValidatedValue() {
-		return currentValue;
-	}
-
-	public void setPropertyPath(PathImpl propertyPath) {
-		this.propertyPath = propertyPath;
-	}
-
-	public void setCurrentGroup(Class<?> currentGroup) {
-		this.currentGroup = currentGroup;
-	}
-
-	public void setCurrentValidatedValue(V currentValue) {
-		this.currentValue = currentValue;
-	}
-
-	public void markCurrentPropertyAsIterable() {
-		propertyPath.getLeafNode().setInIterable( true );
-	}
-
-	public boolean validatingDefault() {
-		return getCurrentGroup() != null && getCurrentGroup().getName().equals( Default.class.getName() );
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public void setElementType(ElementType elementType) {
-		this.elementType = elementType;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ValueContext" );
-		sb.append( "{currentBean=" ).append( currentBean );
-		sb.append( ", currentBeanType=" ).append( currentBeanType );
-		sb.append( ", propertyPath=" ).append( propertyPath );
-		sb.append( ", currentGroup=" ).append( currentGroup );
-		sb.append( ", currentValue=" ).append( currentValue );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/Group.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/Group.java
deleted file mode 100644
index 2d8b36b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/Group.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id: Group.java 19019 2010-03-18 16:36:03Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.groups;
-
-import javax.validation.groups.Default;
-
-/**
- * Encapsulates a single group.
- *
- * @author Hardy Ferentschik
- */
-public class Group {
-	/**
-	 * The actual group.
-	 */
-	private Class<?> group;
-
-	/**
-	 * The sequence the group is part of ({@code null}, if this group is not part of a sequence).
-	 */
-	private Class<?> sequence;
-
-	public Group(Class<?> group) {
-		this( group, null );
-	}
-
-	public Group(Class<?> group, Class<?> sequence) {
-		this.group = group;
-		this.sequence = sequence;
-	}
-
-	public Class<?> getGroup() {
-		return group;
-	}
-
-	public Class<?> getSequence() {
-		return sequence;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if ( this == o ) {
-			return true;
-		}
-		if ( o == null || getClass() != o.getClass() ) {
-			return false;
-		}
-
-		Group group1 = ( Group ) o;
-
-		if ( group != null ? !group.equals( group1.group ) : group1.group != null ) {
-			return false;
-		}
-		return true;
-	}
-
-	public boolean isDefaultGroup() {
-		return getGroup().getName().equals( Default.class.getName() );
-	}
-
-	@Override
-	public int hashCode() {
-		return group != null ? group.hashCode() : 0;
-	}
-
-	@Override
-	public String toString() {
-		return "Group{" + "group=" + group.getName() + '}';
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChain.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChain.java
deleted file mode 100644
index 43ac599..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChain.java
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id: GroupChain.java 19610 2010-05-26 09:43:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.groups;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.validation.GroupDefinitionException;
-import javax.validation.groups.Default;
-
-/**
- * An instance of {@code GroupChain} defines the group order during one full validation call.
- *
- * @author Hardy Ferentschik
- */
-public final class GroupChain {
-
-	/**
-	 * The list of single groups to be used this validation.
-	 */
-	private List<Group> groupList = new ArrayList<Group>();
-
-	/**
-	 * The different sequences for this validation. The map contains the list of groups mapped to their sequence
-	 * name.
-	 */
-	private Map<Class<?>, List<Group>> sequenceMap = new HashMap<Class<?>, List<Group>>();
-
-	public Iterator<Group> getGroupIterator() {
-		return groupList.iterator();
-	}
-
-	public Iterator<List<Group>> getSequenceIterator() {
-		return sequenceMap.values().iterator();
-	}
-
-	public void insertGroup(Group group) {
-		if ( !groupList.contains( group ) ) {
-			groupList.add( group );
-		}
-	}
-
-	public void insertSequence(List<Group> groups) {
-		if ( groups == null || groups.size() == 0 ) {
-			return;
-		}
-
-		if ( !sequenceMap.containsValue( groups ) ) {
-			sequenceMap.put( groups.get( 0 ).getSequence(), groups );
-		}
-	}
-
-	@Override
-	public String toString() {
-		return "GroupChain{" +
-				"groupList=" + groupList +
-				", sequenceMap=" + sequenceMap +
-				'}';
-	}
-
-	public void assertDefaultGroupSequenceIsExpandable(List<Class<?>> defaultGroupSequence) {
-		for ( Map.Entry<Class<?>, List<Group>> entry : sequenceMap.entrySet() ) {
-			Class<?> sequence = entry.getKey();
-			List<Group> groups = entry.getValue();
-			List<Group> defaultGroupList = buildTempGroupList( defaultGroupSequence, sequence );
-			int defaultGroupIndex = containsDefaultGroupAtIndex( sequence, groups );
-			if ( defaultGroupIndex != -1 ) {
-				ensureDefaultGroupSequenceIsExpandable( groups, defaultGroupList, defaultGroupIndex );
-			}
-		}
-	}
-
-	private void ensureDefaultGroupSequenceIsExpandable(List<Group> groupList, List<Group> defaultGroupList, int defaultGroupIndex) {
-		for ( int i = 0; i < defaultGroupList.size(); i++ ) {
-			Group group = defaultGroupList.get( i );
-			if ( group.getGroup().equals( Default.class ) ) {
-				continue; // we don't have to consider the default group since it is the one we want to replace
-			}
-			int index = groupList.indexOf( group ); // check whether the sequence contains group of the default group sequence
-			if ( index == -1 ) {
-				continue; // if the group is not in the sequence we can continue
-			}
-
-			if ( ( i == 0 && index == defaultGroupIndex - 1 ) || ( i == defaultGroupList.size() - 1 && index == defaultGroupIndex + 1 ) ) {
-				// if we are at the beginning or end of he defaultGroupSequence and the matches are either directly before resp after we can continue as well,
-				// since we basically have two groups
-				continue;
-			}
-			throw new GroupDefinitionException( "Unable to expand default group list" + defaultGroupList + " into sequence " + groupList );
-		}
-	}
-
-	private int containsDefaultGroupAtIndex(Class<?> sequence, List<Group> groupList) {
-		Group defaultGroup = new Group( Default.class, sequence );
-		return groupList.indexOf( defaultGroup );
-	}
-
-	private List<Group> buildTempGroupList(List<Class<?>> defaultGroupSequence, Class<?> sequence) {
-		List<Group> groups = new ArrayList<Group>();
-		for ( Class<?> clazz : defaultGroupSequence ) {
-			Group g = new Group( clazz, sequence );
-			groups.add( g );
-		}
-		return groups;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChainGenerator.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChainGenerator.java
deleted file mode 100644
index c736062..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/GroupChainGenerator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-// $Id: GroupChainGenerator.java 19019 2010-03-18 16:36:03Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.groups;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.validation.GroupDefinitionException;
-import javax.validation.GroupSequence;
-import javax.validation.ValidationException;
-
-/**
- * Helper class used to resolve groups and sequences into a single chain of groups which can then be validated.
- *
- * @author Hardy Ferentschik
- */
-public class GroupChainGenerator {
-
-	private final Map<Class<?>, List<Group>> resolvedSequences = new HashMap<Class<?>, List<Group>>();
-
-	/**
-	 * Generates a chain of groups to be validated given the specified validation groups.
-	 *
-	 * @param groups The groups specified at the validation call.
-	 *
-	 * @return an instance of {@code GroupChain} defining the order in which validation has to occur.
-	 */
-	public GroupChain getGroupChainFor(Collection<Class<?>> groups) {
-		if ( groups == null || groups.size() == 0 ) {
-			throw new IllegalArgumentException( "At least one groups has to be specified." );
-		}
-
-		for ( Class<?> clazz : groups ) {
-			if ( !clazz.isInterface() ) {
-				throw new ValidationException( "A group has to be an interface. " + clazz.getName() + " is not." );
-			}
-		}
-
-		GroupChain chain = new GroupChain();
-		for ( Class<?> clazz : groups ) {
-			if ( isGroupSequence( clazz ) ) {
-				insertSequence( clazz, chain );
-			}
-			else {
-				Group group = new Group( clazz );
-				chain.insertGroup( group );
-				insertInheritedGroups( clazz, chain );
-			}
-		}
-
-		return chain;
-	}
-
-	private boolean isGroupSequence(Class<?> clazz) {
-		return clazz.getAnnotation( GroupSequence.class ) != null;
-	}
-
-	/**
-	 * Recursively add inherited groups into the group chain.
-	 *
-	 * @param clazz The group interface
-	 * @param chain The group chain we are currently building.
-	 */
-	private void insertInheritedGroups(Class<?> clazz, GroupChain chain) {
-		for ( Class<?> inheritedGroup : clazz.getInterfaces() ) {
-			Group group = new Group( inheritedGroup );
-			chain.insertGroup( group );
-			insertInheritedGroups( inheritedGroup, chain );
-		}
-	}
-
-	private void insertSequence(Class<?> clazz, GroupChain chain) {
-		List<Group> sequence;
-		if ( resolvedSequences.containsKey( clazz ) ) {
-			sequence = resolvedSequences.get( clazz );
-		}
-		else {
-			sequence = resolveSequence( clazz, new ArrayList<Class<?>>() );
-			// we expand the inherited groups only after we determined whether the sequence is expandable
-			sequence = expandInhertitedGroups( sequence );
-		}
-		chain.insertSequence( sequence );
-	}
-
-	private List<Group> expandInhertitedGroups(List<Group> sequence) {
-		List<Group> expandedGroup = new ArrayList<Group>();
-		for ( Group group : sequence ) {
-			expandedGroup.add( group );
-			addInheritedGroups( group, expandedGroup );
-		}
-		return expandedGroup;
-	}
-
-	private void addInheritedGroups(Group group, List<Group> expandedGroups) {
-		for ( Class<?> inheritedGroup : group.getGroup().getInterfaces() ) {
-			if ( isGroupSequence( inheritedGroup ) ) {
-				throw new GroupDefinitionException(
-						"Sequence definitions are not allowed as composing parts of a sequence."
-				);
-			}
-			Group g = new Group( inheritedGroup, group.getSequence() );
-			expandedGroups.add( g );
-			addInheritedGroups( g, expandedGroups );
-		}
-	}
-
-	private List<Group> resolveSequence(Class<?> group, List<Class<?>> processedSequences) {
-		if ( processedSequences.contains( group ) ) {
-			throw new GroupDefinitionException( "Cyclic dependency in groups definition" );
-		}
-		else {
-			processedSequences.add( group );
-		}
-		List<Group> resolvedGroupSequence = new ArrayList<Group>();
-		GroupSequence sequenceAnnotation = group.getAnnotation( GroupSequence.class );
-		Class<?>[] sequenceArray = sequenceAnnotation.value();
-		for ( Class<?> clazz : sequenceArray ) {
-			if ( isGroupSequence( clazz ) ) {
-				List<Group> tmpSequence = resolveSequence( clazz, processedSequences );
-				addGroups( resolvedGroupSequence, tmpSequence );
-			}
-			else {
-				List<Group> list = new ArrayList<Group>();
-				list.add( new Group( clazz, group ) );
-				addGroups( resolvedGroupSequence, list );
-			}
-		}
-		resolvedSequences.put( group, resolvedGroupSequence );
-		return resolvedGroupSequence;
-	}
-
-	private void addGroups(List<Group> resolvedGroupSequence, List<Group> groups) {
-		for ( Group tmpGroup : groups ) {
-			if ( resolvedGroupSequence.contains( tmpGroup ) && resolvedGroupSequence.indexOf( tmpGroup ) < resolvedGroupSequence
-					.size() - 1 ) {
-				throw new GroupDefinitionException( "Unable to expand group sequence." );
-			}
-			resolvedGroupSequence.add( tmpGroup );
-		}
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "GroupChainGenerator" );
-		sb.append( "{resolvedSequences=" ).append( resolvedSequences );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html
deleted file mode 100644
index 7247880..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Helper classes for the processing of groups.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html
deleted file mode 100644
index c7bf2f0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Implementations for the core interfaces of JSR-303.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/DefaultTraversableResolver.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/DefaultTraversableResolver.java
deleted file mode 100644
index 366ae30..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/DefaultTraversableResolver.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// $Id: DefaultTraversableResolver.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.resolver;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-import javax.validation.ValidationException;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * A JPA 2 aware <code>TraversableResolver</code>.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class DefaultTraversableResolver implements TraversableResolver {
-
-	private static final Logger log = LoggerFactory.make();
-
-	/**
-	 * Class to load to check whether JPA 2 is on the classpath.
-	 */
-	private static final String PERSISTENCE_UTIL_CLASS_NAME = "javax.persistence.PersistenceUtil";
-
-	/**
-	 * Class to instantiate in case JPA 2 is on the classpath.
-	 */
-	private static final String JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME = "org.hibernate.validator.engine.resolver.JPATraversableResolver";
-
-	/**
-	 * A JPA 2 aware traversable resolver.
-	 */
-	private TraversableResolver jpaTraversableResolver;
-
-
-	public DefaultTraversableResolver() {
-		detectJPA();
-	}
-
-	/**
-	 * Tries to load detect and load JPA.
-	 */
-	private void detectJPA() {
-		try {
-			ReflectionHelper.loadClass( PERSISTENCE_UTIL_CLASS_NAME, this.getClass() );
-			log.debug( "Found {} on classpath.", PERSISTENCE_UTIL_CLASS_NAME );
-		}
-		catch ( ValidationException e ) {
-			log.debug(
-					"Cannot find {} on classpath. All properties will per default be traversable.",
-					PERSISTENCE_UTIL_CLASS_NAME
-			);
-			return;
-		}
-
-		try {
-			@SuppressWarnings("unchecked")
-			Class<? extends TraversableResolver> jpaAwareResolverClass = ( Class<? extends TraversableResolver> )
-					ReflectionHelper.loadClass( JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME, this.getClass() );
-			jpaTraversableResolver = ReflectionHelper.newInstance( jpaAwareResolverClass, "" );
-			log.info(
-					"Instantiated an instance of {}.", JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME
-			);
-		}
-		catch ( ValidationException e ) {
-			log.info(
-					"Unable to load or instanciate JPA aware resolver {}. All properties will per default be traversable.",
-					JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME
-			);
-		}
-	}
-
-	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		return jpaTraversableResolver == null || jpaTraversableResolver.isReachable(
-				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
-		);
-	}
-
-	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		return jpaTraversableResolver == null || jpaTraversableResolver.isCascadable(
-				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
-		);
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/JPATraversableResolver.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/JPATraversableResolver.java
deleted file mode 100644
index 9705bef..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/JPATraversableResolver.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id: JPATraversableResolver.java 19380 2010-05-06 10:31:32Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.resolver;
-
-import java.lang.annotation.ElementType;
-import javax.persistence.Persistence;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-
-/**
- * An implementation of {@code TraversableResolver} which is aware of JPA 2 and utilizes {@code PersistenceUtil} to get
- * query the reachability of a property.
- * This resolver will be automatically enabled if JPA 2 is on the classpath and the {@code DefaultTraversableResolver} is
- * used.
- *
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
-public class JPATraversableResolver implements TraversableResolver {
-	private static final Logger log = LoggerFactory.make();
-
-	public boolean isReachable(Object traversableObject,
-							   Path.Node traversableProperty,
-							   Class<?> rootBeanType,
-							   Path pathToTraversableObject,
-							   ElementType elementType) {
-		if ( log.isTraceEnabled() ) {
-			log.trace(
-					"Calling isReachable on object {} with node name {}",
-					traversableObject,
-					traversableProperty.getName()
-			);
-		}
-
-		// we have to check traversableProperty.getName() against null to check the root gets validated (see HV-266)
-		// also check the element type, if it is ElementType.TYPE then we don't have to call is reachable since we have
-		// a class level constraint (HV-305)
-		if ( traversableObject == null || traversableProperty.getName() == null
-				|| ElementType.TYPE.equals( elementType ) ) {
-			return true;
-		}
-		else {
-			return Persistence.getPersistenceUtil().isLoaded( traversableObject, traversableProperty.getName() );
-		}
-	}
-
-	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver.java b/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver.java
deleted file mode 100644
index cc8650e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver.java
+++ /dev/null
@@ -1,162 +0,0 @@
-// $Id: SingleThreadCachedTraversableResolver.java 19610 2010-05-26 09:43:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.engine.resolver;
-
-import java.lang.annotation.ElementType;
-import java.util.HashMap;
-import java.util.Map;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-
-/**
- * Cache results of a delegated traversable resovler to optimize calls
- * It works only for a single validate* call and should not be used if
- * the TraversableResolver is accessed concurrently
- *
- * @author Emmanuel Bernard
- */
-public class SingleThreadCachedTraversableResolver implements TraversableResolver {
-	private TraversableResolver delegate;
-	private Map<TraversableHolder, TraversableHolder> traversables = new HashMap<TraversableHolder, TraversableHolder>();
-
-	public SingleThreadCachedTraversableResolver(TraversableResolver delegate) {
-		this.delegate = delegate;
-	}
-
-	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		TraversableHolder currentLH = new TraversableHolder(
-				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
-		);
-		TraversableHolder cachedLH = traversables.get( currentLH );
-		if ( cachedLH == null ) {
-			currentLH.isReachable = delegate.isReachable(
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-			traversables.put( currentLH, currentLH );
-			cachedLH = currentLH;
-		}
-		else if ( cachedLH.isReachable == null ) {
-			cachedLH.isReachable = delegate.isReachable(
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-		}
-		return cachedLH.isReachable;
-	}
-
-	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		TraversableHolder currentLH = new TraversableHolder(
-				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
-		);
-		TraversableHolder cachedLH = traversables.get( currentLH );
-		if ( cachedLH == null ) {
-			currentLH.isCascadable = delegate.isCascadable(
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-			traversables.put( currentLH, currentLH );
-			cachedLH = currentLH;
-		}
-		else if ( cachedLH.isCascadable == null ) {
-			cachedLH.isCascadable = delegate.isCascadable(
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-		}
-		return cachedLH.isCascadable;
-	}
-
-	private static final class TraversableHolder {
-		private final Object traversableObject;
-		private final Path.Node traversableProperty;
-		private final Class<?> rootBeanType;
-		private final Path pathToTraversableObject;
-		private final ElementType elementType;
-		private final int hashCode;
-
-		private Boolean isReachable;
-		private Boolean isCascadable;
-
-
-		private TraversableHolder(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			this.traversableObject = traversableObject;
-			this.traversableProperty = traversableProperty;
-			this.rootBeanType = rootBeanType;
-			this.pathToTraversableObject = pathToTraversableObject;
-			this.elementType = elementType;
-			this.hashCode = buildHashCode();
-		}
-
-		@Override
-		public boolean equals(Object o) {
-			if ( this == o ) {
-				return true;
-			}
-			if ( o == null || getClass() != o.getClass() ) {
-				return false;
-			}
-
-			TraversableHolder that = ( TraversableHolder ) o;
-
-			if ( elementType != that.elementType ) {
-				return false;
-			}
-			if ( !pathToTraversableObject.equals( that.pathToTraversableObject ) ) {
-				return false;
-			}
-			if ( !rootBeanType.equals( that.rootBeanType ) ) {
-				return false;
-			}
-			if ( traversableObject != null ? !traversableObject.equals( that.traversableObject ) : that.traversableObject != null ) {
-				return false;
-			}
-			if ( !traversableProperty.equals( that.traversableProperty ) ) {
-				return false;
-			}
-
-			return true;
-		}
-
-		@Override
-		public int hashCode() {
-			return hashCode;
-		}
-
-		public int buildHashCode() {
-			int result = traversableObject != null ? traversableObject.hashCode() : 0;
-			result = 31 * result + traversableProperty.hashCode();
-			result = 31 * result + rootBeanType.hashCode();
-			result = 31 * result + pathToTraversableObject.hashCode();
-			result = 31 * result + elementType.hashCode();
-			return result;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html
deleted file mode 100644
index 0beec9e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Various implementations of the TraversableResolver interface.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java b/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java
deleted file mode 100644
index 6af96d5..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java
+++ /dev/null
@@ -1,288 +0,0 @@
-// $Id: ResourceBundleMessageInterpolator.java 19777 2010-06-21 13:35:31Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.messageinterpolation;
-
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.validation.MessageInterpolator;
-
-import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-
-/**
- * Resource bundle backed message interpolator.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- * @author Gunnar Morling
- */
-public class ResourceBundleMessageInterpolator implements MessageInterpolator {
-
-	/**
-	 * The name of the default message bundle.
-	 */
-	public static final String DEFAULT_VALIDATION_MESSAGES = "org.hibernate.validator.ValidationMessages";
-
-	/**
-	 * The name of the user-provided message bundle as defined in the specification.
-	 */
-	public static final String USER_VALIDATION_MESSAGES = "ValidationMessages";
-
-	/**
-	 * Regular expression used to do message interpolation.
-	 */
-	private static final Pattern MESSAGE_PARAMETER_PATTERN = Pattern.compile( "(\\{[^\\}]+?\\})" );
-
-	/**
-	 * The default locale for the current user.
-	 */
-	private final Locale defaultLocale;
-
-	/**
-	 * Loads user-specified resource bundles.
-	 */
-	private final ResourceBundleLocator userResourceBundleLocator;
-
-	/**
-	 * Loads built-in resource bundles.
-	 */
-	private final ResourceBundleLocator defaultResourceBundleLocator;
-
-	/**
-	 * Step 1-3 of message interpolation can be cached. We do this in this map.
-	 */
-	private final Map<LocalisedMessage, String> resolvedMessages = new WeakHashMap<LocalisedMessage, String>();
-
-	/**
-	 * Flag indicating whether this interpolator should chance some of the interpolation steps.
-	 */
-	private final boolean cacheMessages;
-
-	public ResourceBundleMessageInterpolator() {
-		this( null );
-	}
-
-	public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator) {
-		this( userResourceBundleLocator, true );
-	}
-
-	public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
-
-		defaultLocale = Locale.getDefault();
-
-		if ( userResourceBundleLocator == null ) {
-			this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
-		}
-		else {
-			this.userResourceBundleLocator = userResourceBundleLocator;
-		}
-
-		this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
-		this.cacheMessages = cacheMessages;
-	}
-
-	public String interpolate(String message, Context context) {
-		// probably no need for caching, but it could be done by parameters since the map
-		// is immutable and uniquely built per Validation definition, the comparison has to be based on == and not equals though
-		return interpolateMessage( message, context.getConstraintDescriptor().getAttributes(), defaultLocale );
-	}
-
-	public String interpolate(String message, Context context, Locale locale) {
-		return interpolateMessage( message, context.getConstraintDescriptor().getAttributes(), locale );
-	}
-
-	/**
-	 * Runs the message interpolation according to algorithm specified in JSR 303.
-	 * <br/>
-	 * Note:
-	 * <br/>
-	 * Look-ups in user bundles is recursive whereas look-ups in default bundle are not!
-	 *
-	 * @param message the message to interpolate
-	 * @param annotationParameters the parameters of the annotation for which to interpolate this message
-	 * @param locale the {@code Locale} to use for the resource bundle.
-	 *
-	 * @return the interpolated message.
-	 */
-	private String interpolateMessage(String message, Map<String, Object> annotationParameters, Locale locale) {
-		LocalisedMessage localisedMessage = new LocalisedMessage( message, locale );
-		String resolvedMessage = null;
-
-		if ( cacheMessages ) {
-			resolvedMessage = resolvedMessages.get( localisedMessage );
-		}
-
-		// if the message is not already in the cache we have to run step 1-3 of the message resolution 
-		if ( resolvedMessage == null ) {
-			ResourceBundle userResourceBundle = userResourceBundleLocator
-					.getResourceBundle( locale );
-			ResourceBundle defaultResourceBundle = defaultResourceBundleLocator
-					.getResourceBundle( locale );
-
-			String userBundleResolvedMessage;
-			resolvedMessage = message;
-			boolean evaluatedDefaultBundleOnce = false;
-			do {
-				// search the user bundle recursive (step1)
-				userBundleResolvedMessage = replaceVariables(
-						resolvedMessage, userResourceBundle, locale, true
-				);
-
-				// exit condition - we have at least tried to validate against the default bundle and there was no
-				// further replacements
-				if ( evaluatedDefaultBundleOnce
-						&& !hasReplacementTakenPlace( userBundleResolvedMessage, resolvedMessage ) ) {
-					break;
-				}
-
-				// search the default bundle non recursive (step2)
-				resolvedMessage = replaceVariables( userBundleResolvedMessage, defaultResourceBundle, locale, false );
-				evaluatedDefaultBundleOnce = true;
-				if ( cacheMessages ) {
-					resolvedMessages.put( localisedMessage, resolvedMessage );
-				}
-			} while ( true );
-		}
-
-		// resolve annotation attributes (step 4)
-		resolvedMessage = replaceAnnotationAttributes( resolvedMessage, annotationParameters );
-
-		// last but not least we have to take care of escaped literals
-		resolvedMessage = resolvedMessage.replace( "\\{", "{" );
-		resolvedMessage = resolvedMessage.replace( "\\}", "}" );
-		resolvedMessage = resolvedMessage.replace( "\\\\", "\\" );
-		return resolvedMessage;
-	}
-
-	private boolean hasReplacementTakenPlace(String origMessage, String newMessage) {
-		return !origMessage.equals( newMessage );
-	}
-
-	private String replaceVariables(String message, ResourceBundle bundle, Locale locale, boolean recurse) {
-		Matcher matcher = MESSAGE_PARAMETER_PATTERN.matcher( message );
-		StringBuffer sb = new StringBuffer();
-		String resolvedParameterValue;
-		while ( matcher.find() ) {
-			String parameter = matcher.group( 1 );
-			resolvedParameterValue = resolveParameter(
-					parameter, bundle, locale, recurse
-			);
-
-			matcher.appendReplacement( sb, escapeMetaCharacters( resolvedParameterValue ) );
-		}
-		matcher.appendTail( sb );
-		return sb.toString();
-	}
-
-	private String replaceAnnotationAttributes(String message, Map<String, Object> annotationParameters) {
-		Matcher matcher = MESSAGE_PARAMETER_PATTERN.matcher( message );
-		StringBuffer sb = new StringBuffer();
-		while ( matcher.find() ) {
-			String resolvedParameterValue;
-			String parameter = matcher.group( 1 );
-			Object variable = annotationParameters.get( removeCurlyBrace( parameter ) );
-			if ( variable != null ) {
-				resolvedParameterValue = escapeMetaCharacters( variable.toString() );
-			}
-			else {
-				resolvedParameterValue = parameter;
-			}
-			matcher.appendReplacement( sb, resolvedParameterValue );
-		}
-		matcher.appendTail( sb );
-		return sb.toString();
-	}
-
-	private String resolveParameter(String parameterName, ResourceBundle bundle, Locale locale, boolean recurse) {
-		String parameterValue;
-		try {
-			if ( bundle != null ) {
-				parameterValue = bundle.getString( removeCurlyBrace( parameterName ) );
-				if ( recurse ) {
-					parameterValue = replaceVariables( parameterValue, bundle, locale, recurse );
-				}
-			}
-			else {
-				parameterValue = parameterName;
-			}
-		}
-		catch ( MissingResourceException e ) {
-			// return parameter itself
-			parameterValue = parameterName;
-		}
-		return parameterValue;
-	}
-
-	private String removeCurlyBrace(String parameter) {
-		return parameter.substring( 1, parameter.length() - 1 );
-	}
-
-	/**
-	 * @param s The string in which to replace the meta characters '$' and '\'.
-	 *
-	 * @return A string where meta characters relevant for {@link Matcher#appendReplacement} are escaped.
-	 */
-	private String escapeMetaCharacters(String s) {
-		String escapedString = s.replace( "\\", "\\\\" );
-		escapedString = escapedString.replace( "$", "\\$" );
-		return escapedString;
-	}
-
-	private static class LocalisedMessage {
-		private final String message;
-		private final Locale locale;
-
-		LocalisedMessage(String message, Locale locale) {
-			this.message = message;
-			this.locale = locale;
-		}
-
-		@Override
-		public boolean equals(Object o) {
-			if ( this == o ) {
-				return true;
-			}
-			if ( o == null || getClass() != o.getClass() ) {
-				return false;
-			}
-
-			LocalisedMessage that = ( LocalisedMessage ) o;
-
-			if ( locale != null ? !locale.equals( that.locale ) : that.locale != null ) {
-				return false;
-			}
-			if ( message != null ? !message.equals( that.message ) : that.message != null ) {
-				return false;
-			}
-
-			return true;
-		}
-
-		@Override
-		public int hashCode() {
-			int result = message != null ? message.hashCode() : 0;
-			result = 31 * result + ( locale != null ? locale.hashCode() : 0 );
-			return result;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html
deleted file mode 100644
index 91fe3b8..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Implementations of the MessageInterpolator interface in particular ResourceBundleMessageInterpolator which can be used
-by custom implementations of the interface for delegation. Classes in this package are part of the public Hibernate Validator API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/AnnotationIgnores.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/AnnotationIgnores.java
deleted file mode 100644
index 6978622..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/AnnotationIgnores.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// $Id: AnnotationIgnores.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-
-/**
- * This class instantiated during the parsing of the XML configuration data and keeps
- * track of the annotations which should be ignored.
- *
- * @author Hardy Ferentschik
- */
-public class AnnotationIgnores {
-
-	private static final Logger log = LoggerFactory.make();
-
-	/**
-	 * Keeps track whether the 'ignore-annotations' flag is set on bean level in the xml configuration. If 'ignore-annotations'
-	 * is not specified <code>true</code> is the default.
-	 */
-	private final Map<Class<?>, Boolean> ignoreAnnotationDefaults = new HashMap<Class<?>, Boolean>();
-
-	/**
-	 * Keeps track of explicitly excluded members (fields and properties) for a given class. If a member appears in
-	 * the list mapped to a given class 'ignore-annotations' was explicitly set to <code>true</code> in the configuration
-	 * for this class.
-	 */
-	private final Map<Class<?>, List<Member>> ignoreAnnotationOnMember = new HashMap<Class<?>, List<Member>>();
-
-	private final Map<Class<?>, Boolean> ignoreAnnotationOnClass = new HashMap<Class<?>, Boolean>();
-
-	public void setDefaultIgnoreAnnotation(Class<?> clazz, Boolean b) {
-		if ( b == null ) {
-			ignoreAnnotationDefaults.put( clazz, Boolean.TRUE );
-		}
-		else {
-			ignoreAnnotationDefaults.put( clazz, b );
-		}
-	}
-
-	public boolean getDefaultIgnoreAnnotation(Class<?> clazz) {
-		return ignoreAnnotationDefaults.containsKey( clazz ) && ignoreAnnotationDefaults.get( clazz );
-	}
-
-	public void setIgnoreAnnotationsOnMember(Member member) {
-		Class<?> beanClass = member.getDeclaringClass();
-		if ( ignoreAnnotationOnMember.get( beanClass ) == null ) {
-			List<Member> tmpList = new ArrayList<Member>();
-			tmpList.add( member );
-			ignoreAnnotationOnMember.put( beanClass, tmpList );
-		}
-		else {
-			ignoreAnnotationOnMember.get( beanClass ).add( member );
-		}
-	}
-
-	public boolean isIgnoreAnnotations(Member member) {
-		boolean ignoreAnnotation;
-		Class<?> clazz = member.getDeclaringClass();
-		List<Member> ignoreAnnotationForMembers = ignoreAnnotationOnMember.get( clazz );
-		if ( ignoreAnnotationForMembers == null || !ignoreAnnotationForMembers.contains( member ) ) {
-			ignoreAnnotation = getDefaultIgnoreAnnotation( clazz );
-		}
-		else {
-			ignoreAnnotation = ignoreAnnotationForMembers.contains( member );
-		}
-		if ( ignoreAnnotation ) {
-			logMessage( member, clazz );
-		}
-		return ignoreAnnotation;
-	}
-
-	private void logMessage(Member member, Class<?> clazz) {
-		String type;
-		if ( member instanceof Field ) {
-			type = "Field";
-		}
-		else {
-			type = "Property";
-		}
-		log.debug( type + " level annotations are getting ignored for " + clazz.getName() + "." + member.getName() );
-	}
-
-	public void setIgnoreAnnotationsOnClass(Class<?> clazz, boolean b) {
-		ignoreAnnotationOnClass.put( clazz, b );
-	}
-
-	public boolean isIgnoreAnnotations(Class<?> clazz) {
-		boolean ignoreAnnotation;
-		if ( ignoreAnnotationOnClass.containsKey( clazz ) ) {
-			ignoreAnnotation = ignoreAnnotationOnClass.get( clazz );
-		}
-		else {
-			ignoreAnnotation = getDefaultIgnoreAnnotation( clazz );
-		}
-		if ( log.isDebugEnabled() && ignoreAnnotation ) {
-			log.debug( "Class level annotation are getting ignored for " + clazz.getName() );
-		}
-		return ignoreAnnotation;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanDescriptorImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanDescriptorImpl.java
deleted file mode 100644
index 6a433b8..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanDescriptorImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: BeanDescriptorImpl.java 17638 2009-10-07 08:31:13Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.util.Set;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.PropertyDescriptor;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class BeanDescriptorImpl<T> extends ElementDescriptorImpl implements BeanDescriptor {
-
-	public BeanDescriptorImpl(BeanMetaData<T> beanMetaData) {
-		super( beanMetaData.getBeanClass(), beanMetaData );
-	}
-
-	public boolean isBeanConstrained() {
-		return metaDataBean.getMetaConstraintsAsMap().size() > 0;
-	}
-
-	public PropertyDescriptor getConstraintsForProperty(String propertyName) {
-		if ( propertyName == null ) {
-			throw new IllegalArgumentException( "The property name cannot be null" );
-		}
-		return metaDataBean.getPropertyDescriptor( propertyName );
-	}
-
-	public Set<PropertyDescriptor> getConstrainedProperties() {
-		return metaDataBean.getConstrainedProperties();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaData.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaData.java
deleted file mode 100644
index c77adfb..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaData.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id: BeanMetaData.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.PropertyDescriptor;
-
-/**
- * Interface defining the meta data about the constraints defined in a given bean.
- *
- * @author Hardy Ferentschik
- */
-public interface BeanMetaData<T> {
-
-	/**
-	 * @return the class of the bean.
-	 */
-	Class<T> getBeanClass();
-
-	/**
-	 * @return an instance of {@code ElementDescriptor} describing the bean this meta data applies for.
-	 */
-	BeanDescriptor getBeanDescriptor();
-
-	/**
-	 * @return A list of all cascaded methods and fields (methods/fields annotated with @Valid).
-	 */
-	List<Member> getCascadedMembers();
-
-	/**
-	 * @return A map mapping defined group sequences to a list of groups.
-	 */
-	List<Class<?>> getDefaultGroupSequence();
-
-	/**
-	 * @return {@code true} if the entity redefines the default group sequence, {@code false} otherwise.
-	 */
-	boolean defaultGroupSequenceIsRedefined();
-
-	/**
-	 * @return A map of {@code MetaConstraint} instances encapsulating the information of all the constraints
-	 *         defined on the bean mapped to the class in which the constraints is defined.
-	 */
-	Map<Class<?>, List<MetaConstraint<T, ? extends Annotation>>> getMetaConstraintsAsMap();
-
-	/**
-	 * @return A list of {@code MetaConstraint} instances encapsulating the information of all the constraints
-	 *         defined on the bean.
-	 */
-	List<MetaConstraint<T, ? extends Annotation>> getMetaConstraintsAsList();
-
-	/**
-	 * Return {@code PropertyDescriptor} for the given property.
-	 *
-	 * @param property the property for which to retrieve the descriptor.
-	 *
-	 * @return Returns the {@code PropertyDescriptor} for the given property or {@code null} in case the
-	 *         property does not have a descriptor.
-	 */
-	PropertyDescriptor getPropertyDescriptor(String property);
-
-	/**
-	 * return true if the property exists on the object
-	 * even if the property does not host any constraint nor is cascaded
-	 */
-	boolean isPropertyPresent(String name);
-
-	/**
-	 * @return the property descriptors having at least one constraint defined or which are marked
-	 *         as cascaded (@Valid).
-	 */
-	Set<PropertyDescriptor> getConstrainedProperties();
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataCache.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataCache.java
deleted file mode 100644
index 48c8e95..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataCache.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: BeanMetaDataCache.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Cache for created instances of <code>BeanMetaData</code>.
- *
- * @author Hardy Ferentschik
- */
-public class BeanMetaDataCache {
-	/**
-	 * A map for the meta data for each entity. The key is the class and the value the bean meta data for this
-	 * entity.
-	 */
-	private Map<Class<?>, BeanMetaDataImpl<?>> metadataProviders = new ConcurrentHashMap<Class<?>, BeanMetaDataImpl<?>>(
-			10
-	);
-
-	@SuppressWarnings("unchecked")
-	public <T> BeanMetaDataImpl<T> getBeanMetaData(Class<T> beanClass) {
-		if ( beanClass == null ) {
-			throw new IllegalArgumentException( "Class cannot be null" );
-		}
-		return ( BeanMetaDataImpl<T> ) metadataProviders.get( beanClass );
-	}
-
-	public <T> void addBeanMetaData(Class<T> beanClass, BeanMetaDataImpl<T> metaData) {
-		metadataProviders.put( beanClass, metaData );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataImpl.java
deleted file mode 100644
index 1c3c614..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/BeanMetaDataImpl.java
+++ /dev/null
@@ -1,534 +0,0 @@
-// $Id: BeanMetaDataImpl.java 19825 2010-06-24 21:29:29Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.GroupDefinitionException;
-import javax.validation.GroupSequence;
-import javax.validation.Valid;
-import javax.validation.groups.Default;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.PropertyDescriptor;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-
-
-/**
- * This class encapsulates all meta data needed for validation. Implementations of {@code Validator} interface can
- * instantiate an instance of this class and delegate the metadata extraction to it.
- *
- * @author Hardy Ferentschik
- */
-public final class BeanMetaDataImpl<T> implements BeanMetaData<T> {
-
-	private static final Logger log = LoggerFactory.make();
-
-	/**
-	 * The root bean class for this meta data.
-	 */
-	private final Class<T> beanClass;
-
-	/**
-	 * The main element descriptor for <code>beanClass</code>.
-	 */
-	private BeanDescriptorImpl<T> beanDescriptor;
-
-	/**
-	 * Map of all direct constraints which belong to the entity {@code beanClass}. The constraints are mapped to the class
-	 * (eg super class or interface) in which they are defined.
-	 */
-	private Map<Class<?>, List<MetaConstraint<T, ? extends Annotation>>> metaConstraints = new HashMap<Class<?>, List<MetaConstraint<T, ? extends Annotation>>>();
-
-	/**
-	 * List of cascaded members.
-	 */
-	private List<Member> cascadedMembers = new ArrayList<Member>();
-
-	/**
-	 * Maps field and method names to their <code>ElementDescriptorImpl</code>.
-	 */
-	private Map<String, PropertyDescriptor> propertyDescriptors = new HashMap<String, PropertyDescriptor>();
-
-	/**
-	 * The default groups sequence for this bean class.
-	 */
-	private List<Class<?>> defaultGroupSequence = new ArrayList<Class<?>>();
-
-	/**
-	 * Object keeping track of all constraints.
-	 */
-	private final ConstraintHelper constraintHelper;
-
-	/**
-	 * A list of all property names in the class (constraint and un-constraint).
-	 */
-	// Used to avoid ReflectionHelper#containsMember which is slow
-	private final Set<String> propertyNames = new HashSet<String>( 30 );
-
-	public BeanMetaDataImpl(Class<T> beanClass, ConstraintHelper constraintHelper, BeanMetaDataCache beanMetaDataCache) {
-		this(
-				beanClass,
-				constraintHelper,
-				new ArrayList<Class<?>>(),
-				new HashMap<Class<?>, List<MetaConstraint<T, ?>>>(),
-				new ArrayList<Member>(),
-				new AnnotationIgnores(),
-				beanMetaDataCache
-		);
-	}
-
-	public BeanMetaDataImpl(Class<T> beanClass,
-							ConstraintHelper constraintHelper,
-							List<Class<?>> defaultGroupSequence,
-							Map<Class<?>, List<MetaConstraint<T, ?>>> constraints,
-							List<Member> cascadedMembers,
-							AnnotationIgnores annotationIgnores,
-							BeanMetaDataCache beanMetaDataCache) {
-		this.beanClass = beanClass;
-		this.constraintHelper = constraintHelper;
-		createMetaData( annotationIgnores, beanMetaDataCache );
-		if ( !defaultGroupSequence.isEmpty() ) {
-			setDefaultGroupSequence( defaultGroupSequence );
-		}
-		for ( Map.Entry<Class<?>, List<MetaConstraint<T, ?>>> entry : constraints.entrySet() ) {
-			Class<?> clazz = entry.getKey();
-			for ( MetaConstraint<T, ?> constraint : entry.getValue() ) {
-				addMetaConstraint( clazz, constraint );
-			}
-		}
-		for ( Member member : cascadedMembers ) {
-			addCascadedMember( member );
-		}
-	}
-
-	public Class<T> getBeanClass() {
-		return beanClass;
-	}
-
-	public BeanDescriptor getBeanDescriptor() {
-		return beanDescriptor;
-	}
-
-	public List<Member> getCascadedMembers() {
-		return Collections.unmodifiableList( cascadedMembers );
-	}
-
-	public Map<Class<?>, List<MetaConstraint<T, ? extends Annotation>>> getMetaConstraintsAsMap() {
-		return Collections.unmodifiableMap( metaConstraints );
-	}
-
-	public List<MetaConstraint<T, ? extends Annotation>> getMetaConstraintsAsList() {
-		List<MetaConstraint<T, ? extends Annotation>> constraintList = new ArrayList<MetaConstraint<T, ? extends Annotation>>();
-		for ( List<MetaConstraint<T, ? extends Annotation>> list : metaConstraints.values() ) {
-			constraintList.addAll( list );
-		}
-		return Collections.unmodifiableList( constraintList );
-	}
-
-	public PropertyDescriptor getPropertyDescriptor(String property) {
-		return propertyDescriptors.get( property );
-	}
-
-	public boolean isPropertyPresent(String name) {
-		return propertyNames.contains( name );
-	}
-
-	public List<Class<?>> getDefaultGroupSequence() {
-		return Collections.unmodifiableList( defaultGroupSequence );
-	}
-
-	public boolean defaultGroupSequenceIsRedefined() {
-		return defaultGroupSequence.size() > 1;
-	}
-
-	public Set<PropertyDescriptor> getConstrainedProperties() {
-		return Collections.unmodifiableSet( new HashSet<PropertyDescriptor>( propertyDescriptors.values() ) );
-	}
-
-	private void setDefaultGroupSequence(List<Class<?>> groupSequence) {
-		defaultGroupSequence = new ArrayList<Class<?>>();
-		boolean groupSequenceContainsDefault = false;
-		for ( Class<?> group : groupSequence ) {
-			if ( group.getName().equals( beanClass.getName() ) ) {
-				defaultGroupSequence.add( Default.class );
-				groupSequenceContainsDefault = true;
-			}
-			else if ( group.getName().equals( Default.class.getName() ) ) {
-				throw new GroupDefinitionException( "'Default.class' cannot appear in default group sequence list." );
-			}
-			else {
-				defaultGroupSequence.add( group );
-			}
-		}
-		if ( !groupSequenceContainsDefault ) {
-			throw new GroupDefinitionException( beanClass.getName() + " must be part of the redefined default group sequence." );
-		}
-		if ( log.isTraceEnabled() ) {
-			log.trace(
-					"Members of the default group sequence for bean {} are: {}",
-					beanClass.getName(),
-					defaultGroupSequence
-			);
-		}
-	}
-
-	private void addMetaConstraint(Class<?> clazz, MetaConstraint<T, ? extends Annotation> metaConstraint) {
-		// first we add the meta constraint to our meta constraint map
-		List<MetaConstraint<T, ? extends Annotation>> constraintList;
-		if ( !metaConstraints.containsKey( clazz ) ) {
-			constraintList = new ArrayList<MetaConstraint<T, ? extends Annotation>>();
-			metaConstraints.put( clazz, constraintList );
-		}
-		else {
-			constraintList = metaConstraints.get( clazz );
-		}
-		constraintList.add( metaConstraint );
-
-		// but we also have to update the descriptors exposing the BV metadata API
-		if ( metaConstraint.getElementType() == ElementType.TYPE ) {
-			beanDescriptor.addConstraintDescriptor( metaConstraint.getDescriptor() );
-		}
-		else {
-			PropertyDescriptorImpl propertyDescriptor = ( PropertyDescriptorImpl ) propertyDescriptors.get(
-					metaConstraint.getPropertyName()
-			);
-			if ( propertyDescriptor == null ) {
-				Member member = metaConstraint.getMember();
-				propertyDescriptor = addPropertyDescriptorForMember( member, isValidAnnotationPresent( member ) );
-			}
-			propertyDescriptor.addConstraintDescriptor( metaConstraint.getDescriptor() );
-		}
-	}
-
-	private void addCascadedMember(Member member) {
-		ReflectionHelper.setAccessibility( member );
-		cascadedMembers.add( member );
-		addPropertyDescriptorForMember( member, true );
-	}
-
-	/**
-	 * Create bean descriptor, find all classes/subclasses/interfaces which have to be taken in consideration
-	 * for this validator and create meta data.
-	 *
-	 * @param annotationIgnores Data structure keeping track on which annotation should be ignored
-	 * @param beanMetaDataCache The bean meta data cache
-	 */
-	private void createMetaData(AnnotationIgnores annotationIgnores, BeanMetaDataCache beanMetaDataCache) {
-		beanDescriptor = new BeanDescriptorImpl<T>( this );
-		initDefaultGroupSequence();
-		List<Class<?>> classes = ReflectionHelper.computeClassHierarchy( beanClass );
-		for ( Class<?> current : classes ) {
-			initClass( current, annotationIgnores, beanMetaDataCache );
-		}
-	}
-
-	private void initClass(Class<?> clazz, AnnotationIgnores annotationIgnores, BeanMetaDataCache beanMetaDataCache) {
-		initClassConstraints( clazz, annotationIgnores, beanMetaDataCache );
-		initMethodConstraints( clazz, annotationIgnores, beanMetaDataCache );
-		initFieldConstraints( clazz, annotationIgnores, beanMetaDataCache );
-	}
-
-	/**
-	 * Checks whether there is a default group sequence defined for this class.
-	 * See HV-113.
-	 */
-	private void initDefaultGroupSequence() {
-		List<Class<?>> groupSequence = new ArrayList<Class<?>>();
-		GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
-		if ( groupSequenceAnnotation == null ) {
-			groupSequence.add( beanClass );
-		}
-		else {
-			groupSequence.addAll( Arrays.asList( groupSequenceAnnotation.value() ) );
-		}
-
-		setDefaultGroupSequence( groupSequence );
-	}
-
-	private void initFieldConstraints(Class<?> clazz, AnnotationIgnores annotationIgnores, BeanMetaDataCache beanMetaDataCache) {
-		final Field[] fields = ReflectionHelper.getFields( clazz );
-		for ( Field field : fields ) {
-			addToPropertyNameList( field );
-
-			// HV-172
-			if ( Modifier.isStatic( field.getModifiers() ) ) {
-				continue;
-			}
-
-			if ( annotationIgnores.isIgnoreAnnotations( field ) ) {
-				continue;
-			}
-
-			// HV-262
-			BeanMetaDataImpl<?> cachedMetaData = beanMetaDataCache.getBeanMetaData( clazz );
-			List<ConstraintDescriptorImpl<?>> fieldMetaData;
-			boolean cachedFieldIsCascaded = false;
-			if ( cachedMetaData != null && cachedMetaData.getMetaConstraintsAsMap().get( clazz ) != null ) {
-				fieldMetaData = new ArrayList<ConstraintDescriptorImpl<?>>();
-				cachedFieldIsCascaded = cachedMetaData.getCascadedMembers().contains( field );
-				for ( MetaConstraint<?, ?> metaConstraint : cachedMetaData.getMetaConstraintsAsMap().get( clazz ) ) {
-					ConstraintDescriptorImpl<?> descriptor = metaConstraint.getDescriptor();
-					if ( descriptor.getElementType() == ElementType.FIELD
-							&& metaConstraint.getPropertyName().equals( ReflectionHelper.getPropertyName( field ) ) ) {
-						fieldMetaData.add( descriptor );
-					}
-				}
-			}
-			else {
-				fieldMetaData = findConstraints( field, ElementType.FIELD );
-			}
-
-			for ( ConstraintDescriptorImpl<?> constraintDescription : fieldMetaData ) {
-				ReflectionHelper.setAccessibility( field );
-				MetaConstraint<T, ?> metaConstraint = createMetaConstraint( field, constraintDescription );
-				addMetaConstraint( clazz, metaConstraint );
-			}
-
-			if ( cachedFieldIsCascaded || field.isAnnotationPresent( Valid.class ) ) {
-				addCascadedMember( field );
-			}
-		}
-	}
-
-	private void addToPropertyNameList(Member member) {
-		String name = ReflectionHelper.getPropertyName( member );
-		if ( name != null ) {
-			propertyNames.add( name );
-		}
-	}
-
-	private void initMethodConstraints(Class<?> clazz, AnnotationIgnores annotationIgnores, BeanMetaDataCache beanMetaDataCache) {
-		final Method[] declaredMethods = ReflectionHelper.getMethods( clazz );
-		for ( Method method : declaredMethods ) {
-			addToPropertyNameList( method );
-
-			// HV-172
-			if ( Modifier.isStatic( method.getModifiers() ) ) {
-				continue;
-			}
-
-			if ( annotationIgnores.isIgnoreAnnotations( method ) ) {
-				continue;
-			}
-
-			// HV-262
-			BeanMetaDataImpl<?> cachedMetaData = beanMetaDataCache.getBeanMetaData( clazz );
-			List<ConstraintDescriptorImpl<?>> methodMetaData;
-			boolean cachedMethodIsCascaded = false;
-			if ( cachedMetaData != null && cachedMetaData.getMetaConstraintsAsMap().get( clazz ) != null ) {
-				cachedMethodIsCascaded = cachedMetaData.getCascadedMembers().contains( method );
-				methodMetaData = new ArrayList<ConstraintDescriptorImpl<?>>();
-				for ( MetaConstraint<?, ?> metaConstraint : cachedMetaData.getMetaConstraintsAsMap().get( clazz ) ) {
-					ConstraintDescriptorImpl<?> descriptor = metaConstraint.getDescriptor();
-					if ( descriptor.getElementType() == ElementType.METHOD
-							&& metaConstraint.getPropertyName().equals( ReflectionHelper.getPropertyName( method ) ) ) {
-						methodMetaData.add( descriptor );
-					}
-				}
-			}
-			else {
-				methodMetaData = findConstraints( method, ElementType.METHOD );
-			}
-
-			for ( ConstraintDescriptorImpl<?> constraintDescription : methodMetaData ) {
-				ReflectionHelper.setAccessibility( method );
-				MetaConstraint<T, ?> metaConstraint = createMetaConstraint( method, constraintDescription );
-				addMetaConstraint( clazz, metaConstraint );
-			}
-
-			if ( cachedMethodIsCascaded || method.isAnnotationPresent( Valid.class ) ) {
-				addCascadedMember( method );
-			}
-		}
-	}
-
-	private PropertyDescriptorImpl addPropertyDescriptorForMember(Member member, boolean isCascaded) {
-		String name = ReflectionHelper.getPropertyName( member );
-		PropertyDescriptorImpl propertyDescriptor = ( PropertyDescriptorImpl ) propertyDescriptors.get(
-				name
-		);
-		if ( propertyDescriptor == null ) {
-			propertyDescriptor = new PropertyDescriptorImpl(
-					ReflectionHelper.getType( member ),
-					isCascaded,
-					name,
-					this
-			);
-			propertyDescriptors.put( name, propertyDescriptor );
-		}
-		return propertyDescriptor;
-	}
-
-	private boolean isValidAnnotationPresent(Member member) {
-		return ( ( AnnotatedElement ) member ).isAnnotationPresent( Valid.class );
-	}
-
-	private void initClassConstraints(Class<?> clazz, AnnotationIgnores annotationIgnores, BeanMetaDataCache beanMetaDataCache) {
-		if ( annotationIgnores.isIgnoreAnnotations( clazz ) ) {
-			return;
-		}
-
-		// HV-262
-		BeanMetaDataImpl<?> cachedMetaData = beanMetaDataCache.getBeanMetaData( clazz );
-		List<ConstraintDescriptorImpl<?>> classMetaData;
-		if ( cachedMetaData != null && cachedMetaData.getMetaConstraintsAsMap().get( clazz ) != null ) {
-			classMetaData = new ArrayList<ConstraintDescriptorImpl<?>>();
-			for ( MetaConstraint<?, ?> metaConstraint : cachedMetaData.getMetaConstraintsAsMap().get( clazz ) ) {
-				ConstraintDescriptorImpl<?> descriptor = metaConstraint.getDescriptor();
-				if ( descriptor.getElementType() == ElementType.TYPE ) {
-					classMetaData.add( descriptor );
-				}
-			}
-		}
-		else {
-			classMetaData = findClassLevelConstraints( clazz );
-		}
-
-		for ( ConstraintDescriptorImpl<?> constraintDescription : classMetaData ) {
-			MetaConstraint<T, ?> metaConstraint = createMetaConstraint( null, constraintDescription );
-			addMetaConstraint( clazz, metaConstraint );
-		}
-	}
-
-	private <A extends Annotation> MetaConstraint<T, ?> createMetaConstraint(Member m, ConstraintDescriptorImpl<A> descriptor) {
-		return new MetaConstraint<T, A>( beanClass, m, descriptor );
-	}
-
-	/**
-	 * Examines the given annotation to see whether it is a single- or multi-valued constraint annotation.
-	 *
-	 * @param clazz the class we are currently processing
-	 * @param annotation The annotation to examine
-	 * @param type the element type on which the annotation/constraint is placed on
-	 *
-	 * @return A list of constraint descriptors or the empty list in case <code>annotation</code> is neither a
-	 *         single nor multi-valued annotation.
-	 */
-	private <A extends Annotation> List<ConstraintDescriptorImpl<?>> findConstraintAnnotations(Class<?> clazz, A annotation, ElementType type) {
-		List<ConstraintDescriptorImpl<?>> constraintDescriptors = new ArrayList<ConstraintDescriptorImpl<?>>();
-
-		List<Annotation> constraints = new ArrayList<Annotation>();
-		Class<? extends Annotation> annotationType = annotation.annotationType();
-		if ( constraintHelper.isConstraintAnnotation( annotationType )
-				|| constraintHelper.isBuiltinConstraint( annotationType ) ) {
-			constraints.add( annotation );
-		}
-		else if ( constraintHelper.isMultiValueConstraint( annotationType ) ) {
-			constraints.addAll( constraintHelper.getMultiValueConstraints( annotation ) );
-		}
-
-		for ( Annotation constraint : constraints ) {
-			final ConstraintDescriptorImpl constraintDescriptor = buildConstraintDescriptor( clazz, constraint, type );
-			constraintDescriptors.add( constraintDescriptor );
-		}
-		return constraintDescriptors;
-	}
-
-	@SuppressWarnings("unchecked")
-	private <A extends Annotation> ConstraintDescriptorImpl buildConstraintDescriptor(Class<?> clazz, A annotation, ElementType type) {
-		ConstraintDescriptorImpl constraintDescriptor;
-		ConstraintOrigin definedIn = determineOrigin( clazz );
-		if ( clazz.isInterface() && !clazz.equals( beanClass ) ) {
-			constraintDescriptor = new ConstraintDescriptorImpl(
-					annotation, constraintHelper, clazz, type, definedIn
-			);
-		}
-		else {
-			constraintDescriptor = new ConstraintDescriptorImpl( annotation, constraintHelper, type, definedIn );
-		}
-		return constraintDescriptor;
-	}
-
-	/**
-	 * Finds all constraint annotations defined for the given class and returns them in a list of
-	 * constraint descriptors.
-	 *
-	 * @param beanClass The class to check for constraints annotations.
-	 *
-	 * @return A list of constraint descriptors for all constraint specified on the given class.
-	 */
-	private List<ConstraintDescriptorImpl<?>> findClassLevelConstraints(Class<?> beanClass) {
-		List<ConstraintDescriptorImpl<?>> metaData = new ArrayList<ConstraintDescriptorImpl<?>>();
-		for ( Annotation annotation : beanClass.getAnnotations() ) {
-			metaData.addAll( findConstraintAnnotations( beanClass, annotation, ElementType.TYPE ) );
-		}
-		return metaData;
-	}
-
-
-	/**
-	 * Finds all constraint annotations defined for the given field/method and returns them in a list of
-	 * constraint descriptors.
-	 *
-	 * @param member The fields or method to check for constraints annotations.
-	 * @param type The element type the constraint/annotation is placed on.
-	 *
-	 * @return A list of constraint descriptors for all constraint specified for the given field or method.
-	 */
-	private List<ConstraintDescriptorImpl<?>> findConstraints(Member member, ElementType type) {
-		assert member instanceof Field || member instanceof Method;
-
-		List<ConstraintDescriptorImpl<?>> metaData = new ArrayList<ConstraintDescriptorImpl<?>>();
-		for ( Annotation annotation : ( ( AnnotatedElement ) member ).getAnnotations() ) {
-			metaData.addAll( findConstraintAnnotations( member.getDeclaringClass(), annotation, type ) );
-		}
-
-		return metaData;
-	}
-
-	private ConstraintOrigin determineOrigin(Class<?> clazz) {
-		if ( clazz.equals( beanClass ) ) {
-			return ConstraintOrigin.DEFINED_LOCALLY;
-		}
-		else {
-			return ConstraintOrigin.DEFINED_IN_HIERARCHY;
-		}
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "BeanMetaDataImpl" );
-		sb.append( "{beanClass=" ).append( beanClass );
-		sb.append( ", beanDescriptor=" ).append( beanDescriptor );
-		sb.append( ", metaConstraints=" ).append( metaConstraints );
-		sb.append( ", cascadedMembers=" ).append( cascadedMembers );
-		sb.append( ", propertyDescriptors=" ).append( propertyDescriptors );
-		sb.append( ", defaultGroupSequence=" ).append( defaultGroupSequence );
-		sb.append( ", constraintHelper=" ).append( constraintHelper );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintDescriptorImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintDescriptorImpl.java
deleted file mode 100644
index eb7691d..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintDescriptorImpl.java
+++ /dev/null
@@ -1,494 +0,0 @@
-// $Id: ConstraintDescriptorImpl.java 19825 2010-06-24 21:29:29Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.Constraint;
-import javax.validation.ConstraintDefinitionException;
-import javax.validation.ConstraintValidator;
-import javax.validation.OverridesAttribute;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.ValidationException;
-import javax.validation.groups.Default;
-import javax.validation.metadata.ConstraintDescriptor;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * Describe a single constraint (including it's composing constraints).
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ConstraintDescriptorImpl<T extends Annotation> implements ConstraintDescriptor<T>, Serializable {
-
-	private static final long serialVersionUID = -2563102960314069246L;
-	private static final Logger log = LoggerFactory.make();
-	private static final int OVERRIDES_PARAMETER_DEFAULT_INDEX = -1;
-	private static final String GROUPS = "groups";
-	private static final String PAYLOAD = "payload";
-
-	/**
-	 * A list of annotations which can be ignored when investigating for composing constraints.
-	 */
-	private static final List<String> NON_COMPOSING_CONSTRAINT_ANNOTATIONS = new ArrayList<String>();
-
-	static {
-		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Documented.class.getName() );
-		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Retention.class.getName() );
-		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Target.class.getName() );
-		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Constraint.class.getName() );
-		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( ReportAsSingleViolation.class.getName() );
-	}
-
-	/**
-	 * The actual constraint annotation.
-	 */
-	private final T annotation;
-
-	/**
-	 * The type of the annotation made instance variable, because {@code annotation.annotationType()} is quite expensive.
-	 */
-	private final Class<T> annotationType;
-
-	/**
-	 * The set of classes implementing the validation for this constraint. See also
-	 * <code>ConstraintValidator</code> resolution algorithm.
-	 */
-	private final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorDefinitionClasses;
-
-	/**
-	 * The groups for which to apply this constraint.
-	 */
-	private final Set<Class<?>> groups;
-
-	/**
-	 * The constraint parameters as map. The key is the parameter name and the value the
-	 * parameter value as specified in the constraint.
-	 */
-	private final Map<String, Object> attributes;
-
-	/**
-	 * The specified payload of the constraint.
-	 */
-	private final Set<Class<? extends Payload>> payloads;
-
-	/**
-	 * The composing constraints for this constraint.
-	 */
-	private final Set<ConstraintDescriptor<?>> composingConstraints;
-
-	/**
-	 * Flag indicating if in case of a composing constraint a single error or multiple errors should be raised.
-	 */
-	private final boolean isReportAsSingleInvalidConstraint;
-
-	/**
-	 * Describes on which level (<code>TYPE</code>, <code>METHOD</code>, <code>FIELD</code>) the constraint was
-	 * defined on.
-	 */
-	private final ElementType elementType;
-
-	/**
-	 * The origin of the constraint. Defined on the actual root class or somehwere in the class hierarchy
-	 */
-	private final ConstraintOrigin definedOn;
-
-
-	/**
-	 * Handle to the built-in constraint implementations.
-	 */
-	//TODO Can be made transient since it is only used during object construction. It would be better if we would not have to pass it at all
-	private transient final ConstraintHelper constraintHelper;
-
-	public ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, Class<?> implicitGroup, ElementType type, ConstraintOrigin definedOn) {
-		this.annotation = annotation;
-		this.annotationType = ( Class<T> ) this.annotation.annotationType();
-		this.constraintHelper = constraintHelper;
-		this.elementType = type;
-		this.definedOn = definedOn;
-		this.isReportAsSingleInvalidConstraint = annotationType.isAnnotationPresent(
-				ReportAsSingleViolation.class
-		);
-
-		// HV-181 - To avoid and thread visibility issues we are building the different data structures in tmp variables and
-		// then assign them to the final variables
-		this.attributes = buildAnnotationParameterMap( annotation );
-		this.groups = buildGroupSet( implicitGroup );
-		this.payloads = buildPayloadSet( annotation );
-		this.constraintValidatorDefinitionClasses = findConstraintValidatorClasses();
-		this.composingConstraints = parseComposingConstraints();
-	}
-
-	public ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, ElementType type, ConstraintOrigin definedOn) {
-		this( annotation, constraintHelper, null, type, definedOn );
-	}
-
-	private Set<Class<? extends Payload>> buildPayloadSet(T annotation) {
-		Set<Class<? extends Payload>> payloadSet = new HashSet<Class<? extends Payload>>();
-		Class<Payload>[] payloadFromAnnotation;
-		try {
-			//TODO be extra safe and make sure this is an array of Payload
-			payloadFromAnnotation = ReflectionHelper.getAnnotationParameter( annotation, PAYLOAD, Class[].class );
-		}
-		catch ( ValidationException e ) {
-			//ignore people not defining payloads
-			payloadFromAnnotation = null;
-		}
-		if ( payloadFromAnnotation != null ) {
-			payloadSet.addAll( Arrays.asList( payloadFromAnnotation ) );
-		}
-		return Collections.unmodifiableSet( payloadSet );
-	}
-
-	private Set<Class<?>> buildGroupSet(Class<?> implicitGroup) {
-		Set<Class<?>> groupSet = new HashSet<Class<?>>();
-		final Class<?>[] groupsFromAnnotation = ReflectionHelper.getAnnotationParameter(
-				annotation, GROUPS, Class[].class
-		);
-		if ( groupsFromAnnotation.length == 0 ) {
-			groupSet.add( Default.class );
-		}
-		else {
-			groupSet.addAll( Arrays.asList( groupsFromAnnotation ) );
-		}
-
-		// if the constraint is part of the Default group it is automatically part of the implicit group as well
-		if ( implicitGroup != null && groupSet.contains( Default.class ) ) {
-			groupSet.add( implicitGroup );
-		}
-		return Collections.unmodifiableSet( groupSet );
-	}
-
-	private List<Class<? extends ConstraintValidator<T, ?>>> findConstraintValidatorClasses() {
-		final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorClasses = new ArrayList<Class<? extends ConstraintValidator<T, ?>>>();
-		if ( constraintHelper.containsConstraintValidatorDefinition( annotationType ) ) {
-			for ( Class<? extends ConstraintValidator<T, ?>> validator : constraintHelper
-					.getConstraintValidatorDefinition( annotationType ) ) {
-				constraintValidatorClasses.add( validator );
-			}
-			return Collections.unmodifiableList( constraintValidatorClasses );
-		}
-
-		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintDefinitionClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
-		if ( constraintHelper.isBuiltinConstraint( annotationType ) ) {
-			constraintDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
-		}
-		else {
-			Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
-					.getAnnotation( Constraint.class )
-					.validatedBy();
-			constraintDefinitionClasses.addAll( Arrays.asList( validatedBy ) );
-		}
-
-		constraintHelper.addConstraintValidatorDefinition(
-				annotationType, constraintDefinitionClasses
-		);
-
-		for ( Class<? extends ConstraintValidator<? extends Annotation, ?>> validator : constraintDefinitionClasses ) {
-			@SuppressWarnings("unchecked")
-			Class<? extends ConstraintValidator<T, ?>> safeValidator = ( Class<? extends ConstraintValidator<T, ?>> ) validator;
-			constraintValidatorClasses.add( safeValidator );
-		}
-		return Collections.unmodifiableList( constraintValidatorClasses );
-	}
-
-	public T getAnnotation() {
-		return annotation;
-	}
-
-	public Set<Class<?>> getGroups() {
-		return groups;
-	}
-
-	public Set<Class<? extends Payload>> getPayload() {
-		return payloads;
-	}
-
-	public List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorClasses() {
-		return constraintValidatorDefinitionClasses;
-	}
-
-	public Map<String, Object> getAttributes() {
-		return attributes;
-	}
-
-	public Set<ConstraintDescriptor<?>> getComposingConstraints() {
-		return composingConstraints;
-	}
-
-	public boolean isReportAsSingleViolation() {
-		return isReportAsSingleInvalidConstraint;
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public ConstraintOrigin getDefinedOn() {
-		return definedOn;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ConstraintDescriptorImpl" );
-		sb.append( "{annotation=" ).append( annotationType.getName() );
-		sb.append( ", payloads=" ).append( payloads );
-		sb.append( ", hasComposingConstraints=" ).append( composingConstraints.isEmpty() );
-		sb.append( ", isReportAsSingleInvalidConstraint=" ).append( isReportAsSingleInvalidConstraint );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( ", definedOn=" ).append( definedOn );
-		sb.append( ", groups=" ).append( groups );
-		sb.append( ", attributes=" ).append( attributes );
-		sb.append( '}' );
-		return sb.toString();
-	}
-
-	private Map<String, Object> buildAnnotationParameterMap(Annotation annotation) {
-		final Method[] declaredMethods = ReflectionHelper.getMethods( annotation.annotationType() );
-		Map<String, Object> parameters = new HashMap<String, Object>( declaredMethods.length );
-		for ( Method m : declaredMethods ) {
-			try {
-				parameters.put( m.getName(), m.invoke( annotation ) );
-			}
-			catch ( IllegalAccessException e ) {
-				throw new ValidationException( "Unable to read annotation attributes: " + annotation.getClass(), e );
-			}
-			catch ( InvocationTargetException e ) {
-				throw new ValidationException( "Unable to read annotation attributes: " + annotation.getClass(), e );
-			}
-		}
-		return Collections.unmodifiableMap( parameters );
-	}
-
-	private Object getMethodValue(Annotation annotation, Method m) {
-		Object value;
-		try {
-			value = m.invoke( annotation );
-		}
-		// should never happen
-		catch ( IllegalAccessException e ) {
-			throw new ValidationException( "Unable to retrieve annotation parameter value." );
-		}
-		catch ( InvocationTargetException e ) {
-			throw new ValidationException( "Unable to retrieve annotation parameter value." );
-		}
-		return value;
-	}
-
-	private Map<ClassIndexWrapper, Map<String, Object>> parseOverrideParameters() {
-		Map<ClassIndexWrapper, Map<String, Object>> overrideParameters = new HashMap<ClassIndexWrapper, Map<String, Object>>();
-		final Method[] methods = ReflectionHelper.getMethods( annotationType );
-		for ( Method m : methods ) {
-			if ( m.getAnnotation( OverridesAttribute.class ) != null ) {
-				addOverrideAttributes(
-						overrideParameters, m, m.getAnnotation( OverridesAttribute.class )
-				);
-			}
-			else if ( m.getAnnotation( OverridesAttribute.List.class ) != null ) {
-				addOverrideAttributes(
-						overrideParameters,
-						m,
-						m.getAnnotation( OverridesAttribute.List.class ).value()
-				);
-			}
-		}
-		return overrideParameters;
-	}
-
-	private void addOverrideAttributes(Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, Method m, OverridesAttribute... attributes) {
-
-		Object value = getMethodValue( annotation, m );
-		for ( OverridesAttribute overridesAttribute : attributes ) {
-			ensureAttributeIsOverridable( m, overridesAttribute );
-
-			ClassIndexWrapper wrapper = new ClassIndexWrapper(
-					overridesAttribute.constraint(), overridesAttribute.constraintIndex()
-			);
-			Map<String, Object> map = overrideParameters.get( wrapper );
-			if ( map == null ) {
-				map = new HashMap<String, Object>();
-				overrideParameters.put( wrapper, map );
-			}
-			map.put( overridesAttribute.name(), value );
-		}
-	}
-
-	private void ensureAttributeIsOverridable(Method m, OverridesAttribute overridesAttribute) {
-		final Method method = ReflectionHelper.getMethod( overridesAttribute.constraint(), overridesAttribute.name() );
-		if ( method == null ) {
-			throw new ConstraintDefinitionException(
-					"Overridden constraint does not define an attribute with name " + overridesAttribute.name()
-			);
-		}
-		Class<?> returnTypeOfOverriddenConstraint = method.getReturnType();
-		if ( !returnTypeOfOverriddenConstraint.equals( m.getReturnType() ) ) {
-			String message = "The overriding type of a composite constraint must be identical to the overridden one. Expected " + returnTypeOfOverriddenConstraint
-					.getName() + " found " + m.getReturnType();
-			throw new ConstraintDefinitionException( message );
-		}
-	}
-
-	private Set<ConstraintDescriptor<?>> parseComposingConstraints() {
-		Set<ConstraintDescriptor<?>> composingConstraintsSet = new HashSet<ConstraintDescriptor<?>>();
-		Map<ClassIndexWrapper, Map<String, Object>> overrideParameters = parseOverrideParameters();
-
-		for ( Annotation declaredAnnotation : annotationType.getDeclaredAnnotations() ) {
-			Class<? extends Annotation> declaredAnnotationType = declaredAnnotation.annotationType();
-			if ( NON_COMPOSING_CONSTRAINT_ANNOTATIONS.contains( declaredAnnotationType.getName() ) ) {
-				// ignore the usual suspects which will be in almost any constraint, but are no composing constraint
-				continue;
-			}
-
-			if ( constraintHelper.isConstraintAnnotation( declaredAnnotationType )
-					|| constraintHelper.isBuiltinConstraint( declaredAnnotationType ) ) {
-				ConstraintDescriptorImpl<?> descriptor = createComposingConstraintDescriptor(
-						declaredAnnotation, overrideParameters, OVERRIDES_PARAMETER_DEFAULT_INDEX
-				);
-				composingConstraintsSet.add( descriptor );
-				if ( log.isDebugEnabled() ) {
-					log.debug( "Adding composing constraint: " + descriptor );
-				}
-			}
-			else if ( constraintHelper.isMultiValueConstraint( declaredAnnotationType ) ) {
-				List<Annotation> multiValueConstraints = constraintHelper.getMultiValueConstraints( declaredAnnotation );
-				int index = 0;
-				for ( Annotation constraintAnnotation : multiValueConstraints ) {
-					ConstraintDescriptorImpl<?> descriptor = createComposingConstraintDescriptor(
-							constraintAnnotation, overrideParameters, index
-					);
-					composingConstraintsSet.add( descriptor );
-					if ( log.isDebugEnabled() ) {
-						log.debug( "Adding composing constraint: " + descriptor );
-					}
-					index++;
-				}
-			}
-		}
-		return Collections.unmodifiableSet( composingConstraintsSet );
-	}
-
-	private <U extends Annotation> ConstraintDescriptorImpl<U> createComposingConstraintDescriptor(U declaredAnnotation, Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, int index) {
-		@SuppressWarnings("unchecked")
-		final Class<U> annotationType = ( Class<U> ) declaredAnnotation.annotationType();
-		return createComposingConstraintDescriptor(
-				overrideParameters,
-				index,
-				declaredAnnotation,
-				annotationType
-		);
-	}
-
-	private <U extends Annotation> ConstraintDescriptorImpl<U> createComposingConstraintDescriptor(Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, int index, U constraintAnnotation, Class<U> annotationType) {
-		// use a annotation proxy
-		AnnotationDescriptor<U> annotationDescriptor = new AnnotationDescriptor<U>(
-				annotationType, buildAnnotationParameterMap( constraintAnnotation )
-		);
-
-		// get the right override parameters
-		Map<String, Object> overrides = overrideParameters.get(
-				new ClassIndexWrapper(
-						annotationType, index
-				)
-		);
-		if ( overrides != null ) {
-			for ( Map.Entry<String, Object> entry : overrides.entrySet() ) {
-				annotationDescriptor.setValue( entry.getKey(), entry.getValue() );
-			}
-		}
-
-		// groups get inherited from the parent
-		annotationDescriptor.setValue( GROUPS, groups.toArray( new Class<?>[groups.size()] ) );
-
-		// HV-183 - payloads are propagated to composing constraints
-		annotationDescriptor.setValue( PAYLOAD, payloads.toArray( new Class<?>[payloads.size()] ) );
-
-		U annotationProxy = AnnotationFactory.create( annotationDescriptor );
-		return new ConstraintDescriptorImpl<U>(
-				annotationProxy, constraintHelper, elementType, definedOn
-		);
-	}
-
-	/**
-	 * A wrapper class to keep track for which composing constraints (class and index) a given attribute override applies to.
-	 */
-	private class ClassIndexWrapper {
-		final Class<?> clazz;
-		final int index;
-
-		ClassIndexWrapper(Class<?> clazz, int index) {
-			this.clazz = clazz;
-			this.index = index;
-		}
-
-		@Override
-		@SuppressWarnings("SimplifiableIfStatement")
-		public boolean equals(Object o) {
-			if ( this == o ) {
-				return true;
-			}
-			if ( o == null || getClass() != o.getClass() ) {
-				return false;
-			}
-
-			@SuppressWarnings("unchecked") // safe due to the check above
-					ClassIndexWrapper that = ( ClassIndexWrapper ) o;
-
-			if ( index != that.index ) {
-				return false;
-			}
-			if ( clazz != null && !clazz.equals( that.clazz ) ) {
-				return false;
-			}
-			if ( clazz == null && that.clazz != null ) {
-				return false;
-			}
-
-			return true;
-		}
-
-		@Override
-		public int hashCode() {
-			int result = clazz != null ? clazz.hashCode() : 0;
-			result = 31 * result + index;
-			return result;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintHelper.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintHelper.java
deleted file mode 100644
index 78ad705..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintHelper.java
+++ /dev/null
@@ -1,380 +0,0 @@
-// $Id: ConstraintHelper.java 19825 2010-06-24 21:29:29Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.validation.Constraint;
-import javax.validation.ConstraintDefinitionException;
-import javax.validation.ConstraintValidator;
-import javax.validation.ValidationException;
-import javax.validation.constraints.AssertFalse;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.DecimalMax;
-import javax.validation.constraints.DecimalMin;
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Null;
-import javax.validation.constraints.Past;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-import org.hibernate.validator.constraints.impl.AssertFalseValidator;
-import org.hibernate.validator.constraints.impl.AssertTrueValidator;
-import org.hibernate.validator.constraints.impl.DecimalMaxValidatorForNumber;
-import org.hibernate.validator.constraints.impl.DecimalMaxValidatorForString;
-import org.hibernate.validator.constraints.impl.DecimalMinValidatorForNumber;
-import org.hibernate.validator.constraints.impl.DecimalMinValidatorForString;
-import org.hibernate.validator.constraints.impl.DigitsValidatorForNumber;
-import org.hibernate.validator.constraints.impl.DigitsValidatorForString;
-import org.hibernate.validator.constraints.impl.FutureValidatorForCalendar;
-import org.hibernate.validator.constraints.impl.FutureValidatorForDate;
-import org.hibernate.validator.constraints.impl.MaxValidatorForNumber;
-import org.hibernate.validator.constraints.impl.MaxValidatorForString;
-import org.hibernate.validator.constraints.impl.MinValidatorForNumber;
-import org.hibernate.validator.constraints.impl.MinValidatorForString;
-import org.hibernate.validator.constraints.impl.NotNullValidator;
-import org.hibernate.validator.constraints.impl.NullValidator;
-import org.hibernate.validator.constraints.impl.PastValidatorForCalendar;
-import org.hibernate.validator.constraints.impl.PastValidatorForDate;
-import org.hibernate.validator.constraints.impl.PatternValidator;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArray;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfBoolean;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfByte;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfChar;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfDouble;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfFloat;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfInt;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfLong;
-import org.hibernate.validator.constraints.impl.SizeValidatorForCollection;
-import org.hibernate.validator.constraints.impl.SizeValidatorForMap;
-import org.hibernate.validator.constraints.impl.SizeValidatorForString;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * Keeps track of builtin constraints and their validator implementations, as well as already resolved validator definitions.
- *
- * @author Hardy Ferentschik
- * @author Alaa Nassef
- */
-public class ConstraintHelper {
-	private final ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<?, ?>>>> builtinConstraints =
-			new ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<?, ?>>>>();
-
-	private final ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>> constraintValidatorDefinitions =
-			new ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>>();
-
-	public ConstraintHelper() {
-		List<Class<? extends ConstraintValidator<?, ?>>> constraintList =
-				new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( AssertFalseValidator.class );
-		builtinConstraints.put( AssertFalse.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( AssertTrueValidator.class );
-		builtinConstraints.put( AssertTrue.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( DecimalMaxValidatorForNumber.class );
-		constraintList.add( DecimalMaxValidatorForString.class );
-		builtinConstraints.put( DecimalMax.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( DecimalMinValidatorForNumber.class );
-		constraintList.add( DecimalMinValidatorForString.class );
-		builtinConstraints.put( DecimalMin.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( DigitsValidatorForString.class );
-		constraintList.add( DigitsValidatorForNumber.class );
-		builtinConstraints.put( Digits.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( FutureValidatorForCalendar.class );
-		constraintList.add( FutureValidatorForDate.class );
-		builtinConstraints.put( Future.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( MaxValidatorForNumber.class );
-		constraintList.add( MaxValidatorForString.class );
-		builtinConstraints.put( Max.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( MinValidatorForNumber.class );
-		constraintList.add( MinValidatorForString.class );
-		builtinConstraints.put( Min.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( NotNullValidator.class );
-		builtinConstraints.put( NotNull.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( NullValidator.class );
-		builtinConstraints.put( Null.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( PastValidatorForCalendar.class );
-		constraintList.add( PastValidatorForDate.class );
-		builtinConstraints.put( Past.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( PatternValidator.class );
-		builtinConstraints.put( Pattern.class, constraintList );
-
-		constraintList = new ArrayList<Class<? extends ConstraintValidator<?, ?>>>();
-		constraintList.add( SizeValidatorForString.class );
-		constraintList.add( SizeValidatorForCollection.class );
-		constraintList.add( SizeValidatorForArray.class );
-		constraintList.add( SizeValidatorForMap.class );
-		constraintList.add( SizeValidatorForArraysOfBoolean.class );
-		constraintList.add( SizeValidatorForArraysOfByte.class );
-		constraintList.add( SizeValidatorForArraysOfChar.class );
-		constraintList.add( SizeValidatorForArraysOfDouble.class );
-		constraintList.add( SizeValidatorForArraysOfFloat.class );
-		constraintList.add( SizeValidatorForArraysOfInt.class );
-		constraintList.add( SizeValidatorForArraysOfLong.class );
-		builtinConstraints.put( Size.class, constraintList );
-	}
-
-	public List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> getBuiltInConstraints(Class<? extends Annotation> annotationClass) {
-		final List<Class<? extends ConstraintValidator<?, ?>>> builtInList = builtinConstraints.get( annotationClass );
-
-		if ( builtInList == null || builtInList.size() == 0 ) {
-			throw new ValidationException( "Unable to find constraints for  " + annotationClass );
-		}
-
-		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraints =
-				new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>( builtInList.size() );
-		for ( Class<? extends ConstraintValidator<?, ?>> validatorClass : builtInList ) {
-			//safe cause all CV for a given annotation A are CV<A, ?>
-			@SuppressWarnings("unchecked")
-			Class<ConstraintValidator<? extends Annotation, ?>> safeValidatorClass = ( Class<ConstraintValidator<? extends Annotation, ?>> ) validatorClass;
-			constraints.add( safeValidatorClass );
-		}
-
-		return constraints;
-	}
-
-	public boolean isBuiltinConstraint(Class<? extends Annotation> annotationType) {
-		return builtinConstraints.containsKey( annotationType );
-	}
-
-	/**
-	 * Checks whether a given annotation is a multi value constraint or not.
-	 *
-	 * @param annotationType the annotation type to check.
-	 *
-	 * @return {@code true} if the specified annotation is a multi value constraints, {@code false}
-	 *         otherwise.
-	 */
-	public boolean isMultiValueConstraint(Class<? extends Annotation> annotationType) {
-		boolean isMultiValueConstraint = false;
-			final Method method = ReflectionHelper.getMethod( annotationType, "value" );
-			if ( method != null ) {
-				Class returnType = method.getReturnType();
-				if ( returnType.isArray() && returnType.getComponentType().isAnnotation() ) {
-					@SuppressWarnings( "unchecked" )
-					Class<? extends Annotation> componentType = ( Class<? extends Annotation> ) returnType.getComponentType();
-					if ( isConstraintAnnotation( componentType ) || isBuiltinConstraint( componentType ) ) {
-						isMultiValueConstraint = true;
-					}
-					else {
-						isMultiValueConstraint = false;
-					}
-				}
-			}
-		return isMultiValueConstraint;
-	}
-
-
-	/**
-	 * Checks whether a given annotation is a multi value constraint and returns the contained constraints if so.
-	 *
-	 * @param annotation the annotation to check.
-	 *
-	 * @return A list of constraint annotations or the empty list if <code>annotation</code> is not a multi constraint
-	 *         annotation.
-	 */
-	public <A extends Annotation> List<Annotation> getMultiValueConstraints(A annotation) {
-		List<Annotation> annotationList = new ArrayList<Annotation>();
-		try {
-			final Method method = ReflectionHelper.getMethod( annotation.getClass(), "value" );
-			if ( method != null ) {
-				Class returnType = method.getReturnType();
-				if ( returnType.isArray() && returnType.getComponentType().isAnnotation() ) {
-					Annotation[] annotations = ( Annotation[] ) method.invoke( annotation );
-					for ( Annotation a : annotations ) {
-						Class<? extends Annotation> annotationType = a.annotationType();
-						if ( isConstraintAnnotation( annotationType ) || isBuiltinConstraint( annotationType ) ) {
-							annotationList.add( a );
-						}
-					}
-				}
-			}
-		}
-		catch ( IllegalAccessException iae ) {
-			// ignore
-		}
-		catch ( InvocationTargetException ite ) {
-			// ignore
-		}
-		return annotationList;
-	}
-
-	/**
-	 * Checks whether the specified annotation is a valid constraint annotation. A constraint annotations has to
-	 * fulfill the following conditions:
-	 * <ul>
-	 * <li>Has to contain a <code>ConstraintValidator</code> implementation.</li>
-	 * <li>Defines a message parameter.</li>
-	 * <li>Defines a group parameter.</li>
-	 * <li>Defines a payload parameter.</li>
-	 * </ul>
-	 *
-	 * @param annotationType The annotation type to test.
-	 *
-	 * @return <code>true</code> if the annotation fulfills the above condtions, <code>false</code> otherwise.
-	 */
-	public boolean isConstraintAnnotation(Class<? extends Annotation> annotationType) {
-		Constraint constraint = annotationType.getAnnotation( Constraint.class );
-		if ( constraint == null ) {
-			return false;
-		}
-
-		assertMessageParameterExists( annotationType );
-		assertGroupsParameterExists( annotationType );
-		assertPayloadParameterExists( annotationType );
-		assertNoParameterStartsWithValid( annotationType );
-
-		return true;
-	}
-
-	private void assertNoParameterStartsWithValid(Class<? extends Annotation> annotationType) {
-		final Method[] methods = ReflectionHelper.getMethods( annotationType );
-		for ( Method m : methods ) {
-			if ( m.getName().startsWith( "valid" ) ) {
-				String msg = "Parameters starting with 'valid' are not allowed in a constraint.";
-				throw new ConstraintDefinitionException( msg );
-			}
-		}
-	}
-
-	private void assertPayloadParameterExists(Class<? extends Annotation> annotationType) {
-		try {
-			final Method method = ReflectionHelper.getMethod( annotationType, "payload" );
-			if ( method == null ) {
-				String msg = annotationType.getName() + " contains Constraint annotation, but does " +
-						"not contain a payload parameter.";
-				throw new ConstraintDefinitionException( msg );
-			}
-			Class<?>[] defaultPayload = ( Class<?>[] ) method.getDefaultValue();
-			if ( defaultPayload.length != 0 ) {
-				String msg = annotationType
-						.getName() + " contains Constraint annotation, but the payload " +
-						"parameter default value is not the empty array.";
-				throw new ConstraintDefinitionException( msg );
-			}
-		}
-		catch ( ClassCastException e ) {
-			String msg = annotationType.getName() + " contains Constraint annotation, but the " +
-					"payload parameter is of wrong type.";
-			throw new ConstraintDefinitionException( msg );
-		}
-	}
-
-	private void assertGroupsParameterExists(Class<? extends Annotation> annotationType) {
-		try {
-			final Method method = ReflectionHelper.getMethod( annotationType, "groups" );
-			if ( method == null ) {
-				String msg = annotationType.getName() + " contains Constraint annotation, but does " +
-						"not contain a groups parameter.";
-				throw new ConstraintDefinitionException( msg );
-			}
-			Class<?>[] defaultGroups = ( Class<?>[] ) method.getDefaultValue();
-			if ( defaultGroups.length != 0 ) {
-				String msg = annotationType
-						.getName() + " contains Constraint annotation, but the groups " +
-						"parameter default value is not the empty array.";
-				throw new ConstraintDefinitionException( msg );
-			}
-		}
-		catch ( ClassCastException e ) {
-			String msg = annotationType.getName() + " contains Constraint annotation, but the " +
-					"groups parameter is of wrong type.";
-			throw new ConstraintDefinitionException( msg );
-		}
-	}
-
-	private void assertMessageParameterExists(Class<? extends Annotation> annotationType) {
-		try {
-			final Method method = ReflectionHelper.getMethod( annotationType, "message" );
-			if ( method == null ) {
-				String msg = annotationType.getName() + " contains Constraint annotation, but does " +
-						"not contain a message parameter.";
-				throw new ConstraintDefinitionException( msg );
-			}
-			if ( method.getReturnType() != String.class ) {
-				String msg = annotationType.getName() + " contains Constraint annotation, but the message parameter " +
-						"is not of type java.lang.String.";
-				throw new ConstraintDefinitionException( msg );
-			}
-		}
-		catch ( ClassCastException e ) {
-			String msg = annotationType.getName() + " contains Constraint annotation, but the " +
-					"groups parameter is of wrong type.";
-			throw new ConstraintDefinitionException( msg );
-		}
-	}
-
-	public <T extends Annotation> List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorDefinition
-			(Class<T> annotationClass) {
-		if ( annotationClass == null ) {
-			throw new IllegalArgumentException( "Class cannot be null" );
-		}
-
-		final List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> list = constraintValidatorDefinitions.get(
-				annotationClass
-		);
-
-		List<Class<? extends ConstraintValidator<T, ?>>> constraintsValidators =
-				new ArrayList<Class<? extends ConstraintValidator<T, ?>>>( list.size() );
-		for ( Class<? extends ConstraintValidator<?, ?>> validatorClass : list ) {
-			//safe cause all CV for a given annotation A are CV<A, ?>
-			@SuppressWarnings("unchecked")
-			Class<ConstraintValidator<T, ?>> safeValidatorClass = ( Class<ConstraintValidator<T, ?>> ) validatorClass;
-			constraintsValidators.add( safeValidatorClass );
-		}
-
-		return constraintsValidators;
-	}
-
-	public <A extends Annotation> void addConstraintValidatorDefinition(Class<A> annotationClass, List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> definitionClasses) {
-		constraintValidatorDefinitions.putIfAbsent( annotationClass, definitionClasses );
-	}
-
-	public boolean containsConstraintValidatorDefinition(Class<? extends Annotation> annotationClass) {
-		return constraintValidatorDefinitions.containsKey( annotationClass );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintOrigin.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintOrigin.java
deleted file mode 100644
index a4e0bc2..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintOrigin.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id: ConstraintOrigin.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-/**
- * Visibility looked at when discovering constraints.
- *
- * @author Hardy Ferentschik
- */
-public enum ConstraintOrigin {
-	/**
-	 * Constraint is defined on the root class
-	 */
-	DEFINED_LOCALLY,
-
-	/**
-	 * Constraint is defined in a super-class or interface of the root class.
-	 */
-	DEFINED_IN_HIERARCHY
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ElementDescriptorImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ElementDescriptorImpl.java
deleted file mode 100644
index 5545d7b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ElementDescriptorImpl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id: ElementDescriptorImpl.java 17638 2009-10-07 08:31:13Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.annotation.ElementType;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import javax.validation.groups.Default;
-import javax.validation.metadata.ConstraintDescriptor;
-import javax.validation.metadata.ElementDescriptor;
-import javax.validation.metadata.Scope;
-
-import org.hibernate.validator.engine.groups.Group;
-import org.hibernate.validator.engine.groups.GroupChain;
-import org.hibernate.validator.engine.groups.GroupChainGenerator;
-
-/**
- * Describe a validated element (class, field or property).
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ElementDescriptorImpl implements ElementDescriptor {
-	protected final BeanMetaData<?> metaDataBean;
-	private final Class<?> type;
-	private final Set<ConstraintDescriptorImpl<?>> constraintDescriptors = new HashSet<ConstraintDescriptorImpl<?>>();
-
-	public ElementDescriptorImpl(Class<?> type, BeanMetaData<?> metaDataBean) {
-		this.metaDataBean = metaDataBean;
-		this.type = type;
-	}
-
-	public void addConstraintDescriptor(ConstraintDescriptorImpl constraintDescriptor) {
-		constraintDescriptors.add( constraintDescriptor );
-	}
-
-	public boolean hasConstraints() {
-		return constraintDescriptors.size() != 0;
-	}
-
-	public Class<?> getElementClass() {
-		return type;
-	}
-
-	public Set<ConstraintDescriptor<?>> getConstraintDescriptors() {
-		return findConstraints().getConstraintDescriptors();
-	}
-
-	public ConstraintFinder findConstraints() {
-		return new ConstraintFinderImpl();
-	}
-
-	private class ConstraintFinderImpl implements ConstraintFinder {
-		private List<Class<?>> groups;
-		private Set<ConstraintOrigin> definedInSet;
-		private Set<ElementType> elementTypes;
-
-		ConstraintFinderImpl() {
-			elementTypes = new HashSet<ElementType>();
-			elementTypes.add( ElementType.TYPE );
-			elementTypes.add( ElementType.METHOD );
-			elementTypes.add( ElementType.FIELD );
-			definedInSet = new HashSet<ConstraintOrigin>();
-			definedInSet.add( ConstraintOrigin.DEFINED_LOCALLY );
-			definedInSet.add( ConstraintOrigin.DEFINED_IN_HIERARCHY );
-			groups = Collections.emptyList();
-		}
-
-		public ConstraintFinder unorderedAndMatchingGroups(Class<?>... classes) {
-			this.groups = new ArrayList<Class<?>>();
-			for ( Class<?> clazz : classes ) {
-				if ( Default.class.equals( clazz ) && metaDataBean.defaultGroupSequenceIsRedefined() ) {
-					this.groups.addAll( metaDataBean.getDefaultGroupSequence() );
-				}
-				else {
-					groups.add( clazz );
-				}
-			}
-			return this;
-		}
-
-		public ConstraintFinder lookingAt(Scope visibility) {
-			if ( visibility.equals( Scope.LOCAL_ELEMENT ) ) {
-				definedInSet.remove( ConstraintOrigin.DEFINED_IN_HIERARCHY );
-			}
-			return this;
-		}
-
-		public ConstraintFinder declaredOn(ElementType... elementTypes) {
-			this.elementTypes.clear();
-			this.elementTypes.addAll( Arrays.asList( elementTypes ) );
-			return this;
-		}
-
-		public Set<ConstraintDescriptor<?>> getConstraintDescriptors() {
-
-			Set<ConstraintDescriptor<?>> matchingDescriptors = new HashSet<ConstraintDescriptor<?>>();
-			findMatchingDescriptors( matchingDescriptors );
-			return Collections.unmodifiableSet( matchingDescriptors );
-		}
-
-		private void findMatchingDescriptors(Set<ConstraintDescriptor<?>> matchingDescriptors) {
-			if ( !groups.isEmpty() ) {
-				GroupChain groupChain = new GroupChainGenerator().getGroupChainFor( groups );
-				Iterator<Group> groupIterator = groupChain.getGroupIterator();
-				while ( groupIterator.hasNext() ) {
-					Group g = groupIterator.next();
-					addMatchingDescriptorsForGroup( g.getGroup(), matchingDescriptors );
-				}
-			}
-			else {
-				for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) {
-					if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() ) ) {
-						matchingDescriptors.add( descriptor );
-					}
-				}
-			}
-		}
-
-		public boolean hasConstraints() {
-			return getConstraintDescriptors().size() != 0;
-		}
-
-		private void addMatchingDescriptorsForGroup(Class<?> group, Set<ConstraintDescriptor<?>> matchingDescriptors) {
-			for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) {
-				if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() )
-						&& descriptor.getGroups().contains( group ) ) {
-					matchingDescriptors.add( descriptor );
-				}
-			}
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/MetaConstraint.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/MetaConstraint.java
deleted file mode 100644
index de8b60a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/MetaConstraint.java
+++ /dev/null
@@ -1,175 +0,0 @@
-// $Id: MetaConstraint.java 19313 2010-04-28 11:05:26Z hardy.ferentschik $// $Id: MetaConstraint.java 19313 2010-04-28 11:05:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.ValidationException;
-
-import org.hibernate.validator.engine.ConstraintTree;
-import org.hibernate.validator.engine.ValidationContext;
-import org.hibernate.validator.engine.ValueContext;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * Instances of this class abstract the constraint type  (class, method or field constraint) and give access to
- * meta data about the constraint. This allows a unified handling of constraints in the validator implementation.
- *
- * @author Hardy Ferentschik
- */
-public class MetaConstraint<T, A extends Annotation> {
-
-	/**
-	 * The member the constraint was defined on.
-	 */
-	private final Member member;
-
-	/**
-	 * The JavaBeans name of the field/property the constraint was placed on. {@code null} if this is a
-	 * class level constraint.
-	 */
-	private final String propertyName;
-
-	/**
-	 * The class of the bean hosting this constraint.
-	 */
-	private final Class<T> beanClass;
-
-	/**
-	 * The constraint tree created from the constraint annotation.
-	 */
-	private final ConstraintTree<A> constraintTree;
-
-	/**
-	 * @param beanClass The class in which the constraint is defined on
-	 * @param member The member on which the constraint is defined on, {@code null} if it is a class constraint}
-	 * @param constraintDescriptor The constraint descriptor for this constraint
-	 */
-	public MetaConstraint(Class<T> beanClass, Member member, ConstraintDescriptorImpl<A> constraintDescriptor) {
-		this.member = member;
-		if ( this.member != null ) {
-			this.propertyName = ReflectionHelper.getPropertyName( member );
-			if ( member instanceof Method && propertyName == null ) { // can happen if member is a Method which does not follow the bean convention
-				throw new ValidationException(
-						"Annotated methods must follow the JavaBeans naming convention. " + member.getName() + "() does not."
-				);
-			}
-		} else {
-			this.propertyName = null;
-		}
-		this.beanClass = beanClass;
-		constraintTree = new ConstraintTree<A>( constraintDescriptor );
-	}
-
-	/**
-	 * @return Returns the list of groups this constraint is part of. This might include the default group even when
-	 *         it is not explicitly specified, but part of the redefined default group list of the hosting bean.
-	 */
-	public Set<Class<?>> getGroupList() {
-		return constraintTree.getDescriptor().getGroups();
-	}
-
-	public ConstraintDescriptorImpl<A> getDescriptor() {
-		return constraintTree.getDescriptor();
-	}
-
-	public Class<T> getBeanClass() {
-		return beanClass;
-	}
-
-	public Member getMember() {
-		return member;
-	}
-
-	/**
-	 * @return The JavaBeans name of the field/property the constraint was placed on. {@code null} if this is a
-	 *         class level constraint.
-	 */
-	public String getPropertyName() {
-		return propertyName;
-	}
-
-	public ElementType getElementType() {
-		return constraintTree.getDescriptor().getElementType();
-	}
-
-	public <T, U, V> boolean validateConstraint(ValidationContext<T> executionContext, ValueContext<U, V> valueContext) {
-		List<ConstraintViolation<T>> constraintViolations = new ArrayList<ConstraintViolation<T>>();
-		valueContext.setElementType( getElementType() );
-		constraintTree.validateConstraints(
-				typeOfAnnotatedElement(), executionContext, valueContext, constraintViolations
-		);
-		if ( constraintViolations.size() > 0 ) {
-			executionContext.addConstraintFailures( constraintViolations );
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * @param o the object from which to retrieve the value.
-	 *
-	 * @return Returns the value for this constraint from the specified object. Depending on the type either the value itself
-	 *         is returned of method or field access is used to access the value.
-	 */
-	public Object getValue(Object o) {
-		switch ( getElementType() ) {
-			case TYPE: {
-				return o;
-			}
-			default: {
-				return ReflectionHelper.getValue( member, o );
-			}
-		}
-	}
-
-	private Type typeOfAnnotatedElement() {
-		Type t;
-		switch ( getElementType() ) {
-			case TYPE: {
-				t = beanClass;
-				break;
-			}
-			default: {
-				t = ReflectionHelper.typeOf( member );
-				if ( t instanceof Class && ( ( Class ) t ).isPrimitive() ) {
-					t = ReflectionHelper.boxedType( t );
-				}
-			}
-		}
-		return t;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "MetaConstraint" );
-		sb.append( "{beanClass=" ).append( beanClass );
-		sb.append( ", member=" ).append( member );
-		sb.append( ", propertyName='" ).append( propertyName ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/PropertyDescriptorImpl.java b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/PropertyDescriptorImpl.java
deleted file mode 100644
index b4959ab..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/PropertyDescriptorImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id: PropertyDescriptorImpl.java 17638 2009-10-07 08:31:13Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.metadata;
-
-import javax.validation.metadata.PropertyDescriptor;
-
-/**
- * Describe a validated element (class, field or property).
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class PropertyDescriptorImpl extends ElementDescriptorImpl implements PropertyDescriptor {
-	private final boolean cascaded;
-	private final String property;
-
-
-	public PropertyDescriptorImpl(Class<?> returnType, boolean cascaded, String property, BeanMetaData<?> beanMetaData) {
-		super( returnType, beanMetaData );
-		this.cascaded = cascaded;
-		this.property = property;
-	}
-
-	public boolean isCascaded() {
-		return cascaded;
-	}
-
-	public String getPropertyName() {
-		return property;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html
deleted file mode 100644
index a252611..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Implementations of the Bean Validation metadata interfaces as well as Hibernate Validator specific meta data classes.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/package.html
deleted file mode 100644
index e54dbb6..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Bootstrap classes HibernateValidator and HibernateValidatorConfiguration which uniquely identify Hibernate Validator
-and allow to configure it. These classes form part of the public Hibernate Validator API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java
deleted file mode 100644
index 304ff04..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java
+++ /dev/null
@@ -1,147 +0,0 @@
-// $Id: AggregateResourceBundleLocator.java 19557 2010-05-19 15:50:47Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.resourceloading;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import org.hibernate.validator.util.IteratorEnumeration;
-
-/**
- * A {@link ResourceBundleLocator} implementation that provides access
- * to multiple source {@link ResourceBundle}s by merging them into one
- * aggregated bundle.
- *
- * @author Gunnar Morling
- */
-public class AggregateResourceBundleLocator extends DelegatingResourceBundleLocator {
-
-	private final List<String> bundleNames;
-
-	/**
-	 * Creates a locator that delivers a resource bundle merged from the given
-	 * list of source bundles.
-	 *
-	 * @param bundleNames A list with source bundle names. The returned bundle will
-	 * contain all entries from all source bundles. In case a key occurs
-	 * in multiple source bundles, the value will be taken from the
-	 * first bundle containing the key.
-	 */
-	public AggregateResourceBundleLocator(List<String> bundleNames) {
-		this( bundleNames, null );
-	}
-
-	/**
-	 * Creates a locator that delivers a resource bundle merged from the given
-	 * list of source bundles.
-	 *
-	 * @param bundleNames A list with source bundle names. The returned bundle will
-	 * contain all keys from all source bundles. In case a key occurs
-	 * in multiple source bundles, the value will be taken from the
-	 * first bundle containing the key.
-	 * @param delegate A delegate resource bundle locator. The bundle returned by
-	 * this locator will be added to the aggregate bundle after all
-	 * source bundles.
-	 */
-	public AggregateResourceBundleLocator(List<String> bundleNames, ResourceBundleLocator delegate) {
-		super( delegate );
-
-		if ( bundleNames == null ) {
-			throw new IllegalArgumentException( "bundleNames must not be null." );
-		}
-
-		List<String> tmpBundleNames = new ArrayList<String>();
-		tmpBundleNames.addAll( bundleNames );
-
-		this.bundleNames = Collections.unmodifiableList( tmpBundleNames );
-	}
-
-	public ResourceBundle getResourceBundle(Locale locale) {
-		List<ResourceBundle> sourceBundles = new ArrayList<ResourceBundle>();
-
-		for ( String oneBundleName : bundleNames ) {
-			ResourceBundleLocator oneLocator =
-					new PlatformResourceBundleLocator( oneBundleName );
-
-			ResourceBundle oneBundle = oneLocator.getResourceBundle( locale );
-
-			if ( oneBundle != null ) {
-				sourceBundles.add( oneBundle );
-			}
-		}
-
-		ResourceBundle bundleFromDelegate = super.getResourceBundle( locale );
-
-		if ( bundleFromDelegate != null ) {
-			sourceBundles.add( bundleFromDelegate );
-		}
-
-		return sourceBundles.isEmpty() ? null : new AggregateBundle( sourceBundles );
-	}
-
-	/**
-	 * A {@link ResourceBundle} which's content is aggregated from multiple source bundles.
-	 * <p/>
-	 * This class is package-private for the sake of testability.
-	 *
-	 * @author Gunnar Morling
-	 */
-	public static class AggregateBundle extends ResourceBundle {
-		private Map<String, Object> contents = new HashMap<String, Object>();
-
-		/**
-		 * Creates a new AggregateBundle.
-		 *
-		 * @param bundles A list of source bundles, which shall be merged into one
-		 * aggregated bundle. The newly created bundle will contain
-		 * all keys from all source bundles. In case a key occurs in
-		 * multiple source bundles, the value will be taken from the
-		 * first bundle containing the key.
-		 */
-		public AggregateBundle(List<ResourceBundle> bundles) {
-			if ( bundles != null ) {
-
-				for ( ResourceBundle bundle : bundles ) {
-					Enumeration<String> keys = bundle.getKeys();
-					while ( keys.hasMoreElements() ) {
-						String oneKey = keys.nextElement();
-						if ( !contents.containsKey( oneKey ) ) {
-							contents.put( oneKey, bundle.getObject( oneKey ) );
-						}
-					}
-				}
-			}
-		}
-
-		@Override
-		public Enumeration<String> getKeys() {
-			return new IteratorEnumeration<String>( contents.keySet().iterator() );
-		}
-
-		@Override
-		protected Object handleGetObject(String key) {
-			return contents.get( key );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java
deleted file mode 100644
index a0b91bb..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id: CachingResourceBundleLocator.java 19314 2010-04-28 14:33:12Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.resourceloading;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * A {@link ResourceBundleLocator} implementation that wraps around another
- * locator and caches values retrieved from that locator.
- *
- * @author Gunnar Morling
- */
-public class CachingResourceBundleLocator extends DelegatingResourceBundleLocator {
-
-	private final ConcurrentMap<Locale, ResourceBundle> bundleCache = new ConcurrentHashMap<Locale, ResourceBundle>();
-
-	/**
-	 * Creates a new CachingResourceBundleLocator.
-	 *
-	 * @param delegate The locator from which the values actually will be retrieved.
-	 */
-	public CachingResourceBundleLocator(ResourceBundleLocator delegate) {
-		super( delegate );
-	}
-
-	public ResourceBundle getResourceBundle(Locale locale) {
-
-		if ( bundleCache.containsKey( locale ) ) {
-			return bundleCache.get( locale );
-		}
-
-		ResourceBundle bundle = super.getResourceBundle( locale );
-		if ( bundle != null ) {
-			bundleCache.put( locale, bundle );
-		}
-		return bundle;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java
deleted file mode 100644
index f8ac5ac..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: DelegatingResourceBundleLocator.java 19314 2010-04-28 14:33:12Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.resourceloading;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/**
- * Abstract base for all {@link ResourceBundleLocator} implementations, that
- * wish to delegate to some other locator.
- *
- * @author Gunnar Morling
- */
-public abstract class DelegatingResourceBundleLocator implements ResourceBundleLocator {
-
-	private final ResourceBundleLocator delegate;
-
-	public DelegatingResourceBundleLocator(ResourceBundleLocator delegate) {
-		this.delegate = delegate;
-	}
-
-	public ResourceBundle getResourceBundle(Locale locale) {
-		return delegate == null ? null : delegate.getResourceBundle( locale );
-	}
-
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java
deleted file mode 100644
index 89c0a99..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id: PlatformResourceBundleLocator.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.resourceloading;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * A resource bundle locator, that loads resource bundles by simply
- * invoking <code>ResourceBundle.loadBundle(...)</code>.
- *
- * @author Hardy Ferentschik
- * @author Gunnar Morling
- */
-public class PlatformResourceBundleLocator implements ResourceBundleLocator {
-
-	private static final Logger log = LoggerFactory.make();
-	private String bundleName;
-
-	public PlatformResourceBundleLocator(String bundleName) {
-		this.bundleName = bundleName;
-	}
-
-	/**
-	 * Search current thread classloader for the resource bundle. If not found,
-	 * search validator (this) classloader.
-	 *
-	 * @param locale The locale of the bundle to load.
-	 *
-	 * @return the resource bundle or <code>null</code> if none is found.
-	 */
-	public ResourceBundle getResourceBundle(Locale locale) {
-		ResourceBundle rb = null;
-		ClassLoader classLoader = ReflectionHelper.getClassLoaderFromContext();
-		if ( classLoader != null ) {
-			rb = loadBundle(
-					classLoader, locale, bundleName
-							+ " not found by thread local classloader"
-			);
-		}
-		if ( rb == null ) {
-			classLoader = ReflectionHelper.getClassLoaderFromClass( PlatformResourceBundleLocator.class );
-			rb = loadBundle(
-					classLoader, locale, bundleName
-							+ " not found by validator classloader"
-			);
-		}
-		if ( log.isDebugEnabled() ) {
-			if ( rb != null ) {
-				log.debug( bundleName + " found" );
-			}
-			else {
-				log.debug( bundleName + " not found." );
-			}
-		}
-		return rb;
-	}
-
-	private ResourceBundle loadBundle(ClassLoader classLoader, Locale locale, String message) {
-		ResourceBundle rb = null;
-		try {
-			rb = ResourceBundle.getBundle(
-					bundleName, locale,
-					classLoader
-			);
-		}
-		catch ( MissingResourceException e ) {
-			log.trace( message );
-		}
-		return rb;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java
deleted file mode 100644
index 547aa02..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id: ResourceBundleLocator.java 19314 2010-04-28 14:33:12Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.resourceloading;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/**
- * <p>
- * Used by {@link org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator} to load resource bundles
- * containing message texts to be displayed in case of validation errors.
- * </p>
- * <p>
- * The default implementation provides access to the bundle "ValidationMessages"
- * as described in the BV specification. By providing additional implementations
- * of this interface, alternative ways of bundle loading can be realized, e.g.
- * by loading bundles based on XML files or from a database.
- * </p>
- * <p>
- * A {@code ResourceBundleLocator} implementation must be thread-safe.
- * </p>
- *
- * @author Gunnar Morling
- */
-public interface ResourceBundleLocator {
-
-	/**
-	 * Returns a resource bundle for the given locale.
-	 *
-	 * @param locale A locale, for which a resource bundle shall be retrieved. Must
-	 * not be null.
-	 *
-	 * @return A resource bundle for the given locale. May be null, if no such
-	 *         bundle exists.
-	 */
-	ResourceBundle getResourceBundle(Locale locale);
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html
deleted file mode 100644
index 709ef72..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-ResourceBundleLocator interface and its various implementations. Part of the Hibernate Validator public API.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/IdentitySet.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/IdentitySet.java
deleted file mode 100644
index 794a296..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/IdentitySet.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id: IdentitySet.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import java.util.Collection;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Set that compares object by identity rather than equality. Wraps around a <code>IdentityHashMap</code>
- *
- * @author Emmanuel Bernard
- */
-public class IdentitySet implements Set {
-	private Map<Object, Object> map;
-	private Object CONTAINS = new Object();
-
-	public IdentitySet() {
-		this( 10 );
-	}
-
-	public IdentitySet(int size) {
-		this.map = new IdentityHashMap<Object, Object>( size );
-	}
-
-	public int size() {
-		return map.size();
-	}
-
-	public boolean isEmpty() {
-		return map.isEmpty();
-	}
-
-	public boolean contains(Object o) {
-		return map.containsKey( o );
-	}
-
-	public Iterator iterator() {
-		return map.keySet().iterator();
-	}
-
-	public Object[] toArray() {
-		return map.keySet().toArray();
-	}
-
-	public boolean add(Object o) {
-		return map.put( o, CONTAINS ) == null;
-	}
-
-	public boolean remove(Object o) {
-		return map.remove( o ) == CONTAINS;
-	}
-
-	public boolean addAll(Collection c) {
-		boolean doThing = false;
-		for ( Object o : c ) {
-			doThing = doThing || add( o );
-		}
-		return doThing;
-	}
-
-	public void clear() {
-		map.clear();
-	}
-
-	public boolean removeAll(Collection c) {
-		boolean remove = false;
-		for ( Object o : c ) {
-			remove = remove || remove( o );
-		}
-		return remove;
-	}
-
-	public boolean retainAll(Collection c) {
-		throw new UnsupportedOperationException();
-	}
-
-	public boolean containsAll(Collection c) {
-		for ( Object o : c ) {
-			if ( !contains( o ) ) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	public Object[] toArray(Object[] a) {
-		return map.keySet().toArray( a );
-	}
-
-	@Override
-	public String toString() {
-		return "IdentitySet{" +
-				"map=" + map +
-				'}';
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/IteratorEnumeration.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/IteratorEnumeration.java
deleted file mode 100644
index 417800a..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/IteratorEnumeration.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * $Id: IteratorEnumeration.java 19090 2010-03-23 15:22:59Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.util;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-/**
- * An {@link Enumeration} implementation, that wraps an {@link Iterator}. Can
- * be used to integrate older APIs working with enumerations with iterators.
- *
- * @author Gunnar Morling
- * @param <T> The enumerated type.
- */
-public class IteratorEnumeration<T> implements Enumeration<T> {
-
-	private Iterator<T> source;
-
-	/**
-	 * Creates a new IterationEnumeration.
-	 *
-	 * @param source The source iterator. Must not be null.
-	 */
-	public IteratorEnumeration(Iterator<T> source) {
-
-		if ( source == null ) {
-			throw new IllegalArgumentException( "Source must not be null" );
-		}
-
-		this.source = source;
-	}
-
-	public boolean hasMoreElements() {
-		return source.hasNext();
-	}
-
-	public T nextElement() {
-		return source.next();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/LazyValidatorFactory.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/LazyValidatorFactory.java
deleted file mode 100644
index f25f811..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/LazyValidatorFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id: LazyValidatorFactory.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import javax.validation.ValidatorFactory;
-import javax.validation.Validator;
-import javax.validation.ValidatorContext;
-import javax.validation.MessageInterpolator;
-import javax.validation.Configuration;
-import javax.validation.Validation;
-import javax.validation.TraversableResolver;
-import javax.validation.ConstraintValidatorFactory;
-
-/**
- * This class lazily initialize the ValidatorFactory on the first usage
- * One benefit is that no domain class is loaded until the
- * ValidatorFactory is really needed.
- * Useful to avoid loading classes before JPA is initialized
- * and has enhanced its classes.
- *
- * Experimental, not considered a public API
- * @author Emmanuel Bernard
- */
-public class LazyValidatorFactory implements ValidatorFactory {
-
-	private final Configuration<?> configuration;
-	private volatile ValidatorFactory delegate; //use as a barrier
-
-	/**
-	 * Use the default ValidatorFactory creation routine
-	 */
-	public LazyValidatorFactory() {
-		this(null);
-	}
-
-	public LazyValidatorFactory(Configuration<?> configuration) {
-		this.configuration = configuration;
-	}
-
-	private ValidatorFactory getDelegate() {
-		ValidatorFactory result = delegate;
-		if (result == null) {
-			synchronized ( this ) {
-				result = delegate;
-				if (result == null) {
-					delegate = result = initFactory();
-				}
-			}
-		}
-		return result;
-	}
-
-	public Validator getValidator() {
-		return getDelegate().getValidator();
-	}
-
-	//we can initialize several times that's ok
-	private ValidatorFactory initFactory() {
-		if ( configuration == null ) {
-			return Validation.buildDefaultValidatorFactory();
-		}
-		else {
-			return configuration.buildValidatorFactory();
-		}
-	}
-
-	public ValidatorContext usingContext() {
-		return getDelegate().usingContext();
-	}
-
-	public MessageInterpolator getMessageInterpolator() {
-		return getDelegate().getMessageInterpolator();
-	}
-
-	public TraversableResolver getTraversableResolver() {
-		return getDelegate().getTraversableResolver();
-	}
-
-	public ConstraintValidatorFactory getConstraintValidatorFactory() {
-		return getDelegate().getConstraintValidatorFactory();
-	}
-
-	public <T> T unwrap(Class<T> clazz) {
-		return getDelegate().unwrap( clazz );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java
deleted file mode 100644
index 7e1dd64..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// :$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import org.slf4j.Logger;
-
-/**
- * @author Hardy Ferentschik
- */
-public class LoggerFactory {
-	public static Logger make() {
-		Throwable t = new Throwable();
-		StackTraceElement directCaller = t.getStackTrace()[1];
-		return org.slf4j.LoggerFactory.getLogger( directCaller.getClassName() );
-	}
-
-	// private constructor to avoid instantiation
-	private LoggerFactory(){
-
-	}
-}
-
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/ReflectionHelper.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/ReflectionHelper.java
deleted file mode 100644
index fa60555..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/ReflectionHelper.java
+++ /dev/null
@@ -1,692 +0,0 @@
-// $Id: ReflectionHelper.java 19581 2010-05-21 10:31:30Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import java.beans.Introspector;
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-import java.security.AccessController;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.validation.ValidationException;
-
-import com.googlecode.jtype.TypeUtils;
-
-import org.hibernate.validator.util.privilegedactions.ConstructorInstance;
-import org.hibernate.validator.util.privilegedactions.GetAnnotationParameter;
-import org.hibernate.validator.util.privilegedactions.GetClassLoader;
-import org.hibernate.validator.util.privilegedactions.GetConstructor;
-import org.hibernate.validator.util.privilegedactions.GetDeclaredField;
-import org.hibernate.validator.util.privilegedactions.GetDeclaredFields;
-import org.hibernate.validator.util.privilegedactions.GetDeclaredMethods;
-import org.hibernate.validator.util.privilegedactions.GetMethod;
-import org.hibernate.validator.util.privilegedactions.GetMethodFromPropertyName;
-import org.hibernate.validator.util.privilegedactions.LoadClass;
-import org.hibernate.validator.util.privilegedactions.NewInstance;
-import org.hibernate.validator.util.privilegedactions.SetAccessibility;
-
-/**
- * Some reflection utility methods. Where necessary calls will be performed as {@code PrivilegedAction} which is necessary
- * for situations where a security manager is in place.
- *
- * @author Hardy Ferentschik
- */
-public final class ReflectionHelper {
-
-	/**
-	 * Private constructor in order to avoid instantiation.
-	 */
-	private ReflectionHelper() {
-	}
-
-	public static ClassLoader getClassLoaderFromContext() {
-		ClassLoader loader;
-		GetClassLoader action = GetClassLoader.fromContext();
-		if ( System.getSecurityManager() != null ) {
-			loader = AccessController.doPrivileged( action );
-		}
-		else {
-			loader = action.run();
-		}
-		return loader;
-	}
-
-	public static ClassLoader getClassLoaderFromClass(Class<?> clazz) {
-		ClassLoader loader;
-		GetClassLoader action = GetClassLoader.fromClass( clazz );
-		if ( System.getSecurityManager() != null ) {
-			loader = AccessController.doPrivileged( action );
-		}
-		else {
-			loader = action.run();
-		}
-		return loader;
-	}
-
-	public static Class<?> loadClass(String className, Class<?> caller) {
-		LoadClass action = LoadClass.action( className, caller );
-		if ( System.getSecurityManager() != null ) {
-			return AccessController.doPrivileged( action );
-		}
-		else {
-			return action.run();
-		}
-	}
-
-	public static <T> Constructor<T> getConstructor(Class<T> clazz, Class<?>... params) {
-		Constructor<T> constructor;
-		GetConstructor<T> action = GetConstructor.action( clazz, params );
-		if ( System.getSecurityManager() != null ) {
-			constructor = AccessController.doPrivileged( action );
-		}
-		else {
-			constructor = action.run();
-		}
-		return constructor;
-	}
-
-	public static <T> T newInstance(Class<T> clazz, String message) {
-		T instance;
-		NewInstance<T> newInstance = NewInstance.action( clazz, message );
-		if ( System.getSecurityManager() != null ) {
-			instance = AccessController.doPrivileged( newInstance );
-		}
-		else {
-			instance = newInstance.run();
-		}
-		return instance;
-	}
-
-	public static <T> T newConstructorInstance(Constructor<T> constructor, Object... initArgs) {
-		T instance;
-		ConstructorInstance<T> newInstance = ConstructorInstance.action( constructor, initArgs );
-		if ( System.getSecurityManager() != null ) {
-			instance = AccessController.doPrivileged( newInstance );
-		}
-		else {
-			instance = newInstance.run();
-		}
-		return instance;
-	}
-
-	@SuppressWarnings("unchecked")
-	public static <T> T getAnnotationParameter(Annotation annotation, String parameterName, Class<T> type) {
-		T result;
-		GetAnnotationParameter<T> action = GetAnnotationParameter.action( annotation, parameterName, type );
-		if ( System.getSecurityManager() != null ) {
-			result = AccessController.doPrivileged( action );
-		}
-		else {
-			result = action.run();
-		}
-		return result;
-	}
-
-	/**
-	 * Process bean properties getter by applying the JavaBean naming conventions.
-	 *
-	 * @param member the member for which to get the property name.
-	 *
-	 * @return The bean method name with the "is" or "get" prefix stripped off, <code>null</code>
-	 *         the method name id not according to the JavaBeans standard.
-	 */
-	public static String getPropertyName(Member member) {
-		String name = null;
-
-		if ( member instanceof Field ) {
-			name = member.getName();
-		}
-
-		if ( member instanceof Method ) {
-			String methodName = member.getName();
-			if ( methodName.startsWith( "is" ) ) {
-				name = Introspector.decapitalize( methodName.substring( 2 ) );
-			}
-			else if ( methodName.startsWith( "has" ) ) {
-				name = Introspector.decapitalize( methodName.substring( 3 ) );
-			}
-			else if ( methodName.startsWith( "get" ) ) {
-				name = Introspector.decapitalize( methodName.substring( 3 ) );
-			}
-		}
-		return name;
-	}
-
-	/**
-	 * Checks whether the property with the specified name and type exists on the given class.
-	 *
-	 * @param clazz The class to check for the property. Cannot be {@code null}.
-	 * @param property The property name without 'is', 'get' or 'has'. Cannot be {@code null} or empty.
-	 * @param elementType The element type. Either {@code ElementType.FIELD} or {@code ElementType METHOD}.
-	 *
-	 * @return {@code true} is the property and can be access via the specified type, {@code false} otherwise.
-	 */
-	public static boolean propertyExists(Class<?> clazz, String property, ElementType elementType) {
-		return getMember( clazz, property, elementType ) != null;
-	}
-
-	/**
-	 * Returns the member with the given name and type.
-	 *
-	 * @param clazz The class from which to retrieve the member. Cannot be {@code null}.
-	 * @param property The property name without 'is', 'get' or 'has'. Cannot be {@code null} or empty.
-	 * @param elementType The element type. Either {@code ElementType.FIELD} or {@code ElementType METHOD}.
-	 *
-	 * @return the member which matching the name and type or {@code null} if no such member exists.
-	 */
-	public static Member getMember(Class<?> clazz, String property, ElementType elementType) {
-		if ( clazz == null ) {
-			throw new IllegalArgumentException( "The class cannot be null" );
-		}
-
-		if ( property == null || property.length() == 0 ) {
-			throw new IllegalArgumentException( "Property name cannot be null or empty" );
-		}
-
-		if ( !( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) ) {
-			throw new IllegalArgumentException( "Element type has to be FIELD or METHOD" );
-		}
-
-		Member member = null;
-		if ( ElementType.FIELD.equals( elementType ) ) {
-			GetDeclaredField action = GetDeclaredField.action( clazz, property );
-			if ( System.getSecurityManager() != null ) {
-				member = AccessController.doPrivileged( action );
-			}
-			else {
-				member = action.run();
-			}
-		}
-		else {
-			String methodName = property.substring( 0, 1 ).toUpperCase() + property.substring( 1 );
-			String[] prefixes = { "is", "get", "has" };
-			for ( String prefix : prefixes ) {
-				GetMethod action = GetMethod.action( clazz, prefix + methodName );
-				if ( System.getSecurityManager() != null ) {
-					member = AccessController.doPrivileged( action );
-				}
-				else {
-					member = action.run();
-				}
-				if ( member != null ) {
-					break;
-				}
-			}
-		}
-		return member;
-	}
-
-
-	/**
-	 * Returns the type of the field of return type of a method.
-	 *
-	 * @param member the member for which to get the type.
-	 *
-	 * @return Returns the type of the field of return type of a method.
-	 */
-	public static Class<?> getType(Member member) {
-		Class<?> type = null;
-		if ( member instanceof Field ) {
-			type = ( ( Field ) member ).getType();
-		}
-
-		if ( member instanceof Method ) {
-			type = ( ( Method ) member ).getReturnType();
-		}
-		return type;
-	}
-
-	/**
-	 * @param member The <code>Member</code> instance for which to retrieve the type.
-	 *
-	 * @return Returns the <code>Type</code> of the given <code>Field</code> or <code>Method</code>.
-	 *
-	 * @throws IllegalArgumentException in case <code>member</code> is not a <code>Field</code> or <code>Method</code>.
-	 */
-	public static Type typeOf(Member member) {
-		Type type;
-		if ( member instanceof Field ) {
-			type = ( ( Field ) member ).getGenericType();
-		}
-		else if ( member instanceof Method ) {
-			type = ( ( Method ) member ).getGenericReturnType();
-		}
-		else {
-			throw new IllegalArgumentException( "Member " + member + " is neither a field nor a method" );
-		}
-		if ( type instanceof TypeVariable ) {
-			type = TypeUtils.getErasedType( type );
-		}
-		return type;
-	}
-
-
-	public static Object getValue(Member member, Object object) {
-		Object value = null;
-
-		if ( member instanceof Method ) {
-			Method method = ( Method ) member;
-			try {
-				value = method.invoke( object );
-			}
-			catch ( IllegalAccessException e ) {
-				throw new ValidationException( "Unable to access " + method.getName(), e );
-			}
-			catch ( InvocationTargetException e ) {
-				throw new ValidationException( "Unable to access " + method.getName(), e );
-			}
-		}
-		else if ( member instanceof Field ) {
-			Field field = ( Field ) member;
-			try {
-				value = field.get( object );
-			}
-			catch ( IllegalAccessException e ) {
-				throw new ValidationException( "Unable to access " + field.getName(), e );
-			}
-		}
-		return value;
-	}
-
-	public static void setAccessibility(Member member) {
-		SetAccessibility action = SetAccessibility.action( member );
-		if ( System.getSecurityManager() != null ) {
-			AccessController.doPrivileged( action );
-		}
-		else {
-			action.run();
-		}
-	}
-
-	/**
-	 * Determines the type of elements of an <code>Iterable</code>, array or the value of a <code>Map</code>.
-	 *
-	 * @param type the type to inspect
-	 *
-	 * @return Returns the type of elements of an <code>Iterable</code>, array or the value of a <code>Map</code>. <code>
-	 *         null</code> is returned in case the type is not indexable (in the context of JSR 303).
-	 */
-	public static Type getIndexedType(Type type) {
-		Type indexedType = null;
-		if ( isIterable( type ) && type instanceof ParameterizedType ) {
-			ParameterizedType paramType = ( ParameterizedType ) type;
-			indexedType = paramType.getActualTypeArguments()[0];
-		}
-		else if ( isMap( type ) && type instanceof ParameterizedType ) {
-			ParameterizedType paramType = ( ParameterizedType ) type;
-			indexedType = paramType.getActualTypeArguments()[1];
-		}
-		else if ( TypeUtils.isArray( type ) ) {
-			indexedType = TypeUtils.getComponentType( type );
-		}
-		return indexedType;
-	}
-
-	/**
-	 * @param type the type to check.
-	 *
-	 * @return Returns <code>true</code> if <code>type</code> is a iterable type, <code>false</code> otherwise.
-	 */
-	public static boolean isIterable(Type type) {
-		if ( type instanceof Class && extendsOrImplements( ( Class ) type, Iterable.class ) ) {
-			return true;
-		}
-		if ( type instanceof ParameterizedType ) {
-			return isIterable( ( ( ParameterizedType ) type ).getRawType() );
-		}
-		if ( type instanceof WildcardType ) {
-			Type[] upperBounds = ( ( WildcardType ) type ).getUpperBounds();
-			return upperBounds.length != 0 && isIterable( upperBounds[0] );
-		}
-		return false;
-	}
-
-	/**
-	 * @param type the type to check.
-	 *
-	 * @return Returns <code>true</code> if <code>type</code> is implementing <code>Map</code>, <code>false</code> otherwise.
-	 */
-	public static boolean isMap(Type type) {
-		if ( type instanceof Class && extendsOrImplements( ( Class ) type, Map.class ) ) {
-			return true;
-		}
-		if ( type instanceof ParameterizedType ) {
-			return isMap( ( ( ParameterizedType ) type ).getRawType() );
-		}
-		if ( type instanceof WildcardType ) {
-			Type[] upperBounds = ( ( WildcardType ) type ).getUpperBounds();
-			return upperBounds.length != 0 && isMap( upperBounds[0] );
-		}
-		return false;
-	}
-
-	/**
-	 * @param type the type to check.
-	 *
-	 * @return Returns <code>true</code> if <code>type</code> is implementing <code>List</code>, <code>false</code> otherwise.
-	 */
-	public static boolean isList(Type type) {
-		if ( type instanceof Class && extendsOrImplements( ( Class ) type, List.class ) ) {
-			return true;
-		}
-		if ( type instanceof ParameterizedType ) {
-			return isList( ( ( ParameterizedType ) type ).getRawType() );
-		}
-		if ( type instanceof WildcardType ) {
-			Type[] upperBounds = ( ( WildcardType ) type ).getUpperBounds();
-			return upperBounds.length != 0 && isList( upperBounds[0] );
-		}
-		return false;
-	}
-
-	/**
-	 * Tries to retrieve the indexed value from the specified object.
-	 *
-	 * @param value The object from which to retrieve the indexed value. The object has to be non <code>null</null> and
-	 * either a collection or array.
-	 * @param index The index. The index does not have to be numerical. <code>value</code> could also be a map in which
-	 * case the index could also be a string key.
-	 *
-	 * @return The indexed value or <code>null</code> if <code>value</code> is <code>null</code> or not a collection or array.
-	 *         <code>null</code> is also returned in case the index does not exist.
-	 */
-	public static Object getIndexedValue(Object value, Integer index) {
-		if ( value == null ) {
-			return null;
-		}
-
-		Iterator<?> iter;
-		Type type = value.getClass();
-		if ( isIterable( type ) ) {
-			iter = ( ( Iterable<?> ) value ).iterator();
-		}
-		else if ( TypeUtils.isArray( type ) ) {
-			List<?> arrayList = Arrays.asList( ( Object ) value );
-			iter = arrayList.iterator();
-		}
-		else {
-			return null;
-		}
-
-		int i = 0;
-		Object o;
-		while ( iter.hasNext() ) {
-			o = iter.next();
-			if ( i == index ) {
-				return o;
-			}
-			i++;
-		}
-		return null;
-	}
-
-	/**
-	 * Tries to retrieve the mapped value from the specified object.
-	 *
-	 * @param value The object from which to retrieve the mapped value. The object has to be non {@code null} and
-	 * must implement the  @{code Map} interface.
-	 * @param key The map key. index.
-	 *
-	 * @return The mapped value or {@code null} if {@code value} is {@code null} or not implementing @{code Map}.
-	 */
-	public static Object getMappedValue(Object value, Object key) {
-		if ( !( value instanceof Map ) ) {
-			return null;
-		}
-
-		Map<?, ?> map = ( Map<?, ?> ) value;
-		//noinspection SuspiciousMethodCalls
-		return map.get( key );
-	}
-
-
-	/**
-	 * Returns the field with the specified name or <code>null</code> if it does not exist.
-	 *
-	 * @param clazz The class to check.
-	 * @param fieldName The field name.
-	 *
-	 * @return Returns the field with the specified name or <code>null</code> if it does not exist.
-	 */
-	public static Field getField(Class<?> clazz, String fieldName) {
-		GetDeclaredField action = GetDeclaredField.action( clazz, fieldName );
-		final Field field;
-		if ( System.getSecurityManager() != null ) {
-			field = AccessController.doPrivileged( action );
-		}
-		else {
-			field = action.run();
-		}
-		return field;
-	}
-
-	/**
-	 * Checks whether the specified class contains a field with the given name.
-	 *
-	 * @param clazz The class to check.
-	 * @param fieldName The field name.
-	 *
-	 * @return Returns {@code true} if the field exists, {@code false} otherwise.
-	 */
-	public static boolean containsField(Class<?> clazz, String fieldName) {
-		return getField( clazz, fieldName ) != null;
-	}
-
-	/**
-	 * Returns the fields of the specified class.
-	 *
-	 * @param clazz The class for which to retrieve the fields.
-	 *
-	 * @return Returns the fields for this class.
-	 */
-	public static Field[] getFields(Class<?> clazz) {
-		GetDeclaredFields action = GetDeclaredFields.action( clazz );
-		final Field[] fields;
-		if ( System.getSecurityManager() != null ) {
-			fields = AccessController.doPrivileged( action );
-		}
-		else {
-			fields = action.run();
-		}
-		return fields;
-	}
-
-	/**
-	 * Returns the method with the specified property name or {@code null} if it does not exist. This method will
-	 * prepend  'is' and 'get' to the property name and capitalize the first letter.
-	 *
-	 * @param clazz The class to check.
-	 * @param methodName The property name.
-	 *
-	 * @return Returns the method with the specified property or {@code null} if it does not exist.
-	 */
-	public static Method getMethodFromPropertyName(Class<?> clazz, String methodName) {
-		Method method;
-		GetMethodFromPropertyName action = GetMethodFromPropertyName.action( clazz, methodName );
-		if ( System.getSecurityManager() != null ) {
-			method = AccessController.doPrivileged( action );
-		}
-		else {
-			method = action.run();
-		}
-		return method;
-	}
-
-	/**
-	 * Checks whether the specified class contains a method for the specified property.
-	 *
-	 * @param clazz The class to check.
-	 * @param property The property name.
-	 *
-	 * @return Returns {@code true} if the method exists, {@code false} otherwise.
-	 */
-	public static boolean containsMethodWithPropertyName(Class<?> clazz, String property) {
-		return getMethodFromPropertyName( clazz, property ) != null;
-	}
-
-	/**
-	 * Returns the method with the specified name or {@code null} if it does not exist.
-	 *
-	 * @param clazz The class to check.
-	 * @param methodName The property name.
-	 *
-	 * @return Returns the method with the specified property or {@code null}if it does not exist.
-	 */
-	public static Method getMethod(Class<?> clazz, String methodName) {
-		Method method;
-		GetMethod action = GetMethod.action( clazz, methodName );
-		if ( System.getSecurityManager() != null ) {
-			method = AccessController.doPrivileged( action );
-		}
-		else {
-			method = action.run();
-		}
-		return method;
-	}
-
-	/**
-	 * Returns the methods of the specified class.
-	 *
-	 * @param clazz The class for which to retrieve the methods.
-	 *
-	 * @return Returns the methods for this class.
-	 */
-	public static Method[] getMethods(Class<?> clazz) {
-		GetDeclaredMethods action = GetDeclaredMethods.action( clazz );
-		final Method[] methods;
-		if ( System.getSecurityManager() != null ) {
-			methods = AccessController.doPrivileged( action );
-		}
-		else {
-			methods = action.run();
-		}
-		return methods;
-	}
-
-	/**
-	 * Checks whether the specified class contains a method with the given name.
-	 *
-	 * @param clazz The class to check.
-	 * @param methodName The method name.
-	 *
-	 * @return Returns {@code true} if the method exists, {@code false} otherwise.
-	 */
-	public static boolean containsMethod(Class<?> clazz, String methodName) {
-		return getMethodFromPropertyName( clazz, methodName ) != null;
-	}
-
-	/**
-	 * Returns the autoboxed type of a primitive type.
-	 *
-	 * @param primitiveType the primitive type
-	 *
-	 * @return the autoboxed type of a primitive type.
-	 *
-	 * @throws IllegalArgumentException in case the parameter {@code primitiveType} does not represent a primitive type.
-	 */
-	public static Class<?> boxedType(Type primitiveType) {
-		if ( !( primitiveType instanceof Class ) && !( ( Class ) primitiveType ).isPrimitive() ) {
-			throw new IllegalArgumentException( primitiveType.getClass() + "has to be a primitive type" );
-		}
-
-		if ( primitiveType == boolean.class ) {
-			return Boolean.class;
-		}
-		else if ( primitiveType == char.class ) {
-			return Character.class;
-		}
-		else if ( primitiveType == double.class ) {
-			return Double.class;
-		}
-		else if ( primitiveType == float.class ) {
-			return Float.class;
-		}
-		else if ( primitiveType == long.class ) {
-			return Long.class;
-		}
-		else if ( primitiveType == int.class ) {
-			return Integer.class;
-		}
-		else if ( primitiveType == short.class ) {
-			return Short.class;
-		}
-		else if ( primitiveType == byte.class ) {
-			return Byte.class;
-		}
-		else {
-			throw new RuntimeException( "Unhandled primitive type." );
-		}
-	}
-
-	/**
-	 * Get all superclasses and interfaces recursively.
-	 *
-	 * @param clazz The class to start the search with.
-	 *
-	 * @return List of all super classes and interfaces of {@code clazz}. The list contains the class itself! The empty
-	 *         list is returned if {@code clazz} is {@code null}.
-	 */
-	public static List<Class<?>> computeClassHierarchy(Class<?> clazz) {
-		List<Class<?>> classes = new ArrayList<Class<?>>();
-		computeClassHierarchy( clazz, classes );
-		return classes;
-	}
-
-	/**
-	 * Get all superclasses and interfaces recursively.
-	 *
-	 * @param clazz The class to start the search with.
-	 * @param classes List of classes to which to add all found super classes and interfaces.
-	 */
-	private static void computeClassHierarchy(Class<?> clazz, List<Class<?>> classes) {
-		for ( Class current = clazz; current != null; current = current.getSuperclass() ) {
-			if ( classes.contains( current ) ) {
-				return;
-			}
-			classes.add( current );
-			for ( Class currentInterface : current.getInterfaces() ) {
-				computeClassHierarchy( currentInterface, classes );
-			}
-		}
-	}
-
-	/**
-	 * Checks whether the specified {@code clazz} extends or inherits the specified super class or interface.
-	 *
-	 * @param clazz @{code Class} to check.
-	 * @param superClassOrInterface The super class/interface {@code clazz}.
-	 *
-	 * @return {@code true} if {@code clazz} extends or implements {@code superClassOrInterface}, {@code false} otherwise.
-	 */
-	private static boolean extendsOrImplements(Class<?> clazz, Class<?> superClassOrInterface) {
-		List<Class<?>> classes = computeClassHierarchy( clazz );
-		return classes.contains( superClassOrInterface );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/ValidatorTypeHelper.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/ValidatorTypeHelper.java
deleted file mode 100644
index aa69722..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/ValidatorTypeHelper.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// $Id: ValidatorTypeHelper.java 19781 2010-06-22 16:30:24Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.validation.ConstraintValidator;
-import javax.validation.ValidationException;
-
-import com.googlecode.jtype.TypeUtils;
-
-
-/**
- * Helper methods around <code>ConstraintValidator</code> types.
- *
- * @author Emmanuel Bernanrd
- * @author Hardy Ferentschik
- */
-public class ValidatorTypeHelper {
-	private static final int VALIDATOR_TYPE_INDEX = 1;
-
-	/**
-	 * @param validators List of constraint validator classes (for a given constraint).
-	 *
-	 * @return Return a Map<Class, Class<? extends ConstraintValidator>> where the map
-	 *         key is the type the validator accepts and value the validator class itself.
-	 */
-	public static <T extends Annotation> Map<Type, Class<? extends ConstraintValidator<?, ?>>> getValidatorsTypes(
-			List<Class<? extends ConstraintValidator<T, ?>>> validators) {
-		Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorsTypes =
-				new HashMap<Type, Class<? extends ConstraintValidator<?, ?>>>();
-		for ( Class<? extends ConstraintValidator<?, ?>> validator : validators ) {
-			validatorsTypes.put( extractType( validator ), validator );
-		}
-		return validatorsTypes;
-
-	}
-
-	private static Type extractType(Class<? extends ConstraintValidator<?, ?>> validator) {
-		Map<Type, Type> resolvedTypes = new HashMap<Type, Type>();
-		Type constraintValidatorType = resolveTypes( resolvedTypes, validator );
-
-		//we now have all bind from a type to its resolution at one level
-		Type validatorType = ( ( ParameterizedType ) constraintValidatorType ).getActualTypeArguments()[VALIDATOR_TYPE_INDEX];
-		if ( validatorType == null ) {
-			throw new ValidationException( "null is an invalid type for a constraint validator." );
-		}
-		else if ( validatorType instanceof GenericArrayType ) {
-			validatorType = TypeUtils.getArrayType( TypeUtils.getComponentType( validatorType ) );
-		}
-
-		while ( resolvedTypes.containsKey( validatorType ) ) {
-			validatorType = resolvedTypes.get( validatorType );
-		}
-		//FIXME raise an exception if validatorType is not a class
-		return validatorType;
-	}
-
-	private static Type resolveTypes(Map<Type, Type> resolvedTypes, Type type) {
-		if ( type == null ) {
-			return null;
-		}
-		else if ( type instanceof Class ) {
-			Class clazz = ( Class ) type;
-			final Type returnedType = resolveTypeForClassAndHierarchy( resolvedTypes, clazz );
-			if ( returnedType != null ) {
-				return returnedType;
-			}
-		}
-		else if ( type instanceof ParameterizedType ) {
-			ParameterizedType paramType = ( ParameterizedType ) type;
-			if ( !( paramType.getRawType() instanceof Class ) ) {
-				return null; //don't know what to do here
-			}
-			Class<?> rawType = ( Class<?> ) paramType.getRawType();
-
-			TypeVariable<?>[] originalTypes = rawType.getTypeParameters();
-			Type[] partiallyResolvedTypes = paramType.getActualTypeArguments();
-			int nbrOfParams = originalTypes.length;
-			for ( int i = 0; i < nbrOfParams; i++ ) {
-				resolvedTypes.put( originalTypes[i], partiallyResolvedTypes[i] );
-			}
-
-			if ( rawType.equals( ConstraintValidator.class ) ) {
-				//we found our baby
-				return type;
-			}
-			else {
-				Type returnedType = resolveTypeForClassAndHierarchy( resolvedTypes, rawType );
-				if ( returnedType != null ) {
-					return returnedType;
-				}
-			}
-		}
-		//else we don't care I think
-		return null;
-	}
-
-	private static Type resolveTypeForClassAndHierarchy(Map<Type, Type> resolvedTypes, Class<?> clazz) {
-		Type returnedType = resolveTypes( resolvedTypes, clazz.getGenericSuperclass() );
-		if ( returnedType != null ) {
-			return returnedType;
-		}
-		for ( Type genericInterface : clazz.getGenericInterfaces() ) {
-			returnedType = resolveTypes( resolvedTypes, genericInterface );
-			if ( returnedType != null ) {
-				return returnedType;
-			}
-		}
-		return null;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java
deleted file mode 100644
index 25fbf44..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id: Version.java 19551 2010-05-19 15:46:02Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util;
-
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.slf4j.Logger;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Version {
-	private static final Logger log = org.hibernate.validator.util.LoggerFactory.make();
-
-	static {
-		Class clazz = Version.class;
-		String classFileName = clazz.getSimpleName() + ".class";
-		String classFilePath = clazz.getCanonicalName().replace( '.', '/' )
-				+ ".class";
-		String pathToThisClass =
-				clazz.getResource( classFileName ).toString();
-		String pathToManifest = pathToThisClass.substring( 0, pathToThisClass.indexOf( classFilePath ) - 1 )
-				+ "/META-INF/MANIFEST.MF";
-		log.trace( "Manifest file {}", pathToManifest );
-		Manifest manifest = null;
-		String version;
-		try {
-			manifest = new Manifest( new URL( pathToManifest ).openStream() );
-		}
-		catch ( Exception e ) {
-			log.warn( "Unable to determine version of Hibernate Validator" );
-		}
-		if ( manifest == null ) {
-			version = "?";
-		}
-		else {
-			version = manifest.getMainAttributes().getValue( Attributes.Name.IMPLEMENTATION_VERSION );
-		}
-		log.info( "Hibernate Validator {}", version );
-	}
-
-	public static void touch() {
-	}
-
-	// helper class should not have a public constructor
-	private Version() {
-
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationDescriptor.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationDescriptor.java
deleted file mode 100644
index 852b740..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationDescriptor.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id: AnnotationDescriptor.java 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.annotationfactory;
-
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Encapsulates the data you need to create an annotation. In
- * particular, it stores the type of an <code>Annotation</code> instance
- * and the values of its elements.
- * The "elements" we're talking about are the annotation attributes,
- * not its targets (the term "element" is used ambiguously
- * in Java's annotations documentation).
- *
- * @author Paolo Perrotta
- * @author Davide Marchignoli
- * @author Hardy Ferentschik
- */
-public class AnnotationDescriptor<T extends Annotation> {
-
-	private final Class<T> type;
-
-	private final Map<String, Object> elements = new HashMap<String, Object>();
-
-	/**
-	 * Returns a new descriptor for the given annotation type.
-	 * 
-	 * @param <S> The type of the annotation.
-	 * @param annotationType The annotation's class.
-	 * 
-	 * @return A new descriptor for the given annotation type.
-	 */
-	public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType) {
-		return new AnnotationDescriptor<S>(annotationType);
-	}
-	
-	/**
-	 * Returns a new descriptor for the given annotation type.
-	 * 
-	 * @param <S> The type of the annotation.
-	 * @param annotationType The annotation's class.
-	 * @param elements A map with attribute values for the annotation to be created.
-	 * 
-	 * @return A new descriptor for the given annotation type.
-	 */
-	public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType, Map<String, Object> elements) {
-		return new AnnotationDescriptor<S>(annotationType, elements);
-	}
-	
-	public AnnotationDescriptor(Class<T> annotationType) {
-		this.type = annotationType;
-	}
-
-    public AnnotationDescriptor(Class<T> annotationType, Map<String, Object> elements) {
-		this.type = annotationType;
-		for (Map.Entry<String, Object> entry : elements.entrySet()) {
-			this.elements.put( entry.getKey(), entry.getValue() );
-		}
-	}
-
-	public void setValue(String elementName, Object value) {
-		elements.put( elementName, value );
-	}
-
-	public Object valueOf(String elementName) {
-		return elements.get( elementName );
-	}
-
-	public boolean containsElement(String elementName) {
-		return elements.containsKey( elementName );
-	}
-
-	public int numberOfElements() {
-		return elements.size();
-	}
-
-	public Class<T> type() {
-		return type;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationFactory.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationFactory.java
deleted file mode 100644
index 10e10c0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id: AnnotationFactory.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.annotationfactory;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Proxy;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * Creates live annotations (actually <code>AnnotationProxies</code>) from <code>AnnotationDescriptors</code>.
- *
- * @author Paolo Perrotta
- * @author Davide Marchignoli
- * @author Hardy Ferentschik
- * @see AnnotationProxy
- */
-public class AnnotationFactory {
-
-	@SuppressWarnings("unchecked")
-	public static <T extends Annotation> T create(AnnotationDescriptor<T> descriptor) {
-		ClassLoader classLoader = ReflectionHelper.getClassLoaderFromContext();
-		Class<T> proxyClass = ( Class<T> ) Proxy.getProxyClass( classLoader, descriptor.type() );
-		InvocationHandler handler = new AnnotationProxy( descriptor );
-		try {
-			return getProxyInstance( proxyClass, handler );
-		}
-		catch ( RuntimeException e ) {
-			throw e;
-		}
-		catch ( Exception e ) {
-			throw new RuntimeException( e );
-		}
-	}
-
-	private static <T extends Annotation> T getProxyInstance(Class<T> proxyClass, InvocationHandler handler) throws
-			SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException,
-			IllegalAccessException, InvocationTargetException {
-		final Constructor<T> constructor = ReflectionHelper.getConstructor( proxyClass, InvocationHandler.class );
-		return ReflectionHelper.newConstructorInstance( constructor, handler );
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationProxy.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationProxy.java
deleted file mode 100644
index da1107d..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/AnnotationProxy.java
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id: AnnotationProxy.java 19800 2010-06-23 16:18:16Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.annotationfactory;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-
-/**
- * A concrete implementation of <code>Annotation</code> that pretends it is a
- * "real" source code annotation. It's also an <code>InvocationHandler</code>.
- * <p/>
- * When you create an <code>AnnotationProxy</code>, you must initialize it
- * with an <code>AnnotationDescriptor</code>.
- * The adapter checks that the provided elements are the same elements defined
- * in the annotation interface. However, it does <i>not</i> check that their
- * values are the right type. If you omit an element, the adapter will use the
- * default value for that element from the annotation interface, if it exists.
- * If no default exists, it will throw an exception.
- * <p/>
- * Warning: this class does not implement <code>hashCode()</code> and
- * <code>equals()</code> - it just uses the ones it inherits from <code>Object</code>.
- * This means that an <code>AnnotationProxy</code> does <i>not</i> follow the
- * recommendations of the <code>Annotation</code> javadoc about these two
- * methods. That's why you should never mix <code>AnnotationProxies</code>
- * with "real" annotations. For example, don't put them into the same
- * <code>Collection</code>.
- *
- * @author Paolo Perrotta
- * @author Davide Marchignoli
- * @see java.lang.annotation.Annotation
- */
-public class AnnotationProxy implements Annotation, InvocationHandler, Serializable {
-
-	private static final long serialVersionUID = 6907601010599429454L;
-	private final Class<? extends Annotation> annotationType;
-	private final Map<String, Object> values;
-
-
-	public AnnotationProxy(AnnotationDescriptor descriptor) {
-		this.annotationType = descriptor.type();
-		values = getAnnotationValues( descriptor );
-	}
-
-	private Map<String, Object> getAnnotationValues(AnnotationDescriptor descriptor) {
-		Map<String, Object> result = new HashMap<String, Object>();
-		int processedValuesFromDescriptor = 0;
-		final Method[] declaredMethods = ReflectionHelper.getMethods( annotationType );
-		for ( Method m : declaredMethods ) {
-			if ( descriptor.containsElement( m.getName() ) ) {
-				result.put( m.getName(), descriptor.valueOf( m.getName() ) );
-				processedValuesFromDescriptor++;
-			}
-			else if ( m.getDefaultValue() != null ) {
-				result.put( m.getName(), m.getDefaultValue() );
-			}
-			else {
-				throw new IllegalArgumentException( "No value provided for " + m.getName() );
-			}
-		}
-		if ( processedValuesFromDescriptor != descriptor.numberOfElements() ) {
-			throw new RuntimeException( "Trying to instantiate " + annotationType + " with unknown parameters." );
-		}
-		return result;
-	}
-
-	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-		if ( values.containsKey( method.getName() ) ) {
-			return values.get( method.getName() );
-		}
-		return method.invoke( this, args );
-	}
-
-	public Class<? extends Annotation> annotationType() {
-		return annotationType;
-	}
-
-	public String toString() {
-		StringBuilder result = new StringBuilder();
-		result.append( '@' ).append( annotationType.getName() ).append( '(' );
-		for ( String s : getRegisteredMethodsInAlphabeticalOrder() ) {
-			result.append( s ).append( '=' ).append( values.get( s ) ).append( ", " );
-		}
-		// remove last separator:
-		if ( values.size() > 0 ) {
-			result.delete( result.length() - 2, result.length() );
-			result.append( ")" );
-		}
-		else {
-			result.delete( result.length() - 1, result.length() );
-		}
-
-		return result.toString();
-	}
-
-	private SortedSet<String> getRegisteredMethodsInAlphabeticalOrder() {
-		SortedSet<String> result = new TreeSet<String>();
-		result.addAll( values.keySet() );
-		return result;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html
deleted file mode 100644
index c88a53c..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Annotation proxy helper.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html
deleted file mode 100644
index e2307e6..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Independent helper classes.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/ConstructorInstance.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/ConstructorInstance.java
deleted file mode 100644
index 90b5902..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/ConstructorInstance.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: ConstructorInstance.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.security.PrivilegedAction;
-import javax.validation.ValidationException;
-
-/**
- * Execute instance creation as privileged action.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class ConstructorInstance<T> implements PrivilegedAction<T> {
-	private final Constructor<T> constructor;
-	private final Object[] initArgs;
-
-	public static <T> ConstructorInstance<T> action(Constructor<T> constructor, Object... initArgs) {
-		return new ConstructorInstance<T>( constructor, initArgs );
-	}
-
-	private ConstructorInstance(Constructor<T> constructor, Object... initArgs) {
-		this.constructor = constructor;
-		this.initArgs = initArgs;
-	}
-
-	public T run() {
-		try {
-			return constructor.newInstance( initArgs );
-		}
-		catch ( InstantiationException e ) {
-			throw new ValidationException( "Unable to instantiate" + constructor.getName(), e );
-		}
-		catch ( IllegalAccessException e ) {
-			throw new ValidationException( "Unable to instantiate" + constructor.getName(), e );
-		}
-		catch ( InvocationTargetException e ) {
-			throw new ValidationException( "Unable to instantiate" + constructor.getName(), e );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Unable to instantiate" + constructor.getName(), e );
-		}
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetAnnotationParameter.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetAnnotationParameter.java
deleted file mode 100644
index 00fb341..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetAnnotationParameter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id: GetAnnotationParameter.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.security.PrivilegedAction;
-import javax.validation.ValidationException;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class GetAnnotationParameter<T> implements PrivilegedAction<T> {
-	private final Annotation annotation;
-	private final String parameterName;
-	private final Class<T> type;
-
-
-	public static <T> GetAnnotationParameter<T> action(Annotation annotation, String parameterName, Class<T> type) {
-		return new GetAnnotationParameter<T>( annotation, parameterName, type );
-	}
-
-	private GetAnnotationParameter(Annotation annotation, String parameterName, Class<T> type) {
-		this.annotation = annotation;
-		this.parameterName = parameterName;
-		this.type = type;
-	}
-
-	public T run() {
-		try {
-			Method m = annotation.getClass().getMethod( parameterName );
-			m.setAccessible( true );
-			Object o = m.invoke( annotation );
-			if ( o.getClass().getName().equals( type.getName() ) ) {
-				return ( T ) o;
-			}
-			else {
-				String msg = "Wrong parameter type. Expected: " + type.getName() + " Actual: " + o.getClass().getName();
-				throw new ValidationException( msg );
-			}
-		}
-		catch ( NoSuchMethodException e ) {
-			String msg = "The specified annotation defines no parameter '" + parameterName + "'.";
-			throw new ValidationException( msg, e );
-		}
-		catch ( IllegalAccessException e ) {
-			String msg = "Unable to get '" + parameterName + "' from " + annotation.getClass().getName();
-			throw new ValidationException( msg, e );
-		}
-		catch ( InvocationTargetException e ) {
-			String msg = "Unable to get '" + parameterName + "' from " + annotation.getClass().getName();
-			throw new ValidationException( msg, e );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetClassLoader.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetClassLoader.java
deleted file mode 100644
index 93674ca..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetClassLoader.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id: GetClassLoader.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- */
-public final class GetClassLoader implements PrivilegedAction<ClassLoader> {
-	private final Class<?> clazz;
-
-	public static GetClassLoader fromContext() {
-		return new GetClassLoader( null );
-	}
-
-	public static GetClassLoader fromClass(Class<?> clazz) {
-		if ( clazz == null ) {
-			throw new IllegalArgumentException( "Class is null" );
-		}
-		return new GetClassLoader( clazz );
-	}
-
-	private GetClassLoader(Class<?> clazz) {
-		this.clazz = clazz;
-	}
-
-	public ClassLoader run() {
-		if ( clazz != null ) {
-			return clazz.getClassLoader();
-		}
-		else {
-			return Thread.currentThread().getContextClassLoader();
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetConstructor.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetConstructor.java
deleted file mode 100644
index c3bf834..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetConstructor.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id: GetConstructor.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.Constructor;
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetConstructor<T> implements PrivilegedAction<Constructor<T>> {
-	private final Class<T> clazz;
-	private final Class<?>[] params;
-
-	public static <T> GetConstructor<T> action(Class<T> clazz, Class<?>... params) {
-		return new GetConstructor<T>( clazz, params );
-	}
-
-	private GetConstructor(Class<T> clazz, Class<?>... params) {
-		this.clazz = clazz;
-		this.params = params;
-	}
-
-	public Constructor<T> run() {
-		try {
-			return clazz.getConstructor(params);
-		}
-		catch ( NoSuchMethodException e ) {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredField.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredField.java
deleted file mode 100644
index 43c55ef..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredField.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id: GetDeclaredField.java 19588 2010-05-22 12:31:15Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.Field;
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetDeclaredField implements PrivilegedAction<Field> {
-	private final Class<?> clazz;
-	private final String fieldName;
-
-	public static GetDeclaredField action(Class<?> clazz, String fieldName) {
-		return new GetDeclaredField( clazz, fieldName );
-	}
-
-	private GetDeclaredField(Class<?> clazz, String fieldName) {
-		this.clazz = clazz;
-		this.fieldName = fieldName;
-	}
-
-	public Field run() {
-		try {
-			final Field field = clazz.getDeclaredField( fieldName );
-			field.setAccessible( true );
-			return field;
-		}
-		catch ( NoSuchFieldException e ) {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredFields.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredFields.java
deleted file mode 100644
index 97c4df0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredFields.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id: GetDeclaredFields.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-import java.lang.reflect.Field;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetDeclaredFields implements PrivilegedAction<Field[]> {
-	private final Class<?> clazz;
-
-	public static GetDeclaredFields action(Class<?> clazz) {
-		return new GetDeclaredFields( clazz );
-	}
-
-	private GetDeclaredFields(Class<?> clazz) {
-		this.clazz = clazz;
-	}
-
-	public Field[] run() {
-		return clazz.getDeclaredFields();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredMethods.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredMethods.java
deleted file mode 100644
index 82e2fd6..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetDeclaredMethods.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id: GetDeclaredMethods.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-import java.lang.reflect.Method;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetDeclaredMethods implements PrivilegedAction<Method[]> {
-	private final Class<?> clazz;
-
-	public static GetDeclaredMethods action(Class<?> clazz) {
-		return new GetDeclaredMethods( clazz );
-	}
-
-	private GetDeclaredMethods(Class<?> clazz) {
-		this.clazz = clazz;
-	}
-
-	public Method[] run() {
-		return clazz.getDeclaredMethods();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethod.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethod.java
deleted file mode 100644
index 0f524fa..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethod.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id: GetMethod.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.Method;
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetMethod implements PrivilegedAction<Method> {
-	private final Class<?> clazz;
-	private final String methodName;
-
-	public static GetMethod action(Class<?> clazz, String methodName) {
-		return new GetMethod( clazz, methodName );
-	}
-
-	private GetMethod(Class<?> clazz, String methodName) {
-		this.clazz = clazz;
-		this.methodName = methodName;
-	}
-
-	public Method run() {
-		try {
-			return clazz.getMethod(methodName);
-		}
-		catch ( NoSuchMethodException e ) {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethodFromPropertyName.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethodFromPropertyName.java
deleted file mode 100644
index 49de826..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethodFromPropertyName.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id: GetMethodFromPropertyName.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.Method;
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class GetMethodFromPropertyName implements PrivilegedAction<Method> {
-	private final Class<?> clazz;
-	private final String property;
-
-	public static GetMethodFromPropertyName action(Class<?> clazz, String property) {
-		return new GetMethodFromPropertyName( clazz, property );
-	}
-
-	private GetMethodFromPropertyName(Class<?> clazz, String property) {
-		this.clazz = clazz;
-		this.property = property;
-	}
-
-	public Method run() {
-		try {
-			char string[] = property.toCharArray();
-			string[0] = Character.toUpperCase( string[0] );
-			String fullMethodName = new String( string );
-			try {
-				return clazz.getMethod( "get" + fullMethodName );
-			}
-			catch ( NoSuchMethodException e ) {
-				return clazz.getMethod( "is" + fullMethodName );
-			}
-		}
-		catch ( NoSuchMethodException e ) {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethods.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethods.java
deleted file mode 100644
index 57fb31b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/GetMethods.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id: GetMethods.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-import java.lang.reflect.Method;
-
-/**
- * @author Emmanuel Bernard
- */
-public class GetMethods implements PrivilegedAction<Method[]> {
-	private final Class<?> clazz;
-
-	public static GetMethods action(Class<?> clazz) {
-		return new GetMethods( clazz );
-	}
-
-	private GetMethods(Class<?> clazz) {
-		this.clazz = clazz;
-	}
-
-	public Method[] run() {
-		return clazz.getMethods();
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java
deleted file mode 100644
index 641b4af..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id: LoadClass.java 19606 2010-05-25 18:21:27Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-import javax.validation.ValidationException;
-
-/**
- * @author Emmanuel Bernard
- */
-public class LoadClass implements PrivilegedAction<Class<?>> {
-	private final String className;
-	private final Class<?> caller;
-
-	public static LoadClass action(String className, Class<?> caller) {
-		return new LoadClass( className, caller );
-	}
-
-	private LoadClass(String className, Class<?> caller) {
-		this.className = className;
-		this.caller = caller;
-	}
-
-	public Class<?> run() {
-		try {
-			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-			if ( contextClassLoader != null ) {
-				return contextClassLoader.loadClass( className );
-			}
-		}
-		catch ( ClassNotFoundException e ) {
-			// ignore - try using the classloader of the caller first
-		}
-		catch ( RuntimeException e ) {
-			// ignore
-		}
-		try {
-			return Class.forName( className, true, caller.getClassLoader() );
-		}
-		catch ( ClassNotFoundException e ) {
-			throw new ValidationException( "Unable to load class: " + className, e );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/NewInstance.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/NewInstance.java
deleted file mode 100644
index 5550943..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/NewInstance.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id: NewInstance.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.security.PrivilegedAction;
-import javax.validation.ValidationException;
-
-/**
- * Execute instance creation as privileged action.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class NewInstance<T> implements PrivilegedAction<T> {
-	private final Class<T> clazz;
-	private final String message;
-
-	public static <T> NewInstance<T> action(Class<T> clazz, String message) {
-		return new NewInstance<T>( clazz, message );
-	}
-
-	private NewInstance(Class<T> clazz, String message) {
-		this.clazz = clazz;
-		this.message = message;
-	}
-
-	public T run() {
-		try {
-			return clazz.newInstance();
-		}
-		catch ( InstantiationException e ) {
-			throw new ValidationException( "Unable to instantiate " + message + ": " + clazz, e );
-		}
-		catch ( IllegalAccessException e ) {
-			throw new ValidationException( "Unable to instantiate " + clazz, e );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException( "Unable to instantiate " + clazz, e );
-		}
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/SetAccessibility.java b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/SetAccessibility.java
deleted file mode 100644
index 51cffd0..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/SetAccessibility.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: SetAccessibility.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.util.privilegedactions;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Member;
-import java.security.PrivilegedAction;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class SetAccessibility implements PrivilegedAction<Object> {
-	private final Member member;
-
-	public static SetAccessibility action(Member member) {
-		return new SetAccessibility( member );
-	}
-
-	private SetAccessibility(Member member) {
-		this.member = member;
-	}
-
-	public Object run() {
-		( ( AccessibleObject ) member ).setAccessible( true );
-		return member;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html
deleted file mode 100644
index a666b0b..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Implementations of PrivilegedAction in order to execute reflection operations in a security manager.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationBootstrapParameters.java b/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationBootstrapParameters.java
deleted file mode 100644
index fbf63d5..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationBootstrapParameters.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: ValidationBootstrapParameters.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.xml;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.spi.ValidationProvider;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ValidationBootstrapParameters {
-	public ConstraintValidatorFactory constraintValidatorFactory;
-	public MessageInterpolator messageInterpolator;
-	public TraversableResolver traversableResolver;
-	public ValidationProvider provider;
-	public Class<? extends ValidationProvider<?>> providerClass = null;
-	public final Map<String, String> configProperties = new HashMap<String, String>();
-	public final Set<InputStream> mappings = new HashSet<InputStream>();
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationXmlParser.java b/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationXmlParser.java
deleted file mode 100644
index b30bc7f..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/xml/ValidationXmlParser.java
+++ /dev/null
@@ -1,270 +0,0 @@
-// $Id: ValidationXmlParser.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.xml;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.MessageInterpolator;
-import javax.validation.TraversableResolver;
-import javax.validation.ValidationException;
-import javax.validation.spi.ValidationProvider;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-
-import org.slf4j.Logger;
-import org.xml.sax.SAXException;
-
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * Parser for <i>validation.xml</i> using JAXB.
- *
- * @author Hardy Ferentschik
- */
-public class ValidationXmlParser {
-
-	private static final Logger log = LoggerFactory.make();
-	private static final String VALIDATION_XML_FILE = "META-INF/validation.xml";
-	private static final String VALIDATION_CONFIGURATION_XSD = "META-INF/validation-configuration-1.0.xsd";
-
-
-	/**
-	 * Tries to check whether a validation.xml file exists and parses it using JAXB.
-	 *
-	 * @return The parameters parsed out of <i>validation.xml</i> wrapped in an instance of <code>ConfigurationImpl.ValidationBootstrapParameters</code>.
-	 */
-	public ValidationBootstrapParameters parseValidationXml() {
-		ValidationConfigType config = getValidationConfig();
-		ValidationBootstrapParameters xmlParameters = new ValidationBootstrapParameters();
-		if ( config != null ) {
-			// collect the parameters from the xml file
-			setProviderClassFromXml( config, xmlParameters );
-			setMessageInterpolatorFromXml( config, xmlParameters );
-			setTraversableResolverFromXml( config, xmlParameters );
-			setConstraintFactoryFromXml( config, xmlParameters );
-			setMappingStreamsFromXml( config, xmlParameters );
-			setPropertiesFromXml( config, xmlParameters );
-		}
-		return xmlParameters;
-	}
-
-	private void setConstraintFactoryFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
-		String constraintFactoryClass = config.getConstraintValidatorFactory();
-		if ( constraintFactoryClass != null ) {
-			try {
-				@SuppressWarnings("unchecked")
-				Class<ConstraintValidatorFactory> clazz = ( Class<ConstraintValidatorFactory> ) ReflectionHelper.loadClass(
-						constraintFactoryClass, this.getClass()
-				);
-				xmlParameters.constraintValidatorFactory = ReflectionHelper.newInstance(
-						clazz, "constraint factory class"
-				);
-				log.info( "Using {} as constraint factory.", constraintFactoryClass );
-			}
-			catch ( ValidationException e ) {
-				throw new ValidationException(
-						"Unable to instantiate constraint factory class " + constraintFactoryClass + ".", e
-				);
-			}
-		}
-	}
-
-	private void setPropertiesFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
-		for ( PropertyType property : config.getProperty() ) {
-			if ( log.isDebugEnabled() ) {
-				log.debug(
-						"Found property '{}' with value '{}' in validation.xml.",
-						property.getName(),
-						property.getValue()
-				);
-			}
-			xmlParameters.configProperties.put( property.getName(), property.getValue() );
-		}
-	}
-
-	private void setMappingStreamsFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
-		for ( String mappingFileName : config.getConstraintMapping() ) {
-			if ( log.isDebugEnabled() ) {
-				log.debug(
-						"Trying to open input stream for {}.", mappingFileName
-				);
-			}
-			InputStream in = getInputStreamForPath( mappingFileName );
-			if ( in == null ) {
-				throw new ValidationException( "Unable to open input stream for mapping file " + mappingFileName + "." );
-			}
-			xmlParameters.mappings.add( in );
-		}
-	}
-
-	private void setMessageInterpolatorFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
-		String messageInterpolatorClass = config.getMessageInterpolator();
-		if ( messageInterpolatorClass != null ) {
-			try {
-				@SuppressWarnings("unchecked")
-				Class<MessageInterpolator> clazz = ( Class<MessageInterpolator> ) ReflectionHelper.loadClass(
-						messageInterpolatorClass, this.getClass()
-				);
-				xmlParameters.messageInterpolator = clazz.newInstance();
-				log.info( "Using {} as message interpolator.", messageInterpolatorClass );
-			}
-			catch ( ValidationException e ) {
-				throw new ValidationException(
-						"Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
-				);
-			}
-			catch ( InstantiationException e ) {
-				throw new ValidationException(
-						"Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
-				);
-			}
-			catch ( IllegalAccessException e ) {
-				throw new ValidationException(
-						"Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
-				);
-			}
-		}
-	}
-
-	private void setTraversableResolverFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
-		String traversableResolverClass = config.getTraversableResolver();
-		if ( traversableResolverClass != null ) {
-			try {
-				@SuppressWarnings("unchecked")
-				Class<TraversableResolver> clazz = ( Class<TraversableResolver> ) ReflectionHelper.loadClass(
-						traversableResolverClass, this.getClass()
-				);
-				xmlParameters.traversableResolver = clazz.newInstance();
-				log.info( "Using {} as traversable resolver.", traversableResolverClass );
-			}
-			catch ( ValidationException e ) {
-				throw new ValidationException(
-						"Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
-				);
-			}
-			catch ( InstantiationException e ) {
-				throw new ValidationException(
-						"Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
-				);
-			}
-			catch ( IllegalAccessException e ) {
-				throw new ValidationException(
-						"Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
-				);
-			}
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private void setProviderClassFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParamters) {
-		String providerClassName = config.getDefaultProvider();
-		if ( providerClassName != null ) {
-			try {
-				xmlParamters.providerClass = ( Class<? extends ValidationProvider<?>> ) ReflectionHelper.loadClass(
-						providerClassName, this.getClass()
-				);
-				log.info( "Using {} as validation provider.", providerClassName );
-			}
-			catch ( Exception e ) {
-				throw new ValidationException( "Unable to instantiate validation provider class " + providerClassName + "." );
-			}
-		}
-	}
-
-	private ValidationConfigType getValidationConfig() {
-		InputStream inputStream = getInputStreamForPath( VALIDATION_XML_FILE );
-		if ( inputStream == null ) {
-			log.debug( "No {} found. Using annotation based configuration only", VALIDATION_XML_FILE );
-			return null;
-		}
-
-		log.info( "{} found.", VALIDATION_XML_FILE );
-
-		ValidationConfigType validationConfig;
-		Schema schema = getValidationConfigurationSchema();
-		try {
-			JAXBContext jc = JAXBContext.newInstance( ValidationConfigType.class );
-			Unmarshaller unmarshaller = jc.createUnmarshaller();
-			unmarshaller.setSchema( schema );
-			StreamSource stream = new StreamSource( inputStream );
-			JAXBElement<ValidationConfigType> root = unmarshaller.unmarshal( stream, ValidationConfigType.class );
-			validationConfig = root.getValue();
-		}
-		catch ( JAXBException e ) {
-			log.error( "Error parsing validation.xml: {}", e.getMessage() );
-			throw new ValidationException( "Unable to parse " + VALIDATION_XML_FILE );
-		}
-		finally {
-			try {
-				inputStream.close();
-			}
-			catch ( IOException io ) {
-				log.warn( "Unable to close input stream for " + VALIDATION_XML_FILE );
-			}
-		}
-		return validationConfig;
-	}
-
-	private InputStream getInputStreamForPath(String path) {
-		//TODO not sure it's the right thing to do (ie removing '/'
-		//remove heading '/'
-		if ( path.startsWith( "/" ) ) {
-			path = path.substring( 1 );
-		}
-
-		boolean isContextCL = true;
-		// try the context class loader first
-		ClassLoader loader = ReflectionHelper.getClassLoaderFromContext();
-
-		if ( loader == null ) {
-			log.debug( "No default context class loader, fall back to Bean Validation's loader" );
-			loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
-			isContextCL = false;
-		}
-		InputStream inputStream = loader.getResourceAsStream( path );
-
-		// try the current class loader
-		if ( isContextCL && inputStream == null ) {
-			loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
-			inputStream = loader.getResourceAsStream( path );
-		}
-		return inputStream;
-	}
-
-	private Schema getValidationConfigurationSchema() {
-		ClassLoader loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
-		URL schemaUrl = loader.getResource( VALIDATION_CONFIGURATION_XSD );
-		SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI );
-		Schema schema = null;
-		try {
-			schema = sf.newSchema( schemaUrl );
-		}
-		catch ( SAXException e ) {
-			log.warn( "Unable to create schema for {}: {}", VALIDATION_CONFIGURATION_XSD, e.getMessage() );
-		}
-		return schema;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/xml/XmlMappingParser.java b/hibernate-validator/src/main/java/org/hibernate/validator/xml/XmlMappingParser.java
deleted file mode 100644
index 4dde37e..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/xml/XmlMappingParser.java
+++ /dev/null
@@ -1,623 +0,0 @@
-// $Id: XmlMappingParser.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.xml;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.Constraint;
-import javax.validation.ConstraintValidator;
-import javax.validation.Payload;
-import javax.validation.ValidationException;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-
-import org.slf4j.Logger;
-import org.xml.sax.SAXException;
-
-import org.hibernate.validator.metadata.AnnotationIgnores;
-import org.hibernate.validator.metadata.ConstraintDescriptorImpl;
-import org.hibernate.validator.metadata.ConstraintHelper;
-import org.hibernate.validator.metadata.ConstraintOrigin;
-import org.hibernate.validator.metadata.MetaConstraint;
-import org.hibernate.validator.util.LoggerFactory;
-import org.hibernate.validator.util.ReflectionHelper;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Hardy Ferentschik
- */
-public class XmlMappingParser {
-
-	private static final Logger log = LoggerFactory.make();
-	private static final String VALIDATION_MAPPING_XSD = "META-INF/validation-mapping-1.0.xsd";
-	private static final String MESSAGE_PARAM = "message";
-	private static final String GROUPS_PARAM = "groups";
-	private static final String PAYLOAD_PARAM = "payload";
-	private static final String PACKAGE_SEPARATOR = ".";
-
-	private final Set<Class<?>> processedClasses = new HashSet<Class<?>>();
-	private final ConstraintHelper constraintHelper;
-	private final AnnotationIgnores annotationIgnores;
-	private final Map<Class<?>, List<MetaConstraint<?, ? extends Annotation>>> constraintMap;
-	private final Map<Class<?>, List<Member>> cascadedMembers;
-	private final Map<Class<?>, List<Class<?>>> defaultSequences;
-
-	public XmlMappingParser(ConstraintHelper constraintHelper) {
-		this.constraintHelper = constraintHelper;
-		this.annotationIgnores = new AnnotationIgnores();
-		this.constraintMap = new HashMap<Class<?>, List<MetaConstraint<?, ? extends Annotation>>>();
-		this.cascadedMembers = new HashMap<Class<?>, List<Member>>();
-		this.defaultSequences = new HashMap<Class<?>, List<Class<?>>>();
-	}
-
-	public void parse(Set<InputStream> mappingStreams) {
-		for ( InputStream in : mappingStreams ) {
-			ConstraintMappingsType mapping = getValidationConfig( in );
-			String defaultPackage = mapping.getDefaultPackage();
-
-			parseConstraintDefinitions( mapping.getConstraintDefinition(), defaultPackage );
-
-			for ( BeanType bean : mapping.getBean() ) {
-				Class<?> beanClass = getClass( bean.getClazz(), defaultPackage );
-				checkClassHasNotBeenProcessed( processedClasses, beanClass );
-				annotationIgnores.setDefaultIgnoreAnnotation( beanClass, bean.isIgnoreAnnotations() );
-				parseClassLevelOverrides( bean.getClassType(), beanClass, defaultPackage );
-				parseFieldLevelOverrides( bean.getField(), beanClass, defaultPackage );
-				parsePropertyLevelOverrides( bean.getGetter(), beanClass, defaultPackage );
-				processedClasses.add( beanClass );
-			}
-		}
-	}
-
-	public Set<Class<?>> getXmlConfiguredClasses() {
-		return processedClasses;
-	}
-
-	public AnnotationIgnores getAnnotationIgnores() {
-		return annotationIgnores;
-	}
-
-	public <T> List<MetaConstraint<T, ? extends Annotation>> getConstraintsForClass(Class<T> beanClass) {
-		List<MetaConstraint<T, ? extends Annotation>> list = new ArrayList<MetaConstraint<T, ? extends Annotation>>();
-		if ( constraintMap.containsKey( beanClass ) ) {
-			for ( MetaConstraint<?, ? extends Annotation> metaConstraint : constraintMap.get( beanClass ) ) {
-				@SuppressWarnings("unchecked") // safe cast since the list of meta constraints is always specific to the bean type
-						MetaConstraint<T, ? extends Annotation> boundMetaConstraint = ( MetaConstraint<T, ? extends Annotation> ) metaConstraint;
-				list.add( boundMetaConstraint );
-			}
-			return list;
-		}
-		else {
-			return Collections.emptyList();
-		}
-	}
-
-	public List<Member> getCascadedMembersForClass(Class<?> beanClass) {
-		if ( cascadedMembers.containsKey( beanClass ) ) {
-			return cascadedMembers.get( beanClass );
-		}
-		else {
-			return Collections.emptyList();
-		}
-	}
-
-	public List<Class<?>> getDefaultSequenceForClass(Class<?> beanClass) {
-		if ( defaultSequences.containsKey( beanClass ) ) {
-			return defaultSequences.get( beanClass );
-		}
-		else {
-			return Collections.emptyList();
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	private void parseConstraintDefinitions(List<ConstraintDefinitionType> constraintDefinitionList, String defaultPackage) {
-		for ( ConstraintDefinitionType constraintDefinition : constraintDefinitionList ) {
-			String annotationClassName = constraintDefinition.getAnnotation();
-
-			Class<?> clazz = getClass( annotationClassName, defaultPackage );
-			if ( !clazz.isAnnotation() ) {
-				throw new ValidationException( annotationClassName + " is not an annotation" );
-			}
-			Class<? extends Annotation> annotationClass = ( Class<? extends Annotation> ) clazz;
-
-			ValidatedByType validatedByType = constraintDefinition.getValidatedBy();
-			List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
-			if ( validatedByType.isIncludeExistingValidators() != null && validatedByType.isIncludeExistingValidators() ) {
-				constraintValidatorClasses.addAll( findConstraintValidatorClasses( annotationClass ) );
-			}
-			for ( String validatorClassName : validatedByType.getValue() ) {
-				Class<? extends ConstraintValidator<?, ?>> validatorClass;
-				validatorClass = ( Class<? extends ConstraintValidator<?, ?>> ) ReflectionHelper.loadClass(
-						validatorClassName,
-						this.getClass()
-				);
-
-
-				if ( !ConstraintValidator.class.isAssignableFrom( validatorClass ) ) {
-					throw new ValidationException( validatorClass + " is not a constraint validator class" );
-				}
-
-				constraintValidatorClasses.add( validatorClass );
-			}
-			constraintHelper.addConstraintValidatorDefinition(
-					annotationClass, constraintValidatorClasses
-			);
-		}
-	}
-
-	private List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> findConstraintValidatorClasses(Class<? extends Annotation> annotationType) {
-		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorDefinitionClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
-		if ( constraintHelper.isBuiltinConstraint( annotationType ) ) {
-			constraintValidatorDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
-		}
-		else {
-			Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
-					.getAnnotation( Constraint.class )
-					.validatedBy();
-			constraintValidatorDefinitionClasses.addAll( Arrays.asList( validatedBy ) );
-		}
-		return constraintValidatorDefinitionClasses;
-	}
-
-	private void checkClassHasNotBeenProcessed(Set<Class<?>> processedClasses, Class<?> beanClass) {
-		if ( processedClasses.contains( beanClass ) ) {
-			throw new ValidationException( beanClass.getName() + " has already be configured in xml." );
-		}
-	}
-
-	private void parseFieldLevelOverrides(List<FieldType> fields, Class<?> beanClass, String defaultPackage) {
-		List<String> fieldNames = new ArrayList<String>();
-		for ( FieldType fieldType : fields ) {
-			String fieldName = fieldType.getName();
-			if ( fieldNames.contains( fieldName ) ) {
-				throw new ValidationException( fieldName + " is defined twice in mapping xml for bean " + beanClass.getName() );
-			}
-			else {
-				fieldNames.add( fieldName );
-			}
-			final boolean containsField = ReflectionHelper.containsField( beanClass, fieldName );
-			if ( !containsField ) {
-				throw new ValidationException( beanClass.getName() + " does not contain the fieldType  " + fieldName );
-			}
-			final Field field = ReflectionHelper.getField( beanClass, fieldName );
-
-			// ignore annotations
-			boolean ignoreFieldAnnotation = fieldType.isIgnoreAnnotations() == null ? false : fieldType.isIgnoreAnnotations();
-			if ( ignoreFieldAnnotation ) {
-				annotationIgnores.setIgnoreAnnotationsOnMember( field );
-			}
-
-			// valid
-			if ( fieldType.getValid() != null ) {
-				addCascadedMember( beanClass, field );
-			}
-
-			// constraints
-			for ( ConstraintType constraint : fieldType.getConstraint() ) {
-				MetaConstraint<?, ?> metaConstraint = createMetaConstraint(
-						constraint, beanClass, field, defaultPackage
-				);
-				addMetaConstraint( beanClass, metaConstraint );
-			}
-		}
-	}
-
-	private void parsePropertyLevelOverrides(List<GetterType> getters, Class<?> beanClass, String defaultPackage) {
-		List<String> getterNames = new ArrayList<String>();
-		for ( GetterType getterType : getters ) {
-			String getterName = getterType.getName();
-			if ( getterNames.contains( getterName ) ) {
-				throw new ValidationException( getterName + " is defined twice in mapping xml for bean " + beanClass.getName() );
-			}
-			else {
-				getterNames.add( getterName );
-			}
-			boolean containsMethod = ReflectionHelper.containsMethod( beanClass, getterName );
-			if ( !containsMethod ) {
-				throw new ValidationException( beanClass.getName() + " does not contain the property  " + getterName );
-			}
-			final Method method = ReflectionHelper.getMethodFromPropertyName( beanClass, getterName );
-
-			// ignore annotations
-			boolean ignoreGetterAnnotation = getterType.isIgnoreAnnotations() == null ? false : getterType.isIgnoreAnnotations();
-			if ( ignoreGetterAnnotation ) {
-				annotationIgnores.setIgnoreAnnotationsOnMember( method );
-			}
-
-			// valid
-			if ( getterType.getValid() != null ) {
-				addCascadedMember( beanClass, method );
-			}
-
-			// constraints
-			for ( ConstraintType constraint : getterType.getConstraint() ) {
-				MetaConstraint<?, ?> metaConstraint = createMetaConstraint(
-						constraint, beanClass, method, defaultPackage
-				);
-				addMetaConstraint( beanClass, metaConstraint );
-			}
-		}
-	}
-
-	private void parseClassLevelOverrides(ClassType classType, Class<?> beanClass, String defaultPackage) {
-		if ( classType == null ) {
-			return;
-		}
-
-		// ignore annotation
-		if ( classType.isIgnoreAnnotations() != null ) {
-			annotationIgnores.setIgnoreAnnotationsOnClass( beanClass, classType.isIgnoreAnnotations() );
-		}
-
-		// group sequence
-		List<Class<?>> groupSequence = createGroupSequence( classType.getGroupSequence(), defaultPackage );
-		if ( !groupSequence.isEmpty() ) {
-			defaultSequences.put( beanClass, groupSequence );
-		}
-
-		// constraints
-		for ( ConstraintType constraint : classType.getConstraint() ) {
-			MetaConstraint<?, ?> metaConstraint = createMetaConstraint( constraint, beanClass, null, defaultPackage );
-			addMetaConstraint( beanClass, metaConstraint );
-		}
-	}
-
-	private void addMetaConstraint(Class<?> beanClass, MetaConstraint<?, ?> metaConstraint) {
-		if ( constraintMap.containsKey( beanClass ) ) {
-			constraintMap.get( beanClass ).add( metaConstraint );
-		}
-		else {
-			List<MetaConstraint<?, ? extends Annotation>> constraintList = new ArrayList<MetaConstraint<?, ? extends Annotation>>();
-			constraintList.add( metaConstraint );
-			constraintMap.put( beanClass, constraintList );
-		}
-	}
-
-	private void addCascadedMember(Class<?> beanClass, Member member) {
-		if ( cascadedMembers.containsKey( beanClass ) ) {
-			cascadedMembers.get( beanClass ).add( member );
-		}
-		else {
-			List<Member> tmpList = new ArrayList<Member>();
-			tmpList.add( member );
-			cascadedMembers.put( beanClass, tmpList );
-		}
-	}
-
-	private List<Class<?>> createGroupSequence(GroupSequenceType groupSequenceType, String defaultPackage) {
-		List<Class<?>> groupSequence = new ArrayList<Class<?>>();
-		if ( groupSequenceType != null ) {
-			for ( String groupName : groupSequenceType.getValue() ) {
-				Class<?> group = getClass( groupName, defaultPackage );
-				groupSequence.add( group );
-			}
-		}
-		return groupSequence;
-	}
-
-	private <A extends Annotation, T> MetaConstraint<?, ?> createMetaConstraint(ConstraintType constraint, Class<T> beanClass, Member member, String defaultPackage) {
-		@SuppressWarnings("unchecked")
-		Class<A> annotationClass = ( Class<A> ) getClass( constraint.getAnnotation(), defaultPackage );
-		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( annotationClass );
-
-		if ( constraint.getMessage() != null ) {
-			annotationDescriptor.setValue( MESSAGE_PARAM, constraint.getMessage() );
-		}
-		annotationDescriptor.setValue( GROUPS_PARAM, getGroups( constraint.getGroups(), defaultPackage ) );
-		annotationDescriptor.setValue( PAYLOAD_PARAM, getPayload( constraint.getPayload(), defaultPackage ) );
-
-		for ( ElementType elementType : constraint.getElement() ) {
-			String name = elementType.getName();
-			checkNameIsValid( name );
-			Class<?> returnType = getAnnotationParameterType( annotationClass, name );
-			Object elementValue = getElementValue( elementType, returnType );
-			annotationDescriptor.setValue( name, elementValue );
-		}
-
-		A annotation;
-		try {
-			annotation = AnnotationFactory.create( annotationDescriptor );
-		}
-		catch ( RuntimeException e ) {
-			throw new ValidationException(
-					"Unable to create annotation for configured constraint: " + e.getMessage(), e
-			);
-		}
-
-		java.lang.annotation.ElementType type = java.lang.annotation.ElementType.TYPE;
-		if ( member instanceof Method ) {
-			type = java.lang.annotation.ElementType.METHOD;
-		}
-		else if ( member instanceof Field ) {
-			type = java.lang.annotation.ElementType.FIELD;
-		}
-
-		// we set initially ConstraintOrigin.DEFINED_LOCALLY for all xml configured constraints
-		// later we will make copies of this constraint descriptor when needed and adjust the ConstraintOrigin
-		ConstraintDescriptorImpl<A> constraintDescriptor = new ConstraintDescriptorImpl<A>(
-				annotation, constraintHelper, type, ConstraintOrigin.DEFINED_LOCALLY
-		);
-
-		return new MetaConstraint<T, A>( beanClass, member, constraintDescriptor );
-	}
-
-	private <A extends Annotation> Class<?> getAnnotationParameterType(Class<A> annotationClass, String name) {
-		Method m = ReflectionHelper.getMethod( annotationClass, name );
-		if ( m == null ) {
-			throw new ValidationException( "Annotation of type " + annotationClass.getName() + " does not contain a parameter " + name + "." );
-		}
-		return m.getReturnType();
-	}
-
-	private Object getElementValue(ElementType elementType, Class<?> returnType) {
-		removeEmptyContentElements( elementType );
-
-		boolean isArray = returnType.isArray();
-		if ( !isArray ) {
-			if ( elementType.getContent().size() != 1 ) {
-				throw new ValidationException( "Attempt to specify an array where single value is expected." );
-			}
-			return getSingleValue( elementType.getContent().get( 0 ), returnType );
-		}
-		else {
-			List<Object> values = new ArrayList<Object>();
-			for ( Serializable s : elementType.getContent() ) {
-				values.add( getSingleValue( s, returnType.getComponentType() ) );
-			}
-			return values.toArray( ( Object[] ) Array.newInstance( returnType.getComponentType(), values.size() ) );
-		}
-	}
-
-	private void removeEmptyContentElements(ElementType elementType) {
-		List<Serializable> contentToDelete = new ArrayList<Serializable>();
-		for ( Serializable content : elementType.getContent() ) {
-			if ( content instanceof String && ( ( String ) content ).matches( "[\\n ].*" ) ) {
-				contentToDelete.add( content );
-			}
-		}
-		elementType.getContent().removeAll( contentToDelete );
-	}
-
-	private Object getSingleValue(Serializable serializable, Class<?> returnType) {
-
-		Object returnValue;
-		if ( serializable instanceof String ) {
-			String value = ( String ) serializable;
-			returnValue = convertStringToReturnType( returnType, value );
-		}
-		else if ( serializable instanceof JAXBElement && ( ( JAXBElement ) serializable ).getDeclaredType()
-				.equals( String.class ) ) {
-			JAXBElement<?> elem = ( JAXBElement<?> ) serializable;
-			String value = ( String ) elem.getValue();
-			returnValue = convertStringToReturnType( returnType, value );
-		}
-		else if ( serializable instanceof JAXBElement && ( ( JAXBElement ) serializable ).getDeclaredType()
-				.equals( AnnotationType.class ) ) {
-			JAXBElement<?> elem = ( JAXBElement<?> ) serializable;
-			AnnotationType annotationType = ( AnnotationType ) elem.getValue();
-			try {
-				@SuppressWarnings("unchecked")
-				Class<Annotation> annotationClass = ( Class<Annotation> ) returnType;
-				returnValue = createAnnotation( annotationType, annotationClass );
-			}
-			catch ( ClassCastException e ) {
-				throw new ValidationException( "Unexpected parameter value" );
-			}
-		}
-		else {
-			throw new ValidationException( "Unexpected parameter value" );
-		}
-		return returnValue;
-
-	}
-
-	private <A extends Annotation> Annotation createAnnotation(AnnotationType annotationType, Class<A> returnType) {
-		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( returnType );
-		for ( ElementType elementType : annotationType.getElement() ) {
-			String name = elementType.getName();
-			Class<?> parameterType = getAnnotationParameterType( returnType, name );
-			Object elementValue = getElementValue( elementType, parameterType );
-			annotationDescriptor.setValue( name, elementValue );
-		}
-		return AnnotationFactory.create( annotationDescriptor );
-	}
-
-	private Object convertStringToReturnType(Class<?> returnType, String value) {
-		Object returnValue;
-		if ( returnType.getName().equals( byte.class.getName() ) ) {
-			try {
-				returnValue = Byte.parseByte( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid byte format", e );
-			}
-		}
-		else if ( returnType.getName().equals( short.class.getName() ) ) {
-			try {
-				returnValue = Short.parseShort( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid short format", e );
-			}
-		}
-		else if ( returnType.getName().equals( int.class.getName() ) ) {
-			try {
-				returnValue = Integer.parseInt( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid int format", e );
-			}
-		}
-		else if ( returnType.getName().equals( long.class.getName() ) ) {
-			try {
-				returnValue = Long.parseLong( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid long format", e );
-			}
-		}
-		else if ( returnType.getName().equals( float.class.getName() ) ) {
-			try {
-				returnValue = Float.parseFloat( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid float format", e );
-			}
-		}
-		else if ( returnType.getName().equals( double.class.getName() ) ) {
-			try {
-				returnValue = Double.parseDouble( value );
-			}
-			catch ( NumberFormatException e ) {
-				throw new ValidationException( "Invalid double format", e );
-			}
-		}
-		else if ( returnType.getName().equals( boolean.class.getName() ) ) {
-			returnValue = Boolean.parseBoolean( value );
-		}
-		else if ( returnType.getName().equals( char.class.getName() ) ) {
-			if ( value.length() != 1 ) {
-				throw new ValidationException( "Invalid char value: " + value );
-			}
-			returnValue = value.charAt( 0 );
-		}
-		else if ( returnType.getName().equals( String.class.getName() ) ) {
-			returnValue = value;
-		}
-		else if ( returnType.getName().equals( Class.class.getName() ) ) {
-			returnValue = ReflectionHelper.loadClass( value, this.getClass() );
-		}
-		else {
-			try {
-				@SuppressWarnings("unchecked")
-				Class<Enum> enumClass = ( Class<Enum> ) returnType;
-				returnValue = Enum.valueOf( enumClass, value );
-			}
-			catch ( ClassCastException e ) {
-				throw new ValidationException( "Invalid return type: " + returnType + ". Should be a enumeration type." );
-			}
-		}
-		return returnValue;
-	}
-
-	private void checkNameIsValid(String name) {
-		if ( MESSAGE_PARAM.equals( name ) || GROUPS_PARAM.equals( name ) ) {
-			throw new ValidationException( MESSAGE_PARAM + ", " + GROUPS_PARAM + ", " + PAYLOAD_PARAM + " are reserved parameter names." );
-		}
-	}
-
-	private Class<?>[] getGroups(GroupsType groupsType, String defaultPackage) {
-		if ( groupsType == null ) {
-			return new Class[] { };
-		}
-
-		List<Class<?>> groupList = new ArrayList<Class<?>>();
-		for ( String groupClass : groupsType.getValue() ) {
-			groupList.add( getClass( groupClass, defaultPackage ) );
-		}
-		return groupList.toArray( new Class[groupList.size()] );
-	}
-
-	@SuppressWarnings("unchecked")
-	private Class<? extends Payload>[] getPayload(PayloadType payloadType, String defaultPackage) {
-		if ( payloadType == null ) {
-			return new Class[] { };
-		}
-
-		List<Class<? extends Payload>> payloadList = new ArrayList<Class<? extends Payload>>();
-		for ( String groupClass : payloadType.getValue() ) {
-			Class<?> payload = getClass( groupClass, defaultPackage );
-			if ( !Payload.class.isAssignableFrom( payload ) ) {
-				throw new ValidationException( "Specified payload class " + payload.getName() + " does not implement javax.validation.Payload" );
-			}
-			else {
-				payloadList.add( ( Class<? extends Payload> ) payload );
-			}
-		}
-		return payloadList.toArray( new Class[payloadList.size()] );
-	}
-
-	private Class<?> getClass(String clazz, String defaultPackage) {
-		String fullyQualifiedClass;
-		if ( isQualifiedClass( clazz ) ) {
-			fullyQualifiedClass = clazz;
-		}
-		else {
-			fullyQualifiedClass = defaultPackage + PACKAGE_SEPARATOR + clazz;
-		}
-		return ReflectionHelper.loadClass( fullyQualifiedClass, this.getClass() );
-	}
-
-	private boolean isQualifiedClass(String clazz) {
-		return clazz.contains( PACKAGE_SEPARATOR );
-	}
-
-	private ConstraintMappingsType getValidationConfig(InputStream in) {
-		ConstraintMappingsType constraintMappings;
-		Schema schema = getMappingSchema();
-		try {
-			JAXBContext jc = JAXBContext.newInstance( ConstraintMappingsType.class );
-			Unmarshaller unmarshaller = jc.createUnmarshaller();
-			unmarshaller.setSchema( schema );
-			StreamSource stream = new StreamSource( in );
-			JAXBElement<ConstraintMappingsType> root = unmarshaller.unmarshal( stream, ConstraintMappingsType.class );
-			constraintMappings = root.getValue();
-		}
-		catch ( JAXBException e ) {
-			String msg = "Error parsing mapping file.";
-			log.error( msg );
-			throw new ValidationException( msg, e );
-		}
-		return constraintMappings;
-	}
-
-	private Schema getMappingSchema() {
-		ClassLoader loader = ReflectionHelper.getClassLoaderFromClass( XmlMappingParser.class );
-		URL schemaUrl = loader.getResource( VALIDATION_MAPPING_XSD );
-		SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI );
-		Schema schema = null;
-		try {
-			schema = sf.newSchema( schemaUrl );
-		}
-		catch ( SAXException e ) {
-			log.warn( "Unable to create schema for {}: {}", VALIDATION_MAPPING_XSD, e.getMessage() );
-		}
-		return schema;
-	}
-}
diff --git a/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html b/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html
deleted file mode 100644
index cd87dd9..0000000
--- a/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ $Id: package.html 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-  ~
-  ~ JBoss, Home of Professional Open Source
-  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-  ~ by the @authors tag. See the copyright.txt in the distribution for a
-  ~ full listing of individual contributors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-</head>
-<body>
-Classes used to parse Bean Validation XML configuration files.
-</body>
-</html>
diff --git a/hibernate-validator/src/main/resources/META-INF/MANIFEST.MF b/hibernate-validator/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 87839de..0000000
--- a/hibernate-validator/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Built-By: ${user.name}
-Build-Jdk: ${java.version}
-Implementation-Title: ${pom.artifactId}
-Implementation-Vendor: ${pom.groupId}
-Implementation-Vendor-Id: ${pom.groupId}
-Implementation-Version: ${pom.version}
-Specification-Title: Bean Validation
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages.properties
deleted file mode 100644
index 0e92c8f..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# $Id: ValidationMessages.properties 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-javax.validation.constraints.AssertFalse.message=must be false
-javax.validation.constraints.AssertTrue.message=must be true
-javax.validation.constraints.DecimalMax.message=must be less than or equal to {value}
-javax.validation.constraints.DecimalMin.message=must be greater than or equal to {value}
-javax.validation.constraints.Digits.message=numeric value out of bounds (<{integer} digits>.<{fraction} digits> expected)
-javax.validation.constraints.Future.message=must be in the future
-javax.validation.constraints.Max.message=must be less than or equal to {value}
-javax.validation.constraints.Min.message=must be greater than or equal to {value}
-javax.validation.constraints.NotNull.message=may not be null
-javax.validation.constraints.Null.message=must be null
-javax.validation.constraints.Past.message=must be in the past
-javax.validation.constraints.Pattern.message=must match "{regexp}"
-javax.validation.constraints.Size.message=size must be between {min} and {max}
-org.hibernate.validator.constraints.Email.message=not a well-formed email address
-org.hibernate.validator.constraints.Length.message=length must be between {min} and {max}
-org.hibernate.validator.constraints.NotBlank.message=may not be empty
-org.hibernate.validator.constraints.NotEmpty.message=may not be empty
-org.hibernate.validator.constraints.Range.message=must be between {min} and {max}
-org.hibernate.validator.constraints.URL.message=must be a valid URL
-org.hibernate.validator.constraints.CreditCardNumber.message=invalid credit card number
-org.hibernate.validator.constraints.ScriptAssert.message=script expression "{script}" didn't evaluate to true
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties
deleted file mode 100644
index 194b15d..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# $Id: ValidationMessages_de.properties 19251 2010-04-20 15:28:18Z hardy.ferentschik $
-javax.validation.constraints.NotNull.message=kann nicht null sein
-javax.validation.constraints.Size.message=muss zwischen {min} und {max} liegen
-javax.validation.constraints.Pattern.message=muss auf Ausdruck "{regexp}" passen
-javax.validation.constraints.Min.message=muss gr\u00F6ssergleich {value} sein
-javax.validation.constraints.Max.message=muss kleinergleich {value} sein
-javax.validation.constraints.Null.message=muss null sein
-javax.validation.constraints.Past.message=muss in der Vergangenheit liegen
-javax.validation.constraints.Future.message=muss in der Zukunft liegen
-javax.validation.constraints.AssertTrue.message=muss wahr sein
-javax.validation.constraints.AssertFalse.message=muss falsch sein
-javax.validation.constraints.Digits.message=numerischer Wert au\u00DFerhalb erlaubten Wertebereichs (<{integer} Ziffern>.<{fraction} Ziffern> erwartet)
-javax.validation.constraints.DecimalMin.message=muss gr\u00F6ssergleich {value} sein
-javax.validation.constraints.DecimalMax.message=muss kleinergleich {value} sein
-org.hibernate.validator.constraints.Email.message=keine g\u00FCltige E-Mail-Adresse
-org.hibernate.validator.constraints.Length.message=muss zwischen {min} und {max} liegen
-org.hibernate.validator.constraints.NotBlank.message=kann nicht leer sein
-org.hibernate.validator.constraints.NotEmpty.message=kann nicht leer sein
-org.hibernate.validator.constraints.Range.message=muss zwischen {min} und {max} liegen
-org.hibernate.validator.constraints.URL.message=muss eine g\u00FCltige URL sein
-org.hibernate.validator.constraints.CreditCardNumber.message=ung\u00FCltige Kreditkartennummer
-org.hibernate.validator.constraints.ScriptAssert.message=Skriptausdruck "{script}" muss true zur\u00FCckliefern
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties
deleted file mode 100644
index cea61f0..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# $Id: ValidationMessages_en.properties 19090 2010-03-23 15:22:59Z hardy.ferentschik $
-# This file is intentionally left empty. All calls to this bundle will
-# be delegated to the parent bundle ValidationMessages (which contains 
-# English messages).
-#
-# Not providing this bundle would cause the bundle for the default 
-# locale to take precedence over the base bundle. If the default locale 
-# is not English but one, for which a resource bundle exists (e.g. German),
-# the English texts would never be returned.
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties
deleted file mode 100644
index 44713b5..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Id: ValidationMessages_fr.properties 19252 2010-04-20 15:29:43Z hardy.ferentschik $
-javax.validation.constraints.NotNull.message=ne peut pas \u00EAtre nul
-javax.validation.constraints.Size.message=la taille doit \u00EAtre entre {min} et {max}
-javax.validation.constraints.Pattern.message=doit suivre "{regexp}"
-javax.validation.constraints.Min.message=doit \u00EAtre plus grand que {value}
-javax.validation.constraints.Max.message=doit \u00EAtre plus petit que {value}
-javax.validation.constraints.Null.message=doit \u00EAtre nul
-javax.validation.constraints.Past.message=doit \u00EAtre dans le pass\u00E9
-javax.validation.constraints.Future.message=doit \u00EAtre dans le futur
-javax.validation.constraints.AssertTrue.message=doit \u00EAtre vrai
-javax.validation.constraints.AssertFalse.message=doit \u00EAtre faux
-javax.validation.constraints.Digits.message=Valeur num\u00E9rique hors limite (<{integer} chiffres>.<{fraction} chiffres> attendus)
-javax.validation.constraints.DecimalMin.message=doit \u00EAtre plus grand que {value}
-javax.validation.constraints.DecimalMax.message=doit \u00EAtre plus petit que {value}
-org.hibernate.validator.constraints.Email.message=Addresse email mal form\u00E9e
-org.hibernate.validator.constraints.Length.message=la taille doit \u00EAtre entre {min} et {max}
-org.hibernate.validator.constraints.NotBlank.message=ne peut pas \u00EAtre vide
-org.hibernate.validator.constraints.NotEmpty.message=ne peut pas \u00EAtre vide
-org.hibernate.validator.constraints.Range.message=doit \u00EAtre entre {min} et {max}
-org.hibernate.validator.constraints.URL.message=URL mal form\u00E9e
-org.hibernate.validator.constraints.CreditCardNumber.message=Num\u00E9ro de carte de cr\u00E9dit invalide
\ No newline at end of file
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties
deleted file mode 100644
index e31521f..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-javax.validation.constraints.AssertFalse.message=\u0425\u0443\u0434\u0430\u043B \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.AssertTrue.message=\u04AE\u043D\u044D\u043D \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.DecimalMax.message={value}-\u0430\u0430\u0441 \u0431\u0430\u0433\u0430 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.DecimalMin.message={value}-\u0430\u0430\u0441 \u0438\u0445 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Digits.message=\u0422\u043E\u043E\u043D \u0445\u044F\u0437\u0433\u0430\u0430\u0440\u0430\u0430\u0441 \u0445\u044D\u0442\u044D\u0440\u0441\u044D\u043D \u0431\u0430\u0439\u043D\u0430 (<{integerDigits} digits>.<{fractionalDigits} digits> \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430)
-javax.validation.constraints.Future.message=\u0418\u0440\u044D\u044D\u0434\u04AF\u0439\u0434 \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Max.message={value}-\u0430\u0430\u0441 \u0431\u0430\u0433\u0430 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Min.message={value}-\u0430\u0430\u0441 \u0438\u0445 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.NotNull.message=null \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
-javax.validation.constraints.Null.message=null \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Past.message=\u04E8\u043D\u0433\u04E9\u0440\u0441\u04E9\u043D\u0434 \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Pattern.message=\"{regexp}\"-\u0434 \u0442\u0430\u0430\u0440\u0430\u0445 \u0451\u0441\u0442\u043E\u0439
-javax.validation.constraints.Size.message=\u0425\u044D\u043C\u0436\u044D\u044D {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
-org.hibernate.validator.constraints.Email.message=\u0411\u0443\u0440\u0443\u0443 \u0438-\u043C\u044D\u0439\u043B \u0445\u0430\u044F\u0433 \u0431\u0430\u0439\u043D\u0430
-org.hibernate.validator.constraints.Length.message=\u0422\u044D\u043C\u0434\u044D\u0433\u0442\u0438\u0439\u043D \u0443\u0440\u0442 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
-org.hibernate.validator.constraints.NotBlank.message=\u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
-org.hibernate.validator.constraints.NotEmpty.message=\u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
-org.hibernate.validator.constraints.Range.message=\u0423\u0442\u0433\u0430 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
\ No newline at end of file
diff --git a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties b/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
deleted file mode 100644
index 01acd7f..0000000
--- a/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-javax.validation.constraints.AssertFalse.message=teyit ba\u015far\u0131s\u0131z
-javax.validation.constraints.AssertTrue.message=teyit ba\u015far\u0131s\u0131z
-javax.validation.constraints.DecimalMax.message='{value}' de\u011ferinden k\u00fc\u00e7\u00fck yada e\u015fit olmal\u0131
-javax.validation.constraints.DecimalMin.message='{value}' de\u011ferinden b\u00fcy\u00fck yada e\u015fit olmal\u0131
-javax.validation.constraints.Digits.message=s\u0131n\u0131rlar\u0131n d\u0131\u015f\u0131nda say\u0131sal de\u011fer (beklenen <{integerDigits} basamak>.<{fractionalDigits} basamak>)
-javax.validation.constraints.Future.message=ileri bir tarih olmal\u0131
-javax.validation.constraints.Max.message='{value}' de\u011ferinden k\u00fc\u00e7\u00fck yada e\u015fit olmal\u0131
-javax.validation.constraints.Min.message='{value}' de\u011ferinden b\u00fcy\u00fck yada e\u015fit olmal\u0131
-javax.validation.constraints.NotNull.message=bo\u015f de\u011fer olamaz
-javax.validation.constraints.Null.message=bo\u015f de\u011fer olmal\u0131
-javax.validation.constraints.Past.message=ge\u00e7mi\u015f bir tarih olmal\u0131
-javax.validation.constraints.Pattern.message='{regexp}' ile e\u015fle\u015fmeli
-javax.validation.constraints.Size.message=boyut '{min}' ile '{max}' aras\u0131nda olmal\u0131
-org.hibernate.validator.constraints.Length.message=uzunluk '{min}' ile '{max}' aras\u0131nda olmal\u0131
-org.hibernate.validator.constraints.NotBlank.message=bo\u015f de\u011fer olamaz
-org.hibernate.validator.constraints.NotEmpty.message=bo\u015f de\u011fer olamaz
-org.hibernate.validator.constraints.Email.message=d\u00fczg\u00fcn bi\u00e7imli bir e-posta adresi de\u011fil!
-org.hibernate.validator.constraints.Range.message={min} ve {max} aras\u0131nda olmal\u0131d\u0131r!
diff --git a/hibernate-validator/src/main/xjb/binding-customization.xjb b/hibernate-validator/src/main/xjb/binding-customization.xjb
deleted file mode 100644
index 1318ed1..0000000
--- a/hibernate-validator/src/main/xjb/binding-customization.xjb
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
-    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
-    <jxb:bindings schemaLocation="../xsd/validation-mapping-1.0.xsd" node="/xs:schema">
-        <jxb:globalBindings>
-            <xjc:javaType name="java.lang.String" xmlType="xs:string" 
-                adapter="javax.xml.bind.annotation.adapters.CollapsedStringAdapter"/>
-        </jxb:globalBindings>
-
-        <jxb:bindings node="//xs:complexType[9]/xs:sequence[1]/xs:element[1]">
-            <jxb:property name="classType"/>
-        </jxb:bindings>
-    </jxb:bindings>
-</jxb:bindings>
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/ValidationMessages.java b/hibernate-validator/src/test/java/org/hibernate/validator/ValidationMessages.java
deleted file mode 100644
index 5ede395..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/ValidationMessages.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id: ValidationMessages.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.util.LoggerFactory;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ValidationMessages extends ResourceBundle {
-
-	private static final Logger log = LoggerFactory.make();
-
-	private static final String DEFAULT_PROPERTIES_FILE_NAME = "/org/hibernate/validator/ValidationMessages.properties";
-
-	private Map<String, String> messages = new HashMap<String, String>();
-
-	public ValidationMessages() throws Exception {
-
-		log.info( "For test purposes are we proxying the buildin messages!" );
-		addTestPropertiesToBundle();
-		log.info( "Adding the following properties to default properties {}", messages );
-
-		loadDefaultValidationProperties();
-	}
-
-	private void addTestPropertiesToBundle() {
-		messages.put( "replace.in.default.bundle1", "{replace.in.default.bundle2}" );
-		messages.put( "replace.in.default.bundle2", "foobar" );
-	}
-
-	private void loadDefaultValidationProperties() throws IOException {
-		InputStream in = this.getClass()
-				.getResourceAsStream( DEFAULT_PROPERTIES_FILE_NAME );
-		PropertyResourceBundle propertyBundle = new PropertyResourceBundle( in );
-		setParent( propertyBundle );
-	}
-
-	protected Object handleGetObject(String key) {
-		return messages.get( key );
-	}
-
-	public Enumeration<String> getKeys() {
-		throw new RuntimeException( "Not needed for testing purposes." );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java
deleted file mode 100644
index 03a3e9a..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id: HibernateValidatorConfigurationTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test;
-
-import javax.validation.Validation;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-
-import static org.testng.Assert.assertNotNull;
-
-/**
- * Test for {@link org.hibernate.validator.HibernateValidatorConfiguration}.
- *
- * @author Gunnar Morling
- */
-public class HibernateValidatorConfigurationTest {
-
-	@Test
-	public void defaultResourceBundleLocatorCanBeRetrieved() {
-		HibernateValidatorConfiguration configure = Validation.byProvider( HibernateValidator.class ).configure();
-		ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator();
-
-		assertNotNull( defaultResourceBundleLocator );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Customer.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Customer.java
deleted file mode 100644
index 6873de7..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Customer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id: Customer.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.bootstrap;
-
-import java.util.HashSet;
-import java.util.Set;
-import javax.validation.Valid;
-
-import org.hibernate.validator.constraints.NotEmpty;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Customer {
-	@NotEmpty
-	private String firstName;
-	private String middleName;
-	@NotEmpty
-	private String lastName;
-
-	@Valid
-	private Set<Order> orders = new HashSet<Order>();
-
-	public void addOrder(Order order) {
-		orders.add( order );
-	}
-
-	public Set<Order> getOrders() {
-		return orders;
-	}
-
-	public String getFirstName() {
-		return firstName;
-	}
-
-	public void setFirstName(String firstName) {
-		this.firstName = firstName;
-	}
-
-	public String getMiddleName() {
-		return middleName;
-	}
-
-	public void setMiddleName(String middleName) {
-		this.middleName = middleName;
-	}
-
-	public String getLastName() {
-		return lastName;
-	}
-
-	public void setLastName(String lastName) {
-		this.lastName = lastName;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Order.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Order.java
deleted file mode 100644
index 1c7cbd9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/Order.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: Order.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.bootstrap;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Order {
-	@NotNull
-	Integer orderNumber;
-
-	public Integer getOrderNumber() {
-		return orderNumber;
-	}
-
-	public void setOrderNumber(Integer orderNumber) {
-		this.orderNumber = orderNumber;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/ValidationTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/ValidationTest.java
deleted file mode 100644
index 4a1c67d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/bootstrap/ValidationTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-// $Id: ValidationTest.java 19640 2010-06-01 12:16:12Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.bootstrap;
-
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-import javax.validation.ConstraintValidatorFactory;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.constraints.impl.NotNullValidator;
-import org.hibernate.validator.engine.ConfigurationImpl;
-import org.hibernate.validator.engine.ConstraintValidatorFactoryImpl;
-import org.hibernate.validator.engine.ValidatorFactoryImpl;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Tests the Bean Validation bootstrapping.
- *
- * @author Hardy Ferentschik
- */
-public class ValidationTest {
-
-	@Test
-	public void testBootstrapAsServiceWithBuilder() {
-		HibernateValidatorConfiguration configuration = Validation
-				.byProvider( HibernateValidator.class )
-				.configure();
-		assertDefaultBuilderAndFactory( configuration );
-	}
-
-	@Test
-	public void testBootstrapAsServiceDefault() {
-		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
-		assertDefaultFactory( factory );
-	}
-
-	@Test
-	public void testCustomConstraintValidatorFactory() {
-
-		Configuration<?> configuration = Validation.byDefaultProvider().configure();
-		assertDefaultBuilderAndFactory( configuration );
-
-		ValidatorFactory factory = configuration.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Customer customer = new Customer();
-		customer.setFirstName( "John" );
-
-		Set<ConstraintViolation<Customer>> constraintViolations = validator.validate( customer );
-		assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
-		ConstraintViolation<Customer> constraintViolation = constraintViolations.iterator().next();
-		assertEquals( "may not be empty", constraintViolation.getMessage(), "Wrong message" );
-
-		// get a new factory using a custom configuration
-		configuration = Validation.byDefaultProvider().configure();
-		configuration.constraintValidatorFactory(
-				new ConstraintValidatorFactory() {
-
-					public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
-						if ( key == NotNullValidator.class ) {
-							return ( T ) new BadlyBehavedNotNullConstraintValidator();
-						}
-						return new ConstraintValidatorFactoryImpl().getInstance( key );
-					}
-				}
-		);
-		factory = configuration.buildValidatorFactory();
-		validator = factory.getValidator();
-		constraintViolations = validator.validate( customer );
-		assertEquals( constraintViolations.size(), 0, "Wrong number of constraints" );
-	}
-
-	/**
-	 * HV-328
-	 */
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNullInputStream() {
-		Configuration<?> configuration = Validation.byDefaultProvider().configure();
-		configuration.addMapping( null );
-		configuration.buildValidatorFactory();
-	}
-
-	private void assertDefaultBuilderAndFactory(Configuration configuration) {
-		assertNotNull( configuration );
-		assertTrue( configuration instanceof ConfigurationImpl );
-
-		ValidatorFactory factory = configuration.buildValidatorFactory();
-		assertDefaultFactory( factory );
-	}
-
-	private void assertDefaultFactory(ValidatorFactory factory) {
-		assertNotNull( factory );
-		assertTrue( factory instanceof ValidatorFactoryImpl );
-	}
-
-	class BadlyBehavedNotNullConstraintValidator extends NotNullValidator {
-		@Override
-		public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
-			return true;
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
deleted file mode 100644
index d8c64ea..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
+++ /dev/null
@@ -1,302 +0,0 @@
-// $Id: ConstraintMappingTest.java 19639 2010-06-01 11:52:20Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import org.slf4j.Logger;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.cfg.defs.AssertTrueDef;
-import org.hibernate.validator.cfg.defs.FutureDef;
-import org.hibernate.validator.cfg.defs.GenericConstraintDef;
-import org.hibernate.validator.cfg.defs.MinDef;
-import org.hibernate.validator.cfg.defs.NotEmptyDef;
-import org.hibernate.validator.cfg.defs.NotNullDef;
-import org.hibernate.validator.cfg.defs.SizeDef;
-import org.hibernate.validator.test.util.TestUtil;
-import org.hibernate.validator.util.LoggerFactory;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static org.hibernate.validator.test.util.TestUtil.assertConstraintViolation;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintViolationMessages;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-import static org.testng.Assert.assertTrue;
-import static org.testng.FileAssert.fail;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintMappingTest {
-	private static final Logger log = LoggerFactory.make();
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNullConstraintMapping() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( ( ConstraintMapping ) null );
-		config.buildValidatorFactory();
-	}
-
-	@Test
-	public void testConstraintMapping() {
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.property( "name", METHOD )
-				.constraint( NotNullDef.class )
-				.property( "numberOfHelpers", FIELD )
-				.constraint( MinDef.class ).value( 1 );
-
-		assertTrue( mapping.getConstraintConfig().containsKey( Marathon.class ) );
-		assertTrue( mapping.getConstraintConfig().get( Marathon.class ).size() == 2 );
-	}
-
-	@Test
-	public void testNoConstraintViolationForUnmappedEntity() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( new Marathon() );
-		assertNumberOfViolations( violations, 0 );
-	}
-
-	@Test
-	public void testSingleConstraint() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.property( "name", METHOD )
-				.constraint( NotNullDef.class );
-
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( new Marathon() );
-		assertNumberOfViolations( violations, 1 );
-		assertConstraintViolation( violations.iterator().next(), "may not be null" );
-	}
-
-	@Test
-	public void testInheritedConstraint() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping
-				.type( Marathon.class )
-				.property( "name", METHOD )
-				.constraint( NotNullDef.class )
-				.type( Tournament.class )
-				.property( "tournamentDate", METHOD )
-				.constraint( FutureDef.class );
-
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Marathon marathon = new Marathon();
-		marathon.setName( "New York Marathon" );
-		Calendar cal = GregorianCalendar.getInstance();
-		cal.set( Calendar.YEAR, -1 );
-		marathon.setTournamentDate( cal.getTime() );
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-		assertConstraintViolation( violations.iterator().next(), "must be in the future" );
-	}
-
-	@Test
-	public void testValid() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.valid( "runners", METHOD )
-				.type( Runner.class )
-				.property( "paidEntryFee", FIELD )
-				.constraint( AssertTrueDef.class );
-
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Marathon marathon = new Marathon();
-		marathon.setName( "New York Marathon" );
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 0 );
-
-		marathon.addRunner( new Runner() );
-		violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-		assertConstraintViolation( violations.iterator().next(), "must be true" );
-	}
-
-	@Test
-	public void testSingleConstraintWrongAccessType() {
-		ConstraintMapping mapping = new ConstraintMapping();
-		try {
-			mapping
-					.type( Marathon.class )
-					.property( "numberOfHelpers", METHOD )
-					.constraint( NotNullDef.class );
-			fail();
-		}
-		catch ( ValidationException e ) {
-			log.debug( e.toString() );
-		}
-	}
-
-	@Test
-	public void testDefaultGroupSequence() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping
-				.type( Marathon.class )
-				.defaultGroupSequence( Foo.class, Marathon.class )
-				.property( "name", METHOD )
-				.constraint( NotNullDef.class ).groups( Foo.class )
-				.property( "runners", METHOD )
-				.constraint( NotEmptyDef.class );
-
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Marathon marathon = new Marathon();
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-		assertConstraintViolation( violations.iterator().next(), "may not be null" );
-
-		marathon.setName( "Stockholm Marathon" );
-		violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-		assertConstraintViolation( violations.iterator().next(), "may not be empty" );
-	}
-
-	@Test
-	public void testMultipleConstraintOfTheSameType() {
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.property( "name", METHOD )
-				.constraint( SizeDef.class ).min( 5 )
-				.constraint( SizeDef.class ).min( 10 );
-
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Marathon marathon = new Marathon();
-		marathon.setName( "Foo" );
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 2 );
-
-		marathon.setName( "Foobar" );
-		violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-
-		marathon.setName( "Stockholm Marathon" );
-		violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 0 );
-	}
-
-	@Test
-	public void testCustomConstraintTypeMissingParameter() {
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.constraint( GenericConstraintDef.class )
-				.constraintType( MarathonConstraint.class );
-
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( mapping );
-		try {
-			config.buildValidatorFactory();
-			fail( "MarathonConstraints needs a parameter" );
-		}
-		catch ( ValidationException e ) {
-			assertTrue( e.getMessage().contains( "No value provided for minRunner" ) );
-		}
-	}
-
-	@Test
-	public void testCustomConstraintType() {
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Marathon.class )
-				.constraint( GenericConstraintDef.class )
-				.constraintType( MarathonConstraint.class )
-				.param( "minRunner", 100 )
-				.message( "Needs more runners" );
-
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		Marathon marathon = new Marathon();
-		marathon.setName( "Stockholm Marathon" );
-
-		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 1 );
-		assertCorrectConstraintViolationMessages( violations, "Needs more runners" );
-
-		for ( int i = 0; i < 100; i++ ) {
-			marathon.addRunner( new Runner() );
-		}
-		violations = validator.validate( marathon );
-		assertNumberOfViolations( violations, 0 );
-	}
-
-	@Test(expectedExceptions = ValidationException.class)
-	public void testNullBean() {
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( null )
-				.constraint( GenericConstraintDef.class )
-				.constraintType( MarathonConstraint.class );
-
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( mapping );
-		config.buildValidatorFactory();
-	}
-
-	public interface Foo {
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Marathon.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Marathon.java
deleted file mode 100644
index c01da91..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Marathon.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id: Marathon.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Marathon implements Tournament {
-
-	private String name;
-
-	private long numberOfHelpers;
-
-	private Date tournamentDate;
-
-	private List<Runner> runners;
-
-	public Marathon() {
-		runners = new ArrayList<Runner>();
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public Date getTournamentDate() {
-		return tournamentDate;
-	}
-
-	public void setTournamentDate(Date tournamentDate) {
-		this.tournamentDate = tournamentDate;
-	}
-
-	public List<Runner> getRunners() {
-		return runners;
-	}
-
-	public void addRunner(Runner runner) {
-		runners.add( runner );
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java
deleted file mode 100644
index 92ad5cf..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: MarathonConstraint.java 19636 2010-05-31 14:31:14Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * @author Hardy Ferentschik
- */
- at Target({ TYPE })
- at Retention(RUNTIME)
- at Constraint(validatedBy = { MarathonConstraintValidator.class })
-public @interface MarathonConstraint {
-	public String message() default "invalid name";
-
-	public Class<?>[] groups() default { };
-
-	public Class<? extends Payload>[] payload() default { };
-
-	public int minRunner();
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java
deleted file mode 100644
index c00f651..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: MarathonConstraintValidator.java 19636 2010-05-31 14:31:14Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class MarathonConstraintValidator implements ConstraintValidator<MarathonConstraint, Marathon> {
-	private int minRunners;
-
-	public void initialize(MarathonConstraint constraintAnnotation) {
-		minRunners = constraintAnnotation.minRunner();
-	}
-
-	public boolean isValid(Marathon m, ConstraintValidatorContext context) {
-		return m.getRunners().size() >= minRunners;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
deleted file mode 100644
index cf4c5b9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: Runner.java 19597 2010-05-24 19:18:21Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Runner {
-	private String name;
-
-	private boolean paidEntryFee;
-
-	public boolean isPaidEntryFee() {
-		return paidEntryFee;
-	}
-
-	public void setPaidEntryFee(boolean paidEntryFee) {
-		this.paidEntryFee = paidEntryFee;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Tournament.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
deleted file mode 100644
index 9aed72f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: Tournament.java 19596 2010-05-24 10:31:09Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.cfg;
-
-import java.util.Date;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface Tournament {
-	Date getTournamentDate();
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java
deleted file mode 100644
index 0d881c2..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-// $Id: ClassValidatorWithTypeVariableTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Valid;
-import javax.validation.Validator;
-import javax.validation.constraints.NotNull;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintTypes;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectPropertyPaths;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * HV-250
- */
-public class ClassValidatorWithTypeVariableTest {
-
-	private Validator validator;
-
-	@BeforeClass
-	public void setUp() {
-		validator = TestUtil.getValidator();
-	}
-
-	@Test
-	public void offersNull() {
-		Batch batch = new Batch( null );
-
-		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
-		assertNumberOfViolations( violations, 1 );
-		assertCorrectPropertyPaths( violations, "offers" );
-		assertCorrectConstraintTypes( violations, NotNull.class );
-	}
-
-	@Test
-	public void offerItemNull() {
-		ItemAOffer offer = new ItemAOffer( null );
-		Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
-		offers.add( offer );
-		Batch batch = new Batch( offers );
-
-		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
-		assertNumberOfViolations( violations, 1 );
-		assertCorrectPropertyPaths( violations, "offers[].item" );
-		assertCorrectConstraintTypes( violations, NotNull.class );
-	}
-
-	@Test
-	public void offerItemDateNull() {
-		ItemA item = new ItemA( null );
-		ItemOffer<? extends Item> offer = new ItemAOffer( item );
-		Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
-		offers.add( offer );
-		Batch batch = new Batch( offers );
-
-		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
-		assertNumberOfViolations( violations, 1 );
-		assertCorrectPropertyPaths( violations, "offers[].item.date" );
-		assertCorrectConstraintTypes( violations, NotNull.class );
-	}
-
-	private class Batch {
-		@NotNull
-		@Valid
-		private Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
-
-		public Batch(Set<ItemOffer<? extends Item>> offers) {
-			this.offers = offers;
-		}
-	}
-
-	private abstract class Item {
-		@NotNull
-		private Date date;
-
-		public Item(Date date) {
-			this.date = date;
-		}
-	}
-
-	private abstract class ItemOffer<T extends Item> {
-		@NotNull
-		@Valid
-		private T item;
-
-		public ItemOffer(T item) {
-			this.item = item;
-		}
-	}
-
-	private class ItemA extends Item {
-		public ItemA(Date date) {
-			super( date );
-		}
-	}
-
-	private class ItemAOffer extends ItemOffer<ItemA> {
-		public ItemAOffer(ItemA item) {
-			super( item );
-		}
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java
deleted file mode 100644
index 21b2f2c..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: Cloneable.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-
-/**
- * @author Hardy Ferentschik
- */
- at Constraint(validatedBy = { CloneableConstraintValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
-public @interface Cloneable {
-	public abstract String message() default "{org.hibernate.validator.constraints.Cloneable.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java
deleted file mode 100644
index 88c5a7b..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: CloneableConstraintValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CloneableConstraintValidator implements ConstraintValidator<org.hibernate.validator.test.constraints.Cloneable, java.lang.Cloneable> {
-
-	public void initialize(org.hibernate.validator.test.constraints.Cloneable annotation) {
-	}
-
-	public boolean isValid(java.lang.Cloneable value, ConstraintValidatorContext constraintValidatorContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java
deleted file mode 100644
index 73b253e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// $Id: ConstraintTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertConstraintViolation;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintTest {
-
-	@Test
-	public void testRangeConstraint() {
-		Validator validator = TestUtil.getValidator();
-
-		Elevator elevator = new Elevator();
-		elevator.setCurrentFloor( -3 );
-		Set<ConstraintViolation<Elevator>> constraintViolations = validator.validate( elevator );
-
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation( constraintViolations.iterator().next(), "Invalid floor" );
-
-		elevator.setCurrentFloor( -2 );
-		constraintViolations = validator.validate( elevator );
-
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		elevator.setCurrentFloor( 45 );
-		constraintViolations = validator.validate( elevator );
-
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		elevator.setCurrentFloor( 50 );
-		constraintViolations = validator.validate( elevator );
-
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		elevator.setCurrentFloor( 51 );
-		constraintViolations = validator.validate( elevator );
-
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation( constraintViolations.iterator().next(), "Invalid floor" );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java
deleted file mode 100644
index f4fc99d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-// $Id: ConstraintValidatorContextTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.util.List;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.ConstraintValidatorContextImpl;
-import org.hibernate.validator.engine.MessageAndPath;
-import org.hibernate.validator.engine.PathImpl;
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectPropertyPaths;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintValidatorContextTest {
-
-	/**
-	 * HV-198
-	 */
-	@Test
-	public void testCorrectSubNodePath() {
-		Validator validator = TestUtil.getValidator();
-
-		Item item = new Item();
-		item.interval = new Interval();
-		item.interval.start = 10;
-		item.interval.end = 5;
-
-		Set<ConstraintViolation<Item>> constraintViolations = validator.validate( item );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectPropertyPaths( constraintViolations, "interval.start" );
-	}
-
-	/**
-	 * HV-208
-	 */
-	@Test
-	public void testCorrectPath() {
-		Validator validator = TestUtil.getValidator();
-
-		Item item = new Item();
-		Interval interval = new Interval();
-		item.interval = interval;
-		item.interval.start = 10;
-		item.interval.end = 5;
-
-		Set<ConstraintViolation<Interval>> constraintViolations = validator.validate( interval );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectPropertyPaths( constraintViolations, "start" );
-	}
-
-	@Test
-	public void testDifferentPaths() {
-		String message = "message";
-		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message )
-				.addNode( "foo" )
-				.addNode( "bar" ).inIterable().atIndex( 3 )
-				.addConstraintViolation();
-
-		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
-		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[3].bar" );
-
-
-		context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message )
-				.addNode( "foo" )
-				.addNode( null ).inIterable().atKey( "test" )
-				.addConstraintViolation();
-
-		messageAndPathList = context.getMessageAndPathList();
-		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test]" );
-
-		context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message )
-				.addNode( "foo" )
-				.addNode( "bar" ).inIterable().atKey( "test" )
-				.addNode( "fubar" )
-				.addConstraintViolation();
-
-		messageAndPathList = context.getMessageAndPathList();
-		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar.fubar" );
-
-		context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message )
-				.addNode( "foo" )
-				.addNode( "bar" ).inIterable().atKey( "test" )
-				.addNode( "fubar" ).inIterable().atIndex( 10 )
-				.addConstraintViolation();
-
-		messageAndPathList = context.getMessageAndPathList();
-		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar[10].fubar" );
-
-		context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message )
-				.addNode( "foo" )
-				.addNode( "bar" ).inIterable().atKey( "test" )
-				.addNode( "fubar" ).inIterable()
-				.addConstraintViolation();
-
-		messageAndPathList = context.getMessageAndPathList();
-		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar[].fubar" );
-	}
-
-	@Test
-	public void testMultipleMessages() {
-		String message1 = "message1";
-		String message2 = "message2";
-		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
-		context.buildConstraintViolationWithTemplate( message1 )
-				.addNode( "foo" )
-				.addNode( "bar" ).inIterable().atKey( "key" )
-				.addConstraintViolation();
-		context.buildConstraintViolationWithTemplate( message2 )
-				.addConstraintViolation();
-
-		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
-		assertTrue( messageAndPathList.size() == 2 );
-		assertMessageAndPath( messageAndPathList.get( 0 ), message1, "foo[key].bar" );
-		assertMessageAndPath( messageAndPathList.get( 1 ), message2, "" );
-	}
-
-	private ConstraintValidatorContextImpl createEmptyConstraintValidatorContextImpl() {
-		ConstraintValidatorContextImpl context = new ConstraintValidatorContextImpl(
-				PathImpl.createNewPath( null ), null
-		);
-		context.disableDefaultConstraintViolation();
-		return context;
-	}
-
-	private void assertMessageAndPath(MessageAndPath messageAndPath, String expectedMessage, String expectedPath) {
-		assertEquals( messageAndPath.getPath(), PathImpl.createPathFromString( expectedPath ), "Wrong path" );
-		assertEquals( messageAndPath.getMessage(), expectedMessage, "Wrong message" );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java
deleted file mode 100644
index 3b0ee40..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id: Coordinate.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-/**
- * @author Hardy Ferentschik
- */
-/**
- * @author Hardy Ferentschik
- */
-public class Coordinate {
-
-	long longitude;
-	long latitude;
-
-	public Coordinate(long longitude, long latitude) {
-		this.longitude = longitude;
-		this.latitude = latitude;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Elevator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Elevator.java
deleted file mode 100644
index 003c10c..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Elevator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id: Elevator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import org.hibernate.validator.constraints.Range;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Elevator {
-
-	@Range(min = -2, max = 50, message = "Invalid floor")
-	private int currentFloor;
-
-	public int getCurrentFloor() {
-		return currentFloor;
-	}
-
-	public void setCurrentFloor(int currentFloor) {
-		this.currentFloor = currentFloor;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Interval.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Interval.java
deleted file mode 100644
index 6aa6195..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Interval.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: Interval.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-/**
- * @author Hardy Ferentschik
- */
- at StartLessThanEnd 
-class Interval
-{
-  int start;
-  int end;
-} 
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Item.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Item.java
deleted file mode 100644
index b5554b7..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Item.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: Item.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.Valid;
-
-/**
- * @author Hardy Ferentschik
- */
-class Item {
-	@Valid
-	Interval interval;
-} 
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Object.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Object.java
deleted file mode 100644
index 8cc3173..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Object.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: Object.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-
-/**
- * @author Hardy Ferentschik
- */
- at Constraint(validatedBy = { ObjectConstraintValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
-public @interface Object {
-	String message() default "{org.hibernate.validator.constraints.Object.message}";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java
deleted file mode 100644
index 7616139..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: ObjectConstraintValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ObjectConstraintValidator implements ConstraintValidator<org.hibernate.validator.test.constraints.Object, java.lang.Object> {
-
-	public void initialize(org.hibernate.validator.test.constraints.Object annotation) {
-	}
-
-	public boolean isValid(java.lang.Object value, ConstraintValidatorContext constraintValidatorContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java
deleted file mode 100644
index 9b85814..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id: PostCodeList.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.TYPE;
-import java.util.Collection;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * A test constraint which can lead to a error when trying to reslove the validator.
- *
- * @author Hardy Ferentschik
- */
- at Constraint(validatedBy = {
-		PostCodeList.PostCodeListValidatorForString.class, PostCodeList.PostCodeListValidatorForNumber.class
-})
- at Documented
- at Target({ METHOD, FIELD, TYPE })
- at Retention(RUNTIME)
-public @interface PostCodeList {
-	public abstract String message() default "foobar";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default {};
-
-	public class PostCodeListValidatorForNumber
-			implements ConstraintValidator<PostCodeList, Collection<? extends Number>> {
-		public void initialize(PostCodeList constraintAnnotation) {
-		}
-
-		public boolean isValid(Collection<? extends Number> value, ConstraintValidatorContext constraintValidatorContext) {
-			return true;
-		}
-	}
-
-	public class PostCodeListValidatorForString implements ConstraintValidator<PostCodeList, Collection<String>> {
-		public void initialize(PostCodeList constraintAnnotation) {
-		}
-
-		public boolean isValid(Collection<String> value, ConstraintValidatorContext constraintValidatorContext) {
-			if ( value == null ) {
-				return true;
-			}
-			return false;
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Serializable.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Serializable.java
deleted file mode 100644
index a2bd850..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Serializable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: Serializable.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-
-/**
- * @author Hardy Ferentschik
- */
- at Constraint(validatedBy = { SerializableConstraintValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
-public @interface Serializable {
-	public abstract String message() default "{org.hibernate.validator.constraints.Serializable.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java
deleted file mode 100644
index 29efd12..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: SerializableConstraintValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SerializableConstraintValidator implements ConstraintValidator<Serializable, java.io.Serializable > {
-
-	public void initialize(Serializable annotation) {
-	}
-
-	public boolean isValid( java.io.Serializable value, ConstraintValidatorContext constraintValidatorContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java
deleted file mode 100644
index d96acde..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: StartLessThanEnd.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-
-/**
- * @author Hardy Ferentschik
- */
- at Target(ElementType.TYPE)
- at Retention(RetentionPolicy.RUNTIME)
- at Constraint(validatedBy = StartLessThanEndImpl.class)
-public @interface StartLessThanEnd {
-	String message() default "x";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java
deleted file mode 100644
index ad1bcc2..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: StartLessThanEndImpl.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class StartLessThanEndImpl implements ConstraintValidator<StartLessThanEnd, Interval> {
-
-	public void initialize(StartLessThanEnd constraintAnnotation) {
-	}
-
-	public boolean isValid(Interval value, ConstraintValidatorContext c) {
-		if ( value.start > value.end ) {
-			c.disableDefaultConstraintViolation();
-			c.buildConstraintViolationWithTemplate( c.getDefaultConstraintMessageTemplate() ).addNode( "start" ).addConstraintViolation();
-			return false;
-		}
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SubType.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SubType.java
deleted file mode 100644
index f6162aa..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SubType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: SubType.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SubType extends SuperType {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Suburb.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Suburb.java
deleted file mode 100644
index bcf7e65..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/Suburb.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// $Id: Suburb.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Suburb {
-	public enum Facility {
-		SHOPPING_MALL, BUS_TERMINAL
-	}
-
-	@Size(min = 5, max = 10, message = "size must be between {min} and {max}")
-	private String name;
-
-	@Size(min = 2, max = 2, message = "size must be between {min} and {max}")
-	private Map<Facility, Boolean> facilities;
-
-	@Size(min = 2, message = "size must be between {min} and {max}")
-	private Set<String> streetNames;
-
-	@Size(min = 4, max = 1000, message = "size must be between {min} and {max}")
-	private Coordinate[] boundingBox;
-
-	@PostCodeList
-	private Collection<? extends Number> includedPostCodes;
-
-	public void setIncludedPostCodes(Collection<? extends Number> includedPostCodes) {
-		this.includedPostCodes = includedPostCodes;
-	}
-
-	public Collection<? extends Number> getIncludedPostcodes() {
-		return includedPostCodes;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public Map<Facility, Boolean> getFacilities() {
-		return facilities;
-	}
-
-	public void addFacility(Facility f, Boolean exist) {
-		if ( facilities == null ) {
-			facilities = new HashMap<Facility, Boolean>();
-		}
-		facilities.put( f, exist );
-	}
-
-	public Set<String> getStreetNames() {
-		return streetNames;
-	}
-
-	public void addStreetName(String streetName) {
-		if ( streetNames == null ) {
-			streetNames = new HashSet<String>();
-		}
-		streetNames.add( streetName );
-	}
-
-	public Coordinate[] getBoundingBox() {
-		return boundingBox;
-	}
-
-	public void setBoundingBox(Coordinate[] boundingBox) {
-		this.boundingBox = boundingBox;
-	}
-}
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperType.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperType.java
deleted file mode 100644
index 2c4fa43..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: SuperType.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SuperType {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java
deleted file mode 100644
index 5b7e138..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: SuperTypeArray.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-
-/**
- * @author Hardy Ferentschik
- */
- at Constraint(validatedBy = { SuperTypeArrayValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
-public @interface SuperTypeArray {
-	public abstract String message() default "{org.hibernate.validator.constraints.SuperTypeArray.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java
deleted file mode 100644
index d24a1f6..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: SuperTypeArrayValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SuperTypeArrayValidator implements ConstraintValidator<SuperTypeArray, SuperType[]> {
-
-	public void initialize(SuperTypeArray annotation) {
-	}
-
-	public boolean isValid(SuperType[] value, ConstraintValidatorContext constraintValidatorContext) {
-		return true;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java
deleted file mode 100644
index 2e94e45..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-// $Id: ValidatorResolutionTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints;
-
-import java.lang.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-import static org.hibernate.validator.test.util.TestUtil.assertConstraintViolation;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ValidatorResolutionTest {
-
-	@Test
-	public void testResolutionOfMultipleSizeValidators() {
-		Validator validator = TestUtil.getValidator();
-
-		Suburb suburb = new Suburb();
-
-		List<Integer> postcodes = new ArrayList<Integer>();
-		postcodes.add( 12345 );
-		suburb.setIncludedPostCodes( postcodes );
-
-		// all values are null and should pass
-		Set<ConstraintViolation<Suburb>> constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		suburb.setName( "" );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation(
-				constraintViolations.iterator().next(), "size must be between 5 and 10", Suburb.class, "", "name"
-		);
-
-		suburb.setName( "Hoegsbo" );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		suburb.addFacility( Suburb.Facility.SHOPPING_MALL, false );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation(
-				constraintViolations.iterator().next(),
-				"size must be between 2 and 2",
-				Suburb.class,
-				suburb.getFacilities(),
-				"facilities"
-		);
-
-		suburb.addFacility( Suburb.Facility.BUS_TERMINAL, true );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		suburb.addStreetName( "Sikelsgatan" );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation(
-				constraintViolations.iterator().next(),
-				"size must be between 2 and 2147483647",
-				Suburb.class,
-				suburb.getStreetNames(),
-				"streetNames"
-		);
-
-		suburb.addStreetName( "Marklandsgatan" );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 0 );
-
-		Coordinate[] boundingBox = new Coordinate[3];
-		boundingBox[0] = new Coordinate( 0l, 0l );
-		boundingBox[1] = new Coordinate( 0l, 1l );
-		boundingBox[2] = new Coordinate( 1l, 0l );
-		suburb.setBoundingBox( boundingBox );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertConstraintViolation(
-				constraintViolations.iterator().next(),
-				"size must be between 4 and 1000",
-				Suburb.class,
-				suburb.getBoundingBox(),
-				"boundingBox"
-		);
-
-		boundingBox = new Coordinate[4];
-		boundingBox[0] = new Coordinate( 0l, 0l );
-		boundingBox[1] = new Coordinate( 0l, 1l );
-		boundingBox[2] = new Coordinate( 1l, 0l );
-		boundingBox[3] = new Coordinate( 1l, 1l );
-		suburb.setBoundingBox( boundingBox );
-		constraintViolations = validator.validate( suburb );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	/**
-	 * HV-233
-	 */
-	@Test
-	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfObject() {
-		Validator validator = TestUtil.getValidator();
-
-		Foo testEntity = new Foo( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
-		Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( testEntity );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	/**
-	 * HV-233
-	 */
-	@Test
-	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfClonable() {
-		Validator validator = TestUtil.getValidator();
-
-		Bar testEntity = new Bar( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
-		Set<ConstraintViolation<Bar>> constraintViolations = validator.validate( testEntity );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	/**
-	 * HV-233
-	 */
-	@Test
-	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfSerializable() {
-		Validator validator = TestUtil.getValidator();
-
-		Fubar testEntity = new Fubar( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
-		Set<ConstraintViolation<Fubar>> constraintViolations = validator.validate( testEntity );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	/**
-	 * HV-233
-	 */
-	@Test
-	public void testSubTypeArrayIsSubtypeOfSuperTypeArray() {
-		Validator validator = TestUtil.getValidator();
-
-		SubTypeEntity testEntity = new SubTypeEntity( new SubType[] { } );
-		Set<ConstraintViolation<SubTypeEntity>> constraintViolations = validator.validate( testEntity );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	public class Foo {
-		@org.hibernate.validator.test.constraints.Object
-		private org.hibernate.validator.test.constraints.Object[] objectArray;
-
-		@org.hibernate.validator.test.constraints.Object
-		private int[] intArray;
-
-		public Foo(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
-			this.objectArray = objectArray;
-			this.intArray = intArray;
-		}
-	}
-
-	public class Bar {
-		@org.hibernate.validator.test.constraints.Cloneable
-		private org.hibernate.validator.test.constraints.Object[] objectArray;
-
-		@org.hibernate.validator.test.constraints.Cloneable
-		private int[] intArray;
-
-		public Bar(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
-			this.objectArray = objectArray;
-			this.intArray = intArray;
-		}
-	}
-
-	public class Fubar {
-		@Serializable
-		private org.hibernate.validator.test.constraints.Object[] objectArray;
-
-		@Serializable
-		private int[] intArray;
-
-		public Fubar(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
-			this.objectArray = objectArray;
-			this.intArray = intArray;
-		}
-	}
-
-	public class SubTypeEntity {
-		@SuperTypeArray
-		private SubType[] subTypeArray;
-
-		public SubTypeEntity(SubType[] subTypeArray) {
-			this.subTypeArray = subTypeArray;
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java
deleted file mode 100644
index 9c3f418..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id: CompositeConstraintTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.composition;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintTypes;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintViolationMessages;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Gerhard Petracek
- * @author Hardy Ferentschik
- */
-public class CompositeConstraintTest {
-
-	/**
-	 * HV-182
-	 */
-	@Test
-	public void testCorrectAnnotationTypeForWithReportAsSingleViolation() {
-
-		Validator currentValidator = TestUtil.getValidator();
-
-		for ( int i = 0; i < 100; i++ ) {
-			Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
-					new Person(
-							null, "Gerhard"
-					)
-			);
-
-			assertNumberOfViolations( constraintViolations, 1 );
-			assertCorrectConstraintTypes( constraintViolations, ValidNameSingleViolation.class );
-			assertCorrectConstraintViolationMessages( constraintViolations, "invalid name" );
-
-			constraintViolations = currentValidator.validate(
-					new Person(
-							"G", "Gerhard"
-					)
-			);
-			assertNumberOfViolations( constraintViolations, 1 );
-			assertCorrectConstraintTypes( constraintViolations, ValidNameSingleViolation.class );
-			assertCorrectConstraintViolationMessages( constraintViolations, "invalid name" );
-		}
-	}
-
-	/**
-	 * HV-182
-	 */
-	@Test
-	public void testCorrectAnnotationTypeReportMultipleViolations() {
-
-		Validator currentValidator = TestUtil.getValidator();
-
-		for ( int i = 0; i < 100; i++ ) {
-			Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
-					new Person(
-							"Gerd", null
-					)
-			);
-
-			assertNumberOfViolations( constraintViolations, 1 );
-			assertCorrectConstraintTypes( constraintViolations, NotNull.class );
-			assertCorrectConstraintViolationMessages( constraintViolations, "may not be null" );
-
-			constraintViolations = currentValidator.validate(
-					new Person(
-							"Gerd", "G"
-					)
-			);
-			assertNumberOfViolations( constraintViolations, 1 );
-			assertCorrectConstraintTypes( constraintViolations, Size.class );
-			assertCorrectConstraintViolationMessages( constraintViolations, "size must be between 2 and 10" );
-		}
-	}
-}
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java
deleted file mode 100644
index 4167c50..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id: Person.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.composition;
-
-/**
- * Test mode for HV-182.
- *
- * @author Gerhard Petracek
- * @author Hardy Ferentschik
- */
-
-public class Person {
-	@ValidNameSingleViolation
-	private String nickName;
-
-	@ValidName
-	private String name;
-
-	public Person(String nickName, String name) {
-		this.nickName = nickName;
-		this.name = name;
-	}
-
-	public String getNickName() {
-		return nickName;
-	}
-
-	public void setNickName(String nickName) {
-		this.nickName = nickName;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java
deleted file mode 100644
index 1f1ce59..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id: ValidName.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.composition;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * Test constraint for HV-182.
- *
- * @author Gerhard Petracek
- * @author Hardy Ferentschik
- */
- at NotNull
- at Size(min = 2, max = 10)
- at Target({ METHOD, FIELD })
- at Retention(RUNTIME)
- at Constraint(validatedBy = { })
-public @interface ValidName {
-	public abstract String message() default "invalid name";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java
deleted file mode 100644
index 1e8a8a0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id: ValidNameSingleViolation.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.composition;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * Test constraint for HV-182.
- *
- * @author Gerhard Petracek
- * @author Hardy Ferentschik
- */
- at NotNull
- at Size(min = 2, max = 10)
- at ReportAsSingleViolation
- at Target({ METHOD, FIELD })
- at Retention(RUNTIME)
- at Constraint(validatedBy = { })
-public @interface ValidNameSingleViolation {
-	String message() default "invalid name";
-
-	Class<?>[] groups() default { };
-
-	Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertFalseValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertFalseValidatorTest.java
deleted file mode 100644
index 09329a8..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertFalseValidatorTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id: AssertFalseValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.AssertFalseValidator;
-
-/**
- * @author Alaa Nassef
- */
-public class AssertFalseValidatorTest {
-
-	private static AssertFalseValidator constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new AssertFalseValidator();
-	}
-
-	@Test
-	public void testIsValid() {
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( false, null ) );
-		assertTrue( constraint.isValid( Boolean.FALSE, null ) );
-		assertFalse( constraint.isValid( true, null ) );
-		assertFalse( constraint.isValid( Boolean.TRUE, null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertTrueValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertTrueValidatorTest.java
deleted file mode 100644
index d86fca5..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/AssertTrueValidatorTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: AssertTrueValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.AssertTrueValidator;
-
-/**
- * @author Alaa Nassef
- */
-public class AssertTrueValidatorTest {
-
-	private static AssertTrueValidator constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new AssertTrueValidator();
-	}
-
-	@Test
-	public void testIsValid() {
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( true, null ) );
-		assertTrue( constraint.isValid( Boolean.TRUE, null ) );
-		assertFalse( constraint.isValid( false, null ) );
-		assertFalse( constraint.isValid( Boolean.FALSE, null ) );
-	}
-}
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/BlankValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/BlankValidatorTest.java
deleted file mode 100644
index a3a4fa3..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/BlankValidatorTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * $Id: BlankValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.NotBlank;
-import org.hibernate.validator.constraints.impl.NotBlankValidator;
-
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-import static org.hibernate.validator.test.util.TestUtil.getValidator;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class BlankValidatorTest {
-	@Test
-	public void testConstraintValidator() {
-		NotBlankValidator constraintValidator = new NotBlankValidator();
-
-		assertTrue( constraintValidator.isValid( "a", null ) );
-		assertTrue( constraintValidator.isValid( null, null ) );
-		assertFalse( constraintValidator.isValid( "", null ) );
-		assertFalse( constraintValidator.isValid( " ", null ) );
-		assertFalse( constraintValidator.isValid( "\t", null ) );
-		assertFalse( constraintValidator.isValid( "\n", null ) );
-	}
-
-	@Test
-	public void testNotBlank() {
-		Validator validator = getValidator();
-		Foo foo = new Foo();
-
-		Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 1 );
-
-		foo.name = "";
-		constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 1 );
-
-		foo.name = " ";
-		constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 1 );
-
-		foo.name = "\t";
-		constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 1 );
-
-		foo.name = "\n";
-		constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 1 );
-
-		foo.name = "john doe";
-		constraintViolations = validator.validate( foo );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-
-	class Foo {
-		@NotBlank
-		String name;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/CreditCardNumberValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/CreditCardNumberValidatorTest.java
deleted file mode 100644
index c096ece..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/CreditCardNumberValidatorTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id: CreditCardNumberValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.CreditCardNumberValidator;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CreditCardNumberValidatorTest {
-
-	private static CreditCardNumberValidator validator;
-
-	@BeforeClass
-	public static void init() {
-		validator = new CreditCardNumberValidator();
-	}
-
-	@Test
-	public void testInvalidCreditCardNumber() throws Exception {
-		assertFalse( validator.isValid( "1234567890123456", null ) );
-	}
-
-	@Test
-	public void testValidCreditCardNumber() throws Exception {
-		assertTrue( validator.isValid( "541234567890125", null ) );
-	}
-
-	@Test
-	public void testNullValue() throws Exception {
-		assertTrue( validator.isValid( null, null ) );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DateHolder.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DateHolder.java
deleted file mode 100644
index 6422117..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DateHolder.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: DateHolder.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Calendar;
-import java.util.Date;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Past;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DateHolder {
-
-	@Past
-	private Calendar calendarWithPastDate;
-
-	@Future
-	private Calendar calendarWithFutureDate;
-
-	@Past
-	private Date past;
-
-	@Past
-	private Date future;
-
-	public DateHolder() {
-		calendarWithPastDate = Calendar.getInstance();
-		calendarWithPastDate.add( Calendar.YEAR, -1 );
-		past = calendarWithPastDate.getTime();
-
-		calendarWithFutureDate = Calendar.getInstance();
-		calendarWithFutureDate.add( Calendar.YEAR, 1 );
-		future = calendarWithFutureDate.getTime();
-	}
-
-	public Calendar getCalendarWithPastDate() {
-		return calendarWithPastDate;
-	}
-
-	public Calendar getCalendarWithFutureDate() {
-		return calendarWithFutureDate;
-	}
-
-	public Date getPast() {
-		return past;
-	}
-
-	public Date getFuture() {
-		return future;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DecimalMinMaxValidatorBoundaryTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DecimalMinMaxValidatorBoundaryTest.java
deleted file mode 100644
index c57133d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DecimalMinMaxValidatorBoundaryTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id: DecimalMinMaxValidatorBoundaryTest.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.constraints.DecimalMin;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.cfg.defs.DecimalMaxDef;
-import org.hibernate.validator.cfg.defs.DecimalMinDef;
-import org.hibernate.validator.test.util.TestUtil;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintTypes;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMinMaxValidatorBoundaryTest {
-	public double d;
-
-	@Test
-	public void testDecimalMinValue() {
-
-		// use programmatic mapping api to configure constraint
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( DecimalMinMaxValidatorBoundaryTest.class )
-				.property( "d", FIELD )
-				.constraint( DecimalMinDef.class )
-				.value( "0.100000000000000005" );
-
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		this.d = 0.1;
-
-		Set<ConstraintViolation<DecimalMinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectConstraintTypes( constraintViolations, DecimalMin.class );
-	}
-
-	@Test
-	public void testDecimalMaxValue() {
-
-		// use programmatic mapping api to configure constraint
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( DecimalMinMaxValidatorBoundaryTest.class )
-				.property( "d", FIELD )
-				.constraint( DecimalMaxDef.class )
-				.value( "0.1" );
-
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		this.d = 0.1;
-
-		Set<ConstraintViolation<DecimalMinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
-		assertNumberOfViolations( constraintViolations, 0 );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForNumberTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForNumberTest.java
deleted file mode 100644
index fb9748d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForNumberTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// $Id: DigitsValidatorForNumberTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.math.BigDecimal;
-import javax.validation.constraints.Digits;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DigitsValidatorForNumber;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class DigitsValidatorForNumberTest {
-
-	@Test
-	public void testIsValid() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 5 );
-		descriptor.setValue( "fraction", 2 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
-		constraint.initialize( p );
-
-
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( Byte.valueOf( "0" ), null ) );
-		assertTrue( constraint.isValid( Double.valueOf( "500.2" ), null ) );
-
-		assertTrue( constraint.isValid( new BigDecimal( "-12345.12" ), null ) );
-		assertFalse( constraint.isValid( new BigDecimal( "-123456.12" ), null ) );
-		assertFalse( constraint.isValid( new BigDecimal( "-123456.123" ), null ) );
-		assertFalse( constraint.isValid( new BigDecimal( "-12345.123" ), null ) );
-		assertFalse( constraint.isValid( new BigDecimal( "12345.123" ), null ) );
-
-		assertTrue( constraint.isValid( Float.valueOf( "-000000000.22" ), null ) );
-		assertFalse( constraint.isValid( Integer.valueOf( "256874" ), null ) );
-		assertFalse( constraint.isValid( Double.valueOf( "12.0001" ), null ) );
-	}
-
-	@Test
-	public void testIsValidZeroLength() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 0 );
-		descriptor.setValue( "fraction", 0 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
-		constraint.initialize( p );
-
-
-		assertTrue( constraint.isValid( null, null ) );
-		assertFalse( constraint.isValid( Byte.valueOf( "0" ), null ) );
-		assertFalse( constraint.isValid( Double.valueOf( "500.2" ), null ) );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeIntegerLength() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", -1 );
-		descriptor.setValue( "fraction", 1 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
-		constraint.initialize( p );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeFractionLength() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 1 );
-		descriptor.setValue( "fraction", -1 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
-		constraint.initialize( p );
-	}
-
-	@Test
-	public void testTrailingZerosAreTrimmed() {
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 12 );
-		descriptor.setValue( "fraction", 3 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
-		constraint.initialize( p );
-
-		assertTrue( constraint.isValid( 0.001d, null ) );
-		assertTrue( constraint.isValid( 0.00100d, null ) );
-		assertFalse( constraint.isValid( 0.0001d, null ) );
-	}
-
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForStringTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForStringTest.java
deleted file mode 100644
index 10fb228..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/DigitsValidatorForStringTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id: DigitsValidatorForStringTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import javax.validation.constraints.Digits;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DigitsValidatorForString;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- */
-public class DigitsValidatorForStringTest {
-
-	private static DigitsValidatorForString constraint;
-
-	@BeforeClass
-	public static void init() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 5 );
-		descriptor.setValue( "fraction", 2 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		constraint = new DigitsValidatorForString();
-		constraint.initialize( p );
-	}
-
-	@Test
-	public void testIsValid() {
-
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( "0", null ) );
-		assertTrue( constraint.isValid( "500.2", null ) );
-		assertTrue( constraint.isValid( "-12456.22", null ) );
-		assertTrue( constraint.isValid( "-000000000.22", null ) );
-		//should throw number format exception
-		assertFalse( constraint.isValid( "", null ) );
-		assertFalse( constraint.isValid( "256874.0", null ) );
-		assertFalse( constraint.isValid( "12.0001", null ) );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeIntegerLength() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", -1 );
-		descriptor.setValue( "fraction", 1 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForString constraint = new DigitsValidatorForString();
-		constraint.initialize( p );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeFractionLength() {
-
-		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
-		descriptor.setValue( "integer", 1 );
-		descriptor.setValue( "fraction", -1 );
-		descriptor.setValue( "message", "{validator.digits}" );
-		Digits p = AnnotationFactory.create( descriptor );
-
-		DigitsValidatorForString constraint = new DigitsValidatorForString();
-		constraint.initialize( p );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/EmailValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/EmailValidatorTest.java
deleted file mode 100644
index f093fa9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/EmailValidatorTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id: EmailValidatorTest.java 19796 2010-06-23 11:23:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.EmailValidator;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class EmailValidatorTest {
-
-	private static EmailValidator validator;
-
-	@BeforeClass
-	public static void init() {
-		validator = new EmailValidator();
-	}
-
-	@Test
-	public void testNullAndEmptyString() throws Exception {
-		isRightEmail( "" );
-		isRightEmail( null );
-	}
-
-	@Test
-	public void testValidEmail() throws Exception {
-		isRightEmail( "emmanuel at hibernate.org" );
-		isRightEmail( "emmanuel at hibernate" );
-		isRightEmail( "emma-n_uel at hibernate" );
-		isRightEmail( "emma+nuel at hibernate.org" );
-		isRightEmail( "emma=nuel at hibernate.org" );
-		isRightEmail( "emmanuel@[123.12.2.11]" );
-		isRightEmail( "*@example.net" );
-		isRightEmail( "fred&barny at example.com" );
-		isRightEmail( "--- at example.com" );
-		isRightEmail( "foo-bar at example.net" );
-		isRightEmail( "mailbox.sub1.sub2 at this-domain" );
-	}
-
-	@Test
-	public void testInValidEmail() throws Exception {
-		isWrongEmail( "emmanuel.hibernate.org" );
-		isWrongEmail( "emma nuel at hibernate.org" );
-		isWrongEmail( "emma(nuel at hibernate.org" );
-		isWrongEmail( "emmanuel@" );
-		isWrongEmail( "emma\nnuel at hibernate.org" );
-		isWrongEmail( "emma at nuel@hibernate.org" );
-		isWrongEmail( "Just a string" );
-		isWrongEmail( "string" );
-		isWrongEmail( "me@");
-		isWrongEmail( "@example.com");
-		isWrongEmail( "me. at example.com");
-		isWrongEmail( ".me at example.com");
-		isWrongEmail( "me at example..com");
-		isWrongEmail( "me\\@example.com");
-	}
-
-	/**
-	 * HV-339
-	 */
-	@Test
-	public void testAccent() {
-		isRightEmail( "Test^Email at example.com" );
-	}
-
-	private void isRightEmail(String email) {
-		assertTrue( validator.isValid( email, null ), "Expected a valid email." );
-	}
-
-	private void isWrongEmail(String email) {
-		assertFalse( validator.isValid( email, null ), "Expected a invalid email." );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForCalendarTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForCalendarTest.java
deleted file mode 100644
index f405fbd..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForCalendarTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id: FutureValidatorForCalendarTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Calendar;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.FutureValidatorForCalendar;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class FutureValidatorForCalendarTest {
-
-	private static FutureValidatorForCalendar constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new FutureValidatorForCalendar();
-	}
-
-	@Test
-	public void testIsValid() {
-		Calendar futureDate = getFutureDate();
-		Calendar pastDate = getPastDate();
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( futureDate, null ) );
-		assertFalse( constraint.isValid( pastDate, null ) );
-	}
-
-	private Calendar getFutureDate() {
-		Calendar cal = Calendar.getInstance();
-		int year = cal.get( Calendar.YEAR );
-		cal.set( Calendar.YEAR, year + 1 );
-		return cal;
-	}
-
-	private Calendar getPastDate() {
-		Calendar cal = Calendar.getInstance();
-		int year = cal.get( Calendar.YEAR );
-		cal.set( Calendar.YEAR, year - 1 );
-		return cal;
-	}
-
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForDateTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForDateTest.java
deleted file mode 100644
index f4268da..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorForDateTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id: FutureValidatorForDateTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Date;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.FutureValidatorForDate;
-
-public class FutureValidatorForDateTest {
-
-	private static FutureValidatorForDate constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new FutureValidatorForDate();
-	}
-
-	@Test
-	public void testIsValid() {
-		Date futureDate = getFutureDate();
-		Date pastDate = getPastDate();
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( futureDate, null ) );
-		assertFalse( constraint.isValid( new Date(), null ) );
-		assertFalse( constraint.isValid( pastDate, null ) );
-	}
-
-	private Date getFutureDate() {
-		Date date = new Date();
-		long timeStamp = date.getTime();
-		date.setTime( timeStamp + 31557600000l );
-		return date;
-	}
-
-	private Date getPastDate() {
-		Date date = new Date();
-		long timeStamp = date.getTime();
-		date.setTime( timeStamp - 31557600000l );
-		return date;
-	}
-
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorTest.java
deleted file mode 100644
index 408d8f6..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/FutureValidatorTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: FutureValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-/**
- * @author Hardy Ferentschik
- */
-public class FutureValidatorTest {
-
-	/**
-	 * HV-158
-	 */
-	@Test
-	public void testFutureAndPast() {
-		Validator validator = TestUtil.getValidator();
-		DateHolder dateHolder = new DateHolder();
-		Set<ConstraintViolation<DateHolder>> constraintViolations = validator.validate( dateHolder );
-		assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/LengthValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/LengthValidatorTest.java
deleted file mode 100644
index a815cbe..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/LengthValidatorTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// $Id: LengthValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.impl.LengthValidator;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * Tests the <code>LengthConstraint</code>.
- *
- * @author Hardy Ferentschik
- */
-public class LengthValidatorTest {
-
-	@Test
-	public void testIsValid() {
-		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
-		descriptor.setValue( "min", 1 );
-		descriptor.setValue( "max", 3 );
-		descriptor.setValue( "message", "{validator.length}" );
-		Length l = AnnotationFactory.create( descriptor );
-		LengthValidator constraint = new LengthValidator();
-		constraint.initialize( l );
-		assertTrue( constraint.isValid( null, null ) );
-		assertFalse( constraint.isValid( "", null ) );
-		assertTrue( constraint.isValid( "f", null ) );
-		assertTrue( constraint.isValid( "fo", null ) );
-		assertTrue( constraint.isValid( "foo", null ) );
-		assertFalse( constraint.isValid( "foobar", null ) );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeMinValue() {
-		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
-		descriptor.setValue( "min", -1 );
-		descriptor.setValue( "max", 1 );
-		descriptor.setValue( "message", "{validator.length}" );
-		Length p = AnnotationFactory.create( descriptor );
-
-		LengthValidator constraint = new LengthValidator();
-		constraint.initialize( p );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeMaxValue() {
-		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
-		descriptor.setValue( "min", 1 );
-		descriptor.setValue( "max", -1 );
-		descriptor.setValue( "message", "{validator.length}" );
-		Length p = AnnotationFactory.create( descriptor );
-
-		LengthValidator constraint = new LengthValidator();
-		constraint.initialize( p );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNegativeLength() {
-		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
-		descriptor.setValue( "min", 5 );
-		descriptor.setValue( "max", 4 );
-		descriptor.setValue( "message", "{validator.length}" );
-		Length p = AnnotationFactory.create( descriptor );
-
-		LengthValidator constraint = new LengthValidator();
-		constraint.initialize( p );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForNumberTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForNumberTest.java
deleted file mode 100644
index 837999f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForNumberTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// $Id: MaxValidatorForNumberTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.constraints.DecimalMax;
-import javax.validation.constraints.Max;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DecimalMaxValidatorForNumber;
-import org.hibernate.validator.constraints.impl.MaxValidatorForNumber;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class MaxValidatorForNumberTest {
-
-	@Test
-	public void testIsValidMax() {
-
-		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
-		descriptor.setValue( "value", 15l );
-		descriptor.setValue( "message", "{validator.max}" );
-		Max m = AnnotationFactory.create( descriptor );
-
-		MaxValidatorForNumber constraint = new MaxValidatorForNumber();
-		constraint.initialize( m );
-		testMaxValidator( constraint );
-	}
-
-	@Test
-	public void testIsValidDecimalMax() {
-
-		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
-		descriptor.setValue( "value", "15.0E0" );
-		descriptor.setValue( "message", "{validator.max}" );
-		DecimalMax m = AnnotationFactory.create( descriptor );
-
-		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
-		constraint.initialize( m );
-		testMaxValidator( constraint );
-	}
-
-	@Test
-	public void testInitializeDecimalMaxWithInvalidValue() {
-
-		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
-		descriptor.setValue( "value", "foobar" );
-		descriptor.setValue( "message", "{validator.max}" );
-		DecimalMax m = AnnotationFactory.create( descriptor );
-
-		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
-		try {
-			constraint.initialize( m );
-			fail();
-		}
-		catch ( IllegalArgumentException e ) {
-			// success
-		}
-	}
-
-	private void testMaxValidator(ConstraintValidator<?, Number> constraint) {
-		byte b = 1;
-		Byte bWrapper = 127;
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( b, null ) );
-		assertTrue( constraint.isValid( 15l, null ) );
-		assertTrue( constraint.isValid( 15, null ) );
-		assertTrue( constraint.isValid( 15.0, null ) );
-		assertTrue( constraint.isValid( BigDecimal.valueOf( -156000000000.0 ), null ) );
-		assertTrue( constraint.isValid( BigInteger.valueOf( -10000000l ), null ) );
-		assertTrue( constraint.isValid( 10, null ) );
-		assertTrue( constraint.isValid( 14.99, null ) );
-		assertTrue( constraint.isValid( -14.99, null ) );
-		assertFalse( constraint.isValid( 20, null ) );
-		assertFalse( constraint.isValid( bWrapper, null ) );
-		assertFalse( constraint.isValid( BigDecimal.valueOf( 156000000000.0 ), null ) );
-		assertFalse( constraint.isValid( BigInteger.valueOf( 10000000l ), null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForStringTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForStringTest.java
deleted file mode 100644
index 47064e1..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MaxValidatorForStringTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// $Id: MaxValidatorForStringTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.constraints.DecimalMax;
-import javax.validation.constraints.Max;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DecimalMaxValidatorForNumber;
-import org.hibernate.validator.constraints.impl.DecimalMaxValidatorForString;
-import org.hibernate.validator.constraints.impl.MaxValidatorForString;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MaxValidatorForStringTest {
-
-	@Test
-	public void testIsValidMax() {
-
-		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
-		descriptor.setValue( "value", 15l );
-		descriptor.setValue( "message", "{validator.max}" );
-		Max m = AnnotationFactory.create( descriptor );
-
-		MaxValidatorForString constraint = new MaxValidatorForString();
-		constraint.initialize( m );
-		testMaxValidator( constraint );
-	}
-
-	@Test
-	public void testIsValidDecimalMax() {
-
-		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
-		descriptor.setValue( "value", "15.0E0" );
-		descriptor.setValue( "message", "{validator.max}" );
-		DecimalMax m = AnnotationFactory.create( descriptor );
-
-		DecimalMaxValidatorForString constraint = new DecimalMaxValidatorForString();
-		constraint.initialize( m );
-		testMaxValidator( constraint );
-	}
-
-	@Test
-	public void testInitializeDecimalMaxWithInvalidValue() {
-
-		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
-		descriptor.setValue( "value", "foobar" );
-		descriptor.setValue( "message", "{validator.max}" );
-		DecimalMax m = AnnotationFactory.create( descriptor );
-
-		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
-		try {
-			constraint.initialize( m );
-			fail();
-		}
-		catch ( IllegalArgumentException e ) {
-			// success
-		}
-	}
-
-	private void testMaxValidator(ConstraintValidator<?, String> constraint) {
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( "15", null ) );
-		assertTrue( constraint.isValid( "15.0", null ) );
-		assertTrue( constraint.isValid( "10", null ) );
-		assertTrue( constraint.isValid( "14.99", null ) );
-		assertTrue( constraint.isValid( "-14.99", null ) );
-		assertFalse( constraint.isValid( "20", null ) );
-		//number format exception
-		assertFalse( constraint.isValid( "15l", null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinMaxValidatorBoundaryTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinMaxValidatorBoundaryTest.java
deleted file mode 100644
index 62dbe7b..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinMaxValidatorBoundaryTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id: MinMaxValidatorBoundaryTest.java 19776 2010-06-21 13:30:26Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-import static junit.framework.Assert.assertFalse;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintTypes;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * Check correct behaviour of {@link org.hibernate.validator.constraints.impl.MinValidatorForNumber} and
- * {@link org.hibernate.validator.constraints.impl.MaxValidatorForNumber} on boundary values.
- * <p/>
- * The chosen numbers: 9223372036854775806l and 9223372036854775807l cast to
- * the same double value.
- *
- * @author Carlos Vara
- * @author Hardy Ferentschik
- */
-public class MinMaxValidatorBoundaryTest {
-	@Min(value = 9223372036854775807l)
-	public long min;
-
-	@Max(value = 9223372036854775806l)
-	public long max;
-
-	@Test
-	public void testMinBoundaryValue() {
-		Validator validator = TestUtil.getValidator();
-
-		this.min = 9223372036854775806l;
-		this.max = 0l;
-
-		// Current min value is smaller, should fail, but it doesn't
-		Set<ConstraintViolation<MinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectConstraintTypes( constraintViolations, Min.class );
-	}
-
-	@Test
-	public void testMaxBoundaryValue() {
-		Validator validator = TestUtil.getValidator();
-
-		this.min = Long.MAX_VALUE;
-		this.max = 9223372036854775807l;
-
-		// Current max value is bigger, should fail, but it doesn't
-		Set<ConstraintViolation<MinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectConstraintTypes( constraintViolations, Max.class );
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForNumberTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForNumberTest.java
deleted file mode 100644
index d5017bc..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForNumberTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id: MinValidatorForNumberTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.validation.ConstraintValidator;
-import javax.validation.constraints.DecimalMin;
-import javax.validation.constraints.Min;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DecimalMinValidatorForNumber;
-import org.hibernate.validator.constraints.impl.MinValidatorForNumber;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class MinValidatorForNumberTest {
-
-	@Test
-	public void testIsValidMinValidator() {
-		AnnotationDescriptor<Min> descriptor = new AnnotationDescriptor<Min>( Min.class );
-		descriptor.setValue( "value", 15l );
-		descriptor.setValue( "message", "{validator.min}" );
-		Min m = AnnotationFactory.create( descriptor );
-
-		MinValidatorForNumber constraint = new MinValidatorForNumber();
-		constraint.initialize( m );
-		testMinValidator( constraint );
-	}
-
-	@Test
-	public void testIsValidDecimalMinValidator() {
-		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
-		descriptor.setValue( "value", "1500E-2" );
-		descriptor.setValue( "message", "{validator.min}" );
-		DecimalMin m = AnnotationFactory.create( descriptor );
-
-		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
-		constraint.initialize( m );
-		testMinValidator( constraint );
-	}
-
-	@Test
-	public void testInitializeDecimalMaxWithInvalidValue() {
-
-		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
-		descriptor.setValue( "value", "foobar" );
-		descriptor.setValue( "message", "{validator.min}" );
-		DecimalMin m = AnnotationFactory.create( descriptor );
-
-		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
-		try {
-			constraint.initialize( m );
-			fail();
-		}
-		catch ( IllegalArgumentException e ) {
-			// success
-		}
-	}
-
-	private void testMinValidator(ConstraintValidator<?, Number> constraint) {
-		byte b = 1;
-		Byte bWrapper = 127;
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( bWrapper, null ) );
-		assertTrue( constraint.isValid( 20, null ) );
-		assertTrue( constraint.isValid( 15l, null ) );
-		assertTrue( constraint.isValid( 15, null ) );
-		assertTrue( constraint.isValid( 15.0, null ) );
-		assertTrue( constraint.isValid( BigDecimal.valueOf( 156000000000.0 ), null ) );
-		assertTrue( constraint.isValid( BigInteger.valueOf( 10000000l ), null ) );
-		assertFalse( constraint.isValid( b, null ) );
-		assertFalse( constraint.isValid( BigDecimal.valueOf( -156000000000.0 ), null ) );
-		assertFalse( constraint.isValid( BigInteger.valueOf( -10000000l ), null ) );
-		assertFalse( constraint.isValid( 10, null ) );
-		assertFalse( constraint.isValid( 14.99, null ) );
-		assertFalse( constraint.isValid( -14.99, null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForStringTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForStringTest.java
deleted file mode 100644
index 89397c3..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/MinValidatorForStringTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id: MinValidatorForStringTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.constraints.DecimalMin;
-import javax.validation.constraints.Min;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.DecimalMinValidatorForNumber;
-import org.hibernate.validator.constraints.impl.DecimalMinValidatorForString;
-import org.hibernate.validator.constraints.impl.MinValidatorForString;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class MinValidatorForStringTest {
-
-	@Test
-	public void testIsValidMinValidator() {
-		AnnotationDescriptor<Min> descriptor = new AnnotationDescriptor<Min>( Min.class );
-		descriptor.setValue( "value", 15l );
-		descriptor.setValue( "message", "{validator.min}" );
-		Min m = AnnotationFactory.create( descriptor );
-
-		MinValidatorForString constraint = new MinValidatorForString();
-		constraint.initialize( m );
-		testMinValidator( constraint );
-	}
-
-	@Test
-	public void testIsValidDecimalMinValidator() {
-		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
-		descriptor.setValue( "value", "1500E-2" );
-		descriptor.setValue( "message", "{validator.min}" );
-		DecimalMin m = AnnotationFactory.create( descriptor );
-
-		DecimalMinValidatorForString constraint = new DecimalMinValidatorForString();
-		constraint.initialize( m );
-		testMinValidator( constraint );
-	}
-
-	@Test
-	public void testInitializeDecimalMaxWithInvalidValue() {
-
-		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
-		descriptor.setValue( "value", "foobar" );
-		descriptor.setValue( "message", "{validator.min}" );
-		DecimalMin m = AnnotationFactory.create( descriptor );
-
-		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
-		try {
-			constraint.initialize( m );
-			fail();
-		}
-		catch ( IllegalArgumentException e ) {
-			// success
-		}
-	}
-
-	private void testMinValidator(ConstraintValidator<?, String> constraint) {
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( "20", null ) );
-		assertTrue( constraint.isValid( "15", null ) );
-		assertTrue( constraint.isValid( "15.0", null ) );
-		assertFalse( constraint.isValid( "10", null ) );
-		assertFalse( constraint.isValid( "14.99", null ) );
-		assertFalse( constraint.isValid( "-14.99", null ) );
-		//number format exception
-		assertFalse( constraint.isValid( "15l", null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NotNullValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NotNullValidatorTest.java
deleted file mode 100644
index f7dabea..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NotNullValidatorTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id: NotNullValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.NotNullValidator;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotNullValidatorTest {
-
-	@Test
-	public void testIsValid() {
-		NotNullValidator constraint = new NotNullValidator();
-
-		assertFalse( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( new Object(), null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NullValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NullValidatorTest.java
deleted file mode 100644
index 9726822..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/NullValidatorTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: NullValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.NullValidator;
-
-/**
- * @author Alaa Nassef
- */
-public class NullValidatorTest {
-
-	private static NullValidator constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new NullValidator();
-	}
-
-	@Test
-	public void testIsValid() {
-		assertTrue( constraint.isValid( null, null ) );
-		assertFalse( constraint.isValid( new Object(), null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForCalendarTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForCalendarTest.java
deleted file mode 100644
index 9533136..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForCalendarTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id: PastValidatorForCalendarTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Calendar;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.PastValidatorForCalendar;
-
-/**
- * @author Alaa Nassef
- * @author Hardy Ferentschik
- */
-public class PastValidatorForCalendarTest {
-
-	private static PastValidatorForCalendar constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new PastValidatorForCalendar();
-	}
-
-	@Test
-	public void testIsValid() {
-		Calendar futureDate = getFutureDate();
-		Calendar pastDate = getPastDate();
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( pastDate, null ) );
-		assertFalse( constraint.isValid( futureDate, null ) );
-	}
-
-	private Calendar getFutureDate() {
-		Calendar cal = Calendar.getInstance();
-		int year = cal.get( Calendar.YEAR );
-		cal.set( Calendar.YEAR, year + 1 );
-		return cal;
-	}
-
-	private Calendar getPastDate() {
-		Calendar cal = Calendar.getInstance();
-		int year = cal.get( Calendar.YEAR );
-		cal.set( Calendar.YEAR, year - 1 );
-		return cal;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForDateTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForDateTest.java
deleted file mode 100644
index 0020500..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PastValidatorForDateTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id: PastValidatorForDateTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Date;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.PastValidatorForDate;
-
-public class PastValidatorForDateTest {
-
-	private static PastValidatorForDate constraint;
-
-	@BeforeClass
-	public static void init() {
-		constraint = new PastValidatorForDate();
-	}
-
-	@Test
-	public void testIsValid() {
-		Date futureDate = getFutureDate();
-		Date pastDate = getPastDate();
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( pastDate, null ) );
-		assertFalse( constraint.isValid( new Date(), null ) );
-		assertFalse( constraint.isValid( futureDate, null ) );
-	}
-
-	private Date getFutureDate() {
-		Date date = new Date();
-		long timeStamp = date.getTime();
-		date.setTime( timeStamp + 31557600000l );
-		return date;
-	}
-
-	private Date getPastDate() {
-		Date date = new Date();
-		long timeStamp = date.getTime();
-		date.setTime( timeStamp - 31557600000l );
-		return date;
-	}
-
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PatternValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PatternValidatorTest.java
deleted file mode 100644
index 73bdd5e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/PatternValidatorTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id: PatternValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import javax.validation.constraints.Pattern;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.PatternValidator;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PatternValidatorTest {
-
-	@Test
-	public void testIsValid() {
-		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
-		descriptor.setValue( "regexp", "foobar" );
-		descriptor.setValue( "message", "pattern does not match" );
-		Pattern p = AnnotationFactory.create( descriptor );
-
-		PatternValidator constraint = new PatternValidator();
-		constraint.initialize( p );
-
-		assertTrue( constraint.isValid( null, null ) );
-		assertFalse( constraint.isValid( "", null ) );
-		assertFalse( constraint.isValid( "bla bla", null ) );
-		assertFalse( constraint.isValid( "This test is not foobar", null ) );
-	}
-
-	@Test
-	public void testIsValidForEmptyStringRegexp() {
-		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
-		descriptor.setValue( "regexp", "|^.*foo$" );
-		descriptor.setValue( "message", "pattern does not match" );
-		Pattern p = AnnotationFactory.create( descriptor );
-
-		PatternValidator constraint = new PatternValidator();
-		constraint.initialize( p );
-
-		assertTrue( constraint.isValid( null, null ) );
-		assertTrue( constraint.isValid( "", null ) );
-		assertFalse( constraint.isValid( "bla bla", null ) );
-		assertTrue( constraint.isValid( "foo", null ) );
-		assertTrue( constraint.isValid( "a b c foo", null ) );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testInvalidRegularExpression() {
-		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
-		descriptor.setValue( "regexp", "(unbalanced parentheses" );
-		descriptor.setValue( "message", "pattern does not match" );
-		Pattern p = AnnotationFactory.create( descriptor );
-
-		PatternValidator constraint = new PatternValidator();
-		constraint.initialize( p );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/ScriptAssertValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/ScriptAssertValidatorTest.java
deleted file mode 100644
index 2a48961..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/ScriptAssertValidatorTest.java
+++ /dev/null
@@ -1,203 +0,0 @@
-// $Id: ScriptAssertValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.util.Date;
-import java.util.GregorianCalendar;
-import javax.validation.ConstraintDeclarationException;
-import javax.validation.ConstraintValidator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.ScriptAssert;
-import org.hibernate.validator.constraints.impl.ScriptAssertValidator;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Unit test for {@link org.hibernate.validator.constraints.impl.ScriptAssertValidator}.
- *
- * @author Gunnar Morling
- */
-public class ScriptAssertValidatorTest {
-
-	@Test
-	public void scriptEvaluatesToTrue() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "javascript", "true" );
-
-		assertTrue( validator.isValid( new Object(), null ) );
-	}
-
-	@Test
-	public void scriptEvaluatesToFalse() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "javascript", "false" );
-
-		assertFalse( validator.isValid( new Object(), null ) );
-	}
-
-	@Test
-	public void scriptExpressionReferencingAnnotatedObject() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
-				"javascript", "_this.startDate.before(_this.endDate)"
-		);
-
-		Date startDate = new GregorianCalendar( 2009, 8, 20 ).getTime();
-		Date endDate = new GregorianCalendar( 2009, 8, 21 ).getTime();
-
-		assertTrue( validator.isValid( new CalendarEvent( startDate, endDate ), null ) );
-		assertFalse( validator.isValid( new CalendarEvent( endDate, startDate ), null ) );
-	}
-
-	@Test
-	public void scriptExpressionUsingCustomizedAlias() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
-				"javascript", "_.startDate.before(_.endDate)", "_"
-		);
-
-		Date startDate = new GregorianCalendar( 2009, 8, 20 ).getTime();
-		Date endDate = new GregorianCalendar( 2009, 8, 21 ).getTime();
-
-		assertFalse( validator.isValid( new CalendarEvent( endDate, startDate ), null ) );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void emptyLanguageNameRaisesException() throws Exception {
-
-		getInitializedValidator( "", "script" );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void emptyScriptRaisesException() throws Exception {
-
-		getInitializedValidator( "lang", "" );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void emptyAliasRaisesException() throws Exception {
-
-		getInitializedValidator( "lang", "script", "" );
-	}
-
-	@Test(expectedExceptions = ConstraintDeclarationException.class)
-	public void unknownLanguageNameRaisesException() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "foo", "script" );
-
-		validator.isValid( new Object(), null );
-	}
-
-	@Test(expectedExceptions = ConstraintDeclarationException.class)
-	public void illegalScriptExpressionRaisesException() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "javascript", "foo" );
-
-		validator.isValid( new Object(), null );
-	}
-
-	@Test(expectedExceptions = ConstraintDeclarationException.class)
-	public void scriptExpressionReturningNullRaisesException() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "javascript", "null" );
-
-		validator.isValid( new Object(), null );
-	}
-
-	@Test(expectedExceptions = ConstraintDeclarationException.class)
-	public void scriptExpressionReturningNoBooleanRaisesException() throws Exception {
-
-		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
-				"javascript", "new java.util.Date()"
-		);
-
-		validator.isValid( new Object(), null );
-	}
-
-	/**
-	 * Returns a {@link org.hibernate.validator.constraints.impl.ScriptAssertValidator} initialized with a {@link ScriptAssert} with the given values.
-	 */
-	private ConstraintValidator<ScriptAssert, Object> getInitializedValidator(String lang, String script, String name) {
-
-		ConstraintValidator<ScriptAssert, Object> validator = new ScriptAssertValidator();
-		validator.initialize( getScriptAssert( lang, script, name ) );
-
-		return validator;
-	}
-
-	/**
-	 * Returns a {@link ScriptAssertValidator} initialized with a {@link ScriptAssert} with the given values.
-	 */
-	private ConstraintValidator<ScriptAssert, Object> getInitializedValidator(String lang, String script) {
-
-		ConstraintValidator<ScriptAssert, Object> validator = new ScriptAssertValidator();
-		validator.initialize( getScriptAssert( lang, script, null ) );
-
-		return validator;
-	}
-
-	/**
-	 * Returns a {@link ScriptAssert} initialized with the given values.
-	 */
-	private ScriptAssert getScriptAssert(String lang, String script, String name) {
-
-		AnnotationDescriptor<ScriptAssert> descriptor = AnnotationDescriptor.getInstance( ScriptAssert.class );
-
-		descriptor.setValue( "lang", lang );
-		descriptor.setValue( "script", script );
-		if ( name != null ) {
-			descriptor.setValue( "alias", name );
-		}
-
-		return AnnotationFactory.create( descriptor );
-	}
-
-	/**
-	 * An exemplary model class used in tests.
-	 *
-	 * @author Gunnar Morling
-	 */
-	private static class CalendarEvent {
-
-		private Date startDate;
-
-		private Date endDate;
-
-		public CalendarEvent(Date startDate, Date endDate) {
-
-			this.startDate = startDate;
-			this.endDate = endDate;
-		}
-
-		@SuppressWarnings("unused")
-		public Date getStartDate() {
-			return startDate;
-		}
-
-		@SuppressWarnings("unused")
-		public Date getEndDate() {
-			return endDate;
-		}
-
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/SizeValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/SizeValidatorTest.java
deleted file mode 100644
index d790a4f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/SizeValidatorTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id: SizeValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import javax.validation.ConstraintValidator;
-import javax.validation.constraints.Size;
-
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertFalse;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.impl.SizeValidatorForArray;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfBoolean;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfByte;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfChar;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfDouble;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfFloat;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfInt;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfLong;
-import org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfShort;
-import org.hibernate.validator.constraints.impl.SizeValidatorForCollection;
-import org.hibernate.validator.constraints.impl.SizeValidatorForMap;
-import org.hibernate.validator.constraints.impl.SizeValidatorForString;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-/**
- * @author Alaa Nassef
- */
-public class SizeValidatorTest {
-
-
-	@Test
-	public void testIsValidObjectArray() throws Exception {
-		ConstraintValidator<Size, Object[]> validator = getValidator( SizeValidatorForArray.class );
-		assertSizes( validator, Object[].class );
-	}
-
-	@Test
-	public void testIsValidBooleanArray() throws Exception {
-		ConstraintValidator<Size, boolean[]> validator = getValidator( SizeValidatorForArraysOfBoolean.class );
-		assertSizes( validator, boolean[].class );
-	}
-
-	@Test
-	public void testIsValidByteArray() throws Exception {
-		ConstraintValidator<Size, byte[]> validator = getValidator( SizeValidatorForArraysOfByte.class );
-		assertSizes( validator, byte[].class );
-	}
-
-	@Test
-	public void testIsValidCharArray() throws Exception {
-		ConstraintValidator<Size, char[]> validator = getValidator( SizeValidatorForArraysOfChar.class );
-		assertSizes( validator, char[].class );
-	}
-
-	@Test
-	public void testIsValidDoubleArray() throws Exception {
-		ConstraintValidator<Size, double[]> validator = getValidator( SizeValidatorForArraysOfDouble.class );
-		assertSizes( validator, double[].class );
-	}
-
-	@Test
-	public void testIsValidFloatArray() throws Exception {
-		ConstraintValidator<Size, float[]> validator = getValidator( SizeValidatorForArraysOfFloat.class );
-		assertSizes( validator, float[].class );
-	}
-
-	@Test
-	public void testIsValidIntArray() throws Exception {
-		ConstraintValidator<Size, int[]> validator = getValidator( SizeValidatorForArraysOfInt.class );
-		assertSizes( validator, int[].class );
-	}
-
-	@Test
-	public void testIsValidLongArray() throws Exception {
-		ConstraintValidator<Size, long[]> validator = getValidator( SizeValidatorForArraysOfLong.class );
-		assertSizes( validator, long[].class );
-	}
-
-	@Test
-	public void testIsValidShortArray() throws Exception {
-		ConstraintValidator<Size, short[]> validator = getValidator( SizeValidatorForArraysOfShort.class );
-		assertSizes( validator, short[].class );
-	}
-
-	@Test
-	public void testIsValidCollection() throws Exception {
-		ConstraintValidator<Size, Collection> validator = getValidator( SizeValidatorForCollection.class );
-
-		assertTrue( validator.isValid( null, null ) );
-
-		Collection<String> collection = new ArrayList<String>();
-		assertFalse( validator.isValid( collection, null ) );
-
-		collection.add( "firstItem" );
-		assertTrue( validator.isValid( collection, null ) );
-
-		collection.add( "secondItem" );
-		assertTrue( validator.isValid( collection, null ) );
-
-		collection.add( "thirdItem" );
-		assertFalse( validator.isValid( collection, null ) );
-	}
-
-	@Test
-	public void testIsValidMap() throws Exception {
-		ConstraintValidator<Size, Map> validator = getValidator( SizeValidatorForMap.class );
-
-		assertTrue( validator.isValid( null, null ) );
-
-		Map<String, String> map = new HashMap<String, String>();
-		assertFalse( validator.isValid( map, null ) );
-
-		map.put( "key1", "firstItem" );
-		assertTrue( validator.isValid( map, null ) );
-
-		map.put( "key3", "secondItem" );
-		assertTrue( validator.isValid( map, null ) );
-
-		map.put( "key2", "thirdItem" );
-		assertFalse( validator.isValid( map, null ) );
-	}
-
-	@Test
-	public void testIsValiString() throws Exception {
-		ConstraintValidator<Size, String> validator = getValidator( SizeValidatorForString.class );
-
-		assertTrue( validator.isValid( null, null ) );
-		assertFalse( validator.isValid( "", null ) );
-		assertTrue( validator.isValid( "a", null ) );
-		assertTrue( validator.isValid( "ab", null ) );
-		assertFalse( validator.isValid( "abc", null ) );
-	}
-
-	private <T> ConstraintValidator<Size, T> getValidator(Class<?> validatorClass) throws Exception {
-		AnnotationDescriptor<Size> descriptor = new AnnotationDescriptor<Size>( Size.class );
-		descriptor.setValue( "min", 1 );
-		descriptor.setValue( "max", 2 );
-		descriptor.setValue( "message", "{validator.max}" );
-		Size m = AnnotationFactory.create( descriptor );
-		@SuppressWarnings("unchecked")
-		ConstraintValidator<Size, T> validator = ( ConstraintValidator<Size, T> ) validatorClass.newInstance();
-		validator.initialize( m );
-		return validator;
-	}
-
-	@SuppressWarnings("unchecked")
-	private <T> void assertSizes(ConstraintValidator<Size, T> validator, Class<T> arrayType) {
-		assertTrue( validator.isValid( null, null ) );
-
-		T array = ( T ) Array.newInstance( arrayType.getComponentType(), 0 );
-		assertFalse( validator.isValid( array, null ) );
-
-		array = ( T ) Array.newInstance( arrayType.getComponentType(), 1 );
-		assertTrue( validator.isValid( array, null ) );
-
-		array = ( T ) Array.newInstance( arrayType.getComponentType(), 2 );
-		assertTrue( validator.isValid( array, null ) );
-
-		array = ( T ) Array.newInstance( arrayType.getComponentType(), 3 );
-		assertFalse( validator.isValid( array, null ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/URLValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/URLValidatorTest.java
deleted file mode 100644
index a5bd932..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/constraints/impl/URLValidatorTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-// $Id: URLValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.constraints.impl;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.constraints.URL;
-import org.hibernate.validator.constraints.impl.URLValidator;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Tests the {@code URL} constraint. See HV-229
- *
- * @author Hardy Ferentschik
- */
-public class URLValidatorTest {
-
-	@Test
-	public void testIsValidUrl() {
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertTrue( validator.isValid( null, null ) );
-		assertFalse( validator.isValid( "http", null ) );
-		assertFalse( validator.isValid( "ftp//abc.de", null ) );
-		assertTrue( validator.isValid( "ftp://abc.de", null ) );
-	}
-
-
-	@Test
-	public void testIsValidUrlWithProtocolSpecified() {
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "protocol", "http" );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertFalse( validator.isValid( "ftp://abc.de", null ) );
-		assertTrue( validator.isValid( "http://abc.de", null ) );
-
-		descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "protocol", "file" );
-		url = AnnotationFactory.create( descriptor );
-		validator = new URLValidator();
-		validator.initialize( url );
-		assertFalse( validator.isValid( "http://abc.de", null ) );
-		assertTrue( validator.isValid( "file://Users/foobar/tmp", null ) );
-	}
-
-	@Test
-	public void testIsValidUrlWithPortSpecified() {
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "port", 21 );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertFalse( validator.isValid( "ftp://abc.de", null ) );
-		assertTrue( validator.isValid( "ftp://abc.de:21", null ) );
-	}
-
-	@Test
-	public void testIsValidUrlWithHostSpecified() {
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "host", "foobar.com" );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertFalse( validator.isValid( "http://fubar.com/this/is/foobar.html", null ) );
-		assertTrue( validator.isValid( "http://foobar.com/this/is/foobar.html", null ) );
-	}
-
-	@Test
-	public void testIsValidUrlWithProtocolHostAndPort() {
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "protocol", "http" );
-		descriptor.setValue( "host", "www.hibernate.org" );
-		descriptor.setValue( "port", 80 );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertFalse( validator.isValid( "ftp://www#hibernate#org:80", null ) );
-		assertTrue( validator.isValid( "http://www.hibernate.org:80", null ) );
-	}
-
-	@Test
-	public void testIsValidEmptyString() {
-		// HV-323
-		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
-		descriptor.setValue( "protocol", "http" );
-		descriptor.setValue( "host", "www.hibernate.org" );
-		descriptor.setValue( "port", 80 );
-		URL url = AnnotationFactory.create( descriptor );
-		URLValidator validator = new URLValidator();
-		validator.initialize( url );
-
-		assertTrue( validator.isValid( "", null ) );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/PathImplTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/PathImplTest.java
deleted file mode 100644
index 2c19587..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/PathImplTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id: PathImplTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine;
-
-import java.util.Iterator;
-import javax.validation.Path;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.PathImpl;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PathImplTest {
-
-	@Test
-	public void testParsing() {
-		String property = "order[3].deliveryAddress.addressline[1]";
-		Path path = PathImpl.createPathFromString( property );
-		Iterator<Path.Node> propIter = path.iterator();
-
-		assertTrue( propIter.hasNext() );
-		Path.Node elem = propIter.next();
-		assertEquals( "order", elem.getName() );
-		assertTrue( elem.isInIterable() );
-		assertEquals( new Integer( 3 ), elem.getIndex() );
-
-		assertTrue( propIter.hasNext() );
-		elem = propIter.next();
-		assertEquals( "deliveryAddress", elem.getName() );
-		assertFalse( elem.isInIterable() );
-		assertEquals( null, elem.getIndex() );
-
-		assertTrue( propIter.hasNext() );
-		elem = propIter.next();
-		assertEquals( "addressline", elem.getName() );
-		assertTrue( elem.isInIterable() );
-		assertEquals( new Integer( 1 ), elem.getIndex() );
-
-		assertFalse( propIter.hasNext() );
-	}
-
-	@Test
-	public void testParseMapBasedProperty() {
-		String property = "order[foo].deliveryAddress";
-		Path path = PathImpl.createPathFromString( property );
-		Iterator<Path.Node> propIter = path.iterator();
-
-		assertTrue( propIter.hasNext() );
-		Path.Node elem = propIter.next();
-		assertEquals( "order", elem.getName() );
-		assertTrue( elem.isInIterable() );
-		assertEquals( "foo", elem.getKey() );
-
-		assertTrue( propIter.hasNext() );
-		elem = propIter.next();
-		assertEquals( "deliveryAddress", elem.getName() );
-		assertFalse( elem.isInIterable() );
-		assertEquals( null, elem.getIndex() );
-
-		assertFalse( propIter.hasNext() );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testNull() {
-		PathImpl.createPathFromString( null );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testUnbalancedBraces() {
-		PathImpl.createPathFromString( "foo[.bar" );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testIndexInMiddleOfProperty() {
-		PathImpl.createPathFromString( "f[1]oo.bar" );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testTrailingPathSeperator() {
-		PathImpl.createPathFromString( "foo.bar." );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testLeadingPathSeperator() {
-		PathImpl.createPathFromString( ".foo.bar" );
-	}
-
-	@Test
-	public void testEmptyString() {
-		Path path = PathImpl.createPathFromString( "" );
-		assertTrue( path.iterator().hasNext() );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/ValidatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/ValidatorTest.java
deleted file mode 100644
index 329b492..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/ValidatorTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id: ValidatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.NotNull;
-import javax.validation.metadata.BeanDescriptor;
-
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectPropertyPaths;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ValidatorTest {
-
-	/**
-	 * HV-208
-	 */
-	@Test
-	public void testPropertyPathDoesNotStartWithLeadingDot() {
-		Validator validator = TestUtil.getValidator();
-		A testInstance = new A();
-		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
-		assertNumberOfViolations( constraintViolations, 1 );
-		assertCorrectPropertyPaths( constraintViolations, "b" );
-	}
-
-	/**
-	 * HV-132 - supper hasBoolean format
-	 */
-	@Test
-	public void testHasBoolean() {
-		Validator validator = TestUtil.getValidator();
-		BeanDescriptor beanDescr = validator.getConstraintsForClass( B.class );
-		assertTrue( beanDescr.isBeanConstrained() );
-	}
-
-	class A {
-		@NotNull
-		String b;
-	}
-
-	class B {
-		private boolean b;
-
-		@AssertTrue
-		public boolean hasB() {
-			return b;
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/CustomErrorMessageTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/CustomErrorMessageTest.java
deleted file mode 100644
index 65316c0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/CustomErrorMessageTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $Id: CustomErrorMessageTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.customerror;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintViolationMessages;
-import static org.hibernate.validator.test.util.TestUtil.getValidator;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CustomErrorMessageTest {
-	/**
-	 * HV-297
-	 *
-	 * @throws Exception in case the test fails.
-	 */
-	@Test
-	public void testReportAsSingleViolationDoesNotInfluenceCustomError() throws Exception {
-		Validator validator = getValidator();
-		DummyTestClass dummyTestClass = new DummyTestClass();
-
-		Set<ConstraintViolation<DummyTestClass>> constraintViolations = validator.validate( dummyTestClass );
-		assertCorrectConstraintViolationMessages( constraintViolations, IsValidValidator.message );
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/DummyTestClass.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/DummyTestClass.java
deleted file mode 100644
index 941ab43..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/DummyTestClass.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * $Id: DummyTestClass.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.test.engine.customerror;
-
-/**
- * @author Hardy Ferentschik
- */
- at IsValid
-public class DummyTestClass {
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValid.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValid.java
deleted file mode 100644
index bb63f60..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValid.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id: IsValid.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.customerror;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.NotNull;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * @author Hardy Ferentschik
- */
- at NotNull
- at Target(TYPE)
- at Retention(RUNTIME)
- at Constraint(validatedBy = IsValidValidator.class)
- at ReportAsSingleViolation
-public @interface IsValid {
-	Class<?>[] groups() default { };
-
-	String message() default "Default error message";
-
-	Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValidValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValidValidator.java
deleted file mode 100644
index eca7a8a..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/customerror/IsValidValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * $Id: IsValidValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.customerror;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class IsValidValidator implements ConstraintValidator<IsValid, DummyTestClass> {
-
-	public static final String message = "Custom error message";
-
-
-	public void initialize(IsValid isValid) {
-	}
-
-	public boolean isValid(DummyTestClass dummyTestClass, ConstraintValidatorContext constraintValidatorContext) {
-		constraintValidatorContext.disableDefaultConstraintViolation();
-		constraintValidatorContext.buildConstraintViolationWithTemplate( message )
-				.addConstraintViolation();
-		return false;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Address.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Address.java
deleted file mode 100644
index d71aec5..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Address.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id: Address.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.GroupSequence;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.validation.groups.Default;
-
-/**
- * @author Emmanuel Bernard
- */
- at GroupSequence({ Address.class, Address.HighLevelCoherence.class })
- at ZipCodeCoherenceChecker(groups = Address.HighLevelCoherence.class)
-public class Address {
-	@NotNull
-	@Size(max = 50)
-	private String street;
-
-	@NotNull
-	@Size(max = 5)
-	private String zipcode;
-
-	@NotNull
-	@Size(max = 30)
-	private String city;
-
-	public String getStreet() {
-		return street;
-	}
-
-	public void setStreet(String street) {
-		this.street = street;
-	}
-
-	public String getZipcode() {
-		return zipcode;
-	}
-
-	public void setZipcode(String zipcode) {
-		this.zipcode = zipcode;
-	}
-
-	public String getCity() {
-		return city;
-	}
-
-	public void setCity(String city) {
-		this.city = city;
-	}
-
-	/**
-	 * Check conherence on the overall object
-	 * Needs basic checking to be green first
-	 */
-	public interface HighLevelCoherence {
-	}
-
-	/**
-	 * Check both basic constraints and high level ones.
-	 * High level constraints are not checked if basic constraints fail.
-	 */
-	@GroupSequence(value = { Default.class, HighLevelCoherence.class })
-	public interface Complete {
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence.java
deleted file mode 100644
index 7ceedbf..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id: CyclicGroupSequence.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.GroupSequence;
-
-/**
- * @author Hardy Ferentschik
- */
- at GroupSequence(value = CyclicGroupSequence.class)
-public interface CyclicGroupSequence {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence1.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence1.java
deleted file mode 100644
index f0dded0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence1.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id: CyclicGroupSequence1.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.GroupSequence;
-
-/**
- * @author Hardy Ferentschik
- */
- at GroupSequence(value = CyclicGroupSequence2.class)
-public interface CyclicGroupSequence1 {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence2.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence2.java
deleted file mode 100644
index 5b0d727..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/CyclicGroupSequence2.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id: CyclicGroupSequence2.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.GroupSequence;
-
-/**
- * @author Hardy Ferentschik
- */
- at GroupSequence(value = CyclicGroupSequence1.class)
-public interface CyclicGroupSequence2 {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/First.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/First.java
deleted file mode 100644
index 89f90f0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/First.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id: First.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * Group executed first in the validation
- *
- * @author Emmanuel Bernard
- */
-public interface First {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupA.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupA.java
deleted file mode 100644
index 97251f0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupA.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id: GroupA.java 19559 2010-05-19 16:20:53Z hardy.ferentschik $
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * @author Hardy Ferentschik
- */
-interface GroupA {
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupB.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupB.java
deleted file mode 100644
index 293c1a8..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupB.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id: GroupB.java 19559 2010-05-19 16:20:53Z hardy.ferentschik $
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * @author Hardy Ferentschik
- */
-interface GroupB {
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainGeneratorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainGeneratorTest.java
deleted file mode 100644
index e02a847..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainGeneratorTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-// $Id: GroupChainGeneratorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import javax.validation.GroupDefinitionException;
-import javax.validation.GroupSequence;
-import javax.validation.ValidationException;
-import javax.validation.groups.Default;
-
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.groups.Group;
-import org.hibernate.validator.engine.groups.GroupChain;
-import org.hibernate.validator.engine.groups.GroupChainGenerator;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Hardy Ferentschik
- */
-public class GroupChainGeneratorTest {
-
-	GroupChainGenerator generator;
-
-	@BeforeTest
-	public void init() {
-		generator = new GroupChainGenerator();
-	}
-
-	@Test(expectedExceptions = ValidationException.class)
-	public void testGroupChainForNonInterface() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( String.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testGroupChainForNull() {
-		generator.getGroupChainFor( null );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void testGroupChainForEmptySet() {
-		generator.getGroupChainFor( new HashSet<Class<?>>() );
-	}
-
-	@Test(expectedExceptions = ValidationException.class)
-	public void testCyclicGroupSequences() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( CyclicGroupSequence1.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test(expectedExceptions = ValidationException.class)
-	public void testCyclicGroupSequence() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( CyclicGroupSequence.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test
-	public void testGroupDuplicates() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( First.class );
-		groups.add( Second.class );
-		groups.add( Last.class );
-		GroupChain chain = generator.getGroupChainFor( groups );
-		int count = countGroups( chain );
-		assertEquals( count, 3, "Wrong number of groups" );
-
-		groups.clear();
-		groups.add( First.class );
-		groups.add( First.class );
-		chain = generator.getGroupChainFor( groups );
-		count = countGroups( chain );
-		assertEquals( count, 1, "Wrong number of groups" );
-
-		groups.clear();
-		groups.add( First.class );
-		groups.add( Last.class );
-		groups.add( First.class );
-		chain = generator.getGroupChainFor( groups );
-		count = countGroups( chain );
-		assertEquals( count, 2, "Wrong number of groups" );
-	}
-
-	@Test(expectedExceptions = GroupDefinitionException.class)
-	public void testGroupDefiningSequencePartOfGroupComposingSequence() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( Sequence1.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test(expectedExceptions = GroupDefinitionException.class)
-	public void testUnexpandableSequence() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( Sequence3.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test
-	public void testExpandableSequenceWithInheritance() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( Sequence4.class );
-		generator.getGroupChainFor( groups );
-	}
-
-	@Test
-	public void testSequenceResolution() {
-		Set<Class<?>> groups = new HashSet<Class<?>>();
-		groups.add( Address.Complete.class );
-		GroupChain chain = generator.getGroupChainFor( groups );
-		Iterator<List<Group>> sequences = chain.getSequenceIterator();
-		List<Group> sequence = sequences.next();
-
-		assertEquals( sequence.get( 0 ).getGroup(), Default.class, "Wrong group" );
-		assertEquals( sequence.get( 1 ).getGroup(), Address.HighLevelCoherence.class, "Wrong group" );
-	}
-
-	private int countGroups(GroupChain chain) {
-		Iterator<Group> groupIterator = chain.getGroupIterator();
-		int count = 0;
-		while ( groupIterator.hasNext() ) {
-			groupIterator.next();
-			count++;
-		}
-		return count;
-	}
-
-
-	interface GroupA extends Default {
-	}
-
-	interface GroupB {
-	}
-
-	interface GroupC extends Sequence2 {
-	}
-
-	@GroupSequence({ GroupA.class, GroupC.class })
-	interface Sequence1 {
-	}
-
-	@GroupSequence({ GroupB.class, GroupA.class })
-	interface Sequence2 {
-	}
-
-	@GroupSequence({ Sequence2.class, GroupB.class })
-	interface Sequence3 {
-	}
-
-	@GroupSequence({ Sequence2.class, GroupA.class })
-	interface Sequence4 {
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainTest.java
deleted file mode 100644
index 492f010..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupChainTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: GroupChainTest.java 19559 2010-05-19 16:20:53Z hardy.ferentschik $
-package org.hibernate.validator.test.engine.groups;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.GroupDefinitionException;
-import javax.validation.groups.Default;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.groups.Group;
-import org.hibernate.validator.engine.groups.GroupChain;
-
-import static org.testng.FileAssert.fail;
-
-/**
- * @author Hardy Ferentschik
- */
-public class GroupChainTest {
-	@Test
-	public void testAssertDefaultGroupSequenceIsExpandableWithDefaultAtEndOfSequence() {
-		// create a dummy sequence
-		Group a = new Group( GroupA.class, TestSequence.class );
-		Group b = new Group( GroupB.class, TestSequence.class );
-		Group c = new Group( GroupC.class, TestSequence.class );
-		Group defaultGroup = new Group(
-				Default.class, TestSequence.class
-		);
-		List<Group> sequence = new ArrayList<Group>();
-		sequence.add( a );
-		sequence.add( b );
-		sequence.add( c );
-		sequence.add( defaultGroup );
-
-		GroupChain chain = new GroupChain();
-		chain.insertSequence( sequence );
-
-		// create test default sequence
-		List<Class<?>> defaultSequence = new ArrayList<Class<?>>();
-		defaultSequence.add( Default.class );
-		defaultSequence.add( GroupA.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-
-		defaultSequence.clear();
-		defaultSequence.add( GroupA.class );
-		defaultSequence.add( Default.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-
-		defaultSequence.clear();
-		defaultSequence.add( Default.class );
-		defaultSequence.add( GroupC.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-
-		defaultSequence.clear();
-		defaultSequence.add( GroupC.class );
-		defaultSequence.add( Default.class );
-		chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-	}
-
-
-	@Test
-	public void testAssertDefaultGroupSequenceIsExpandableWithDefaultAtBeginningOfSequence() {
-		// create a dummy sequence
-		Group a = new Group( GroupA.class, TestSequence.class );
-		Group b = new Group( GroupB.class, TestSequence.class );
-		Group c = new Group( GroupC.class, TestSequence.class );
-		Group defaultGroup = new Group(
-				Default.class, TestSequence.class
-		);
-		List<Group> sequence = new ArrayList<Group>();
-		sequence.add( defaultGroup );
-		sequence.add( a );
-		sequence.add( b );
-		sequence.add( c );
-
-		GroupChain chain = new GroupChain();
-		chain.insertSequence( sequence );
-
-		// create test default sequence
-		List<Class<?>> defaultSequence = new ArrayList<Class<?>>();
-		defaultSequence.add( Default.class );
-		defaultSequence.add( GroupA.class );
-		chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-
-
-		defaultSequence.clear();
-		defaultSequence.add( GroupA.class );
-		defaultSequence.add( Default.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-
-		defaultSequence.clear();
-		defaultSequence.add( Default.class );
-		defaultSequence.add( GroupC.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-
-		defaultSequence.clear();
-		defaultSequence.add( GroupC.class );
-		defaultSequence.add( Default.class );
-		try {
-			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
-			fail();
-		}
-		catch ( GroupDefinitionException e ) {
-			// success
-		}
-	}
-}
-
-interface GroupC {
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupsTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupsTest.java
deleted file mode 100644
index bdf9b8a..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/GroupsTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: GroupsTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintViolationMessages;
-
-/**
- * @author Hardy Ferentschik
- */
-public class GroupsTest {
-
-	/**
-	 * HV-288
-	 */
-	@Test
-	public void testGroupInheritance() {
-		Validator validator = TestUtil.getValidator();
-		Try tryMe = new Try();
-		tryMe.field2 = "foo";
-		tryMe.field3 = "bar";
-
-		Set<ConstraintViolation<Try>> violations = validator.validate( tryMe, Try.GlobalCheck.class );
-		assertCorrectConstraintViolationMessages(violations, "field1");
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Last.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Last.java
deleted file mode 100644
index 5dcc7eb..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Last.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id: Last.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * Group executed Last in the validation
- *
- * @author Emmanuel Bernard
- */
-public interface Last {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Second.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Second.java
deleted file mode 100644
index dc670cd..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Second.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id: Second.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * Group executed second during the validation
- *
- * @author Emmanuel Bernard
- */
-public interface Second {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/TestSequence.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/TestSequence.java
deleted file mode 100644
index 18a529f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/TestSequence.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id: TestSequence.java 19559 2010-05-19 16:20:53Z hardy.ferentschik $
-package org.hibernate.validator.test.engine.groups;
-
-/**
- * @author Hardy Ferentschik
- */
-interface TestSequence {
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Try.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Try.java
deleted file mode 100644
index 7074575..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/Try.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id: Try.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.GroupSequence;
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Try {
-	@NotNull(message = "field1", groups = BaseComponent.class)
-	public String field1;
-
-	@NotNull(message = "field2", groups = Component.class)
-	public String field2;
-
-	@NotNull(message = "field3", groups = OtherComponent.class)
-	public String field3;
-
-	public interface BaseComponent {
-	}
-
-	public interface Component extends BaseComponent {
-	}
-
-	public interface OtherComponent {
-	}
-
-	@GroupSequence({ Component.class, OtherComponent.class })
-	public interface GlobalCheck {
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceChecker.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceChecker.java
deleted file mode 100644
index 1170ba2..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceChecker.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: ZipCodeCoherenceChecker.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-
-/**
- * @author Emmanuel Bernard
- */
- at Target({ TYPE, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
- at Constraint(validatedBy = ZipCodeCoherenceValidator.class)
-public @interface ZipCodeCoherenceChecker {
-	public abstract String message() default "{validator.zipCodeCoherenceChecker}";
-
-	public abstract Class<?>[] groups() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceValidator.java
deleted file mode 100644
index d7cdb29..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/groups/ZipCodeCoherenceValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id: ZipCodeCoherenceValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.groups;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ZipCodeCoherenceValidator implements ConstraintValidator<ZipCodeCoherenceChecker, Address> {
-
-	public void initialize(ZipCodeCoherenceChecker parameters) {
-	}
-
-	public boolean isValid(Address value, ConstraintValidatorContext constraintValidatorContext) {
-		return false;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationTest.java
deleted file mode 100644
index b3dd248..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-// $Id: MessageInterpolationTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.messageinterpolation;
-
-import java.io.ByteArrayInputStream;
-import java.util.Locale;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * Tests for HV-184
- *
- * @author Hardy Ferentschik
- */
-public class MessageInterpolationTest {
-	private Validator validator;
-
-	@BeforeClass
-	public void createValidator() throws Exception {
-		final StringBuilder lines = new StringBuilder();
-		lines.append( "bar=Message is \\\\{escaped\\\\}" ).append( "\r\n" );
-		lines.append( "baz=Message is US$ {value}" ).append( "\r\n" );
-		lines.append( "qux=Message is {missing}" ).append( "\r\n" );
-		lines.append( "escaped=wrong" ).append( "\r\n" );
-		final ResourceBundle bundle = new PropertyResourceBundle(
-				new ByteArrayInputStream( lines.toString().getBytes() )
-		);
-		Configuration<?> config = Validation.byDefaultProvider()
-				.configure()
-				.messageInterpolator(
-						new ResourceBundleMessageInterpolator(
-								new ResourceBundleLocator() {
-
-									public ResourceBundle getResourceBundle(
-											Locale locale) {
-										return bundle;
-									}
-
-								}
-						)
-				);
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		validator = factory.getValidator();
-	}
-
-	@Test
-	public void testCurlyBracesEscapingShouldBeRespected() {
-		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Bar.class ).iterator().next();
-		assertEquals( violation.getMessage(), "Message is {escaped}" );
-	}
-
-	@Test
-	public void testAppendReplacementNeedsToEscapeBackslashAndDollarSign() {
-		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Baz.class ).iterator().next();
-		assertEquals( violation.getMessage(), "Message is US$ 5" );
-	}
-
-	@Test
-	public void testUnknownParametersShouldBePreserved() {
-		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Qux.class ).iterator().next();
-		assertEquals( violation.getMessage(), "Message is {missing}" );
-	}
-
-	public static interface Bar {
-	}
-
-	public static interface Baz {
-	}
-
-	public static interface Qux {
-	}
-
-	public static class Foo {
-		@NotNull(message = "{bar}", groups = { Bar.class })
-		public String getBar() {
-			return null;
-		}
-
-		@Min(value = 5, message = "{baz}", groups = { Baz.class })
-		public int getBaz() {
-			return 0;
-		}
-
-
-		@NotNull(message = "{qux}", groups = { Qux.class })
-		public String getQux() {
-			return null;
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java
deleted file mode 100644
index 038ae8e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-// $Id: MessageInterpolationWithDefaultBundleTest.java 19582 2010-05-21 15:48:20Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.messageinterpolation;
-
-import java.util.Locale;
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertCorrectConstraintViolationMessages;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * Tests for correct message interpolation for messages from the default bundle.
- *
- * @author Hardy Ferentschik
- * @author Gunnar Morling
- */
-public class MessageInterpolationWithDefaultBundleTest {
-	private Locale defaultLocale;
-
-	@BeforeClass
-	public void storeDefaultLocale() {
-		defaultLocale = Locale.getDefault();
-	}
-
-	@AfterClass
-	public void restoreDefaultLocale() {
-		Locale.setDefault( defaultLocale );
-	}
-
-	/**
-	 * HV-268
-	 */
-	@Test
-	public void testEmailAndRangeMessageEnglishLocale() {
-		Configuration<?> config = TestUtil.getConfiguration( Locale.ENGLISH );
-		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
-		Validator validator = config.buildValidatorFactory().getValidator();
-		User user = new User();
-		user.setEmail( "foo" );
-		user.setAge( 16 );
-		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
-		assertNumberOfViolations( constraintViolations, 2 );
-		assertCorrectConstraintViolationMessages(
-				constraintViolations, "not a well-formed email address", "must be between 18 and 21"
-		);
-	}
-
-	/**
-	 * HV-268
-	 */
-	@Test
-	public void testEmailAndRangeMessageGermanLocale() {
-		Configuration<?> config = TestUtil.getConfiguration( Locale.GERMAN );
-		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
-		Validator validator = config.buildValidatorFactory().getValidator();
-		User user = new User();
-		user.setEmail( "foo" );
-		user.setAge( 16 );
-		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
-		assertNumberOfViolations( constraintViolations, 2 );
-		assertCorrectConstraintViolationMessages(
-				constraintViolations, "keine g\u00FCltige E-Mail-Adresse", "muss zwischen 18 und 21 liegen"
-		);
-	}
-
-	/**
-	 * HV-268
-	 */
-	@Test
-	public void testEmailAndRangeMessageFrenchLocale() {
-		Configuration<?> config = TestUtil.getConfiguration( Locale.FRENCH );
-		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
-		Validator validator = config.buildValidatorFactory().getValidator();
-		User user = new User();
-		user.setEmail( "foo" );
-		user.setAge( 16 );
-		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
-		assertNumberOfViolations( constraintViolations, 2 );
-		assertCorrectConstraintViolationMessages(
-				constraintViolations, "Addresse email mal form\u00E9e", "doit \u00EAtre entre 18 et 21"
-		);
-	}
-
-	/**
-	 * HV-306. If English is explicitly set as locale for message interpolation, it
-	 * must take precedence over the system's default locale.
-	 */
-	@Test
-	public void testThatExplicitlySetEnglishLocaleHasPrecedenceOverDefaultLocale() {
-		Configuration<?> config = TestUtil.getConfiguration( Locale.FRENCH );
-		config.messageInterpolator( new LocalizedMessageInterpolator( Locale.ENGLISH ) );
-		Validator validator = config.buildValidatorFactory().getValidator();
-		User user = new User();
-		user.setEmail( "foo" );
-		user.setAge( 16 );
-		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
-		assertNumberOfViolations( constraintViolations, 2 );
-		assertCorrectConstraintViolationMessages(
-				constraintViolations, "not a well-formed email address", "must be between 18 and 21"
-		);
-	}
-
-	/**
-	 * A message interpolator that enforces one given locale to be used for message
-	 * interpolation.
-	 *
-	 * @author Gunnar Morling
-	 */
-	private static class LocalizedMessageInterpolator extends ResourceBundleMessageInterpolator {
-
-		private Locale locale;
-
-		public LocalizedMessageInterpolator(Locale locale) {
-			this.locale = locale;
-		}
-
-		@Override
-		public String interpolate(String messageTemplate, Context context) {
-			return interpolate( messageTemplate, context, this.locale );
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolatorContextTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolatorContextTest.java
deleted file mode 100644
index 363c2a3..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/MessageInterpolatorContextTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: MessageInterpolatorContextTest.java 19735 2010-06-15 09:40:40Z hardy.ferentschik $
-
-package org.hibernate.validator.test.engine.messageinterpolation;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.MessageInterpolator;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.ConstraintDescriptor;
-import javax.validation.metadata.PropertyDescriptor;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.cfg.defs.MinDef;
-import org.hibernate.validator.engine.MessageInterpolatorContext;
-import org.hibernate.validator.test.util.TestUtil;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-import static org.testng.Assert.assertTrue;
-
-
-/**
- * Tests for HV-333
- *
- * @author Hardy Ferentschik
- */
-public class MessageInterpolatorContextTest {
-
-	@org.testng.annotations.Test
-	public void testInterpolatorContext() throws Exception {
-
-		// use programmatic mapping api to configure constraint
-		ConstraintMapping mapping = new ConstraintMapping();
-		mapping.type( Test.class )
-				.property( "test", FIELD )
-				.constraint( MinDef.class )
-				.value( 10 )
-				.message( "{foo}" );
-
-		// use a easy mock message interpolator to verify the right for verifying that the right MessageInterpolatorContext
-		// will be passed
-		MessageInterpolator mock = createMock( MessageInterpolator.class );
-		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
-		config.messageInterpolator( mock );
-		config.addMapping( mapping );
-
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Validator validator = factory.getValidator();
-
-		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Test.class );
-		PropertyDescriptor propertyDescriptor = beanDescriptor.getConstraintsForProperty( "test" );
-		Set<ConstraintDescriptor<?>> constraintDescriptors = propertyDescriptor.getConstraintDescriptors();
-		assertTrue( constraintDescriptors.size() == 1 );
-
-		// prepare the mock interpolator to expect the right interpolate call
-		String validatedValue = "value";
-		expect(
-				mock.interpolate(
-						"{foo}",
-						new MessageInterpolatorContext( constraintDescriptors.iterator().next(), validatedValue )
-				)
-		).andReturn( "{foo}" );
-		replay( mock );
-
-		Set<ConstraintViolation<Test>> violations = validator.validate( new Test( validatedValue ) );
-		assertNumberOfViolations( violations, 1 );
-
-		// verify that the right validatedValue was passed
-		verify( mock );
-	}
-
-
-	public static class Test {
-		private String test;
-
-		public Test(String test) {
-			this.test = test;
-		}
-
-		public String getTest() {
-			return test;
-		}
-
-		public void setTest(String test) {
-			this.test = test;
-		}
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java
deleted file mode 100644
index df91996..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java
+++ /dev/null
@@ -1,379 +0,0 @@
-// $Id: ResourceBundleMessageInterpolatorTest.java 19650 2010-06-02 09:30:55Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.messageinterpolation;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.ResourceBundle;
-import javax.validation.MessageInterpolator;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.MessageInterpolatorContext;
-import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
-import org.hibernate.validator.metadata.ConstraintDescriptorImpl;
-import org.hibernate.validator.metadata.ConstraintHelper;
-import org.hibernate.validator.metadata.ConstraintOrigin;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * Tests for message interpolation.
- *
- * @author Hardy Ferentschik
- */
-public class ResourceBundleMessageInterpolatorTest {
-
-	private ResourceBundleMessageInterpolator interpolator;
-	private NotNull notNull;
-	private ConstraintDescriptorImpl<NotNull> notNullDescriptor;
-	private Size size;
-	private ConstraintDescriptorImpl<Size> sizeDescriptor;
-
-	@BeforeTest
-	public void setUp() {
-		// Create some annotations for testing using AnnotationProxies
-		AnnotationDescriptor<NotNull> descriptor = new AnnotationDescriptor<NotNull>( NotNull.class );
-		notNull = AnnotationFactory.create( descriptor );
-		notNullDescriptor = new ConstraintDescriptorImpl<NotNull>(
-				notNull,
-				new ConstraintHelper(),
-				java.lang.annotation.ElementType.FIELD,
-				ConstraintOrigin.DEFINED_LOCALLY
-		);
-
-		AnnotationDescriptor<Size> sizeAnnotationDescriptor = new AnnotationDescriptor<Size>( Size.class );
-		size = AnnotationFactory.create( sizeAnnotationDescriptor );
-		sizeDescriptor = new ConstraintDescriptorImpl<Size>(
-				size, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
-		);
-	}
-
-	@Test
-	public void testSuccessfulInterpolation() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-		String expected = "message interpolation successful";
-		String actual = interpolator.interpolate( "{simple.key}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "message interpolation successful message interpolation successful";
-		actual = interpolator.interpolate( "{simple.key} {simple.key}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "The message interpolation successful completed";
-		actual = interpolator.interpolate( "The {simple.key} completed", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "{{simple.key}}";
-		actual = interpolator.interpolate( "{{simple.key}}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testMessageLiterals() {
-
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "{";
-		String actual = interpolator.interpolate( "\\{", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "}";
-		actual = interpolator.interpolate( "\\}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "\\";
-		actual = interpolator.interpolate( "\\", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testUnSuccessfulInterpolation() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "foo";  // missing {}
-		String actual = interpolator.interpolate( "foo", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "#{foo  {}";
-		actual = interpolator.interpolate( "#{foo  {}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testUnknownTokenInterpolation() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "{bar}";  // unknown token {}
-		String actual = interpolator.interpolate( "{bar}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testKeyWithDashes() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "message interpolation successful";  // unknown token {}
-		String actual = interpolator.interpolate( "{key-with-dashes}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testKeyWithSpaces() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "message interpolation successful";  // unknown token {}
-		String actual = interpolator.interpolate( "{key with spaces}", context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testDefaultInterpolation() {
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "may not be null";
-		String actual = interpolator.interpolate( notNull.message(), context );
-		assertEquals( actual, expected, "Wrong substitution" );
-
-		expected = "size must be between 0 and 2147483647";  // unknown token {}
-		context = new MessageInterpolatorContext( sizeDescriptor, null );
-		actual = interpolator.interpolate( size.message(), context );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testMessageInterpolationWithLocale() {
-		interpolator = new ResourceBundleMessageInterpolator();
-
-		String expected = "kann nicht null sein";
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-		String actual = interpolator.interpolate( notNull.message(), context, Locale.GERMAN );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	@Test
-	public void testUserResourceBundle() {
-		interpolator = new ResourceBundleMessageInterpolator();
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "no puede ser null";
-		String actual = interpolator.interpolate( notNull.message(), context, new Locale( "es", "ES" ) );
-		assertEquals( actual, expected, "Wrong substitution" );
-	}
-
-	/**
-	 * HV-102
-	 */
-	@Test
-	public void testRecursiveMessageInterpolation() {
-		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
-		descriptor.setValue( "message", "{replace.in.user.bundle1}" );
-		descriptor.setValue( "value", 10l );
-		Max max = AnnotationFactory.create( descriptor );
-
-
-		ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
-				max, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
-		);
-
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( constraintDescriptor, null );
-
-		String expected = "{replace.in.default.bundle2}";
-		String actual = interpolator.interpolate( max.message(), context );
-		assertEquals(
-				actual, expected, "Within default bundle replacement parameter evaluation should not be recursive!"
-		);
-	}
-
-	/**
-	 * HV-182
-	 */
-	@Test
-	public void testCorrectMessageInterpolationIfParameterCannotBeReplaced() {
-		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
-		String message = "Message should stay unchanged since {fubar} is not replaceable";
-		descriptor.setValue( "message", message );
-		descriptor.setValue( "value", 10l );
-		Max max = AnnotationFactory.create( descriptor );
-
-
-		ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
-				max, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
-		);
-
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator()
-		);
-
-		MessageInterpolator.Context context = new MessageInterpolatorContext( constraintDescriptor, null );
-
-		String actual = interpolator.interpolate( max.message(), context );
-		assertEquals(
-				actual, message, "The message should not have changed."
-		);
-	}
-
-	/**
-	 * HV-330
-	 */
-	@Test
-	public void testMessageCaching() {
-
-		// do the whole tests first with caching enabled
-		TestResourceBundle testBundle = new TestResourceBundle();
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator( testBundle )
-		);
-		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		String expected = "{hv-330}";
-		String actual = interpolator.interpolate( "{hv-330}", context );
-		assertEquals( actual, expected, "The key should not not exist in the bundle." );
-
-		testBundle.addOrUpdateMessage( "hv-330", "success" );
-		expected = "{hv-330}";
-		actual = interpolator.interpolate( "{hv-330}", context );
-		assertEquals(
-				actual,
-				expected,
-				"The message has not changed since per default the ResourceBundleMessageInterpolator caches the messages"
-		);
-
-		// now without caching
-		testBundle = new TestResourceBundle();
-		interpolator = new ResourceBundleMessageInterpolator(
-				new TestResourceBundleLocator( testBundle ), false
-		);
-		context = new MessageInterpolatorContext( notNullDescriptor, null );
-
-		expected = "{hv-330}";
-		actual = interpolator.interpolate( "{hv-330}", context );
-		assertEquals( actual, expected, "The key should not not exist in the bundle." );
-
-		testBundle.addOrUpdateMessage( "hv-330", "success" );
-		expected = "success";
-		actual = interpolator.interpolate( "{hv-330}", context );
-		assertEquals(
-				actual,
-				expected,
-				"The message should change since ResourceBundleMessageInterpolator does not cache"
-		);
-	}
-
-	/**
-	 * A dummy locator always returning a {@link TestResourceBundle}.
-	 */
-	private static class TestResourceBundleLocator implements ResourceBundleLocator {
-
-		private final ResourceBundle resourceBundle;
-
-		public TestResourceBundleLocator() {
-			this( new TestResourceBundle() );
-		}
-
-		public TestResourceBundleLocator(ResourceBundle bundle) {
-			resourceBundle = bundle;
-		}
-
-		public ResourceBundle getResourceBundle(Locale locale) {
-			return resourceBundle;
-		}
-	}
-
-	/**
-	 * A dummy resource bundle which can be passed to the constructor of ResourceBundleMessageInterpolator to replace
-	 * the user specified resource bundle.
-	 */
-	private static class TestResourceBundle extends ResourceBundle implements Enumeration<String> {
-		private Map<String, String> testResources;
-		Iterator<String> iter;
-
-		public TestResourceBundle() {
-			testResources = new HashMap<String, String>();
-			// add some test messages
-			testResources.put( "simple.key", "message interpolation successful" );
-			testResources.put( "key-with-dashes", "message interpolation successful" );
-			testResources.put( "key with spaces", "message interpolation successful" );
-			testResources.put( "replace.in.user.bundle1", "{replace.in.user.bundle2}" );
-			testResources.put( "replace.in.user.bundle2", "{replace.in.default.bundle1}" );
-
-			iter = testResources.keySet().iterator();
-		}
-
-		public Object handleGetObject(String key) {
-			return testResources.get( key );
-		}
-
-		public Enumeration<String> getKeys() {
-			return this;
-		}
-
-		public boolean hasMoreElements() {
-			return iter.hasNext();
-		}
-
-		public String nextElement() {
-			if ( hasMoreElements() ) {
-				return iter.next();
-			}
-			else {
-				throw new NoSuchElementException();
-			}
-		}
-
-		public void addOrUpdateMessage(String key, String message) {
-			testResources.put( key, message );
-			iter = testResources.keySet().iterator();
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/User.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/User.java
deleted file mode 100644
index b14e268..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/messageinterpolation/User.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id: User.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.messageinterpolation;
-
-import org.hibernate.validator.constraints.Email;
-import org.hibernate.validator.constraints.Range;
-
-/**
- * @author Hardy Ferentschik
- */
-public class User {
-	@Email
-	private String email;
-
-	@Range(min = 18, max = 21)
-	private int age;
-
-	public int getAge() {
-		return age;
-	}
-
-	public void setAge(int age) {
-		this.age = age;
-	}
-
-	public String getEmail() {
-		return email;
-	}
-
-	public void setEmail(String email) {
-		this.email = email;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/A.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/A.java
deleted file mode 100644
index b303a31..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/A.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: A.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.proxy;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.Size;
-
-interface A {
-	@Min(5)
-	public Integer getInteger();
-
-	@Size(min = 2)
-	public String getString();
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/B.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/B.java
deleted file mode 100644
index 58f6ee4..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/B.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id: B.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.proxy;
-
-public interface B extends A {
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/ProxyTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/ProxyTest.java
deleted file mode 100644
index c1a98db..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/proxy/ProxyTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id: ProxyTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.proxy;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * See HV-257
- *
- * @author Hardy Ferentschik
- */
-public class ProxyTest {
-	@Test
-	public void testValidateA() {
-		InvocationHandler handler = new CustomInvocationHandler( "some object" );
-
-		A a = ( A ) Proxy.newProxyInstance( getClass().getClassLoader(), new Class<?>[] { A.class }, handler );
-		assertEquals( Integer.valueOf( 0 ), a.getInteger() );
-
-		Validator validator = TestUtil.getValidator();
-		Set<ConstraintViolation<A>> violations = validator.validate( a );
-		assertNumberOfViolations( violations, 2 );
-	}
-
-	@Test
-	public void testValidateB() {
-		InvocationHandler handler = new CustomInvocationHandler( "some object" );
-
-		B b = ( B ) Proxy.newProxyInstance( getClass().getClassLoader(), new Class<?>[] { B.class }, handler );
-		assertEquals( Integer.valueOf( 0 ), b.getInteger() );
-
-		Validator validator = TestUtil.getValidator();
-		Set<ConstraintViolation<B>> violations = validator.validate( b );
-		assertNumberOfViolations( violations, 2 );
-	}
-
-	private class CustomInvocationHandler implements InvocationHandler {
-		private Object o;
-
-		public CustomInvocationHandler(Object o) {
-			this.o = o;
-		}
-
-		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-			if ( method.getName().equals( "getInteger" ) ) {
-				method.setAccessible( true );
-				return 0;
-			}
-			if ( method.getName().equals( "getString" ) ) {
-				return "a";
-			}
-			return method.invoke( o, args );
-		}
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/ConstraintViolationSerializationTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/ConstraintViolationSerializationTest.java
deleted file mode 100644
index af06c72..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/ConstraintViolationSerializationTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id: ConstraintViolationSerializationTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
-import java.io.NotSerializableException;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintViolationSerializationTest {
-
-	/**
-	 * HV-245
-	 */
-	@Test
-	public void testSuccessfulSerialization() throws Exception {
-		Validator validator = TestUtil.getValidator();
-		SerializableClass testInstance = new SerializableClass();
-		Set<ConstraintViolation<SerializableClass>> constraintViolations = validator.validate( testInstance );
-
-		byte[] bytes = serialize( constraintViolations );
-		Set<ConstraintViolation<?>> deserializedViolations = deserialize( bytes );
-		assertNumberOfViolations( deserializedViolations, 1 );
-	}
-
-	/**
-	 * HV-245
-	 */
-	@Test(expectedExceptions = NotSerializableException.class)
-	public void testUnSuccessfulSerialization() throws Exception {
-		Validator validator = TestUtil.getValidator();
-		UnSerializableClass testInstance = new UnSerializableClass();
-		Set<ConstraintViolation<UnSerializableClass>> constraintViolations = validator.validate( testInstance );
-
-		serialize( constraintViolations );
-	}
-
-	private byte[] serialize(Object o) throws Exception {
-		ByteArrayOutputStream stream = new ByteArrayOutputStream();
-		ObjectOutput out = new ObjectOutputStream( stream );
-		out.writeObject( o );
-		out.close();
-		byte[] serialized = stream.toByteArray();
-		stream.close();
-		return serialized;
-
-	}
-
-	private Set<ConstraintViolation<?>> deserialize(byte[] byteData) throws Exception {
-		ByteArrayInputStream byteIn = new ByteArrayInputStream( byteData );
-		ObjectInputStream in = new ObjectInputStream( byteIn );
-		Set<ConstraintViolation<?>> deserializedViolations = ( Set<ConstraintViolation<?>> ) in.readObject();
-		in.close();
-		byteIn.close();
-		return deserializedViolations;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/CustomConstraintSerializableTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/CustomConstraintSerializableTest.java
deleted file mode 100644
index 732dc4f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/CustomConstraintSerializableTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id: CustomConstraintSerializableTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-
-/**
- * A <b>sscce</b> (Short, Self Contained, Correct Example) showing that the
- * simple custom Email validation constraint taken from <a href="http://blog.jteam.nl/2009/08/04/bean-validation-integrating-jsr-303-with-spring/"
- * >this blog</a> gives a validation result that is not Serializable with
- * Hibernate Validator 4.0.2.GA with underlying cause that
- * <p/>
- * <code>org.hibernate.validator.util.annotationfactory.AnnotationProxy</code>
- * <p/>
- * <p/>
- * Note that Hibernate Validator does not guarantee at all that a
- * {@link ConstraintViolation} is Serializable because an entity need not be
- * Serializable, but otherwise there should not be much of a problem (right?).
- *
- * @author Henno Vermeulen
- * @author Hardy Ferentschik
- */
-public class CustomConstraintSerializableTest {
-
-	@Test
-	public void testSerializeHibernateEmail() throws Exception {
-		Validator validator = TestUtil.getValidator();
-
-		HibernateEmail invalidHibernateEmail = new HibernateEmail();
-		invalidHibernateEmail.email = "test@";
-
-		Set<ConstraintViolation<HibernateEmail>> constraintViolations = validator.validate( invalidHibernateEmail );
-		doSerialize( constraintViolations.iterator().next() );
-	}
-
-	/**
-	 * HV-291
-	 *
-	 * @throws Exception in case the test fails
-	 */
-	@Test
-	public void testSerializeCustomEmail() throws Exception {
-		Validator validator = TestUtil.getValidator();
-
-		CustomEmail invalidCustomEmail = new CustomEmail();
-		invalidCustomEmail.email = "test@";
-		Set<ConstraintViolation<CustomEmail>> constraintViolations = validator.validate( invalidCustomEmail );
-		doSerialize( constraintViolations.iterator().next() );
-	}
-
-	public static byte[] doSerialize(Object obj) throws Exception {
-		ByteArrayOutputStream baos = new ByteArrayOutputStream( 512 );
-		ObjectOutputStream out = new ObjectOutputStream( baos );
-		out.writeObject( obj );
-		out.close();
-		return baos.toByteArray();
-	}
-
-	static class CustomEmail implements Serializable {
-		private static final long serialVersionUID = -9095271389455131159L;
-
-		@Email
-		String email;
-
-	}
-
-	static class HibernateEmail implements Serializable {
-		private static final long serialVersionUID = 7206154160792549270L;
-
-		@org.hibernate.validator.constraints.Email
-		String email;
-	}
-}
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/DummyEmailValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/DummyEmailValidator.java
deleted file mode 100644
index 9ce8a2f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/DummyEmailValidator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id: DummyEmailValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DummyEmailValidator implements ConstraintValidator<Email, String> {
-	public void initialize(Email annotation) {
-	}
-
-	public boolean isValid(String value, ConstraintValidatorContext context) {
-		return false;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/Email.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/Email.java
deleted file mode 100644
index e50944e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/Email.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id: Email.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.Pattern;
-
-/**
- * Denotes that a field should contain a valid email address.
- * <p/>
- * <p/>
- * Taken from <a href="http://blog.jteam.nl/2009/08/04/bean-validation-integrating-jsr-303-with-spring/"
- * >this blog</a>.
- *
- * @author Hardy Ferentschik
- */
- at Documented
- at Constraint(validatedBy = { DummyEmailValidator.class })
- at Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE })
- at Retention(RetentionPolicy.RUNTIME)
- at Pattern(regexp = ".+ at .+\\.[a-z]+")
- at ReportAsSingleViolation
-public @interface Email {
-
-	public abstract String message() default "{org.hibernate.validator.engine.serialization.Email.message}";
-
-	public abstract Class<?>[] groups() default { };
-
-	public abstract Class<? extends Payload>[] payload() default { };
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/SerializableClass.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/SerializableClass.java
deleted file mode 100644
index 51054a9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/SerializableClass.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: SerializableClass.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import java.io.Serializable;
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SerializableClass implements Serializable {
-	@NotNull
-	private String foo;
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/UnSerializableClass.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/UnSerializableClass.java
deleted file mode 100644
index 1f303cb..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/serialization/UnSerializableClass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: UnSerializableClass.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.serialization;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class UnSerializableClass {
-	@NotNull
-	private String foo;
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Author.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Author.java
deleted file mode 100644
index 895b2da..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Author.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id: Author.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.validation.Valid;
-
-/**
- * @author Hardy Ferentschik
- */
- at Entity
- at AuthorBusinessRules
-public class Author {
-	@Id
-	public Long id;
-
-	@Valid
-	@OneToMany(mappedBy = "author")
-	public List<Book> books = new ArrayList<Book>();
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/AuthorBusinessRules.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/AuthorBusinessRules.java
deleted file mode 100644
index dfe9034..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/AuthorBusinessRules.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id: AuthorBusinessRules.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
- at Constraint(validatedBy = {})
- at Documented
- at Target(ElementType.TYPE)
- at Retention(RetentionPolicy.RUNTIME)
-public @interface AuthorBusinessRules {
-	String message() default "";
-
-	Class<?>[] groups() default {};
-
-	Class<? extends Payload>[] payload() default {};
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Book.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Book.java
deleted file mode 100644
index 3a53039..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Book.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id: Book.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-
-/**
- * @author Hardy Ferentschik
- */
- at BookBusinessRules
- at Entity
-public class Book {
-	@Id
-	public Long id;
-
-	@ManyToOne
-	public Author author;
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/BookBusinessRules.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/BookBusinessRules.java
deleted file mode 100644
index afd08eb..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/BookBusinessRules.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: BookBusinessRules.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
- at Constraint(validatedBy = {})
- at Documented
- at Target(ElementType.TYPE)
- at Retention(RetentionPolicy.RUNTIME)
-public @interface BookBusinessRules {
-	String message() default "";
-
-	Class<?>[] groups() default {};
-
-	Class<? extends Payload>[] payload() default {};
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/CachedTraversableResolverTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/CachedTraversableResolverTest.java
deleted file mode 100644
index 7ce96e7..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/CachedTraversableResolverTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-// $Id: CachedTraversableResolverTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import java.lang.annotation.ElementType;
-import java.util.HashSet;
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.TraversableResolver;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.Path;
-import javax.validation.groups.Default;
-
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-/**
- * @author Emmanuel Bernard
- */
-//this test is specific to Hibernate Validator
-public class CachedTraversableResolverTest {
-	@Test
-	public void testCache() {
-		TraversableResolver resolver = new AskOnceTR();
-		Configuration<?> config = (Configuration<?>) Validation.byDefaultProvider()
-				.configure()
-				.traversableResolver( resolver );
-		ValidatorFactory factory = config.buildValidatorFactory();
-		Suit suit = new Suit();
-		suit.setTrousers( new Trousers() );
-		suit.setJacket( new Jacket() );
-		suit.setSize( 3333 );
-		suit.getTrousers().setLength( 32321 );
-		suit.getJacket().setWidth( 432432 );
-		Validator v = factory.getValidator();
-		try {
-			v.validate( suit, Default.class, Cloth.class );
-		}
-		catch ( IllegalStateException e ) {
-			fail( "Traversable Called several times for a given object" );
-		}
-
-		v = factory.usingContext().traversableResolver( new AskOnceTR() ).getValidator();
-		try {
-			v.validateProperty( suit, "size", Default.class, Cloth.class );
-		}
-		catch ( IllegalStateException e ) {
-			fail( "Traversable Called several times for a given object" );
-		}
-
-		v = factory.usingContext().traversableResolver( new AskOnceTR() ).getValidator();
-		try {
-			v.validateValue( Suit.class, "size", 2, Default.class, Cloth.class );
-		}
-		catch ( IllegalStateException e ) {
-			fail( "Traversable Called several times for a given object" );
-		}
-	}
-
-	private static class AskOnceTR implements TraversableResolver {
-		private Set<Holder> askedReach = new HashSet<Holder>();
-		private Set<Holder> askedCascade = new HashSet<Holder>();
-
-		private boolean isTraversable(Set<Holder> asked, Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			Holder h = new Holder( traversableObject, traversableProperty );
-			if ( asked.contains( h ) ) {
-				throw new IllegalStateException( "Called twice" );
-			}
-			asked.add( h );
-			return true;
-		}
-
-		public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			return isTraversable(
-					askedReach,
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-		}
-
-		public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-			return isTraversable(
-					askedCascade,
-					traversableObject,
-					traversableProperty,
-					rootBeanType,
-					pathToTraversableObject,
-					elementType
-			);
-		}
-
-		public static class Holder {
-			Object NULL = new Object();
-			Object to;
-			Path.Node tp;
-
-			public Holder(Object traversableObject, Path.Node traversableProperty) {
-				to = traversableObject == null ? NULL : traversableObject;
-				tp = traversableProperty;
-			}
-
-			@Override
-			public int hashCode() {
-				return to.hashCode() + tp.hashCode();
-			}
-
-			@Override
-			public boolean equals(Object obj) {
-				if ( !( obj instanceof Holder ) ) {
-					return false;
-				}
-				Holder that = ( Holder ) obj;
-
-				return to != NULL && to == that.to && tp.equals( that.tp );
-			}
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Cloth.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Cloth.java
deleted file mode 100644
index 5793657..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Cloth.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id: Cloth.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.traversableresolver;
-
-/**
- * @author Emmanuel Bernard
- */
-public interface Cloth {
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Jacket.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Jacket.java
deleted file mode 100644
index 8ee81d9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Jacket.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id: Jacket.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import javax.validation.constraints.Max;
-
-
-/**
- * @author Emmanuel Bernard
- */
-public class Jacket {
-	Integer width;
-
-	@Max(30)
-	public Integer getWidth() {
-		return width;
-	}
-
-	public void setWidth(Integer width) {
-		this.width = width;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/JpaTraversableResolverTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/JpaTraversableResolverTest.java
deleted file mode 100644
index b0bea17..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/JpaTraversableResolverTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: JpaTraversableResolverTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.engine.resolver.DefaultTraversableResolver;
-import org.hibernate.validator.test.util.TestUtil;
-
-import static org.testng.Assert.assertTrue;
-
-
-/**
- * See HV-305
- *
- * @author Hardy Ferentschik
- */
-public class JpaTraversableResolverTest {
-	private Validator validator;
-
-	@BeforeTest
-	public void setUp() {
-		Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.traversableResolver( new DefaultTraversableResolver() );
-		validator = configuration.buildValidatorFactory().getValidator();
-	}
-
-	@Test
-	public void testWithBooks() {
-		Author author = new Author();
-		author.books.add( new Book() );
-		Set<ConstraintViolation<Author>> results = validator.validate( author );
-		assertTrue( results.isEmpty() );
-	}
-
-	@Test
-	public void testWithoutBooks() {
-		Author author = new Author();
-
-		// If the "books" collection is empty, everything works as expected.
-		Set<ConstraintViolation<Author>> results = validator.validate( author );
-		assertTrue( results.isEmpty() );
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Suit.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Suit.java
deleted file mode 100644
index 1f35e0b..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Suit.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id: Suit.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.Valid;
-import javax.validation.GroupSequence;
-import javax.validation.groups.Default;
-
-/**
- * @author Emmanuel Bernard
- */
- at GroupSequence( {Suit.class, Cloth.class })
-public class Suit {
-	@Max(value=50, groups = { Default.class, Cloth.class})
-	@Min(1)
-	private Integer size;
-	@Valid private Trousers trousers;
-	private Jacket jacket;
-
-	public Trousers getTrousers() {
-		return trousers;
-	}
-
-	public void setTrousers(Trousers trousers) {
-		this.trousers = trousers;
-	}
-
-	@Valid
-	public Jacket getJacket() {
-		return jacket;
-	}
-
-	public void setJacket(Jacket jacket) {
-		this.jacket = jacket;
-	}
-
-	public Integer getSize() {
-		return size;
-	}
-
-	public void setSize(Integer size) {
-		this.size = size;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Trousers.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Trousers.java
deleted file mode 100644
index 0e5a9c0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/engine/traversableresolver/Trousers.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: Trousers.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.engine.traversableresolver;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.Max;
-import javax.validation.groups.Default;
-
-/**
- * @author Emmanuel Bernard
- */
-public class Trousers {
-	@Min(value=70, groups = {Default.class, Cloth.class})
-	@Max(value=220)
-	private Integer length;
-
-	public Integer getLength() {
-		return length;
-	}
-
-	public void setLength(Integer length) {
-		this.length = length;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ConstraintHelperTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ConstraintHelperTest.java
deleted file mode 100644
index d3b55f4..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ConstraintHelperTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id: ConstraintHelperTest.java 19573 2010-05-20 22:13:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.metadata.ConstraintHelper;
-import org.hibernate.validator.util.ReflectionHelper;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintHelperTest {
-
-	private static ConstraintHelper constraintHelper;
-
-	@BeforeClass
-	public static void init() {
-		constraintHelper = new ConstraintHelper();
-	}
-
-	@Test
-	public void testGetMultiValueConstraints() throws Exception {
-		Engine engine = new Engine();
-		Field[] fields = engine.getClass().getDeclaredFields();
-		assertNotNull( fields );
-		assertTrue( fields.length == 1 );
-		ReflectionHelper.setAccessibility( fields[0] );
-
-		Annotation annotation = fields[0].getAnnotation( Pattern.List.class );
-		assertNotNull( annotation );
-		List<Annotation> multiValueConstraintAnnotations = constraintHelper.getMultiValueConstraints( annotation );
-		assertTrue( multiValueConstraintAnnotations.size() == 2, "There should be two constraint annotations" );
-		assertTrue( multiValueConstraintAnnotations.get( 0 ) instanceof Pattern, "Wrong constraint annotation" );
-		assertTrue( multiValueConstraintAnnotations.get( 1 ) instanceof Pattern, "Wrong constraint annotation" );
-
-
-		Order order = new Order();
-		fields = order.getClass().getDeclaredFields();
-		assertNotNull( fields );
-		assertTrue( fields.length == 1 );
-		ReflectionHelper.setAccessibility( fields[0] );
-
-		annotation = fields[0].getAnnotation( NotNull.class );
-		assertNotNull( annotation );
-		multiValueConstraintAnnotations = constraintHelper.getMultiValueConstraints( annotation );
-		assertTrue( multiValueConstraintAnnotations.size() == 0, "There should be no constraint annotations" );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Customer.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Customer.java
deleted file mode 100644
index 65790b4..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Customer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: Customer.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.Valid;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Customer implements Person {
-
-	private String firstName;
-	private String middleName;
-	private String lastName;
-
-	@Valid
-	private List<Order> orderList = new ArrayList<Order>();
-
-	public void addOrder(Order order) {
-		orderList.add( order );
-	}
-
-	public List<Order> getOrderList() {
-		return orderList;
-	}
-
-	public String getFirstName() {
-		return firstName;
-	}
-
-	public void setFirstName(String firstName) {
-		this.firstName = firstName;
-	}
-
-	public String getMiddleName() {
-		return middleName;
-	}
-
-	public void setMiddleName(String middleName) {
-		this.middleName = middleName;
-	}
-
-	public String getLastName() {
-		return lastName;
-	}
-
-	public void setLastName(String lastName) {
-		this.lastName = lastName;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ElementDescriptorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ElementDescriptorTest.java
deleted file mode 100644
index 65cf3a7..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/ElementDescriptorTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id: ElementDescriptorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import java.util.Set;
-import javax.validation.Validator;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.ConstraintDescriptor;
-import javax.validation.metadata.ElementDescriptor;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class ElementDescriptorTest {
-
-
-	@Test
-	public void testGetTypeForConstrainedBean() {
-		Validator validator = TestUtil.getValidator();
-		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Customer.class );
-		assertEquals( beanDescriptor.getElementClass(), Customer.class, "Wrong type." );
-	}
-
-	@Test
-	public void testGetTypeForConstrainedProperty() {
-		ElementDescriptor elementDescriptor = TestUtil.getPropertyDescriptor( Order.class, "orderNumber" );
-		assertEquals( elementDescriptor.getElementClass(), Integer.class, "Wrong type." );
-	}
-
-	/**
-	 * HV-95
-	 */
-	@Test
-	public void testElementDescriptorForProperty() {
-		ElementDescriptor elementDescriptor = TestUtil.getPropertyDescriptor( Order.class, "orderNumber" );
-		Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();
-		assertTrue( constraintDescriptors.size() == 1, "There should be a descriptor" );
-	}
-
-	/**
-	 * HV-95
-	 */
-	@Test
-	public void testElementDescriptorImmutable() {
-		ElementDescriptor elementDescriptor = TestUtil.getPropertyDescriptor( Order.class, "orderNumber" );
-		Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();
-
-		try {
-			constraintDescriptors.add( null );
-			fail( "Set should be immutable" );
-		}
-		catch ( UnsupportedOperationException e ) {
-			// success
-		}
-
-		try {
-			constraintDescriptors.remove( null );
-			fail( "Set should be immutable" );
-		}
-		catch ( UnsupportedOperationException e ) {
-			// success
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Engine.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Engine.java
deleted file mode 100644
index f43a3f4..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Engine.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: Engine.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import javax.validation.constraints.Pattern;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class Engine {
-	@Pattern.List({
-			@Pattern(regexp = "^[A-Z0-9-]+$",
-					message = "must contain alphabetical characters only"),
-			@Pattern(regexp = "^....-....-....$", message = "must match ....-....-....")
-	})
-	private String serialNumber;
-
-	public String getSerialNumber() {
-		return serialNumber;
-	}
-
-	public void setSerialNumber(String serialNumber) {
-		this.serialNumber = serialNumber;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Order.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Order.java
deleted file mode 100644
index 6a379a6..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Order.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: Order.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Order {
-	@NotNull(message = "Order number must be specified")
-	Integer orderNumber;
-
-	public Integer getOrderNumber() {
-		return orderNumber;
-	}
-
-	public void setOrderNumber(Integer orderNumber) {
-		this.orderNumber = orderNumber;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Person.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Person.java
deleted file mode 100644
index d45236f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/metadata/Person.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: Person.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.metadata;
-
-import org.hibernate.validator.constraints.NotEmpty;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface Person {
-	@NotEmpty(groups = PersonValidation.class)
-	String getFirstName();
-
-	String getMiddleName();
-
-	@NotEmpty
-	String getLastName();
-
-	public interface PersonValidation {
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java
deleted file mode 100644
index 0dc1609..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id: AggregateBundleTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.resourceloading;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.resourceloading.AggregateResourceBundleLocator.AggregateBundle;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-/**
- * Test for {@link AggregateBundle}.
- *
- * @author Gunnar Morling
- */
-public class AggregateBundleTest {
-
-	private final static String BUNDLE_NAME_1 = AggregateResourceBundleLocatorTest.class.getPackage()
-			.getName() + ".AggregateResourceBundleLocatorTestBundle1";
-
-	private final static String BUNDLE_NAME_2 = AggregateResourceBundleLocatorTest.class.getPackage()
-			.getName() + ".AggregateResourceBundleLocatorTestBundle2";
-
-	@Test
-	public void aggregateBundleContainsKeysOfAllSourceBundles() {
-		ResourceBundle bundle_1 = ResourceBundle.getBundle( BUNDLE_NAME_1 );
-		ResourceBundle bundle_2 = ResourceBundle.getBundle( BUNDLE_NAME_2 );
-
-		ResourceBundle aggregateBundle = new AggregateBundle( Arrays.asList( bundle_1, bundle_2 ) );
-
-		Set<String> actualKeys = getAsSet( aggregateBundle.getKeys() );
-		Set<String> expectedKeys = new HashSet<String>( Arrays.asList( "key_1", "key_2", "key_3" ) );
-
-		assertEquals( actualKeys, expectedKeys );
-	}
-
-	@Test
-	public void aggregateBundleWithNoSourceBundlesContainsNoKeys() {
-		ResourceBundle aggregateBundle = new AggregateBundle( Collections.<ResourceBundle>emptyList() );
-		assertTrue( getAsSet( aggregateBundle.getKeys() ).isEmpty() );
-	}
-
-	@Test
-	public void valuesProperlyRetrievedFromAggregateBundle() {
-		ResourceBundle bundle_1 = ResourceBundle.getBundle( BUNDLE_NAME_1 );
-		ResourceBundle bundle_2 = ResourceBundle.getBundle( BUNDLE_NAME_2 );
-
-		ResourceBundle aggregateBundle = new AggregateBundle( Arrays.asList( bundle_1, bundle_2 ) );
-
-		assertEquals(
-				aggregateBundle.getString( "key_1" ),
-				"value 1 from bundle 1",
-				"Value for key_1 should be retrieved from bundle 1"
-		);
-		assertEquals(
-				aggregateBundle.getString( "key_2" ),
-				"value 2 from bundle 1",
-				"Value for key_2 should be retrieved from bundle 1"
-		);
-		assertEquals(
-				aggregateBundle.getString( "key_3" ),
-				"value 3 from bundle 2",
-				"Value for key_3 should be retrieved from bundle 2"
-		);
-	}
-
-	private Set<String> getAsSet(Enumeration<String> e) {
-		Set<String> theValue = new HashSet<String>();
-
-		while ( e.hasMoreElements() ) {
-			theValue.add( e.nextElement() );
-		}
-
-		return theValue;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java
deleted file mode 100644
index 2a89b3e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// $Id: AggregateResourceBundleLocatorTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.resourceloading;
-
-import java.util.Arrays;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.resourceloading.AggregateResourceBundleLocator;
-import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
-import org.hibernate.validator.resourceloading.ResourceBundleLocator;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-
-/**
- * Test for {@link org.hibernate.validator.resourceloading.AggregateResourceBundleLocator}.
- *
- * @author Gunnar Morling
- */
-public class AggregateResourceBundleLocatorTest {
-
-	private final static String BUNDLE_NAME_1 =
-			AggregateResourceBundleLocatorTest.class.getPackage()
-					.getName() + ".AggregateResourceBundleLocatorTestBundle1";
-
-	private final static String BUNDLE_NAME_2 =
-			AggregateResourceBundleLocatorTest.class.getPackage()
-					.getName() + ".AggregateResourceBundleLocatorTestBundle2";
-
-	@Test
-	public void valuesAreRetrievedFromBothSourceBundles() {
-
-		ResourceBundleLocator locator =
-				new AggregateResourceBundleLocator( Arrays.asList( BUNDLE_NAME_1, BUNDLE_NAME_2 ) );
-
-		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.getDefault() );
-
-		assertNotNull( resourceBundle );
-
-		//contained in bundle 1
-		assertEquals( resourceBundle.getString( "key_1" ), "value 1 from bundle 1" );
-
-		//contained in both bundles, bundle 1 comes first
-		assertEquals( resourceBundle.getString( "key_2" ), "value 2 from bundle 1" );
-
-		//contained in bundle 2
-		assertEquals( resourceBundle.getString( "key_3" ), "value 3 from bundle 2" );
-	}
-
-	@Test
-	public void valuesAreRetrievedFromDelegate() {
-
-		ResourceBundleLocator locator =
-				new AggregateResourceBundleLocator(
-						Arrays.asList( BUNDLE_NAME_1 ),
-						new PlatformResourceBundleLocator( BUNDLE_NAME_2 )
-				);
-
-		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.ENGLISH );
-
-		assertNotNull( resourceBundle );
-
-		//contained in bundle 1
-		assertEquals( resourceBundle.getString( "key_1" ), "value 1 from bundle 1" );
-
-		//contained in both bundles, but bundle 1 is queried before bundle 2 (delegate)
-		assertEquals( resourceBundle.getString( "key_2" ), "value 2 from bundle 1" );
-
-		//contained in bundle 2
-		assertEquals( resourceBundle.getString( "key_3" ), "value 3 from bundle 2" );
-	}
-
-	@Test
-	public void nullReturnedAsBundleDoesNotExist() {
-
-		ResourceBundleLocator locator = new AggregateResourceBundleLocator( Arrays.asList( "foo" ) );
-		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.ENGLISH );
-
-		assertNull( resourceBundle );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/BoundariesConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/BoundariesConstraintValidator.java
deleted file mode 100644
index 6c29ee6..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/BoundariesConstraintValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: BoundariesConstraintValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.lang.annotation.Annotation;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * @author Emmanuel Bernard
- */
-public abstract class BoundariesConstraintValidator<T extends Annotation> implements ConstraintValidator<T, Integer> {
-	private int low;
-	private int high;
-
-	protected void initialize(int low, int high) {
-		this.low = low;
-		this.high = high;
-	}
-
-	public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) {
-		return value >= low && value <= high;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/DummyTraversableResolver.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/DummyTraversableResolver.java
deleted file mode 100644
index ee54c7d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/DummyTraversableResolver.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: DummyTraversableResolver.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.test.util;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Path;
-import javax.validation.TraversableResolver;
-
-/**
- * A dummy traversable resolver which returns always {@code true}. This resolver is used by default by all test cases. 
- *
- * @author Hardy Ferentschik
- */
-public class DummyTraversableResolver implements TraversableResolver {
-	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		return true;
-	}
-
-	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
-		return true;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java
deleted file mode 100644
index 933539d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id: HibernateTestCase.java 19597 2010-05-24 19:18:21Z hardy.ferentschik $
-package org.hibernate.validator.test.util;
-
-import java.io.InputStream;
-import java.util.Properties;
-import javax.validation.ValidatorFactory;
-
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.AnnotationConfiguration;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.tool.hbm2ddl.SchemaExport;
-
-/**
- * Base class for validation test which work in combination with Hibernate Core.
- *
- * @author Hardy Ferentschik
- */
-public abstract class HibernateTestCase {
-	private SessionFactory sessionFactory;
-	private Configuration cfg;
-
-	@BeforeTest
-	protected void setUp() throws Exception {
-		buildSessionFactory( getAnnotatedClasses(), getAnnotatedPackages(), getXmlFiles() );
-	}
-
-	@AfterTest
-	protected void tearDown() throws Exception {
-		SchemaExport export = new SchemaExport( cfg );
-		export.drop( false, true );
-		sessionFactory = null;
-	}
-
-	public SessionFactory getSessionFactory() {
-		return sessionFactory;
-	}
-
-	private void buildSessionFactory(Class<?>[] classes, String[] packages, String[] xmlFiles) throws Exception {
-		if ( sessionFactory != null ) {
-			sessionFactory.close();
-		}
-		try {
-			setCfg( new AnnotationConfiguration() );
-			configure( cfg );
-			if ( recreateSchema() ) {
-				cfg.setProperty( org.hibernate.cfg.Environment.HBM2DDL_AUTO, "create-drop" );
-			}
-			for ( String aPackage : packages ) {
-				( ( AnnotationConfiguration ) getCfg() ).addPackage( aPackage );
-			}
-			for ( Class<?> aClass : classes ) {
-				( ( AnnotationConfiguration ) getCfg() ).addAnnotatedClass( aClass );
-			}
-			for ( String xmlFile : xmlFiles ) {
-				InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFile );
-				getCfg().addInputStream( is );
-			}
-			sessionFactory = getCfg().buildSessionFactory();
-		}
-		catch ( Exception e ) {
-			e.printStackTrace();
-			throw e;
-		}
-	}
-
-	protected void configure(Configuration cfg) {
-		Properties prop = cfg.getProperties();
-		//prop.put( "javax.persistence.validation.mode", "none" );
-		prop.put( "javax.persistence.validation.factory", getValidatorFactory() );
-		prop.put( "hibernate.current_session_context_class", "thread" );
-	}
-
-	protected abstract ValidatorFactory getValidatorFactory();
-
-	protected abstract Class<?>[] getAnnotatedClasses();
-
-	protected String[] getAnnotatedPackages() {
-		return new String[] { };
-	}
-
-	protected String[] getXmlFiles() {
-		return new String[] { };
-	}
-
-	protected boolean recreateSchema() {
-		return true;
-	}
-
-	protected void setCfg(Configuration cfg) {
-		this.cfg = cfg;
-	}
-
-	protected Configuration getCfg() {
-		return cfg;
-	}
-}
-
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/IdentitySetTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/IdentitySetTest.java
deleted file mode 100644
index a0fb6a0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/IdentitySetTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id: IdentitySetTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.util.IdentitySet;
-
-/**
- * @author Hardy Ferentschik
- */
-public class IdentitySetTest {
-
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testAddIdenticalInstance() {
-		Set identitySet = new IdentitySet();
-		Set hashSet = new HashSet();
-		assertTrue( identitySet.size() == 0 );
-		assertTrue( hashSet.size() == 0 );
-
-		Object o1 = new Object() {
-			int counter = 0;
-
-			public int hashCode() {
-				return counter++;
-			}
-
-			public boolean equals() {
-				return false;
-			}
-		};
-		identitySet.add( o1 );
-		hashSet.add( o1 );
-		assertTrue( identitySet.size() == 1 );
-		assertTrue( hashSet.size() == 1 );
-
-		identitySet.add( o1 );
-		hashSet.add( o1 );
-		assertTrue( identitySet.size() == 1 );
-		assertTrue( hashSet.size() == 2 );
-
-		Object o2 = new Object() {
-			int counter = 0;
-
-			public int hashCode() {
-				return counter++;
-			}
-
-			public boolean equals() {
-				return false;
-			}
-		};
-		identitySet.add( o2 );
-		hashSet.add( o2 );
-		assertTrue( identitySet.size() == 2 );
-		assertTrue( hashSet.size() == 3 );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/Positive.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/Positive.java
deleted file mode 100644
index 1aab39d..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/Positive.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: Positive.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Documented;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import javax.validation.Constraint;
-
-/**
- * @author Emmanuel Bernard
- */
- at Constraint( validatedBy = { PositiveConstraintValidator.class })
- at Target({ METHOD, FIELD, ANNOTATION_TYPE })
- at Retention(RUNTIME)
- at Documented
-public @interface Positive {
-	public abstract String message() default "{validation.positive}";
-	public abstract Class<?>[] groups() default {};
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/PositiveConstraintValidator.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/PositiveConstraintValidator.java
deleted file mode 100644
index a2aaba9..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/PositiveConstraintValidator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id: PositiveConstraintValidator.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-/**
- * @author Emmanuel Bernard
- */
-public class PositiveConstraintValidator extends BoundariesConstraintValidator<Positive> {
-	public void initialize(Positive constraintAnnotation) {
-		super.initialize( 0, Integer.MAX_VALUE );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ReflectionHelperTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ReflectionHelperTest.java
deleted file mode 100644
index 0c94406..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ReflectionHelperTest.java
+++ /dev/null
@@ -1,207 +0,0 @@
-// $Id: ReflectionHelperTest.java 19566 2010-05-20 11:58:01Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeSet;
-import javax.validation.Payload;
-import javax.validation.ValidationException;
-import javax.validation.constraints.NotNull;
-import javax.validation.groups.Default;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-/**
- * Tests for the {@code ReflectionHelper}.
- *
- * @author Hardy Ferentschik
- */
-public class ReflectionHelperTest {
-
-	@Test
-	public void testIsIterable() throws Exception {
-		Type type = TestTypes.class.getField( "stringList" ).getGenericType();
-		assertTrue( ReflectionHelper.isIterable( type ) );
-
-		assertTrue( ReflectionHelper.isIterable( TreeSet.class ) );
-
-		assertTrue( ReflectionHelper.isIterable( List.class ) );
-		assertTrue( ReflectionHelper.isIterable( HashSet.class ) );
-		assertTrue( ReflectionHelper.isIterable( Iterable.class ) );
-		assertTrue( ReflectionHelper.isIterable( Collection.class ) );
-
-		assertFalse( ReflectionHelper.isIterable( null ) );
-		assertFalse( ReflectionHelper.isIterable( Object.class ) );
-	}
-
-	@Test
-	public void testIsMap() throws Exception {
-		assertTrue( ReflectionHelper.isMap( Map.class ) );
-		assertTrue( ReflectionHelper.isMap( SortedMap.class ) );
-
-		Type type = TestTypes.class.getField( "objectMap" ).getGenericType();
-		assertTrue( ReflectionHelper.isMap( type ) );
-
-		assertFalse( ReflectionHelper.isMap( null ) );
-		assertFalse( ReflectionHelper.isMap( Object.class ) );
-	}
-
-	@Test
-	public void testGetIndexedType() throws Exception {
-		Type type = TestTypes.class.getField( "stringList" ).getGenericType();
-		assertEquals( String.class, ReflectionHelper.getIndexedType( type ) );
-
-		type = TestTypes.class.getField( "objectMap" ).getGenericType();
-		assertEquals( Object.class, ReflectionHelper.getIndexedType( type ) );
-
-		type = TestTypes.class.getField( "stringArray" ).getGenericType();
-		assertEquals( String.class, ReflectionHelper.getIndexedType( type ) );
-	}
-
-	@Test
-	public void testGetIndexedValueForMap() {
-		Map<String, Object> map = new HashMap<String, Object>();
-		Object testObject = new Object();
-		String key = "key";
-		map.put( key, testObject );
-
-		Object value = ReflectionHelper.getMappedValue( map, key );
-		assertEquals( value, testObject, "We should be able to retrieve the indexed object" );
-
-		value = ReflectionHelper.getMappedValue( map, "foo" );
-		assertNull( value, "A non existent index should return the null value" );
-
-		value = ReflectionHelper.getMappedValue( map, "2" );
-		assertNull( value, "A non existent index should return the null value" );
-	}
-
-	@Test
-	public void testGetIndexedValueForList() {
-		List<Object> list = new ArrayList<Object>();
-		Object testObject = new Object();
-		list.add( testObject );
-
-		Object value = ReflectionHelper.getIndexedValue( list, 0 );
-		assertEquals( value, testObject, "We should be able to retrieve the indexed object" );
-
-		value = ReflectionHelper.getIndexedValue( list, 2 );
-		assertNull( value, "A non existent index should return the null value" );
-	}
-
-	@Test
-	public void testGetIndexedValueForNull() {
-		Object value = ReflectionHelper.getIndexedValue( null, 0 );
-		assertNull( value );
-	}
-
-	@Test
-	public void testGetMessageParameter() {
-		NotNull testAnnotation = new NotNull() {
-			public String message() {
-				return "test";
-			}
-
-			public Class<?>[] groups() {
-				return new Class<?>[] { Default.class };
-			}
-
-			public Class<? extends Payload>[] payload() {
-				@SuppressWarnings("unchecked")
-				Class<? extends Payload>[] classes = new Class[] { };
-				return classes;
-			}
-
-			public Class<? extends Annotation> annotationType() {
-				return this.getClass();
-			}
-		};
-		String message = ReflectionHelper.getAnnotationParameter( testAnnotation, "message", String.class );
-		assertEquals( "test", message, "Wrong message" );
-
-		Class<?>[] group = ReflectionHelper.getAnnotationParameter( testAnnotation, "groups", Class[].class );
-		assertEquals( group[0], Default.class, "Wrong message" );
-
-		try {
-			ReflectionHelper.getAnnotationParameter( testAnnotation, "message", Integer.class );
-			fail();
-		}
-		catch ( ValidationException e ) {
-			assertTrue( e.getMessage().startsWith( "Wrong parameter type." ), "Wrong exception message" );
-		}
-
-		try {
-			ReflectionHelper.getAnnotationParameter( testAnnotation, "foo", Integer.class );
-			fail();
-		}
-		catch ( ValidationException e ) {
-			assertTrue(
-					e.getMessage().startsWith( "The specified annotation defines no parameter" ),
-					"Wrong exception message"
-			);
-		}
-	}
-
-	@Test
-	public void testPropertyExists() {
-		assertTrue( ReflectionHelper.propertyExists( Foo.class, "foo", FIELD ) );
-		assertFalse( ReflectionHelper.propertyExists( Foo.class, "foo", METHOD ) );
-		assertFalse( ReflectionHelper.propertyExists( Foo.class, "bar", FIELD ) );
-		assertTrue( ReflectionHelper.propertyExists( Foo.class, "bar", METHOD ) );
-
-		try {
-			assertTrue( ReflectionHelper.propertyExists( Foo.class, "bar", TYPE ) );
-			fail();
-		}
-		catch ( IllegalArgumentException e ) {
-			// success
-		}
-	}
-
-	public class TestTypes {
-		public List<String> stringList;
-		public Map<String, Object> objectMap;
-		public String[] stringArray;
-	}
-
-	public class Foo {
-		String foo;
-
-		public String getBar() {
-			return "bar";
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/TestUtil.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/TestUtil.java
deleted file mode 100644
index 69b2f0e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/TestUtil.java
+++ /dev/null
@@ -1,262 +0,0 @@
-// $Id: TestUtil.java 19635 2010-05-31 14:03:26Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Path;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.metadata.PropertyDescriptor;
-import javax.validation.spi.ValidationProvider;
-
-import org.slf4j.Logger;
-
-import org.hibernate.validator.HibernateValidator;
-import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.engine.PathImpl;
-import org.hibernate.validator.util.LoggerFactory;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.FileAssert.fail;
-
-/**
- * Tests for the <code>ReflectionHelper</code>.
- *
- * @author Hardy Ferentschik
- */
-public class TestUtil {
-	private static final Logger log = LoggerFactory.make();
-
-	private static Validator hibernateValidator;
-
-	private TestUtil() {
-	}
-
-	public static Validator getValidator() {
-		if ( hibernateValidator == null ) {
-			Configuration configuration = getConfiguration( Locale.ENGLISH );
-			configuration.traversableResolver( new DummyTraversableResolver() );
-			hibernateValidator = configuration.buildValidatorFactory().getValidator();
-		}
-		return hibernateValidator;
-	}
-
-	public static Configuration<HibernateValidatorConfiguration> getConfiguration() {
-		return getConfiguration( HibernateValidator.class, Locale.ENGLISH );
-	}
-
-	public static Configuration<HibernateValidatorConfiguration> getConfiguration(Locale locale) {
-		return getConfiguration( HibernateValidator.class, locale );
-	}
-
-	public static <T extends Configuration<T>, U extends ValidationProvider<T>> T getConfiguration(Class<U> type) {
-		return getConfiguration( type, Locale.ENGLISH );
-	}
-
-	public static <T extends Configuration<T>, U extends ValidationProvider<T>> T getConfiguration(Class<U> type, Locale locale) {
-		Locale.setDefault( locale );
-		return Validation.byProvider( type ).configure();
-	}
-
-	/**
-	 * @param path The path to the xml file which should server as <code>validation.xml</code> for the returned
-	 * <code>Validator</code>.
-	 *
-	 * @return A <code>Validator</code> instance which respects the configuration specified in the file with the path
-	 *         <code>path</code>.
-	 */
-	public static Validator getValidatorWithCustomConfiguration(String path) {
-		Thread.currentThread().setContextClassLoader( new CustomValidationXmlClassLoader( path ) );
-		return getConfiguration().buildValidatorFactory().getValidator();
-	}
-
-	public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String property) {
-		Validator validator = getValidator();
-		return validator.getConstraintsForClass( clazz ).getConstraintsForProperty( property );
-	}
-
-	public static <T> void assertCorrectConstraintViolationMessages(Set<ConstraintViolation<T>> violations, String... messages) {
-		List<String> actualMessages = new ArrayList<String>();
-		for ( ConstraintViolation<?> violation : violations ) {
-			actualMessages.add( violation.getMessage() );
-		}
-
-		assertEquals( actualMessages.size(), messages.length, "Wrong number of error messages" );
-
-		for ( String expectedMessage : messages ) {
-			assertTrue(
-					actualMessages.contains( expectedMessage ),
-					"The message '" + expectedMessage + "' should have been in the list of actual messages: " + actualMessages
-			);
-			actualMessages.remove( expectedMessage );
-		}
-		assertTrue(
-				actualMessages.isEmpty(), "Actual messages contained more messages as specified expected messages"
-		);
-	}
-
-	public static <T> void assertCorrectConstraintTypes(Set<ConstraintViolation<T>> violations, Class<?>... expectedConstraintTypes) {
-		List<String> actualConstraintTypes = new ArrayList<String>();
-		for ( ConstraintViolation<?> violation : violations ) {
-			actualConstraintTypes.add(
-					( ( Annotation ) violation.getConstraintDescriptor().getAnnotation() ).annotationType().getName()
-			);
-		}
-
-		assertEquals(
-				expectedConstraintTypes.length, actualConstraintTypes.size(), "Wrong number of constraint types."
-		);
-
-		for ( Class<?> expectedConstraintType : expectedConstraintTypes ) {
-			assertTrue(
-					actualConstraintTypes.contains( expectedConstraintType.getName() ),
-					"The constraint type " + expectedConstraintType.getName() + " should have been violated."
-			);
-		}
-	}
-
-	public static <T> void assertCorrectPropertyPaths(Set<ConstraintViolation<T>> violations, String... propertyPaths) {
-		List<Path> propertyPathsOfViolations = new ArrayList<Path>();
-		for ( ConstraintViolation<?> violation : violations ) {
-			propertyPathsOfViolations.add( violation.getPropertyPath() );
-		}
-
-		for ( String propertyPath : propertyPaths ) {
-			Path expectedPath = PathImpl.createPathFromString( propertyPath );
-			boolean containsPath = false;
-			for ( Path actualPath : propertyPathsOfViolations ) {
-				if ( assertEqualPaths( expectedPath, actualPath ) ) {
-					containsPath = true;
-					break;
-				}
-			}
-			if ( !containsPath ) {
-				fail( expectedPath + " is not in the list of path instances contained in the actual constraint violations: " + propertyPathsOfViolations );
-			}
-		}
-	}
-
-	public static void assertConstraintViolation(ConstraintViolation violation, String errorMessage, Class rootBean, Object invalidValue, String propertyPath) {
-		assertEquals(
-				violation.getPropertyPath(),
-				PathImpl.createPathFromString( propertyPath ),
-				"Wrong propertyPath"
-		);
-		assertConstraintViolation( violation, errorMessage, rootBean, invalidValue );
-	}
-
-	public static void assertConstraintViolation(ConstraintViolation violation, String errorMessage, Class rootBean, Object invalidValue) {
-		assertEquals(
-				violation.getInvalidValue(),
-				invalidValue,
-				"Wrong invalid value"
-		);
-		assertConstraintViolation( violation, errorMessage, rootBean );
-	}
-
-	public static void assertConstraintViolation(ConstraintViolation violation, String errorMessage, Class rootBean) {
-		assertEquals(
-				violation.getRootBean().getClass(),
-				rootBean,
-				"Wrong root bean type"
-		);
-		assertConstraintViolation( violation, errorMessage );
-	}
-
-	public static void assertConstraintViolation(ConstraintViolation violation, String message) {
-		assertEquals( violation.getMessage(), message, "Wrong message" );
-	}
-
-	public static void assertNumberOfViolations(Set violations, int expectedViolations) {
-		assertEquals( violations.size(), expectedViolations, "Wrong number of constraint violations" );
-	}
-
-	public static boolean assertEqualPaths(Path p1, Path p2) {
-		Iterator<Path.Node> p1Iterator = p1.iterator();
-		Iterator<Path.Node> p2Iterator = p2.iterator();
-		while ( p1Iterator.hasNext() ) {
-			Path.Node p1Node = p1Iterator.next();
-			if ( !p2Iterator.hasNext() ) {
-				return false;
-			}
-			Path.Node p2Node = p2Iterator.next();
-
-			// do the comparison on the node values
-			if ( p2Node.getName() == null ) {
-				if ( p1Node.getName() != null ) {
-					return false;
-				}
-			}
-			else if ( !p2Node.getName().equals( p1Node.getName() ) ) {
-				return false;
-			}
-
-			if ( p2Node.isInIterable() != p1Node.isInIterable() ) {
-				return false;
-			}
-
-
-			if ( p2Node.getIndex() == null ) {
-				if ( p1Node.getIndex() != null ) {
-					return false;
-				}
-			}
-			else if ( !p2Node.getIndex().equals( p1Node.getIndex() ) ) {
-				return false;
-			}
-
-			if ( p2Node.getKey() == null ) {
-				if ( p1Node.getKey() != null ) {
-					return false;
-				}
-			}
-			else if ( !p2Node.getKey().equals( p1Node.getKey() ) ) {
-				return false;
-			}
-		}
-
-		return !p2Iterator.hasNext();
-	}
-
-	private static class CustomValidationXmlClassLoader extends ClassLoader {
-		private final String customValidationXmlPath;
-
-		CustomValidationXmlClassLoader(String pathToCustomValidationXml) {
-			super( CustomValidationXmlClassLoader.class.getClassLoader() );
-			customValidationXmlPath = pathToCustomValidationXml;
-		}
-
-		public InputStream getResourceAsStream(String path) {
-			String finalPath = path;
-			if ( "META-INF/validation.xml".equals( path ) ) {
-				log.info( "Using {} as validation.xml", customValidationXmlPath );
-				finalPath = customValidationXmlPath;
-			}
-			return super.getResourceAsStream( finalPath );
-		}
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ValidatorTypeTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ValidatorTypeTest.java
deleted file mode 100644
index 6c73fd5..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/ValidatorTypeTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id: ValidatorTypeTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,  
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import javax.validation.ConstraintValidator;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.util.ValidatorTypeHelper;
-
-/**
- * Tests for message resolution.
- *
- * @author Emmanuel Bernard
- */
-public class ValidatorTypeTest {
-
-	@Test
-	public void testTypeDiscovery() {
-		List<Class<? extends ConstraintValidator<Positive, ?>>> validators =
-				new ArrayList<Class<? extends ConstraintValidator<Positive, ?>>>();
-		validators.add( PositiveConstraintValidator.class );
-		Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorsTypes = ValidatorTypeHelper
-				.getValidatorsTypes( validators );
-
-		assertEquals( validatorsTypes.get( Integer.class ), PositiveConstraintValidator.class );
-		assertNull( validatorsTypes.get( String.class ) );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/annotationfactory/AnnotationFactoryTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/util/annotationfactory/AnnotationFactoryTest.java
deleted file mode 100644
index 2f2f4ec..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/util/annotationfactory/AnnotationFactoryTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id: AnnotationFactoryTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.util.annotationfactory;
-
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.util.annotationfactory.AnnotationDescriptor;
-import org.hibernate.validator.util.annotationfactory.AnnotationFactory;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class AnnotationFactoryTest {
-
-	@Test
-	public void createAnnotationProxy() {
-		AnnotationDescriptor<Size> descriptor = new AnnotationDescriptor<Size>( Size.class );
-		descriptor.setValue( "min", 5 );
-		descriptor.setValue( "max", 10 );
-
-		Size size = AnnotationFactory.create( descriptor );
-
-		assertEquals( size.min(), 5, "Wrong parameter value" );
-		assertEquals( size.max(), 10, "Wrong parameter value" );
-	}
-
-	@Test(expectedExceptions = IllegalArgumentException.class)
-	public void createAnnotationProxyMissingRequiredParamter() {
-		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
-		AnnotationFactory.create( descriptor );
-	}
-
-	@Test
-	public void createAnnotationProxyWithRequiredParamter() {
-		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
-		descriptor.setValue( "regexp", ".*" );
-
-		Pattern pattern = AnnotationFactory.create( descriptor );
-
-		assertEquals( ".*", pattern.regexp(), "Wrong parameter value" );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Customer.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Customer.java
deleted file mode 100644
index bdf3cd0..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Customer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id: Customer.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Customer implements Person {
-    private String firstName;
-    private String middleName;
-    private String lastName;
-
-    private String customerId;
-
-    private String password;
-
-    public String getFirstName() {
-	return this.firstName;
-    }
-
-    public void setFirstName(final String firstName) {
-	this.firstName = firstName;
-    }
-
-    public String getMiddleName() {
-	return this.middleName;
-    }
-
-    public void setMiddleName(final String middleName) {
-	this.middleName = middleName;
-    }
-
-    public String getLastName() {
-	return this.lastName;
-    }
-
-    public void setLastName(final String lastName) {
-	this.lastName = lastName;
-    }
-
-    public String getCustomerId() {
-	return this.customerId;
-    }
-
-    public void setCustomerId(final String customerId) {
-	this.customerId = customerId;
-    }
-
-    public String getPassword() {
-	return this.password;
-    }
-
-    public void setPassword(final String password) {
-	this.password = password;
-    }
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterface.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterface.java
deleted file mode 100644
index 9f0762e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterface.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id: MyInterface.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface MyInterface {
-	Integer getId();
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterfaceImpl.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterfaceImpl.java
deleted file mode 100644
index 86e4ec2..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/MyInterfaceImpl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: MyInterfaceImpl.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class MyInterfaceImpl implements MyInterface {
-	public Integer getId() {
-		return null;
-	}
-}
\ No newline at end of file
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Person.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Person.java
deleted file mode 100644
index e69c54a..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Person.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id: Person.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface Person {
-
-    String getFirstName();
-
-    String getMiddleName();
-
-    String getLastName();
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Properties.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Properties.java
deleted file mode 100644
index ca7b23f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/Properties.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id: Properties.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-import java.util.List;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Properties {
-	private List<String> listOfString;
-
-	public List<String> getListOfString() {
-		return listOfString;
-	}
-
-	public void setListOfString(List<String> listOfString) {
-		this.listOfString = listOfString;
-	}
-}
-
-
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/XmlMappingTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/XmlMappingTest.java
deleted file mode 100644
index d78d58f..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/XmlMappingTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-// $Id: XmlMappingTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.groups.Default;
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.TestUtil;
-
-/**
- * @author Hardy Ferentschik
- */
-public class XmlMappingTest {
-
-	@Test
-	/**
-	 * HV-214
-	 */
-	public void testConstraintInheritanceWithXmlConfiguration() {
-
-		final Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "mapping.xml" ) );
-
-		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		final Validator validator = validatorFactory.getValidator();
-
-		final Set<ConstraintViolation<Customer>> violations = validator.validate( new Customer(), Default.class );
-
-		assertEquals( violations.size(), 1 );
-	}
-
-	@Test
-	/**
-	 * HV-252
-	 */
-	public void testListOfString() {
-
-		final Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "properties-mapping.xml" ) );
-
-		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		final Validator validator = validatorFactory.getValidator();
-
-		List<String> listOfString = new ArrayList<String>();
-		listOfString.add( "one" );
-		listOfString.add( "two" );
-		listOfString.add( "three" );
-
-		final Set<ConstraintViolation<Properties>> violations = validator.validateValue(
-				Properties.class, "listOfString", listOfString
-		);
-
-		assertEquals( violations.size(), 0 );
-	}
-
-	@Test
-	/**
-	 * HV-262
-	 */
-	public void testInterfaceConfiguration() {
-
-		final Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "my-interface-mapping.xml" ) );
-
-		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		final Validator validator = validatorFactory.getValidator();
-		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
-
-		assertEquals( violations.size(), 1 );
-	}
-
-	@Test
-	/**
-	 * HV-262
-	 */
-	public void testInterfaceImplementationConfiguration() {
-
-		final Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "my-interface-impl-mapping.xml" ) );
-
-		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		final Validator validator = validatorFactory.getValidator();
-		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
-
-		assertEquals( violations.size(), 1 );
-	}
-
-	@Test
-	/**
-	 * HV-263
-	 */
-	public void testEmptyInterfaceConfiguration() {
-
-		final Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "empty-my-interface-mapping.xml" ) );
-
-		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		final Validator validator = validatorFactory.getValidator();
-		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
-
-		assertEquals( violations.size(), 0 );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/ICompetition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/ICompetition.java
deleted file mode 100755
index 69d65a1..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/ICompetition.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id: ICompetition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration;
-
-public interface ICompetition {}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/IFixture.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/IFixture.java
deleted file mode 100755
index c892b95..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/IFixture.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id: IFixture.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration;
-
-public interface IFixture {
-	ICompetition getCompetition();
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/InheritanceMappingsTest.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/InheritanceMappingsTest.java
deleted file mode 100755
index 0a49d2a..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/InheritanceMappingsTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// $Id: InheritanceMappingsTest.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-import javax.validation.Configuration;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.constraints.NotNull;
-
-import org.testng.annotations.Test;
-
-import org.hibernate.validator.test.util.DummyTraversableResolver;
-import org.hibernate.validator.test.util.TestUtil;
-import org.hibernate.validator.test.xml.mixedconfiguration.annotation.Competition;
-import org.hibernate.validator.test.xml.mixedconfiguration.annotation.Fixture;
-import org.hibernate.validator.test.xml.mixedconfiguration.annotation.PersonCompetition;
-import org.hibernate.validator.test.xml.mixedconfiguration.annotation.TeamCompetition;
-
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.FileAssert.fail;
-
-
-/**
- * See HV-265
- *
- * @author Hardy Ferentschik
- */
-public class InheritanceMappingsTest {
-
-	@Test
-	public void defaultConfigurationNoExplicitAnnotationDefinition1() {
-		validateAnnotatedFixture(
-				new PersonCompetition(),
-				TestUtil.getValidator()
-		);
-	}
-
-	@Test
-	public void defaultConfigurationNoExplicitAnnotationDefinition2() {
-		validateAnnotatedFixture(
-				new TeamCompetition(),
-				TestUtil.getValidator()
-		);
-	}
-
-	@Test
-	public void customConfigurationNoExplicitAnnotationDefinition1() {
-		validateAnnotatedFixture(
-				new PersonCompetition(),
-				configure( "annotation-mappings.xml" )
-		);
-	}
-
-	@Test
-	public void customConfigurationNoExplicitAnnotationDefinition2() {
-		validateAnnotatedFixture(
-				new TeamCompetition(),
-				configure( "annotation-mappings.xml" )
-		);
-	}
-
-	@Test
-	public void customConfigurationExplicitXmlDefinition() {
-		validateXmlDefinedFixture(
-				new org.hibernate.validator.test.xml.mixedconfiguration.xml.PersonCompetition(),
-				configure( "xml-mappings.xml" )
-		);
-	}
-
-	@Test
-	public void customConfigurationNoExplicitXmlDefinition() {
-		validateXmlDefinedFixture(
-				new org.hibernate.validator.test.xml.mixedconfiguration.xml.TeamCompetition(),
-				configure( "xml-mappings.xml" )
-		);
-	}
-
-	private Validator configure(String mappingsUrl) {
-		Configuration<?> configuration = TestUtil.getConfiguration();
-		configuration.traversableResolver( new DummyTraversableResolver() );
-		configuration.addMapping( InheritanceMappingsTest.class.getResourceAsStream( mappingsUrl ) );
-
-		ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
-		return validatorFactory.getValidator();
-	}
-
-	private void validateFixture(IFixture fixture, Validator validator) {
-		Set<ConstraintViolation<IFixture>> violations = validator.validate( fixture );
-
-		for ( ConstraintViolation<IFixture> violation : violations ) {
-			if ( violation.getLeafBean() instanceof ICompetition
-					&& "detail.competition.name".equals( violation.getPropertyPath().toString() ) ) {
-				assertEquals( violation.getLeafBean(), fixture.getCompetition() );
-				Annotation annotation = ( ( Annotation ) violation.getConstraintDescriptor().getAnnotation() );
-				assertEquals( annotation.annotationType(), NotNull.class );
-				return;
-			}
-		}
-		fail( "@NotNull constraint violation for 'detail.competition.name' not detected" );
-	}
-
-	private void validateAnnotatedFixture(Competition competition,
-										  Validator validator) {
-		Fixture fixture = new Fixture();
-		fixture.setCompetition( competition );
-		validateFixture( fixture, validator );
-	}
-
-	private void validateXmlDefinedFixture(org.hibernate.validator.test.xml.mixedconfiguration.xml.Competition competition,
-										   Validator validator) {
-		org.hibernate.validator.test.xml.mixedconfiguration.xml.Fixture fixture = new org.hibernate.validator.test.xml.mixedconfiguration.xml.Fixture();
-		fixture.setCompetition( competition );
-		validateFixture( fixture, validator );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Competition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Competition.java
deleted file mode 100755
index 8509e6b..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Competition.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id: Competition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import org.hibernate.validator.test.xml.mixedconfiguration.ICompetition;
-
-public abstract class Competition implements ICompetition {
-
-	@NotNull
-	@Size(min = 1)
-	private String name;
-
-	public Competition() {
-		super();
-	}
-
-	public Competition(String name) {
-		setName( name );
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Fixture.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Fixture.java
deleted file mode 100755
index 1b94572..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Fixture.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id: Fixture.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-import org.hibernate.validator.test.xml.mixedconfiguration.IFixture;
-
-public class Fixture extends Game implements IFixture {
-
-	public Fixture() {
-		super();
-	}
-
-	public Fixture(Competition competition) {
-		super( competition );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Game.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Game.java
deleted file mode 100755
index 1db2b37..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/Game.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id: Game.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
-public abstract class Game {
-
-	@NotNull
-	@Valid
-	private GameDetail detail;
-
-	private Game(GameDetail detail) {
-		this.detail = detail;
-	}
-
-	public Game() {
-		this( new GameDetail() );
-	}
-
-	public Game(Competition competition) {
-		this( new GameDetail( competition ) );
-	}
-
-	public Competition getCompetition() {
-		return detail.getCompetition();
-	}
-
-	public void setCompetition(Competition competition) {
-		detail.setCompetition( competition );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/GameDetail.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/GameDetail.java
deleted file mode 100755
index 1f65de4..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/GameDetail.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id: GameDetail.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
-public class GameDetail {
-
-	@NotNull
-	@Valid
-	private Competition competition;
-
-	public GameDetail() {
-		super();
-	}
-
-	public GameDetail(Competition competition) {
-		setCompetition( competition );
-	}
-
-	public Competition getCompetition() {
-		return competition;
-	}
-
-	public void setCompetition(Competition competition) {
-		this.competition = competition;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/PersonCompetition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/PersonCompetition.java
deleted file mode 100755
index 34916ac..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/PersonCompetition.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: PersonCompetition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-public class PersonCompetition extends Competition {
-
-	public PersonCompetition() {
-		super();
-	}
-
-	public PersonCompetition(String name) {
-		super( name );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/TeamCompetition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/TeamCompetition.java
deleted file mode 100755
index 26e7a3b..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/annotation/TeamCompetition.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: TeamCompetition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.annotation;
-
-public class TeamCompetition extends Competition {
-	public TeamCompetition() {
-		super();
-	}
-
-	public TeamCompetition(String name) {
-		super( name );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Competition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Competition.java
deleted file mode 100755
index a0372e6..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Competition.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id: Competition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-import org.hibernate.validator.test.xml.mixedconfiguration.ICompetition;
-
-public abstract class Competition implements ICompetition {
-
-	private String name;
-
-	public Competition() {
-		super();
-	}
-
-	public Competition(String name) {
-		setName( name );
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Fixture.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Fixture.java
deleted file mode 100755
index ff33451..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Fixture.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id: Fixture.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-import org.hibernate.validator.test.xml.mixedconfiguration.IFixture;
-
-public class Fixture extends Game implements IFixture {
-
-	public Fixture() {
-		super();
-	}
-
-	public Fixture(Competition competition) {
-		super( competition );
-	}
-
-	@Override
-	public void setCompetition(Competition competition) {
-		super.setCompetition( competition );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Game.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Game.java
deleted file mode 100755
index 273ec31..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/Game.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id: Game.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-public abstract class Game {
-
-	private GameDetail detail;
-
-	private Game(GameDetail detail) {
-		this.detail = detail;
-	}
-
-	public Game() {
-		this( new GameDetail() );
-	}
-
-	public Game(Competition competition) {
-		this( new GameDetail( competition ) );
-	}
-
-	public Competition getCompetition() {
-		return detail.getCompetition();
-	}
-
-	public void setCompetition(Competition competition) {
-		detail.setCompetition( competition );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/GameDetail.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/GameDetail.java
deleted file mode 100755
index b14b221..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/GameDetail.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id: GameDetail.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-public class GameDetail {
-
-	private Competition competition;
-
-	public GameDetail() {
-		super();
-	}
-
-	public GameDetail(Competition competition) {
-		setCompetition( competition );
-	}
-
-	public Competition getCompetition() {
-		return competition;
-	}
-
-	public void setCompetition(Competition competition) {
-		this.competition = competition;
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/PersonCompetition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/PersonCompetition.java
deleted file mode 100755
index 1c4340e..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/PersonCompetition.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: PersonCompetition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-public class PersonCompetition extends Competition {
-
-	public PersonCompetition() {
-		super();
-	}
-
-	public PersonCompetition(String name) {
-		super( name );
-	}
-}
diff --git a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/TeamCompetition.java b/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/TeamCompetition.java
deleted file mode 100755
index b95ec08..0000000
--- a/hibernate-validator/src/test/java/org/hibernate/validator/test/xml/mixedconfiguration/xml/TeamCompetition.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id: TeamCompetition.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.test.xml.mixedconfiguration.xml;
-
-public class TeamCompetition extends Competition {
-
-	public TeamCompetition() {
-		super();
-	}
-
-	public TeamCompetition(String name) {
-		super( name );
-	}
-}
diff --git a/hibernate-validator/src/test/resources/log4j.properties b/hibernate-validator/src/test/resources/log4j.properties
deleted file mode 100644
index 23f34ce..0000000
--- a/hibernate-validator/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=hibernate.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to socket - chainsaw ###
-log4j.appender.socket=org.apache.log4j.net.SocketAppender
-log4j.appender.socket.remoteHost=localhost
-log4j.appender.socket.port=4560
-log4j.appender.socket.locationInfo=true
-
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-log4j.rootLogger=debug, stdout
-
-log4j.logger.org.hibernate.validator.engine.ValidatorImpl=trace
-#log4j.logger.org.hibernate.validator.engine.resolver.JPATraversableResolver=trace
-#log4j.logger.org.hibernate.validatorengine.ConstraintTree=trace
-log4j.logger.org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator=info
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/empty-my-interface-mapping.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/empty-my-interface-mapping.xml
deleted file mode 100644
index 81d0cdf..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/empty-my-interface-mapping.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
-                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-    <default-package>org.hibernate.validator.xml</default-package>
-    <bean class="org.hibernate.validator.test.xml.MyInterface" ignore-annotations="true">
-    </bean>
-</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mapping.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mapping.xml
deleted file mode 100644
index 4020cc6..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mapping.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<constraint-mappings
-        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation=
-                "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
-
-    <default-package>org.hibernate.validator.xml</default-package>
-
-    <bean class="org.hibernate.validator.test.xml.Person" ignore-annotations="false">
-        <getter name="firstName">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </getter>
-    </bean>
-
-    <bean class="org.hibernate.validator.test.xml.Customer" ignore-annotations="false"/>
-</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mixedconfiguration/xml-mappings.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mixedconfiguration/xml-mappings.xml
deleted file mode 100755
index 97418ca..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mixedconfiguration/xml-mappings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<constraint-mappings
-        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="
-		http://jboss.org/xml/ns/javax/validation/mapping
-		validation-mapping-1.0.xsd">
-
-    <default-package>org.hibernate.validator.xml.mixedconfiguration.xml</default-package>
-
-    <bean class="org.hibernate.validator.test.xml.mixedconfiguration.xml.Competition" ignore-annotations="true">
-        <field name="name">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-            <constraint annotation="javax.validation.constraints.Size">
-                <element name="min">1</element>
-            </constraint>
-        </field>
-    </bean>
-    <bean class="org.hibernate.validator.test.xml.mixedconfiguration.xml.PersonCompetition" ignore-annotations="true"/>
-    <!--bean class="TeamCompetition"/-->
-
-    <bean class="org.hibernate.validator.test.xml.mixedconfiguration.xml.Game" ignore-annotations="true">
-        <field name="detail">
-            <valid/>
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </field>
-    </bean>
-
-    <bean class="org.hibernate.validator.test.xml.mixedconfiguration.xml.GameDetail" ignore-annotations="true">
-        <field name="competition">
-            <valid/>
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </field>
-    </bean>
-    <bean class="org.hibernate.validator.test.xml.mixedconfiguration.xml.Fixture"/>
-
-</constraint-mappings>
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-impl-mapping.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-impl-mapping.xml
deleted file mode 100644
index 706419f..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-impl-mapping.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
-                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-    <default-package>org.hibernate.validator.xml</default-package>
-    <bean class="org.hibernate.validator.test.xml.MyInterfaceImpl" ignore-annotations="true">
-        <getter name="id" ignore-annotations="true">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </getter>
-    </bean>
-</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-mapping.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-mapping.xml
deleted file mode 100644
index d542b10..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/my-interface-mapping.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
-                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-    <default-package>org.hibernate.validator.xml</default-package>
-    <bean class="org.hibernate.validator.test.xml.MyInterface" ignore-annotations="true">
-        <getter name="id" ignore-annotations="true">
-            <constraint annotation="javax.validation.constraints.NotNull"/>
-        </getter>
-    </bean>
-</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/properties-mapping.xml b/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/properties-mapping.xml
deleted file mode 100644
index 3bf294d..0000000
--- a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/properties-mapping.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<constraint-mappings xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
-      <default-package>org.hibernate.validator.xml</default-package>
-      <bean class="org.hibernate.validator.test.xml.Properties" ignore-annotations="true">
-          <getter name="listOfString" ignore-annotations="true">
-              <constraint annotation="javax.validation.constraints.NotNull" />
-          </getter>
-      </bean>
-</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/suite/unit-tests.xml b/hibernate-validator/src/test/suite/unit-tests.xml
deleted file mode 100644
index 115fef3..0000000
--- a/hibernate-validator/src/test/suite/unit-tests.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-
-<suite name="Hibernate Validator Unit Tests" verbose="1">
-    <test name="Unit tests">
-        <packages>
-            <package name="org.hibernate.validator.test"/>
-            <package name="org.hibernate.validator.test.bootstrap"/>
-            <package name="org.hibernate.validator.test.cfg"/>
-            <package name="org.hibernate.validator.test.constraints"/>
-            <package name="org.hibernate.validator.test.constraints.impl"/>
-            <package name="org.hibernate.validator.test.constraints.composition"/>
-            <package name="org.hibernate.validator.test.engine"/>
-            <package name="org.hibernate.validator.test.engine.customerror"/>
-            <package name="org.hibernate.validator.test.engine.groups"/>
-            <package name="org.hibernate.validator.test.engine.messageinterpolation"/>
-            <package name="org.hibernate.validator.test.engine.proxy"/>
-            <package name="org.hibernate.validator.test.engine.serialization"/>
-            <package name="org.hibernate.validator.test.engine.traversableresolver"/>
-            <package name="org.hibernate.validator.test.metadata"/>
-            <package name="org.hibernate.validator.test.resourceloading"/>
-            <package name="org.hibernate.validator.test.util"/>
-            <package name="org.hibernate.validator.test.util.annotationfactory"/>
-            <package name="org.hibernate.validator.test.xml"/>
-            <package name="org.hibernate.validator.test.xml.mixedconfiguration"/>
-        </packages>
-    </test>
-</suite>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index cf931fe..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,387 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator-parent</artifactId>
-    <packaging>pom</packaging>
-    <version>4.1.0.Final</version>
-    <name>Hibernate Validator Aggregator</name>
-    <url>http://validator.hibernate.org</url>
-
-    <description>
-        Aggregator of the Hibernate Validator modules.
-    </description>
-
-    <developers>
-        <developer>
-            <id>epbernard</id>
-            <name>Emmanuel Bernard</name>
-            <email>emmanuel at hibernate.org</email>
-            <organization>JBoss, a division of Red Hat</organization>
-            <url>http://in.relation.to/Bloggers/Emmanuel</url>
-        </developer>
-        <developer>
-            <id>hardy.ferentschik</id>
-            <name>Hardy Ferentschik</name>
-            <email>hferents at redhat.com</email>
-            <organization>JBoss, a division of Red Hat</organization>
-            <url>http://in.relation.to/Bloggers/Hardy</url>
-        </developer>
-        <developer>
-            <id>gunnar.morling</id>
-            <name>Gunnar Morling</name>
-            <email>gunnar.morling at googlemail.com</email>
-            <organization>Individual</organization>
-            <url>http://musingsofaprogrammingaddict.blogspot.com/</url>
-        </developer>
-    </developers>
-
-    <mailingLists>
-        <mailingList>
-            <name>hibernate-dev</name>
-            <post>hibernate-dev at lists.jboss.org</post>
-        </mailingList>
-    </mailingLists>
-
-    <modules>
-        <module>hibernate-validator</module>
-        <module>hibernate-validator-archetype</module>
-        <module>hibernate-validator-legacy</module>
-        <module>hibernate-validator-tck-runner</module>
-        <module>hibernate-validator-annotation-processor</module>
-    </modules>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.hibernate</groupId>
-                <artifactId>hibernate-validator</artifactId>
-                <version>${version}</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.validation</groupId>
-                <artifactId>validation-api</artifactId>
-                <version>1.0.0.GA</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.xml.bind</groupId>
-                <artifactId>jaxb-api</artifactId>
-                <version>2.2</version>
-            </dependency>
-            <dependency>
-                <groupId>com.sun.xml.bind</groupId>
-                <artifactId>jaxb-impl</artifactId>
-                <version>2.1.12</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>1.5.6</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-log4j12</artifactId>
-                <version>1.5.6</version>
-            </dependency>
-            <dependency>
-                <groupId>com.googlecode.jtype</groupId>
-                <artifactId>jtype</artifactId>
-                <version>0.1.1</version>
-            </dependency>
-            <dependency>
-                <groupId>org.hibernate.javax.persistence</groupId>
-                <artifactId>hibernate-jpa-2.0-api</artifactId>
-                <version>1.0.0.Final</version>
-            </dependency>
-            <dependency>
-                <groupId>org.hibernate</groupId>
-                <artifactId>hibernate-entitymanager</artifactId>
-                <version>3.5.0-Final</version>
-            </dependency>
-            <dependency>
-                <groupId>org.testng</groupId>
-                <artifactId>testng</artifactId>
-                <version>5.8</version>
-                <classifier>jdk15</classifier>
-            </dependency>
-            <dependency>
-              <groupId>org.easymock</groupId>
-              <artifactId>easymock</artifactId>
-              <version>3.0</version>
-            </dependency>            
-            <dependency>
-                <groupId>com.h2database</groupId>
-                <artifactId>h2</artifactId>
-                <version>1.2.124</version>
-            </dependency>
-            <dependency>
-                <groupId>org.hibernate.jsr303.tck</groupId>
-                <artifactId>jsr303-tck</artifactId>
-                <version>1.0.3.GA</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jboss.test-harness</groupId>
-                <artifactId>jboss-test-harness-jboss-as-51</artifactId>
-                <version>1.0.0</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <build>
-        <extensions>
-            <extension>
-                <groupId>org.apache.maven.wagon</groupId>
-                <artifactId>wagon-webdav</artifactId>
-                <version>1.0-beta-2</version>
-            </extension>
-        </extensions>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-enforcer-plugin</artifactId>
-                <version>1.0-beta-1</version>
-                <executions>
-                    <execution>
-                        <id>enforce-java</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <rules>
-                        <requireJavaVersion>
-                            <!-- require JDK 1.6 to run the build -->
-                            <version>[1.6,)</version>
-                        </requireJavaVersion>
-                    </rules>
-                </configuration>
-            </plugin>
-        </plugins>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>2.2</version>
-                    <configuration>
-                        <archive>
-                            <manifestEntries>
-                                <Implementation-Title>${pom.artifactId}</Implementation-Title>
-                                <Implementation-Version>${pom.version}</Implementation-Version>
-                                <Implementation-Vendor>${pom.groupId}</Implementation-Vendor>
-                                <Implementation-Vendor-Id>${pom.groupId}</Implementation-Vendor-Id>
-                                <Implementation-URL>${pom.url}</Implementation-URL>
-                                <Specification-Title>Bean Validation</Specification-Title>
-                            </manifestEntries>
-                        </archive>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.0.2</version>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.4.3</version>
-                    <configuration>
-                        <forkMode>always</forkMode>
-                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
-                        <includes>
-                            <include>**/*Test.java</include>
-                        </includes>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-report-plugin</artifactId>
-                    <version>2.4.3</version>
-                    <executions>
-                        <execution>
-                            <id>generate-test-report</id>
-                            <phase>test</phase>
-                            <goals>
-                                <goal>report-only</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                    <configuration>
-                        <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
-                        <outputName>test-report</outputName>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-source-plugin</artifactId>
-                    <version>2.1.1</version>
-                    <executions>
-                        <execution>
-                            <id>attach-sources</id>
-                            <goals>
-                                <goal>jar</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-dependency-plugin</artifactId>
-                    <version>2.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-assembly-plugin</artifactId>
-                    <version>2.2-beta-5</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-release-plugin</artifactId>
-                    <version>2.0</version>
-                    <configuration>
-	                    <preparationGoals>clean install</preparationGoals>
-                        <autoVersionSubmodules>true</autoVersionSubmodules>
-                        <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
-                        <remoteTagging>true</remoteTagging>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.5</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>exec-maven-plugin</artifactId>
-                    <version>1.1.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>jaxb2-maven-plugin</artifactId>
-                    <version>1.3</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-shade-plugin</artifactId>
-                    <version>1.2.2</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.jboss.maven.plugins</groupId>
-                    <artifactId>maven-jdocbook-plugin</artifactId>
-                    <version>2.2.3</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.jboss.maven.plugins</groupId>
-                    <artifactId>maven-jdocbook-style-plugin</artifactId>
-                    <version>2.0.0</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>2.0.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.twdata.maven</groupId>
-                    <artifactId>maven-cli-plugin</artifactId>
-                    <version>0.6.3.CR2</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>maven-bundle-plugin</artifactId>
-                    <version>2.0.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-archetype-plugin</artifactId>
-                    <version>2.0-alpha-4</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>2.7</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-
-    <ciManagement>
-        <system>Hudson</system>
-        <url>http://hudson.qa.jboss.com/hudson/job/beanvalidation</url>
-    </ciManagement>
-
-    <issueManagement>
-        <system>JIRA</system>
-        <url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
-    </issueManagement>
-
-    <inceptionYear>2007</inceptionYear>
-
-    <licenses>
-        <license>
-            <name>Apache License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-        </license>
-    </licenses>
-
-    <scm>
-        <connection>scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_1_0_Final</connection>
-        <url>http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_1_0_Final</url>
-    </scm>
-
-    <distributionManagement>
-        <repository>
-            <id>jboss-releases-repository</id>
-            <name>JBoss Releases Repository</name>
-            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
-        </repository>
-        <snapshotRepository>
-            <id>jboss-snapshots-repository</id>
-            <name>JBoss Snapshots Repository</name>
-            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
-        </snapshotRepository>
-    </distributionManagement>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.0.1</version>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jxr-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clover-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-pmd-plugin</artifactId>
-                <configuration>
-                    <targetJdk>1.5</targetJdk>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>taglist-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>changelog-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>changes-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </reporting>
-</project>
diff --git a/project/annotation-processor/pom.xml b/project/annotation-processor/pom.xml
new file mode 100644
index 0000000..ae32afd
--- /dev/null
+++ b/project/annotation-processor/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-annotation-processor</artifactId>
+
+    <name>Hibernate Validator Annotation Processor</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- Copy the dependencies into the output folder in order to reference them when
+                 creating the test compilation tasks -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/test-dependencies</outputDirectory>
+                            <stripVersion>true</stripVersion>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <compilerArgument>-proc:none</compilerArgument>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <links>
+                        <link>http://java.sun.com/j2se/1.6.0/docs/api/</link>
+                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api/</link>
+                    </links>
+                    <packagesheader>Hibernate Validator Annotation Processor Packages</packagesheader>
+                    <doctitle>Hibernate Validator Annotation Processor ${project.version}</doctitle>
+                    <windowtitle>Hibernate Validator Annotation Processor ${project.version}</windowtitle>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java
new file mode 100644
index 0000000..afd17d1
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintAnnotationVisitor.java
@@ -0,0 +1,227 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.ElementKindVisitor6;
+import javax.tools.Diagnostic.Kind;
+
+import org.hibernate.validator.ap.checks.ConstraintCheckError;
+import org.hibernate.validator.ap.checks.ConstraintCheckFactory;
+import org.hibernate.validator.ap.checks.ConstraintChecks;
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.Configuration;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+import org.hibernate.validator.ap.util.MessagerAdapter;
+
+/**
+ * An {@link javax.lang.model.element.ElementVisitor} that visits annotated elements (type declarations,
+ * methods and fields) and applies different {@link org.hibernate.validator.ap.checks.ConstraintCheck}s to them.
+ * Each {@link ConstraintCheckError} occurred will be reported using the
+ * {@link javax.annotation.processing.Messager} API.
+ *
+ * @author Gunnar Morling
+ */
+final class ConstraintAnnotationVisitor extends ElementKindVisitor6<Void, List<AnnotationMirror>> {
+
+	private final MessagerAdapter messager;
+
+	private final ConstraintCheckFactory constraintCheckFactory;
+
+	private final boolean verbose;
+
+	public ConstraintAnnotationVisitor(
+			ProcessingEnvironment processingEnvironment, MessagerAdapter messager, Configuration configuration) {
+
+		this.messager = messager;
+		this.verbose = configuration.isVerbose();
+
+		AnnotationApiHelper annotationApiHelper = new AnnotationApiHelper(
+				processingEnvironment.getElementUtils(), processingEnvironment.getTypeUtils()
+		);
+
+		ConstraintHelper constraintHelper = new ConstraintHelper(
+				processingEnvironment.getTypeUtils(), annotationApiHelper
+		);
+
+		constraintCheckFactory = new ConstraintCheckFactory(
+				processingEnvironment.getTypeUtils(),
+				constraintHelper,
+				annotationApiHelper,
+				configuration.methodConstraintsSupported()
+		);
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * method. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Constraint annotations may only be given at non-static, JavaBeans getter
+	 * methods which's return type is supported by the constraints.</li>
+	 * <li>
+	 * The <code>@Valid</code> annotation may only be given at non-static,
+	 * non-primitive JavaBeans getter methods.</li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitExecutableAsMethod(ExecutableElement method,
+										List<AnnotationMirror> mirrors) {
+
+		checkConstraints( method, mirrors );
+
+		return null;
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * field. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Constraint annotations may only be given at non-static fields which's
+	 * type is supported by the constraints.</li>
+	 * <li>
+	 * The <code>@Valid</code> annotation may only be given at non-static,
+	 * non-primitive fields.</li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitVariableAsField(VariableElement annotatedField, List<AnnotationMirror> mirrors) {
+
+		checkConstraints( annotatedField, mirrors );
+
+		return null;
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * annotation type declaration. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * The only annotation types allowed to be annotated with other constraint
+	 * annotations are composed constraint annotation type declarations.</li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitTypeAsAnnotationType(TypeElement annotationType,
+										  List<AnnotationMirror> mirrors) {
+
+		checkConstraints( annotationType, mirrors );
+
+		return null;
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * class type declaration. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Constraint annotations may at types supported by the constraints.</li>
+	 * <li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitTypeAsClass(TypeElement e, List<AnnotationMirror> p) {
+
+		checkConstraints( e, p );
+		return null;
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * enum type declaration. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Constraint annotations may at types supported by the constraints.</li>
+	 * <li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitTypeAsEnum(TypeElement e, List<AnnotationMirror> p) {
+
+		checkConstraints( e, p );
+		return null;
+	}
+
+	/**
+	 * <p>
+	 * Checks whether the given annotations are correctly specified at the given
+	 * interface type declaration. The following checks are performed:
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Constraint annotations may at types supported by the constraints.</li>
+	 * <li>
+	 * </ul>
+	 */
+	@Override
+	public Void visitTypeAsInterface(TypeElement e, List<AnnotationMirror> p) {
+
+		checkConstraints( e, p );
+		return null;
+	}
+
+	/**
+	 * Retrieves the checks required for the given element and annotations,
+	 * executes them and reports all occurred errors.
+	 *
+	 * @param annotatedElement The element to check.
+	 * @param mirrors The annotations to check.
+	 */
+	private void checkConstraints(Element annotatedElement, List<AnnotationMirror> mirrors) {
+
+		for ( AnnotationMirror oneAnnotationMirror : mirrors ) {
+
+			try {
+
+				ConstraintChecks constraintChecks = constraintCheckFactory.getConstraintChecks(
+						annotatedElement, oneAnnotationMirror
+				);
+				Set<ConstraintCheckError> errors = constraintChecks.execute( annotatedElement, oneAnnotationMirror );
+				messager.reportErrors( errors );
+			}
+			//HV-293: if single constraints can't be properly checked, report this and
+			//proceed with next constraints
+			catch ( Exception e ) {
+
+				if ( verbose ) {
+					messager.getDelegate()
+							.printMessage( Kind.NOTE, e.getMessage() != null ? e.getMessage() : e.toString(), annotatedElement, oneAnnotationMirror );
+				}
+			}
+		}
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java
new file mode 100644
index 0000000..1206cdb
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/ConstraintValidationProcessor.java
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap;
+
+import java.util.List;
+import java.util.Set;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedOptions;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ElementVisitor;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.Configuration;
+import org.hibernate.validator.ap.util.MessagerAdapter;
+
+/**
+ * An annotation processor for checking <a
+ * href="http://jcp.org/en/jsr/detail?id=303">Bean Validation</a> constraints.
+ * The processor supports the following options:
+ * <ul>
+ * <li><code>diagnosticKind</code>: the severity with which any occurred
+ * problems shall be reported. Must be given in form of the string
+ * representation of a value from {@link javax.tools.Diagnostic.Kind}, e.g.
+ * "diagnosticKind=WARNING". Default is Kind.ERROR.</li>
+ * <li><code>verbose</code>: whether a verbose output shall be created or not.
+ * Must be given as String parsable by {@link Boolean#parseBoolean}. Default is
+ * <code>false</code>.</li>
+ * <li><code>methodConstraintsSupported</code>: Whether constraints at other
+ * methods than JavaBeans getter methods may be annotated with constraints or
+ * not. Must be given as String parsable by {@link Boolean#parseBoolean}. Can be
+ * set to <code>false</code> in order to allow only getter based property
+ * constraints but not method level constraints as supported by Hibernate
+ * Validator. Default is <code>true</code>.</li>
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+ at SupportedAnnotationTypes("*")
+ at SupportedOptions({
+		Configuration.DIAGNOSTIC_KIND_PROCESSOR_OPTION,
+		Configuration.VERBOSE_PROCESSOR_OPTION,
+		Configuration.METHOD_CONSTRAINTS_SUPPORTED_PROCESSOR_OPTION
+})
+public class ConstraintValidationProcessor extends AbstractProcessor {
+
+	/**
+	 * Whether this processor claims all processed annotations exclusively or not.
+	 */
+	private static final boolean ANNOTATIONS_CLAIMED_EXCLUSIVELY = false;
+
+	/**
+	 * The messager to be used for error reports.
+	 */
+	private MessagerAdapter messager;
+
+	/**
+	 * Provides access to this processor's configuration options.
+	 */
+	private Configuration configuration;
+
+	@Override
+	public synchronized void init(ProcessingEnvironment processingEnv) {
+
+		super.init( processingEnv );
+
+		configuration = new Configuration( processingEnv.getOptions(), processingEnv.getMessager() );
+		messager = new MessagerAdapter( processingEnv.getMessager(), configuration.getDiagnosticKind() );
+	}
+
+	@Override
+	public SourceVersion getSupportedSourceVersion() {
+		return SourceVersion.latestSupported();
+	}
+
+	@Override
+	public boolean process(
+			final Set<? extends TypeElement> annotations,
+			final RoundEnvironment roundEnvironment) {
+
+		AnnotationApiHelper typeHelper = new AnnotationApiHelper(
+				processingEnv.getElementUtils(), processingEnv.getTypeUtils()
+		);
+
+		ElementVisitor<Void, List<AnnotationMirror>> visitor = new ConstraintAnnotationVisitor(
+				processingEnv, messager, configuration
+		);
+
+		for ( TypeElement oneAnnotation : annotations ) {
+
+			//Indicates that the annotation's type isn't on the class path of the compiled
+			//project. Let the compiler deal with that and print an appropriate error.
+			if ( oneAnnotation.getKind() != ElementKind.ANNOTATION_TYPE ) {
+				continue;
+			}
+
+			Set<? extends Element> elementsWithConstraintAnnotation =
+					roundEnvironment.getElementsAnnotatedWith( oneAnnotation );
+
+			for ( Element oneAnnotatedElement : elementsWithConstraintAnnotation ) {
+
+				List<AnnotationMirror> mirrorsOfCurrentAnnotation =
+						typeHelper.filterByType( oneAnnotatedElement.getAnnotationMirrors(), oneAnnotation.asType() );
+
+				oneAnnotatedElement.accept( visitor, mirrorsOfCurrentAnnotation );
+			}
+		}
+
+		return ANNOTATIONS_CLAIMED_EXCLUSIVELY;
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java
new file mode 100644
index 0000000..1261b59
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AbstractConstraintCheck.java
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+/**
+ * <p>
+ * Abstract base class for {@link ConstraintCheck} implementations. Concrete
+ * checks should only override those check methods applicable for their
+ * supported element types.
+ * </p>
+ * <p>
+ * For instance would a check ensuring that constraint annotations are only
+ * given at non-static fields or methods only override <code>checkField()</code>
+ * and <code>checkMethod()</code>.
+ * </p>
+ * <p>
+ * All check methods not overridden will return an empty list.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public class AbstractConstraintCheck implements ConstraintCheck {
+
+	public Set<ConstraintCheckError> checkField(VariableElement element, AnnotationMirror annotation) {
+
+		return Collections.emptySet();
+	}
+
+	public Set<ConstraintCheckError> checkMethod(ExecutableElement element, AnnotationMirror annotation) {
+
+		return Collections.emptySet();
+	}
+
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
+														 AnnotationMirror annotation) {
+
+		return Collections.emptySet();
+	}
+
+	public Set<ConstraintCheckError> checkNonAnnotationType(
+			TypeElement element, AnnotationMirror annotation) {
+
+		return Collections.emptySet();
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java
new file mode 100644
index 0000000..599ec88
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeCheck.java
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+
+/**
+ * Checks, that only constraint annotation types are annotated with other
+ * constraint annotations ("constraint composition"), but not non-constraint
+ * annotations.
+ *
+ * @author Gunnar Morling
+ */
+public class AnnotationTypeCheck extends AbstractConstraintCheck {
+
+	private final ConstraintHelper constraintHelper;
+
+	public AnnotationTypeCheck(ConstraintHelper constraintHelper) {
+		this.constraintHelper = constraintHelper;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
+														 AnnotationMirror annotation) {
+
+		if ( !constraintHelper.isConstraintAnnotation( element ) ) {
+
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, "ONLY_CONSTRAINT_ANNOTATIONS_MAY_BE_ANNOTATED"
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeMemberCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeMemberCheck.java
new file mode 100644
index 0000000..2f51087
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/AnnotationTypeMemberCheck.java
@@ -0,0 +1,314 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.WildcardType;
+import javax.lang.model.util.SimpleAnnotationValueVisitor6;
+import javax.lang.model.util.TypeKindVisitor6;
+import javax.lang.model.util.Types;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.TypeNames.BeanValidationTypes;
+
+import static javax.lang.model.util.ElementFilter.methodsIn;
+
+/**
+ * Checks, that each constraint annotation type declares the members message(), groups() and payload() as
+ * defined by the BV spec.
+ *
+ * @author Gunnar Morling
+ */
+public class AnnotationTypeMemberCheck extends AbstractConstraintCheck {
+
+	private final AnnotationApiHelper annotationApiHelper;
+
+	private final Types typeUtils;
+
+	public AnnotationTypeMemberCheck(AnnotationApiHelper annotationApiHelper, Types typeUtils) {
+
+		this.annotationApiHelper = annotationApiHelper;
+		this.typeUtils = typeUtils;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element, AnnotationMirror annotation) {
+
+		Set<ConstraintCheckError> theValue = CollectionHelper.newHashSet();
+
+		theValue.addAll( checkMessageAttribute( element ) );
+		theValue.addAll( checkGroupsAttribute( element ) );
+		theValue.addAll( checkPayloadAttribute( element ) );
+
+		return theValue;
+	}
+
+	/**
+	 * Checks that the given type element
+	 * <p/>
+	 * <ul>
+	 * <li>has a method with name "message",</li>
+	 * <li>the return type of this method is {@link String}.</li>
+	 * </ul>
+	 *
+	 * @param element The element of interest.
+	 *
+	 * @return A possibly non-empty set of constraint check errors, never null.
+	 */
+	private Set<ConstraintCheckError> checkMessageAttribute(TypeElement element) {
+
+		ExecutableElement messageMethod = getMethod( element, "message" );
+
+		if ( messageMethod == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( element, null, "CONSTRAINT_TYPE_MUST_DECLARE_MESSAGE_MEMBER" )
+			);
+		}
+
+		if ( !typeUtils.isSameType(
+				annotationApiHelper.getMirrorForType( String.class ), messageMethod.getReturnType()
+		) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( messageMethod, null, "RETURN_TYPE_MUST_BE_STRING" )
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	/**
+	 * Checks that the given type element
+	 * <p/>
+	 * <ul>
+	 * <li>has a method with name "groups",</li>
+	 * <li>the return type of this method is <code>Class<?>[]</code>,</li>
+	 * <li>the default value of this method is <code>{}</code>.</li>
+	 * </ul>
+	 *
+	 * @param element The element of interest.
+	 *
+	 * @return A possibly non-empty set of constraint check errors, never null.
+	 */
+	private Set<ConstraintCheckError> checkGroupsAttribute(TypeElement element) {
+
+		ExecutableElement groupsMethod = getMethod( element, "groups" );
+
+		if ( groupsMethod == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( element, null, "CONSTRAINT_TYPE_MUST_DECLARE_GROUPS_MEMBER" )
+			);
+		}
+
+		DeclaredType type = getComponentTypeOfArrayReturnType( groupsMethod );
+
+		if ( type == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( groupsMethod, null, "RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
+			);
+		}
+
+		boolean typeHasNameClass = type.asElement().getSimpleName().contentEquals( "Class" );
+		boolean typeHasExactlyOneTypeArgument = type.getTypeArguments().size() == 1;
+		boolean typeArgumentIsUnboundWildcard = validateWildcardBounds( type.getTypeArguments().get( 0 ), null, null );
+
+		if ( !( typeHasNameClass && typeHasExactlyOneTypeArgument && typeArgumentIsUnboundWildcard ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( groupsMethod, null, "RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
+			);
+		}
+
+		if ( !isEmptyArray( groupsMethod.getDefaultValue() ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( groupsMethod, null, "DEFAULT_VALUE_MUST_BE_EMPTY_ARRAY" )
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	/**
+	 * Checks that the given type element
+	 * <p/>
+	 * <ul>
+	 * <li>has a method with name "payload",</li>
+	 * <li>the return type of this method is <code>Class<? extends Payload>[]</code>,</li>
+	 * <li>the default value of this method is <code>{}</code>.</li>
+	 * </ul>
+	 *
+	 * @param element The element of interest.
+	 *
+	 * @return A possibly non-empty set of constraint check errors, never null.
+	 */
+	private Set<ConstraintCheckError> checkPayloadAttribute(TypeElement element) {
+
+		ExecutableElement payloadMethod = getMethod( element, "payload" );
+
+		if ( payloadMethod == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( element, null, "CONSTRAINT_TYPE_MUST_DECLARE_PAYLOAD_MEMBER" )
+			);
+		}
+
+		DeclaredType type = getComponentTypeOfArrayReturnType( payloadMethod );
+
+		if ( type == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( payloadMethod, null, "PAYLOAD_RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
+			);
+		}
+
+		boolean typeHasNameClass = type.asElement().getSimpleName().contentEquals( "Class" );
+		boolean typeHasExactlyOneTypeArgument = type.getTypeArguments().size() == 1;
+		boolean typeArgumentIsWildcardWithPayloadExtendsBound = validateWildcardBounds(
+				type.getTypeArguments().get( 0 ),
+				annotationApiHelper.getDeclaredTypeByName( BeanValidationTypes.PAYLOAD ),
+				null
+		);
+
+		if ( !( typeHasNameClass && typeHasExactlyOneTypeArgument && typeArgumentIsWildcardWithPayloadExtendsBound ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( payloadMethod, null, "PAYLOAD_RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
+			);
+		}
+
+		if ( !isEmptyArray( payloadMethod.getDefaultValue() ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( payloadMethod, null, "PAYLOAD_DEFAULT_VALUE_MUST_BE_EMPTY_ARRAY" )
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	/**
+	 * Returns the method of the given type with the given name.
+	 *
+	 * @param element The type of interest.
+	 * @param name The name of the method which should be returned.
+	 *
+	 * @return The method of the given type with the given name or null if no such method exists.
+	 */
+	private ExecutableElement getMethod(TypeElement element, String name) {
+
+		for ( ExecutableElement oneMethod : methodsIn( element.getEnclosedElements() ) ) {
+
+			if ( oneMethod.getSimpleName().contentEquals( name ) ) {
+				return oneMethod;
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Returns the component type of the array-typed return value of the given method.
+	 *
+	 * @param method The method of interest.
+	 *
+	 * @return The component type of the array-typed return value of the given method or null,
+	 *         if the given method has no array-typed return value.
+	 */
+	private DeclaredType getComponentTypeOfArrayReturnType(ExecutableElement method) {
+
+		return method.getReturnType().accept(
+				new TypeKindVisitor6<DeclaredType, Void>() {
+
+					@Override
+					public DeclaredType visitArray(ArrayType t, Void p) {
+
+						return t.getComponentType().accept(
+								new TypeKindVisitor6<DeclaredType, Void>() {
+
+									@Override
+									public DeclaredType visitDeclared(DeclaredType t, Void p) {
+										return t;
+									}
+
+								}, null
+						);
+					}
+
+				}, null
+		);
+
+	}
+
+	/**
+	 * Returns true, if the given type mirror is a wildcard type with the given extends and super bounds, false otherwise.
+	 *
+	 * @param type The type to check.
+	 * @param expectedExtendsBound A mirror representing the expected extends bound.
+	 * @param expectedSuperBound A mirror representing the expected super bound.
+	 *
+	 * @return True, if the given type mirror is a wildcard type with the given extends and super bounds, false otherwise.
+	 */
+	private boolean validateWildcardBounds(TypeMirror type, final TypeMirror expectedExtendsBound, final TypeMirror expectedSuperBound) {
+
+		Boolean theValue = type.accept(
+				new TypeKindVisitor6<Boolean, Void>() {
+
+					@Override
+					public Boolean visitWildcard(WildcardType t, Void p) {
+
+						boolean extendsBoundMatches = ( t.getExtendsBound() == null ? expectedExtendsBound == null : expectedExtendsBound != null && typeUtils
+								.isSameType( t.getExtendsBound(), expectedExtendsBound ) );
+						boolean superBoundMatches = ( t.getSuperBound() == null ? expectedSuperBound == null : expectedSuperBound != null && typeUtils
+								.isSameType( t.getSuperBound(), expectedSuperBound ) );
+
+						return extendsBoundMatches && superBoundMatches;
+					}
+
+				}, null
+		);
+
+		return Boolean.TRUE.equals( theValue );
+	}
+
+	/**
+	 * Checks whether the given annotation value is an empty array or not.
+	 *
+	 * @param annotationValue The annotation value of interest.
+	 *
+	 * @return True, if the given annotation value is an empty array, false otherwise.
+	 */
+	private boolean isEmptyArray(AnnotationValue annotationValue) {
+
+		return annotationValue != null && Boolean.TRUE.equals(
+				annotationValue.accept(
+						new SimpleAnnotationValueVisitor6<Boolean, Void>() {
+
+							@Override
+							public Boolean visitArray(List<? extends AnnotationValue> values, Void p) {
+								return values.size() == 0;
+							}
+
+						}, null
+				)
+		);
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java
new file mode 100644
index 0000000..64be949
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheck.java
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+/**
+ * <p>
+ * Implementations represent checks, which determine whether a given constraint
+ * annotation is allowed at a given element.
+ * </p>
+ * <p>
+ * Implementations should be derived from {@link AbstractConstraintCheck} in
+ * order to implement only those check methods applicable for the element kinds
+ * supported by the check.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public interface ConstraintCheck {
+
+	/**
+	 * Checks, whether the given annotation is allowed at the given field.
+	 *
+	 * @param element An annotated field.
+	 * @param annotation An annotation at that field.
+	 *
+	 * @return A set with errors, that describe, why the given annotation is
+	 *         not allowed at the given element. In case no errors occur (the
+	 *         given annotation is allowed at the given element), an empty set
+	 *         must be returned.
+	 */
+	Set<ConstraintCheckError> checkField(VariableElement element,
+										 AnnotationMirror annotation);
+
+	/**
+	 * Checks, whether the given annotation is allowed at the given method.
+	 *
+	 * @param element An annotated method.
+	 * @param annotation An annotation at that method.
+	 *
+	 * @return A set with errors, that describe, why the given annotation is
+	 *         not allowed at the given element. In case no errors occur (the
+	 *         given annotation is allowed at the given element), an empty set
+	 *         must be returned.
+	 */
+	Set<ConstraintCheckError> checkMethod(ExecutableElement element,
+										  AnnotationMirror annotation);
+
+	/**
+	 * Checks, whether the given annotation is allowed at the given annotation
+	 * type declaration.
+	 *
+	 * @param element An annotated annotation type declaration.
+	 * @param annotation An annotation at that annotation type.
+	 *
+	 * @return A set with errors, that describe, why the given annotation is
+	 *         not allowed at the given element. In case no errors occur (the
+	 *         given annotation is allowed at the given element), an empty set
+	 *         must be returned.
+	 */
+	Set<ConstraintCheckError> checkAnnotationType(TypeElement element,
+												  AnnotationMirror annotation);
+
+	/**
+	 * Checks, whether the given annotation is allowed at the given type
+	 * declaration (class, interface, enum).
+	 *
+	 * @param element An annotated type declaration.
+	 * @param annotation An annotation at that type.
+	 *
+	 * @return A set with errors, that describe, why the given annotation is
+	 *         not allowed at the given element. In case no errors occur (the
+	 *         given annotation is allowed at the given element), an empty set
+	 *         must be returned.
+	 */
+	Set<ConstraintCheckError> checkNonAnnotationType(TypeElement element,
+													 AnnotationMirror annotation);
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java
new file mode 100644
index 0000000..c2acc35
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckError.java
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Arrays;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+
+/**
+ * The result of the execution of a {@link ConstraintCheck}. Comprises
+ * information about the location at which the error occurred and a message
+ * describing the occurred error.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstraintCheckError {
+
+	private final Element element;
+
+	private final AnnotationMirror annotationMirror;
+
+	private final String messageKey;
+
+	private final Object[] messageParameters;
+
+	/**
+	 * Creates a new ConstraintCheckError.
+	 *
+	 * @param element The element at which the error occurred.
+	 * @param annotationMirror The annotation that causes the error.
+	 * @param messageKey A key for retrieving an error message template from the bundle
+	 * <p/>
+	 * <code>org.hibernate.validator.ap.ValidationProcessorMessages.</code>
+	 * @param messageParameters An array with values to put into the error message template
+	 * using {@link java.text.MessageFormat}. The number of elements must match
+	 * the number of place holders in the message template.
+	 */
+	public ConstraintCheckError(Element element,
+								AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) {
+
+		this.element = element;
+		this.annotationMirror = annotationMirror;
+		this.messageKey = messageKey;
+		this.messageParameters = messageParameters;
+	}
+
+	public Element getElement() {
+		return element;
+	}
+
+	public AnnotationMirror getAnnotationMirror() {
+		return annotationMirror;
+	}
+
+	public String getMessageKey() {
+		return messageKey;
+	}
+
+	public Object[] getMessageParameters() {
+		return messageParameters;
+	}
+
+	@Override
+	public String toString() {
+		return "ConstraintCheckError [annotationMirror=" + annotationMirror
+				+ ", element=" + element + ", messageKey=" + messageKey
+				+ ", messageParameters=" + Arrays.toString( messageParameters )
+				+ "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime
+				* result
+				+ ( ( annotationMirror == null ) ? 0 : annotationMirror.hashCode() );
+		result = prime * result + ( ( element == null ) ? 0 : element.hashCode() );
+		result = prime * result
+				+ ( ( messageKey == null ) ? 0 : messageKey.hashCode() );
+		result = prime * result + Arrays.hashCode( messageParameters );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		ConstraintCheckError other = (ConstraintCheckError) obj;
+		if ( annotationMirror == null ) {
+			if ( other.annotationMirror != null ) {
+				return false;
+			}
+		}
+		else if ( !annotationMirror.equals( other.annotationMirror ) ) {
+			return false;
+		}
+		if ( element == null ) {
+			if ( other.element != null ) {
+				return false;
+			}
+		}
+		else if ( !element.equals( other.element ) ) {
+			return false;
+		}
+		if ( messageKey == null ) {
+			if ( other.messageKey != null ) {
+				return false;
+			}
+		}
+		else if ( !messageKey.equals( other.messageKey ) ) {
+			return false;
+		}
+		if ( !Arrays.equals( messageParameters, other.messageParameters ) ) {
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java
new file mode 100644
index 0000000..8d15383
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintCheckFactory.java
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Map;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.util.Types;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper.AnnotationType;
+
+/**
+ * A factory in charge of determining the {@link ConstraintCheck}s required for
+ * the validation of annotations at given elements.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstraintCheckFactory {
+
+	/**
+	 * Holds the checks to be executed for field elements.
+	 */
+	private final Map<AnnotationType, ConstraintChecks> fieldChecks;
+
+	/**
+	 * Holds the checks to be executed for method elements.
+	 */
+	private final Map<AnnotationType, ConstraintChecks> methodChecks;
+
+	/**
+	 * Holds the checks to be executed for annotation type declarations.
+	 */
+	private final Map<AnnotationType, ConstraintChecks> annotationTypeChecks;
+
+	/**
+	 * Holds the checks to be executed for class/interface/enum declarations.
+	 */
+	private final Map<AnnotationType, ConstraintChecks> nonAnnotationTypeChecks;
+
+	private ConstraintHelper constraintHelper;
+
+	private final static SingleValuedChecks NULL_CHECKS = new SingleValuedChecks();
+
+	public ConstraintCheckFactory(Types typeUtils, ConstraintHelper constraintHelper, AnnotationApiHelper annotationApiHelper, boolean methodConstraintsSupported) {
+
+		this.constraintHelper = constraintHelper;
+
+		fieldChecks = CollectionHelper.newHashMap();
+		fieldChecks.put(
+				AnnotationType.CONSTRAINT_ANNOTATION,
+				new SingleValuedChecks( new StaticCheck(), new TypeCheck( constraintHelper ) )
+		);
+		fieldChecks.put(
+				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
+				new MultiValuedChecks( constraintHelper, new StaticCheck(), new TypeCheck( constraintHelper ) )
+		);
+		fieldChecks.put(
+				AnnotationType.GRAPH_VALIDATION_ANNOTATION,
+				new SingleValuedChecks( new StaticCheck(), new PrimitiveCheck() )
+		);
+		fieldChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
+
+		methodChecks = CollectionHelper.newHashMap();
+		methodChecks.put(
+				AnnotationType.CONSTRAINT_ANNOTATION,
+				new SingleValuedChecks( new GetterCheck(methodConstraintsSupported), new StaticCheck(), new TypeCheck( constraintHelper ) )
+		);
+		methodChecks.put(
+				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION, new MultiValuedChecks(
+						constraintHelper, new GetterCheck(methodConstraintsSupported), new StaticCheck(), new TypeCheck( constraintHelper )
+				)
+		);
+		methodChecks.put(
+				AnnotationType.GRAPH_VALIDATION_ANNOTATION,
+				new SingleValuedChecks( new GetterCheck(methodConstraintsSupported), new StaticCheck(), new PrimitiveCheck() )
+		);
+		methodChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
+
+		annotationTypeChecks = CollectionHelper.newHashMap();
+		annotationTypeChecks.put(
+				AnnotationType.CONSTRAINT_ANNOTATION,
+				new SingleValuedChecks( new AnnotationTypeCheck( constraintHelper ) )
+		);
+		annotationTypeChecks.put(
+				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
+				new MultiValuedChecks( constraintHelper, new AnnotationTypeCheck( constraintHelper ) )
+		);
+		annotationTypeChecks.put(
+				AnnotationType.CONSTRAINT_META_ANNOTATION,
+				new SingleValuedChecks(
+						new RetentionPolicyCheck( annotationApiHelper ),
+						new TargetCheck( annotationApiHelper ),
+						new ConstraintValidatorCheck( constraintHelper, annotationApiHelper ),
+						new AnnotationTypeMemberCheck( annotationApiHelper, typeUtils )
+				)
+		);
+		annotationTypeChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
+
+		nonAnnotationTypeChecks = CollectionHelper.newHashMap();
+		nonAnnotationTypeChecks.put(
+				AnnotationType.CONSTRAINT_ANNOTATION, new SingleValuedChecks( new TypeCheck( constraintHelper ) )
+		);
+		nonAnnotationTypeChecks.put(
+				AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION,
+				new MultiValuedChecks( constraintHelper, new TypeCheck( constraintHelper ) )
+		);
+		nonAnnotationTypeChecks.put( AnnotationType.NO_CONSTRAINT_ANNOTATION, NULL_CHECKS );
+		nonAnnotationTypeChecks.put(
+				AnnotationType.GROUP_SEQUENCE_PROVIDER_ANNOTATION,
+				new SingleValuedChecks( new GroupSequenceProviderCheck( annotationApiHelper, typeUtils ) )
+		);
+	}
+
+	/**
+	 * Returns those checks that have to be performed to validate the given
+	 * annotation at the given element. In case no checks have to be performed
+	 * (e.g. because the given annotation is no constraint annotation) an empty
+	 * {@link ConstraintChecks} instance will be returned. It's therefore always
+	 * safe to operate on the returned object.
+	 *
+	 * @param annotatedElement An annotated element, e.g. a type declaration or a method.
+	 * @param annotation An annotation.
+	 *
+	 * @return The checks to be performed to validate the given annotation at
+	 *         the given element.
+	 */
+	public ConstraintChecks getConstraintChecks(Element annotatedElement, AnnotationMirror annotation) {
+
+		AnnotationType annotationType = constraintHelper.getAnnotationType( annotation );
+
+		switch ( annotatedElement.getKind() ) {
+			case FIELD:
+				return fieldChecks.get( annotationType );
+			case METHOD:
+				return methodChecks.get( annotationType );
+			case ANNOTATION_TYPE:
+				return annotationTypeChecks.get( annotationType );
+			case CLASS:
+			case INTERFACE:
+			case ENUM:
+				return nonAnnotationTypeChecks.get( annotationType );
+			default:
+				return NULL_CHECKS;
+		}
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java
new file mode 100644
index 0000000..905f0c7
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintChecks.java
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+
+/**
+ * Represents an ordered set of {@link ConstraintCheck}s with the ability
+ * to execute these checks against given elements and their annotations.
+ *
+ * @author Gunnar Morling
+ */
+public interface ConstraintChecks {
+
+	/**
+	 * Executes the checks contained within this set against the given element
+	 * and annotation.
+	 *
+	 * @param element An annotated element.
+	 * @param annotation The annotation to check.
+	 *
+	 * @return A set with errors. Will be empty in case all checks passed
+	 *         successfully.
+	 */
+	Set<ConstraintCheckError> execute(Element element,
+									  AnnotationMirror annotation);
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintValidatorCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintValidatorCheck.java
new file mode 100644
index 0000000..9c43b1e
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/ConstraintValidatorCheck.java
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+import org.hibernate.validator.ap.util.TypeNames.BeanValidationTypes;
+
+/**
+ * Checks, that for each constraint annotation type, which is not a composed constraint,
+ * a validator implementation is specified using the {@link javax.validation.Constraint} annotation.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstraintValidatorCheck extends AbstractConstraintCheck {
+
+	private ConstraintHelper constraintHelper;
+
+	private final AnnotationApiHelper annotationApiHelper;
+
+	public ConstraintValidatorCheck(ConstraintHelper constraintHelper, AnnotationApiHelper annotationApiHelper) {
+
+		this.constraintHelper = constraintHelper;
+		this.annotationApiHelper = annotationApiHelper;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element, AnnotationMirror annotation) {
+
+		AnnotationMirror constraintMirror = annotationApiHelper.getMirror(
+				element.getAnnotationMirrors(), BeanValidationTypes.CONSTRAINT
+		);
+		boolean atLeastOneValidatorGiven = !annotationApiHelper.getAnnotationArrayValue(
+				constraintMirror, "validatedBy"
+		).isEmpty();
+
+		if ( !( atLeastOneValidatorGiven || constraintHelper.isComposedConstraint( element ) ) ) {
+
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element,
+							constraintMirror,
+							"CONSTRAINT_TYPE_WITHOUT_VALIDATOR"
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java
new file mode 100644
index 0000000..3977cfd
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GetterCheck.java
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.type.TypeKind;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+/**
+ * Checks whether a given element is a valid getter method.
+ *
+ * @author Gunnar Morling
+ */
+public class GetterCheck extends AbstractConstraintCheck {
+
+	private final boolean methodConstraintsSupported;
+
+	public GetterCheck(boolean methodConstraintsSupported) {
+		this.methodConstraintsSupported  = methodConstraintsSupported;
+	}
+
+	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
+												 AnnotationMirror annotation) {
+
+		if ( !methodConstraintsSupported && !isGetterMethod( element ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, "ONLY_GETTERS_MAY_BE_ANNOTATED"
+					)
+			);
+		}
+		else if (!hasReturnValue(element)) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, "ONLY_NON_VOID_METHODS_MAY_BE_ANNOTATED"
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	private boolean isGetterMethod(ExecutableElement method) {
+
+		return isJavaBeanGetterName( method.getSimpleName().toString() )
+				&& !hasParameters( method ) && hasReturnValue( method );
+	}
+
+	private boolean hasReturnValue(ExecutableElement method) {
+		return method.getReturnType().getKind() != TypeKind.VOID;
+	}
+
+	private boolean hasParameters(ExecutableElement method) {
+		return !method.getParameters().isEmpty();
+	}
+
+	private boolean isJavaBeanGetterName(String methodName) {
+		return methodName.startsWith( "is" ) || methodName.startsWith( "has" ) || methodName.startsWith( "get" );
+	}
+
+}
+
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GroupSequenceProviderCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GroupSequenceProviderCheck.java
new file mode 100644
index 0000000..bd43182
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/GroupSequenceProviderCheck.java
@@ -0,0 +1,222 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementKindVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.Types;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.TypeNames.BeanValidationTypes;
+import org.hibernate.validator.ap.util.TypeNames.HibernateValidatorTypes;
+
+/**
+ * Checks that the {@link org.hibernate.validator.group.GroupSequenceProvider} annotation definition is valid.
+ * <p>
+ * This check ensure that :
+ * <ul>
+ * <li>The annotation is not defined on an interface.</li>
+ * <li>The annotation defines an implementation class of {@link org.hibernate.validator.group.DefaultGroupSequenceProvider}, not an interface or an abstract class.</li>
+ * <li>The annotation defines a class with a public default constructor.</li>
+ * <li>The annotation defines a default group sequence provider class for a (super-)type of the annotated class.</li>
+ * <li>The class hosting the annotation is not already annotated with {@link javax.validation.GroupSequence}.</li>
+ * </ul>
+ * </p>
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class GroupSequenceProviderCheck extends AbstractConstraintCheck {
+
+	private final Types typeUtils;
+	private final AnnotationApiHelper annotationApiHelper;
+	private final TypeMirror defaultGroupSequenceProviderType;
+
+	public GroupSequenceProviderCheck(AnnotationApiHelper annotationApiHelper, Types typeUtils) {
+		this.typeUtils = typeUtils;
+		this.annotationApiHelper = annotationApiHelper;
+		this.defaultGroupSequenceProviderType = annotationApiHelper.getDeclaredTypeByName( HibernateValidatorTypes.DEFAULT_GROUP_SEQUENCE_PROVIDER );
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkNonAnnotationType(TypeElement element, AnnotationMirror annotation) {
+		Set<ConstraintCheckError> errors = CollectionHelper.newHashSet();
+
+		errors.addAll( checkHostingElement( element, annotation ) );
+		errors.addAll( checkAnnotationValue( element, annotation ) );
+
+		return errors;
+	}
+
+	private Set<ConstraintCheckError> checkHostingElement(TypeElement element, AnnotationMirror annotation) {
+		if ( !element.getKind().isClass() ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, "GROUP_SEQUENCE_PROVIDER_ANNOTATION_MUST_BE_DEFINED_ON_A_CLASS"
+					)
+			);
+		}
+
+		//this error should be raised only if the GroupSequenceProvider annotations is on a class
+		if ( annotationApiHelper.getMirror(
+				element.getAnnotationMirrors(),
+				BeanValidationTypes.GROUP_SEQUENCE
+		) != null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element,
+							annotation,
+							"GROUP_SEQUENCE_PROVIDER_ANNOTATION_NOT_ALLOWED_ON_CLASS_WITH_GROUP_SEQUENCE_ANNOTATION"
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	private Set<ConstraintCheckError> checkAnnotationValue(TypeElement element, AnnotationMirror annotation) {
+		Set<ConstraintCheckError> errors = CollectionHelper.newHashSet();
+		AnnotationValue value = annotationApiHelper.getAnnotationValue( annotation, "value" );
+		TypeMirror valueType = (TypeMirror) value.getValue();
+		TypeElement valueElement = (TypeElement) typeUtils.asElement( valueType );
+
+		if ( valueElement.getKind().isInterface() || valueElement.getModifiers().contains( Modifier.ABSTRACT ) ) {
+			errors.add(
+					new ConstraintCheckError(
+							element,
+							annotation,
+							"GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_MUST_BE_AN_IMPLEMENTATION_CLASS"
+					)
+			);
+
+		}
+		else {
+			//the TypeElement hosting the annotation is a concrete implementation of the DefaultGroupSequenceProvider
+			//interface. In that case, we need to check that it has a public default constructor.
+			if ( !hasPublicDefaultConstructor( valueElement ) ) {
+				errors.add(
+						new ConstraintCheckError(
+								element,
+								annotation,
+								"GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_CLASS_MUST_HAVE_DEFAULT_CONSTRUCTOR",
+								valueType
+						)
+				);
+			}
+		}
+
+		TypeMirror genericProviderType = retrieveGenericProviderType( valueType );
+		if ( !typeUtils.isSubtype( element.asType(), genericProviderType ) ) {
+			errors.add(
+					new ConstraintCheckError(
+							element,
+							annotation,
+							"GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_DEFINED_PROVIDER_CLASS_WITH_WRONG_TYPE",
+							genericProviderType,
+							element.asType()
+					)
+			);
+		}
+
+		return errors;
+	}
+
+	/**
+	 * Checks that the given {@code TypeElement} has a public
+	 * default constructor.
+	 *
+	 * @param element The {@code TypeElement} to check.
+	 *
+	 * @return True if the given {@code TypeElement} has a public default constructor, false otherwise
+	 */
+	private boolean hasPublicDefaultConstructor(TypeElement element) {
+		return element.accept(
+				new ElementKindVisitor6<Boolean, Void>( Boolean.FALSE ) {
+
+					@Override
+					public Boolean visitTypeAsClass(TypeElement typeElement, Void aVoid) {
+						List<? extends Element> enclosedElements = typeElement.getEnclosedElements();
+						for ( Element enclosedElement : enclosedElements ) {
+							if ( enclosedElement.accept( this, aVoid ) ) {
+								return Boolean.TRUE;
+							}
+						}
+						return Boolean.FALSE;
+					}
+
+					@Override
+					public Boolean visitExecutableAsConstructor(ExecutableElement constructorElement, Void aVoid) {
+						if ( constructorElement.getModifiers().contains( Modifier.PUBLIC )
+								&& constructorElement.getParameters().isEmpty() ) {
+
+							return Boolean.TRUE;
+						}
+						return Boolean.FALSE;
+					}
+
+				}, null
+		);
+	}
+
+	/**
+	 * Retrieves the default group sequence provider generic type defined by the given {@code TypeMirror}.
+	 *
+	 * @param typeMirror The {@code TypeMirror} instance.
+	 *
+	 * @return The generic type or {@code null} if the given type doesn't implement the {@link org.hibernate.validator.group.DefaultGroupSequenceProvider} interface.
+	 */
+	private TypeMirror retrieveGenericProviderType(TypeMirror typeMirror) {
+		return typeMirror.accept(
+				new SimpleTypeVisitor6<TypeMirror, Void>() {
+
+					@Override
+					public TypeMirror visitDeclared(DeclaredType declaredType, Void aVoid) {
+						TypeMirror eraseType = typeUtils.erasure( declaredType );
+						if ( typeUtils.isSameType( eraseType, defaultGroupSequenceProviderType ) ) {
+							List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
+							if ( !typeArguments.isEmpty() ) {
+								return typeArguments.get( 0 );
+							}
+							return null;
+						}
+
+						List<? extends TypeMirror> superTypes = typeUtils.directSupertypes( declaredType );
+						for ( TypeMirror superType : superTypes ) {
+							TypeMirror genericProviderType = superType.accept( this, aVoid );
+							if ( genericProviderType != null ) {
+								return genericProviderType;
+							}
+						}
+						return null;
+					}
+
+				}, null
+		);
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java
new file mode 100644
index 0000000..1c8a083
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/MultiValuedChecks.java
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.checks;
+
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+
+/**
+ * A {@link ConstraintChecks} implementation, that executed the contained checks
+ * against all parts of given multi-valued annotations.
+ *
+ * @author Gunnar Morling
+ */
+public class MultiValuedChecks implements ConstraintChecks {
+
+	private final ConstraintHelper constraintHelper;
+
+	private final SingleValuedChecks delegate;
+
+	/**
+	 * Creates a new MultiValuedChecks.
+	 *
+	 * @param constraintHelper Helper for handling multi-valued constraints.
+	 * @param checks The checks to execute.
+	 */
+	public MultiValuedChecks(ConstraintHelper constraintHelper,
+							 ConstraintCheck... checks) {
+
+		this.constraintHelper = constraintHelper;
+		this.delegate = new SingleValuedChecks( checks );
+	}
+
+	public Set<ConstraintCheckError> execute(Element element,
+											 AnnotationMirror annotation) {
+
+		Set<ConstraintCheckError> theValue = CollectionHelper.newHashSet();
+
+		//execute the checks on each element of the multi-valued constraint
+		for ( AnnotationMirror onePartOfMultiValuedConstraint :
+				constraintHelper.getPartsOfMultiValuedConstraint( annotation ) ) {
+
+			theValue.addAll( delegate.execute( element, onePartOfMultiValuedConstraint ) );
+		}
+
+		return theValue;
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java
new file mode 100644
index 0000000..e84a966
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/PrimitiveCheck.java
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+/**
+ * Validates that the given element is not of a primitive type. Applies to
+ * fields and methods (the return type is evaluated).
+ *
+ * @author Gunnar Morling
+ */
+public class PrimitiveCheck extends AbstractConstraintCheck {
+
+	@Override
+	public Set<ConstraintCheckError> checkField(VariableElement element,
+												AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, element.asType(), "ATVALID_NOT_ALLOWED_AT_PRIMITIVE_FIELD" );
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
+												 AnnotationMirror annotation) {
+
+		return checkInternal(
+				element, annotation, element.getReturnType(), "ATVALID_NOT_ALLOWED_AT_METHOD_RETURNING_PRIMITIVE_TYPE"
+		);
+	}
+
+	private Set<ConstraintCheckError> checkInternal(Element element,
+													AnnotationMirror annotation, TypeMirror type, String messageKey) {
+
+		if ( type.getKind().isPrimitive() ) {
+
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, messageKey
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/RetentionPolicyCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/RetentionPolicyCheck.java
new file mode 100644
index 0000000..69dd053
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/RetentionPolicyCheck.java
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+/**
+ * Checks, that {@link RetentionPolicy#RUNTIME} is declared for constraint annotation types.
+ *
+ * @author Gunnar Morling
+ */
+public class RetentionPolicyCheck extends AbstractConstraintCheck {
+
+	private final AnnotationApiHelper annotationApiHelper;
+
+	public RetentionPolicyCheck(AnnotationApiHelper annotationApiHelper) {
+		this.annotationApiHelper = annotationApiHelper;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element, AnnotationMirror annotation) {
+
+		Retention retention = element.getAnnotation( Retention.class );
+
+		if ( retention == null ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError( element, null, "CONSTRAINT_TYPE_WITH_MISSING_OR_WRONG_RETENTION" )
+			);
+		}
+
+		if ( !retention.value().equals( RetentionPolicy.RUNTIME ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element,
+							annotationApiHelper.getMirror( element.getAnnotationMirrors(), Retention.class ),
+							"CONSTRAINT_TYPE_WITH_MISSING_OR_WRONG_RETENTION"
+					)
+			);
+		}
+
+
+		return Collections.emptySet();
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java
new file mode 100644
index 0000000..355ce69
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/SingleValuedChecks.java
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+/**
+ * A {@link ConstraintChecks} implementation that simply executes all
+ * contained checks against given elements and annotations.
+ *
+ * @author Gunnar Morling
+ */
+public class SingleValuedChecks implements ConstraintChecks {
+
+	//TODO GM: the "ordered set" character is currently ensured by adding
+	//each check only once in ConstraintCheckFactory. Should this be a real set?
+	private final List<ConstraintCheck> checks;
+
+	/**
+	 * Creates a new SingleValuedChecks.
+	 *
+	 * @param checks The checks to execute.
+	 */
+	public SingleValuedChecks(ConstraintCheck... checks) {
+
+		if ( checks == null ) {
+			this.checks = Collections.emptyList();
+		}
+		else {
+			this.checks = Arrays.asList( checks );
+		}
+	}
+
+	public Set<ConstraintCheckError> execute(Element element, AnnotationMirror annotation) {
+
+		Set<ConstraintCheckError> theValue = CollectionHelper.newHashSet();
+
+		//for each check execute the check method appropriate for the kind of
+		//the given element
+		for ( ConstraintCheck oneCheck : checks ) {
+
+			if ( element.getKind() == ElementKind.FIELD ) {
+				theValue.addAll( oneCheck.checkField( ( VariableElement ) element, annotation ) );
+			}
+			else if ( element.getKind() == ElementKind.METHOD ) {
+				theValue.addAll( oneCheck.checkMethod( ( ExecutableElement ) element, annotation ) );
+			}
+			else if ( element.getKind() == ElementKind.ANNOTATION_TYPE ) {
+				theValue.addAll( oneCheck.checkAnnotationType( ( TypeElement ) element, annotation ) );
+			}
+			else if (
+					element.getKind() == ElementKind.CLASS ||
+							element.getKind() == ElementKind.INTERFACE ||
+							element.getKind() == ElementKind.ENUM ) {
+
+				theValue.addAll( oneCheck.checkNonAnnotationType( ( TypeElement ) element, annotation ) );
+			}
+
+			if ( !theValue.isEmpty() ) {
+				return theValue;
+			}
+		}
+
+		return theValue;
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java
new file mode 100644
index 0000000..9691c83
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/StaticCheck.java
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.VariableElement;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+/**
+ * Checks, that the given element is not a static element. Applies to fields
+ * and methods.
+ *
+ * @author Gunnar Morling
+ */
+public class StaticCheck extends AbstractConstraintCheck {
+
+	@Override
+	public Set<ConstraintCheckError> checkField(VariableElement element, AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, "STATIC_FIELDS_MAY_NOT_BE_ANNOTATED" );
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkMethod(ExecutableElement element, AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, "STATIC_METHODS_MAY_NOT_BE_ANNOTATED" );
+	}
+
+	private Set<ConstraintCheckError> checkInternal(Element element,
+													AnnotationMirror annotation, String messageKey) {
+		if ( isStaticElement( element ) ) {
+
+			return CollectionHelper.asSet( new ConstraintCheckError( element, annotation, messageKey ) );
+		}
+
+		return Collections.emptySet();
+	}
+
+	private boolean isStaticElement(Element element) {
+		return element.getModifiers().contains( Modifier.STATIC );
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TargetCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TargetCheck.java
new file mode 100644
index 0000000..0d8c801
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TargetCheck.java
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.validator.ap.util.AnnotationApiHelper;
+import org.hibernate.validator.ap.util.CollectionHelper;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+
+/**
+ * Checks, that at least one of the {@link ElementType}s FIELD, METHOD, TYPE or ANNOTATION_TYPE is specified
+ * using the {@link Target} meta-annotation for constraint annotation types.
+ *
+ * @author Gunnar Morling
+ */
+public class TargetCheck extends AbstractConstraintCheck {
+
+	private final AnnotationApiHelper annotationApiHelper;
+
+	/**
+	 * Each constraint annotation type must be targeted at one of these element types at least.
+	 */
+	private final EnumSet<ElementType> supportedTypes = EnumSet.of( FIELD, METHOD, TYPE, ANNOTATION_TYPE );
+
+	public TargetCheck(AnnotationApiHelper annotationApiHelper) {
+		this.annotationApiHelper = annotationApiHelper;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkAnnotationType(TypeElement element, AnnotationMirror annotation) {
+
+		Target target = element.getAnnotation( Target.class );
+
+		//no target given allows the annotation to be declared at any type
+		if ( target == null ) {
+			return Collections.emptySet();
+		}
+
+		if ( !containsAtLeastOneSupportedElementType( target ) ) {
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element,
+							annotationApiHelper.getMirror( element.getAnnotationMirrors(), Target.class ),
+							"CONSTRAINT_TYPE_WITH_WRONG_TARGET"
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+	private boolean containsAtLeastOneSupportedElementType(Target target) {
+
+		ElementType[] elementTypes = target.value();
+
+		for ( ElementType oneElementType : elementTypes ) {
+			if ( supportedTypes.contains( oneElementType ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java
new file mode 100644
index 0000000..39ccba3
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/TypeCheck.java
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.checks;
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper;
+import org.hibernate.validator.ap.util.ConstraintHelper.ConstraintCheckResult;
+
+/**
+ * Checks, that constraint annotations are only specified at elements
+ * of a type supported by the constraints. Applies to fields, methods and
+ * non-annotation type declarations.
+ *
+ * @author Gunnar Morling
+ */
+public class TypeCheck extends AbstractConstraintCheck {
+
+	private ConstraintHelper constraintHelper;
+
+	public TypeCheck(ConstraintHelper constraintHelper) {
+		this.constraintHelper = constraintHelper;
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkField(VariableElement element,
+												AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, element.asType(), "NOT_SUPPORTED_TYPE" );
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkMethod(ExecutableElement element,
+												 AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, element.getReturnType(), "NOT_SUPPORTED_RETURN_TYPE" );
+	}
+
+	@Override
+	public Set<ConstraintCheckError> checkNonAnnotationType(
+			TypeElement element, AnnotationMirror annotation) {
+
+		return checkInternal( element, annotation, element.asType(), "NOT_SUPPORTED_TYPE" );
+	}
+
+	private Set<ConstraintCheckError> checkInternal(Element element,
+													AnnotationMirror annotation, TypeMirror type, String messageKey) {
+
+		if ( constraintHelper.checkConstraint(
+				annotation.getAnnotationType(), type
+		) != ConstraintCheckResult.ALLOWED ) {
+
+			return CollectionHelper.asSet(
+					new ConstraintCheckError(
+							element, annotation, messageKey,
+							annotation.getAnnotationType().asElement().getSimpleName()
+					)
+			);
+		}
+
+		return Collections.emptySet();
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/package.html b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/package.html
new file mode 100644
index 0000000..913c71d
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/checks/package.html
@@ -0,0 +1,29 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>This package contains check implementations used by the annotation processor to verify
+constraint declarations.</p>
+<p>These checks are registered in the <em>ConstraintValidatorFactory</em> responsible to return
+the corresponding check in function of the processed element and annotation. This factory is
+especially used by the annotation processor implementation to get the checks corresponding to
+an annotated element.</p>
+</body>
+</html>
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/package.html b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/package.html
new file mode 100644
index 0000000..922ea66
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>This package contains the main class of Hibernate Validator annotation processor.</p>
+<p>The annotation processor implementation named <em>ConstraintValidationProcessor</em>
+delegates constraint verifications to the implemented checks.</p>
+</body>
+</html>
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java
new file mode 100644
index 0000000..cad9ebb
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/AnnotationApiHelper.java
@@ -0,0 +1,316 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import java.lang.annotation.Annotation;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeKind;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.SimpleAnnotationValueVisitor6;
+import javax.lang.model.util.Types;
+
+/**
+ * A helper class providing some useful methods to work with types
+ * from the JSR-269-API.
+ *
+ * @author Gunnar Morling
+ */
+public class AnnotationApiHelper {
+
+	private Elements elementUtils;
+
+	private Types typeUtils;
+
+	private final Map<Class<?>, TypeMirror> primitiveMirrors;
+
+	public AnnotationApiHelper(Elements elementUtils, Types typeUtils) {
+
+		this.elementUtils = elementUtils;
+		this.typeUtils = typeUtils;
+
+		Map<Class<?>, TypeMirror> tempPrimitiveMirrors = CollectionHelper.newHashMap();
+
+		tempPrimitiveMirrors.put( Boolean.TYPE, typeUtils.getPrimitiveType( TypeKind.BOOLEAN ) );
+		tempPrimitiveMirrors.put( Character.TYPE, typeUtils.getPrimitiveType( TypeKind.CHAR ) );
+		tempPrimitiveMirrors.put( Byte.TYPE, typeUtils.getPrimitiveType( TypeKind.BYTE ) );
+		tempPrimitiveMirrors.put( Short.TYPE, typeUtils.getPrimitiveType( TypeKind.SHORT ) );
+		tempPrimitiveMirrors.put( Integer.TYPE, typeUtils.getPrimitiveType( TypeKind.INT ) );
+		tempPrimitiveMirrors.put( Long.TYPE, typeUtils.getPrimitiveType( TypeKind.LONG ) );
+		tempPrimitiveMirrors.put( Float.TYPE, typeUtils.getPrimitiveType( TypeKind.FLOAT ) );
+		tempPrimitiveMirrors.put( Double.TYPE, typeUtils.getPrimitiveType( TypeKind.DOUBLE ) );
+
+		primitiveMirrors = Collections.unmodifiableMap( tempPrimitiveMirrors );
+	}
+
+	/**
+	 * Returns a list containing those annotation mirrors from the input list,
+	 * which are of type <code>annotationType</code>. The input collection
+	 * remains untouched.
+	 *
+	 * @param annotationMirrors A list of annotation mirrors.
+	 * @param annotationType The type to be compared against.
+	 *
+	 * @return A list with those annotation mirrors from the input list, which
+	 *         are of type <code>annotationType</code>. May be empty but never
+	 *         null.
+	 */
+	public List<AnnotationMirror> filterByType(List<? extends AnnotationMirror> annotationMirrors, TypeMirror annotationType) {
+
+		List<AnnotationMirror> theValue = CollectionHelper.newArrayList();
+
+		if ( annotationMirrors == null || annotationType == null ) {
+			return theValue;
+		}
+
+		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
+
+			if ( typeUtils.isSameType( oneAnnotationMirror.getAnnotationType(), annotationType ) ) {
+				theValue.add( oneAnnotationMirror );
+			}
+		}
+
+		return theValue;
+	}
+
+	/**
+	 * Returns that mirror from the given list of annotation mirrors that
+	 * represents the annotation type specified by the given class.
+	 *
+	 * @param annotationMirrors A list of annotation mirrors.
+	 * @param annotationClazz The class of the annotation of interest.
+	 *
+	 * @return The mirror from the given list that represents the specified
+	 *         annotation or null, if the given list doesn't contain such a
+	 *         mirror.
+	 */
+	public AnnotationMirror getMirror(List<? extends AnnotationMirror> annotationMirrors, Class<? extends Annotation> annotationClazz) {
+
+		return getMirror( annotationMirrors, annotationClazz.getCanonicalName() );
+	}
+
+	/**
+	 * Returns that mirror from the given list of annotation mirrors that
+	 * represents the annotation type specified by the given class.
+	 *
+	 * @param annotationMirrors A list of annotation mirrors.
+	 * @param annotationTypeName The FQN of the annotation of interest.
+	 *
+	 * @return The mirror from the given list that represents the specified
+	 *         annotation or null, if the given list doesn't contain such a
+	 *         mirror.
+	 */
+	public AnnotationMirror getMirror(List<? extends AnnotationMirror> annotationMirrors, String annotationTypeName) {
+
+		if ( annotationMirrors == null || annotationTypeName == null ) {
+			return null;
+		}
+
+		TypeElement typeElement = elementUtils.getTypeElement( annotationTypeName );
+
+		if ( typeElement == null ) {
+			return null;
+		}
+
+		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
+
+			if ( typeUtils.isSameType(
+					oneAnnotationMirror.getAnnotationType(),
+					typeElement.asType()
+			) ) {
+				return oneAnnotationMirror;
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Returns a TypeMirror for the given class.
+	 *
+	 * @param clazz The class of interest.
+	 *
+	 * @return A TypeMirror for the given class.
+	 */
+	public TypeMirror getMirrorForType(Class<?> clazz) {
+
+		if ( clazz.isArray() ) {
+			return typeUtils.getArrayType( getMirrorForNonArrayType( clazz.getComponentType() ) );
+		}
+		else {
+			return getMirrorForNonArrayType( clazz );
+		}
+	}
+
+	private TypeMirror getMirrorForNonArrayType(Class<?> clazz) {
+
+		TypeMirror theValue = null;
+
+		if ( clazz.isPrimitive() ) {
+			theValue = primitiveMirrors.get( clazz );
+		}
+		else {
+			theValue = getDeclaredTypeByName( clazz.getCanonicalName() );
+		}
+
+		if ( theValue != null ) {
+			return theValue;
+		}
+		else {
+			throw new AssertionError( "Couldn't find a type mirror for class " + clazz );
+		}
+	}
+
+	/**
+	 * Returns the {@link DeclaredType} for the given class name.
+	 *
+	 * @param className A fully qualified class name, e.g. "java.lang.String".
+	 *
+	 * @return A {@link DeclaredType} representing the type with the given name,
+	 *         or null, if no such type exists.
+	 */
+	public DeclaredType getDeclaredTypeByName(String className) {
+
+		TypeElement typeElement = elementUtils.getTypeElement( className );
+
+		return typeElement != null ? typeUtils.getDeclaredType( typeElement ) : null;
+	}
+
+	/**
+	 * Returns the annotation value of the given annotation mirror with the
+	 * given name.
+	 *
+	 * @param annotationMirror An annotation mirror.
+	 * @param name The name of the annotation value of interest.
+	 *
+	 * @return The annotation value with the given name or null, if one of the
+	 *         input values is null or if no value with the given name exists
+	 *         within the given annotation mirror.
+	 */
+	public AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String name) {
+
+		if ( annotationMirror == null || name == null ) {
+			return null;
+		}
+
+		Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues = annotationMirror.getElementValues();
+
+		for ( Entry<? extends ExecutableElement, ? extends AnnotationValue> oneElementValue : elementValues.entrySet() ) {
+
+			if ( oneElementValue.getKey().getSimpleName().contentEquals( name ) ) {
+
+				return oneElementValue.getValue();
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Returns the given annotation mirror's array-typed annotation value with
+	 * the given name.
+	 *
+	 * @param annotationMirror An annotation mirror.
+	 * @param name The name of the annotation value of interest.
+	 *
+	 * @return The annotation value with the given name or an empty list, if no
+	 *         such value exists within the given annotation mirror or such a
+	 *         value exists but is not an array-typed one.
+	 */
+	public List<? extends AnnotationValue> getAnnotationArrayValue(AnnotationMirror annotationMirror, String name) {
+
+		AnnotationValue annotationValue = getAnnotationValue( annotationMirror, name );
+
+		if ( annotationValue == null ) {
+			return Collections.<AnnotationValue>emptyList();
+		}
+
+		List<? extends AnnotationValue> theValue = annotationValue.accept(
+				new SimpleAnnotationValueVisitor6<List<? extends AnnotationValue>, Void>() {
+
+					@Override
+					public List<? extends AnnotationValue> visitArray(List<? extends AnnotationValue> values, Void p) {
+						return values;
+					}
+
+				}, null
+		);
+
+		return theValue != null ? theValue : Collections
+				.<AnnotationValue>emptyList();
+	}
+
+	/**
+	 * <p>
+	 * Returns a set containing the "lowest" type per hierarchy contained in the
+	 * input set. The following examples shall demonstrate the behavior.
+	 * </p>
+	 * <ul>
+	 * <li>
+	 * Input: <code>String</code>; Output: <code>String</code></li>
+	 * <li>
+	 * Input: <code>Object</code>, <code>String</code>; Output:
+	 * <code>String</code></li>
+	 * <li>
+	 * Input: <code>Object</code>, <code>Collection</code>, <code>List</code>;
+	 * Output: <code>List</code></li>
+	 * <li>
+	 * Input: <code>Collection</code>, <code>Set</code>, <code>List</code>;
+	 * Output: <code>List</code>, <code>Set</code></li>
+	 * </ul>
+	 *
+	 * @param types A set of type mirrors.
+	 *
+	 * @return A set with the lowest types per hierarchy or null, if the input
+	 *         set was null.
+	 */
+	public Set<TypeMirror> keepLowestTypePerHierarchy(Set<TypeMirror> types) {
+
+		if ( types == null ) {
+			return null;
+		}
+
+		Set<TypeMirror> theValue = CollectionHelper.newHashSet();
+
+		for ( TypeMirror typeMirror1 : types ) {
+			boolean foundSubType = false;
+			for ( TypeMirror typeMirror2 : types ) {
+				if ( !typeUtils.isSameType( typeMirror2, typeMirror1 ) && typeUtils.isAssignable(
+						typeMirror2, typeMirror1
+				) ) {
+					foundSubType = true;
+					continue;
+				}
+			}
+			if ( !foundSubType ) {
+				theValue.add( typeMirror1 );
+			}
+		}
+
+		return theValue;
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java
new file mode 100644
index 0000000..4070680
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/CollectionHelper.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Provides some methods for simplified collection instantiation.
+ *
+ * @author Gunnar Morling
+ */
+public class CollectionHelper {
+
+	public static <K, V> HashMap<K, V> newHashMap() {
+		return new HashMap<K, V>();
+	}
+
+	public static <T> HashSet<T> newHashSet() {
+		return new HashSet<T>();
+	}
+
+	public static <T> ArrayList<T> newArrayList() {
+		return new ArrayList<T>();
+	}
+
+	public static <T> Set<T> asSet(T... ts) {
+
+		return new HashSet<T>( Arrays.asList( ts ) );
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/Configuration.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/Configuration.java
new file mode 100644
index 0000000..c1f8e4a
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/Configuration.java
@@ -0,0 +1,149 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import java.text.MessageFormat;
+import java.util.Map;
+import javax.annotation.processing.Messager;
+import javax.tools.Diagnostic.Kind;
+
+/**
+ * Provides access to the processor options supported by the Hibernate Validator
+ * annotation processor.
+ *
+ * @author Gunnar Morling
+ */
+public class Configuration {
+
+	/**
+	 * The name of the processor option for setting the diagnostic kind to be
+	 * used when reporting errors during annotation processing.
+	 */
+	public final static String DIAGNOSTIC_KIND_PROCESSOR_OPTION = "diagnosticKind";
+
+	/**
+	 * The name of the processor option for activating verbose message reporting.
+	 */
+	public final static String VERBOSE_PROCESSOR_OPTION = "verbose";
+
+	/**
+	 * The name of the processor option for allowing constraints at methods
+	 * other than getter methods.
+	 */
+	public final static String METHOD_CONSTRAINTS_SUPPORTED_PROCESSOR_OPTION = "methodConstraintsSupported";
+
+	/**
+	 * The diagnostic kind to be used if no or an invalid kind is given as processor option.
+	 */
+	public final static Kind DEFAULT_DIAGNOSTIC_KIND = Kind.ERROR;
+
+	private final Kind diagnosticKind;
+
+	private final boolean verbose;
+
+	private final boolean methodConstraintsSupported;
+
+	public Configuration(Map<String, String> options, Messager messager) {
+
+		this.diagnosticKind = getDiagnosticKindOption( options, messager );
+		this.verbose = getVerboseOption( options, messager );
+		this.methodConstraintsSupported = getMethodConstraintsSupportedOption( options );
+	}
+
+	/**
+	 * Returns the diagnosticKind to be used when reporting failing constraint checks.
+	 */
+	public Kind getDiagnosticKind() {
+		return diagnosticKind;
+	}
+
+	/**
+	 * Whether logging information shall be put out in a verbose way or not.
+	 */
+	public boolean isVerbose() {
+		return verbose;
+	}
+
+	/**
+	 * Whether method constraints are allowed at any method (<code>true</code>) or only
+	 * getter methods (<code>false</code>).
+	 */
+	public boolean methodConstraintsSupported() {
+		return methodConstraintsSupported;
+	}
+
+	/**
+	 * Retrieves the diagnostic kind to be used for error messages. If given in
+	 * processor options, it will be taken from there, otherwise the default
+	 * value {@link Kind#ERROR} will be returned.
+	 */
+	private Kind getDiagnosticKindOption(Map<String, String> options, Messager messager) {
+
+		String diagnosticKindFromOptions = options.get( DIAGNOSTIC_KIND_PROCESSOR_OPTION );
+
+		if ( diagnosticKindFromOptions != null ) {
+			try {
+				return Kind.valueOf( diagnosticKindFromOptions );
+			}
+			catch ( IllegalArgumentException e ) {
+				messager.printMessage(
+						Kind.WARNING, MessageFormat.format(
+						"The given value {0} is no valid diagnostic kind. {1} will be used.",
+						diagnosticKindFromOptions,
+						DEFAULT_DIAGNOSTIC_KIND
+				)
+				);
+			}
+		}
+
+		return DEFAULT_DIAGNOSTIC_KIND;
+	}
+
+	/**
+	 * Retrieves the value for the "verbose" property from the options.
+	 */
+	private boolean getVerboseOption(Map<String, String> options, Messager messager) {
+
+		boolean theValue = Boolean.parseBoolean( options.get( VERBOSE_PROCESSOR_OPTION ) );
+
+		if ( theValue ) {
+			messager.printMessage(
+					Kind.NOTE, MessageFormat.format(
+					"Verbose reporting is activated. Some processing information will be displayed using diagnostic kind {0}.",
+					Kind.NOTE
+			)
+			);
+		}
+
+		return theValue;
+	}
+
+	/**
+	 * Retrieves the value for the "methodConstraintsSupported" property from the options.
+	 */
+	private boolean getMethodConstraintsSupportedOption(Map<String, String> options) {
+
+		String methodConstraintsSupported = options.get( METHOD_CONSTRAINTS_SUPPORTED_PROCESSOR_OPTION );
+
+		//allow method constraints by default
+		if ( methodConstraintsSupported == null ) {
+			return true;
+		}
+
+		return Boolean.parseBoolean( methodConstraintsSupported );
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java
new file mode 100644
index 0000000..9de5fe1
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java
@@ -0,0 +1,780 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.SimpleAnnotationValueVisitor6;
+import javax.lang.model.util.TypeKindVisitor6;
+import javax.lang.model.util.Types;
+
+import org.hibernate.validator.ap.util.TypeNames.BeanValidationTypes;
+import org.hibernate.validator.ap.util.TypeNames.HibernateValidatorTypes;
+import org.hibernate.validator.ap.util.TypeNames.JodaTypes;
+
+/**
+ * Helper class that deals with all constraint-related stuff, such as
+ * determining whether a given annotation represents a constraint annotation or
+ * whether a given annotation is allowed to be declared at a given element.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ConstraintHelper {
+
+	/**
+	 * Possible results of a constraint check as returned by
+	 * {@link ConstraintHelper#checkConstraint(DeclaredType, TypeMirror)}.
+	 *
+	 * @author Gunnar Morling
+	 */
+	public enum ConstraintCheckResult {
+
+		/**
+		 * The checked constraint is allowed at the evaluated type.
+		 */
+		ALLOWED,
+
+		/**
+		 * The checked constraint is not allowed at the evaluated type.
+		 */
+		DISALLOWED,
+
+		/**
+		 * Multiple validators were found, that could validate the checked
+		 * constrained at the evaluated type.
+		 */
+		MULTIPLE_VALIDATORS_FOUND
+	}
+
+	/**
+	 * The type of an annotation with respect to the BV API.
+	 *
+	 * @author Gunnar Morling
+	 * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+	 */
+	public enum AnnotationType {
+
+		/**
+		 * Given annotation is a constraint annotation (e.g. @Min).
+		 */
+		CONSTRAINT_ANNOTATION,
+
+		/**
+		 * Given annotation is a multi-valued annotation (e.g.
+		 * <code>
+		 * @List({
+		 * @Min(10),
+		 * @Min(value=20, groups= Special.class})
+		 * })
+		 * </code>.
+		 */
+		MULTI_VALUED_CONSTRAINT_ANNOTATION,
+
+		/**
+		 * Given annotation is the {@code @Valid} annotation.
+		 */
+		GRAPH_VALIDATION_ANNOTATION,
+
+		/**
+		 * Given annotation is the @Constraint meta-annotation.
+		 */
+		CONSTRAINT_META_ANNOTATION,
+
+		/**
+		 * Given annotation is the @GroupSequenceProvider annotation.
+		 */
+		GROUP_SEQUENCE_PROVIDER_ANNOTATION,
+
+		/**
+		 * Given annotation is not related to the BV API (e.g. @Resource).
+		 */
+		NO_CONSTRAINT_ANNOTATION
+	}
+
+	/**
+	 * Contains the supported types for given constraints. Keyed by constraint
+	 * annotation type names, each value is a set with the allowed types for the
+	 * mapped constraint. The map is pre-populated with the supported
+	 * constraints for the built-in constraints. Constraints for custom
+	 * constraints are determined and stored on demand.
+	 */
+	private final Map<Name, Set<TypeMirror>> supportedTypesByConstraint;
+
+	private final Map<Name, AnnotationType> annotationTypeCache;
+
+	/**
+	 * Caches composing constraints.
+	 */
+	private final Map<Name, Set<AnnotationMirror>> composingConstraintsByConstraints;
+
+	private final Types typeUtils;
+
+	private final AnnotationApiHelper annotationApiHelper;
+
+	public ConstraintHelper(Types typeUtils, AnnotationApiHelper annotationApiHelper) {
+
+		this.typeUtils = typeUtils;
+		this.annotationApiHelper = annotationApiHelper;
+
+		annotationTypeCache = CollectionHelper.newHashMap();
+		supportedTypesByConstraint = CollectionHelper.newHashMap();
+		composingConstraintsByConstraints = CollectionHelper.newHashMap();
+
+		//register BV-defined constraints
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.ASSERT_FALSE, Boolean.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.ASSERT_TRUE, Boolean.class );
+		registerAllowedTypesForBuiltInConstraint(
+				BeanValidationTypes.DECIMAL_MAX,
+				Number.class,
+				String.class
+		);
+		registerAllowedTypesForBuiltInConstraint(
+				BeanValidationTypes.DECIMAL_MIN,
+				Number.class,
+				String.class
+		);
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.DIGITS, Number.class, String.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.FUTURE, Calendar.class, Date.class );
+		registerAllowedTypesForBuiltInConstraint(
+				BeanValidationTypes.FUTURE,
+				JodaTypes.READABLE_PARTIAL,
+				JodaTypes.READABLE_INSTANT
+		);
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.MAX, Number.class, String.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.MIN, Number.class, String.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.NOT_NULL, Object.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.NULL, Object.class );
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.PAST, Calendar.class, Date.class );
+		registerAllowedTypesForBuiltInConstraint(
+				BeanValidationTypes.PAST,
+				JodaTypes.READABLE_PARTIAL,
+				JodaTypes.READABLE_INSTANT
+		);
+		registerAllowedTypesForBuiltInConstraint( BeanValidationTypes.PATTERN, String.class );
+		registerAllowedTypesForBuiltInConstraint(
+				BeanValidationTypes.SIZE,
+				Object[].class,
+				boolean[].class,
+				byte[].class,
+				char[].class,
+				double[].class,
+				float[].class,
+				int[].class,
+				long[].class,
+				short[].class,
+				Collection.class,
+				Map.class,
+				String.class
+		);
+
+		//register HV-specific constraints
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.EMAIL, CharSequence.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.LENGTH, CharSequence.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.MOD_CHECK, CharSequence.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NOT_BLANK, CharSequence.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.SAFE_HTML, CharSequence.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.SCRIPT_ASSERT, Object.class );
+		registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.URL, CharSequence.class );
+	}
+
+	/**
+	 * Checks, whether the given type element represents a constraint annotation
+	 * or not. That's the case, if the given element is annotated with the
+	 * {@code @Constraint} meta-annotation (which is only allowed at annotation
+	 * declarations).
+	 *
+	 * @param element The element of interest.
+	 *
+	 * @return True, if the given element is a constraint annotation type, false
+	 *         otherwise.
+	 */
+	public boolean isConstraintAnnotation(Element element) {
+		return annotationApiHelper.getMirror( element.getAnnotationMirrors(), BeanValidationTypes.CONSTRAINT ) != null;
+	}
+
+	/**
+	 * Returns the {@link AnnotationType} of the given annotation.
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return The given mirror's annotation type.
+	 */
+	public AnnotationType getAnnotationType(AnnotationMirror annotationMirror) {
+
+		Name key = getName( annotationMirror.getAnnotationType() );
+
+		AnnotationType annotationType = annotationTypeCache.get( key );
+
+		if ( annotationType != null ) {
+			return annotationType;
+		}
+
+		if ( isConstraintAnnotation( annotationMirror ) ) {
+			annotationType = AnnotationType.CONSTRAINT_ANNOTATION;
+		}
+		else if ( isMultiValuedConstraint( annotationMirror ) ) {
+			annotationType = AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION;
+		}
+		else if ( isGraphValidationAnnotation( annotationMirror ) ) {
+			annotationType = AnnotationType.GRAPH_VALIDATION_ANNOTATION;
+		}
+		else if ( isConstraintMetaAnnotation( annotationMirror ) ) {
+			annotationType = AnnotationType.CONSTRAINT_META_ANNOTATION;
+		}
+		else if ( isGroupSequenceProviderAnnotation( annotationMirror ) ) {
+			annotationType = AnnotationType.GROUP_SEQUENCE_PROVIDER_ANNOTATION;
+		}
+		else {
+			annotationType = AnnotationType.NO_CONSTRAINT_ANNOTATION;
+		}
+
+		annotationTypeCache.put( key, annotationType );
+
+		return annotationType;
+	}
+
+	/**
+	 * Returns a list with the constraint annotations contained in the given
+	 * array-valued annotation mirror.
+	 *
+	 * @param annotationMirror An array-valued annotation mirror (meaning it has an
+	 * array-typed attribute with name "value").
+	 *
+	 * @return A list with the constraint annotations part of the given
+	 *         multi-valued constraint annotation. Will return an empty list if
+	 *         the given annotation is no multi-valued annotation or if no
+	 *         constraint annotations are contained within the given
+	 *         array-valued annotation.
+	 */
+	public List<AnnotationMirror> getPartsOfMultiValuedConstraint(
+			AnnotationMirror annotationMirror) {
+
+		final List<AnnotationMirror> theValue = CollectionHelper.newArrayList();
+
+		for ( AnnotationValue oneValuePart : annotationApiHelper
+				.getAnnotationArrayValue( annotationMirror, "value" ) ) {
+
+			oneValuePart.accept(
+					new SimpleAnnotationValueVisitor6<Void, Void>() {
+
+						@Override
+						public Void visitAnnotation(AnnotationMirror a, Void p) {
+
+							if ( isConstraintAnnotation(
+									a.getAnnotationType()
+											.asElement()
+							) ) {
+								theValue.add( a );
+							}
+
+							return null;
+						}
+
+					}, null
+			);
+
+		}
+
+		return theValue;
+	}
+
+	/**
+	 * Checks whether the given annotation type (which <b>must</b> be a
+	 * constraint annotation type) may be specified at elements of the specified
+	 * type.
+	 *
+	 * @param constraintAnnotationType A constraint annotation type.
+	 * @param typeOfAnnotatedElement A type which with an element is annotated.
+	 *
+	 * @return Whether the given constraint annotation may be specified at
+	 *         elements of the given type.
+	 */
+	public ConstraintCheckResult checkConstraint(DeclaredType constraintAnnotationType, TypeMirror typeOfAnnotatedElement) {
+
+		//recursively check the composing constraints
+		ConstraintCheckResult composingConstraintsCheck = checkComposingConstraints(
+				constraintAnnotationType,
+				typeOfAnnotatedElement
+		);
+		if ( composingConstraintsCheck != ConstraintCheckResult.ALLOWED ) {
+			return composingConstraintsCheck;
+		}
+
+		//check the supported types of the constraint itself
+		return checkSupportedTypes( constraintAnnotationType, typeOfAnnotatedElement );
+	}
+
+	/**
+	 * Checks, whether the given type element represents a composed constraint or not.
+	 *
+	 * @param element The type element of interest. Must not be null.
+	 *
+	 * @return True if the given element represents a composed constraint, false otherwise.
+	 */
+	public boolean isComposedConstraint(TypeElement element) {
+
+		return Boolean.TRUE.equals(
+				element.asType().accept(
+						new TypeKindVisitor6<Boolean, Void>() {
+
+							@Override
+							public Boolean visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
+								return !getComposingConstraints( constraintValidatorImplementation ).isEmpty();
+							}
+
+						}, null
+				)
+		);
+	}
+
+	// ==================================
+	// private API below
+	// ==================================
+
+	/**
+	 * Checks, whether the given annotation mirror represents a constraint
+	 * annotation or not. That's the case, if the given mirror is annotated with
+	 * the {@code @Constraint} meta-annotation (which is only allowed at
+	 * annotation declarations).
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return True, if the given mirror represents a constraint annotation
+	 *         type, false otherwise.
+	 */
+	private boolean isConstraintAnnotation(AnnotationMirror annotationMirror) {
+		return isConstraintAnnotation( annotationMirror.getAnnotationType().asElement() );
+	}
+
+	/**
+	 * Checks, whether the given annotation mirror represents the {@code @Constraint}
+	 * meta-annotation or not.
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return True, if the given mirror represents the {@code @Constraint} meta-annotation
+	 *         type, false otherwise.
+	 */
+	private boolean isConstraintMetaAnnotation(AnnotationMirror annotationMirror) {
+		return getName( annotationMirror.getAnnotationType() ).contentEquals( BeanValidationTypes.CONSTRAINT );
+	}
+
+	/**
+	 * Checks, whether the given annotation mirror represents a multi-valued
+	 * constraint such as {@link javax.validation.constraints.Pattern.List}.
+	 * That is the case if the annotation has an array-typed attribute with name
+	 * "value", that exclusively contains constraint annotations.
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return True, if the given mirror represents a multi-valued constraint,
+	 *         false otherwise.
+	 */
+	private boolean isMultiValuedConstraint(AnnotationMirror annotationMirror) {
+
+		List<? extends AnnotationValue> annotationArrayValue = annotationApiHelper.getAnnotationArrayValue(
+				annotationMirror, "value"
+		);
+
+		// a multi-valued constraint must have at least one value
+		if ( annotationArrayValue.isEmpty() ) {
+			return false;
+		}
+
+		for ( AnnotationValue oneAnnotationValue : annotationArrayValue ) {
+
+			Boolean isConstraintAnnotation = oneAnnotationValue.accept(
+					new SimpleAnnotationValueVisitor6<Boolean, Void>() {
+
+						@Override
+						public Boolean visitAnnotation(
+								AnnotationMirror a, Void p) {
+
+							return isConstraintAnnotation( a.getAnnotationType().asElement() );
+						}
+					}, null
+			);
+
+			//TODO GM: have all parts of the array to be constraint annotations?
+			if ( Boolean.TRUE != isConstraintAnnotation ) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	/**
+	 * Checks, whether the given mirror represents the {@code Valid} annotation.
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return True, if the given mirror represents the {@code Valid} annotation, false
+	 *         otherwise.
+	 */
+	private boolean isGraphValidationAnnotation(
+			AnnotationMirror annotationMirror) {
+
+		return getName( annotationMirror.getAnnotationType() ).contentEquals( BeanValidationTypes.VALID );
+	}
+
+	/**
+	 * Checks, whether the given mirror represents the {@code @GroupSequenceProvider} annotation.
+	 *
+	 * @param annotationMirror The annotation mirror of interest.
+	 *
+	 * @return True, if the given mirror represents the {@code @GroupSequenceProvider} annotation, false
+	 *         otherwise.
+	 */
+	private boolean isGroupSequenceProviderAnnotation(
+			AnnotationMirror annotationMirror) {
+
+		return getName( annotationMirror.getAnnotationType() ).contentEquals( HibernateValidatorTypes.GROUP_SEQUENCE_PROVIDER );
+	}
+
+	private ConstraintCheckResult checkComposingConstraints(DeclaredType constraintAnnotationType, TypeMirror typeOfAnnotatedElement) {
+
+		for ( AnnotationMirror oneComposingConstraint : getComposingConstraints( constraintAnnotationType ) ) {
+
+			ConstraintCheckResult annotationCheckResult = checkConstraint(
+					oneComposingConstraint.getAnnotationType(), typeOfAnnotatedElement
+			);
+
+			if ( annotationCheckResult != ConstraintCheckResult.ALLOWED ) {
+				return annotationCheckResult;
+			}
+
+		}
+
+		return ConstraintCheckResult.ALLOWED;
+	}
+
+	private ConstraintCheckResult checkSupportedTypes(DeclaredType constraintAnnotationType, TypeMirror typeOfAnnotatedElement) {
+
+		Set<TypeMirror> supportedTypes = getSupportedTypes( constraintAnnotationType );
+		Set<TypeMirror> assignableTypes = getAssignableTypes( supportedTypes, typeOfAnnotatedElement );
+
+		//found more than one matching validator
+		if ( assignableTypes.size() > 1 ) {
+			return ConstraintCheckResult.MULTIPLE_VALIDATORS_FOUND;
+		}
+		//found exactly one matching validator OR the constraint is completely composed
+		else if ( assignableTypes.size() == 1 ||
+				( supportedTypes.size() == 0 && !getComposingConstraints( constraintAnnotationType ).isEmpty() ) ) {
+			return ConstraintCheckResult.ALLOWED;
+		}
+		//found no matching validator
+		else {
+			return ConstraintCheckResult.DISALLOWED;
+		}
+	}
+
+	/**
+	 * <p>
+	 * Returns a set with the types supported by the given constraint annotation
+	 * type (as either retrieved from the validators given in the
+	 * {@code @Constraint} meta-annotation or from the map with built-in
+	 * constraints.
+	 * </p>
+	 * <p>
+	 *
+	 * @param constraintAnnotationType A constraint annotation type.
+	 *
+	 * @return A set with the supported types.
+	 */
+	private Set<TypeMirror> getSupportedTypes(DeclaredType constraintAnnotationType) {
+
+		Name key = getName( constraintAnnotationType );
+		Set<TypeMirror> supportedTypes = supportedTypesByConstraint.get( key );
+
+		// create a mapping for the given annotation type if required
+		if ( supportedTypes == null ) {
+			supportedTypes = determineSupportedTypes( constraintAnnotationType );
+			supportedTypesByConstraint.put( key, supportedTypes );
+		}
+
+		return supportedTypes;
+	}
+
+	private Set<TypeMirror> determineSupportedTypes(DeclaredType constraintAnnotationType) {
+
+		//the Constraint meta-annotation at the type declaration, e.g. "@Constraint(validatedBy = CheckCaseValidator.class)"
+		AnnotationMirror constraintMetaAnnotation = getConstraintMetaAnnotation( constraintAnnotationType );
+
+		//the validator classes, e.g. [CheckCaseValidator.class]
+		List<? extends AnnotationValue> validatorClassReferences = getValidatorClassesFromConstraintMetaAnnotation(
+				constraintMetaAnnotation
+		);
+
+		Set<TypeMirror> supportedTypes = CollectionHelper.newHashSet();
+
+		for ( AnnotationValue oneValidatorClassReference : validatorClassReferences ) {
+
+			TypeMirror supportedType = getSupportedType( oneValidatorClassReference );
+			supportedTypes.add( supportedType );
+		}
+
+		return supportedTypes;
+	}
+
+	private TypeMirror getSupportedType(AnnotationValue oneValidatorClassReference) {
+
+		TypeMirror validatorType = oneValidatorClassReference.accept(
+				new SimpleAnnotationValueVisitor6<TypeMirror, Void>() {
+
+					@Override
+					public TypeMirror visitType(TypeMirror t, Void p) {
+						return t;
+					}
+				}, null
+		);
+
+		// contains the bindings of the type parameters from the implemented
+		// ConstraintValidator interface, e.g. "ConstraintValidator<CheckCase, String>"
+		TypeMirror constraintValidatorImplementation = getConstraintValidatorSuperType( validatorType );
+
+		return constraintValidatorImplementation.accept(
+				new TypeKindVisitor6<TypeMirror, Void>() {
+
+					@Override
+					public TypeMirror visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
+						// 2nd type parameter contains the data type supported by current validator class, e.g. "String"
+						return constraintValidatorImplementation.getTypeArguments().get( 1 );
+					}
+
+				}, null
+		);
+	}
+
+	private TypeMirror getConstraintValidatorSuperType(TypeMirror type) {
+
+		List<? extends TypeMirror> superTypes = typeUtils.directSupertypes( type );
+		List<TypeMirror> nextSuperTypes = CollectionHelper.newArrayList();
+
+		//follow the type hierarchy upwards, until we have found the ConstraintValidator IF
+		while ( !superTypes.isEmpty() ) {
+
+			for ( TypeMirror oneSuperType : superTypes ) {
+				if ( getName( typeUtils.asElement( oneSuperType ) ).contentEquals( BeanValidationTypes.CONSTRAINT_VALIDATOR ) ) {
+					return oneSuperType;
+				}
+
+				nextSuperTypes.addAll( typeUtils.directSupertypes( oneSuperType ) );
+			}
+
+			superTypes = nextSuperTypes;
+			nextSuperTypes = CollectionHelper.newArrayList();
+		}
+
+		//HV-293: Actually this should never happen, as we can have only ConstraintValidator implementations
+		//here. The Eclipse JSR 269 implementation unfortunately doesn't always create the type hierarchy 
+		//properly though.
+		//TODO GM: create and report an isolated test case
+		throw new IllegalStateException( "Expected type " + type + " to implement javax.validation.ConstraintValidator, but it doesn't." );
+	}
+
+	/**
+	 * Retrieves the {@code @Constraint} meta-annotation from the given
+	 * constraint annotation.
+	 *
+	 * @param annotationType A constraint type.
+	 *
+	 * @return The Constraint meta-annotation.
+	 *
+	 * @throws IllegalArgumentException If the given constraint annotation type isn't annotated with
+	 * the {@code @Constraint} meta-annotation.
+	 */
+	private AnnotationMirror getConstraintMetaAnnotation(DeclaredType annotationType) {
+
+		List<? extends AnnotationMirror> annotationMirrors = annotationType.asElement().getAnnotationMirrors();
+
+		AnnotationMirror constraintMetaAnnotation = annotationApiHelper.getMirror(
+				annotationMirrors, BeanValidationTypes.CONSTRAINT
+		);
+
+		if ( constraintMetaAnnotation == null ) {
+			throw new IllegalArgumentException( "Given type " + annotationType + " isn't a constraint annotation type." );
+		}
+
+		return constraintMetaAnnotation;
+	}
+
+	private List<? extends AnnotationValue> getValidatorClassesFromConstraintMetaAnnotation(AnnotationMirror constraintMetaAnnotation) {
+
+		AnnotationValue validatedBy = annotationApiHelper.getAnnotationValue( constraintMetaAnnotation, "validatedBy" );
+
+		return validatedBy.accept(
+				new SimpleAnnotationValueVisitor6<List<? extends AnnotationValue>, Void>() {
+
+					@Override
+					public List<? extends AnnotationValue> visitArray(List<? extends AnnotationValue> values, Void p) {
+						return values;
+					}
+
+				}, null
+		);
+	}
+
+	/**
+	 * Returns a set containing those types from the given set of types to which
+	 * the given type is assignable. If the given type can be assigned to
+	 * multiple types from the same inheritance hierarchy (e.g. Collection and
+	 * Set), only the "lowest" one (e.g. Set) will be part of the result.
+	 *
+	 * @param types The types to check.
+	 * @param type The type to check.
+	 *
+	 * @return A set containing those types from the given set of types to which
+	 *         the given type is assignable.
+	 */
+	private Set<TypeMirror> getAssignableTypes(Set<TypeMirror> types, TypeMirror type) {
+
+		Set<TypeMirror> theValue = CollectionHelper.newHashSet();
+
+		for ( TypeMirror supportedType : types ) {
+			if ( typeUtils.isAssignable( type, supportedType ) ) {
+				theValue.add( supportedType );
+			}
+		}
+
+		return annotationApiHelper.keepLowestTypePerHierarchy( theValue );
+	}
+
+	private void registerAllowedTypesForBuiltInConstraint(String annotationType, Class<?>... types) {
+		registerAllowedTypesForBuiltInConstraint( annotationType, asMirrors( types ) );
+	}
+
+	private void registerAllowedTypesForBuiltInConstraint(String annotationType, String... typeNames) {
+		registerAllowedTypesForBuiltInConstraint( annotationType, asMirrors( typeNames ) );
+	}
+
+	private void registerAllowedTypesForBuiltInConstraint(String annotationType, List<TypeMirror> supportedTypes) {
+
+		DeclaredType annotation = annotationApiHelper.getDeclaredTypeByName( annotationType );
+
+		if ( annotation == null ) {
+			return;
+		}
+		Name key = getName( annotation );
+		Set<TypeMirror> types = supportedTypesByConstraint.get( key );
+
+		if ( types == null ) {
+			supportedTypesByConstraint.put( key, new HashSet<TypeMirror>( supportedTypes ) );
+		}
+		else {
+			types.addAll( supportedTypes );
+		}
+	}
+
+	private Name getName(DeclaredType type) {
+		return getName( type.asElement() );
+	}
+
+	private Name getName(Element element) {
+		if ( element.getKind() == ElementKind.CLASS || element.getKind() == ElementKind.INTERFACE || element.getKind() == ElementKind.ANNOTATION_TYPE ) {
+			return ( (TypeElement) element ).getQualifiedName();
+		}
+		else {
+			return element.getSimpleName();
+		}
+	}
+
+	private Set<AnnotationMirror> getComposingConstraints(DeclaredType constraintAnnotationType) {
+
+		Name key = getName( constraintAnnotationType );
+
+		Set<AnnotationMirror> composingConstraints = composingConstraintsByConstraints.get( key );
+
+		if( composingConstraints != null ) {
+			return composingConstraints;
+		}
+
+		composingConstraints = CollectionHelper.newHashSet();
+
+		List<? extends AnnotationMirror> annotationMirrors = constraintAnnotationType.asElement()
+				.getAnnotationMirrors();
+
+		for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {
+
+			AnnotationType annotationType = getAnnotationType(oneAnnotationMirror);
+
+			if ( annotationType == AnnotationType.CONSTRAINT_ANNOTATION ) {
+				composingConstraints.add( oneAnnotationMirror );
+			}
+			else if ( annotationType == AnnotationType.MULTI_VALUED_CONSTRAINT_ANNOTATION ) {
+				List<? extends AnnotationValue> value = annotationApiHelper.getAnnotationArrayValue(
+						oneAnnotationMirror,
+						"value"
+				);
+				for ( AnnotationValue annotationValue : value ) {
+					composingConstraints.add( (AnnotationMirror) annotationValue );
+				}
+			}
+		}
+
+		composingConstraintsByConstraints.put( key, composingConstraints );
+
+		return composingConstraints;
+	}
+
+	private List<TypeMirror> asMirrors(Class<?>... types) {
+
+		List<TypeMirror> mirrors = new ArrayList<TypeMirror>( types.length );
+
+		for ( Class<?> oneType : types ) {
+
+			TypeMirror oneMirror = annotationApiHelper.getMirrorForType( oneType );
+
+			if ( oneMirror != null ) {
+				mirrors.add( oneMirror );
+			}
+		}
+
+		return mirrors;
+	}
+
+	private List<TypeMirror> asMirrors(String... typeNames) {
+
+		List<TypeMirror> mirrors = new ArrayList<TypeMirror>( typeNames.length );
+
+		for ( String oneTypeName : typeNames ) {
+
+			TypeMirror oneMirror = annotationApiHelper.getDeclaredTypeByName( oneTypeName );
+
+			if ( oneMirror != null ) {
+				mirrors.add( oneMirror );
+			}
+		}
+
+		return mirrors;
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java
new file mode 100644
index 0000000..7144e27
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/MessagerAdapter.java
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+import java.util.Set;
+import javax.annotation.processing.Messager;
+import javax.tools.Diagnostic.Kind;
+
+import org.hibernate.validator.ap.checks.ConstraintCheckError;
+
+/**
+ * Wrapper around {@link Messager}, which adds the ability to format error messages using {@link MessageFormat}.
+ *
+ * @author Gunnar Morling
+ */
+public class MessagerAdapter {
+
+	/**
+	 * Contains the texts to be displayed.
+	 */
+	private final ResourceBundle errorMessages;
+
+	private final Messager messager;
+
+	/**
+	 * The kind of diagnostic to be used when reporting any problems.
+	 */
+	private Kind diagnosticKind;
+
+	/**
+	 * Creates a new MessagerAdapter.
+	 *
+	 * @param messager The underlying messager.
+	 * @param diagnosticKind The kind with which messages shall be reported.
+	 */
+	public MessagerAdapter(Messager messager, Kind diagnosticKind) {
+
+		this.messager = messager;
+		this.diagnosticKind = diagnosticKind;
+
+		errorMessages = ResourceBundle.getBundle( "org.hibernate.validator.ap.ValidationProcessorMessages" );
+	}
+
+	/**
+	 * Returns the messager used by this adapter.
+	 *
+	 * @return The underlying messager.
+	 */
+	public Messager getDelegate() {
+		return messager;
+	}
+
+	/**
+	 * Reports the given errors against the underlying {@link Messager} using
+	 * the specified {@link Kind}.
+	 *
+	 * @param errors A set with errors to report. May be empty but must not be
+	 * null.
+	 */
+	public void reportErrors(Set<ConstraintCheckError> errors) {
+		for ( ConstraintCheckError oneError : errors ) {
+			reportError( oneError );
+		}
+	}
+
+	/**
+	 * Reports the given error. Message parameters will be put into the template
+	 * retrieved from the resource bundle if applicable.
+	 *
+	 * @param error The error to report.
+	 */
+	private void reportError(ConstraintCheckError error) {
+
+		String message = errorMessages.getString( error.getMessageKey() );
+
+		if ( error.getMessageParameters() != null ) {
+			message = MessageFormat.format( message, error.getMessageParameters() );
+		}
+
+		messager.printMessage(
+				diagnosticKind, message, error.getElement(), error.getAnnotationMirror()
+		);
+	}
+
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/TypeNames.java b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/TypeNames.java
new file mode 100644
index 0000000..c4544d7
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/TypeNames.java
@@ -0,0 +1,80 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+/**
+ * Contains the fully-qualified names of types used by the annotation processor
+ * which are accessed only via the mirror API in order to avoid references to
+ * the actual class objects.
+ *
+ * @author Gunnar Morling
+ */
+public class TypeNames {
+
+	public static class BeanValidationTypes {
+
+		public static final String JAVAX_VALIDATION = "javax.validation";
+
+		public static final String CONSTRAINT = JAVAX_VALIDATION + ".Constraint";
+		public static final String CONSTRAINT_VALIDATOR = JAVAX_VALIDATION + ".ConstraintValidator";
+		public static final String GROUP_SEQUENCE = JAVAX_VALIDATION + ".GroupSequence";
+		public static final String PAYLOAD = JAVAX_VALIDATION + ".Payload";
+		public static final String VALID = JAVAX_VALIDATION + ".Valid";
+
+		public static final String JAVAX_VALIDATION_CONSTRAINTS = "javax.validation.constraints";
+
+		public final static String ASSERT_FALSE = JAVAX_VALIDATION_CONSTRAINTS + ".AssertFalse";
+		public final static String ASSERT_TRUE = JAVAX_VALIDATION_CONSTRAINTS + ".AssertTrue";
+		public final static String DECIMAL_MAX = JAVAX_VALIDATION_CONSTRAINTS + ".DecimalMax";
+		public final static String DECIMAL_MIN = JAVAX_VALIDATION_CONSTRAINTS + ".DecimalMin";
+		public final static String DIGITS = JAVAX_VALIDATION_CONSTRAINTS + ".Digits";
+		public final static String FUTURE = JAVAX_VALIDATION_CONSTRAINTS + ".Future";
+		public final static String MAX = JAVAX_VALIDATION_CONSTRAINTS + ".Max";
+		public final static String MIN = JAVAX_VALIDATION_CONSTRAINTS + ".Min";
+		public final static String NOT_NULL = JAVAX_VALIDATION_CONSTRAINTS + ".NotNull";
+		public final static String NULL = JAVAX_VALIDATION_CONSTRAINTS + ".Null";
+		public final static String PAST = JAVAX_VALIDATION_CONSTRAINTS + ".Past";
+		public final static String PATTERN = JAVAX_VALIDATION_CONSTRAINTS + ".Pattern";
+		public final static String SIZE = JAVAX_VALIDATION_CONSTRAINTS + ".Size";
+	}
+
+	public static class HibernateValidatorTypes {
+
+		private static final String ORG_HIBERNATE_VALIDATOR_GROUP = "org.hibernate.validator.group";
+
+		public final static String GROUP_SEQUENCE_PROVIDER = ORG_HIBERNATE_VALIDATOR_GROUP + ".GroupSequenceProvider";
+		public final static String DEFAULT_GROUP_SEQUENCE_PROVIDER = ORG_HIBERNATE_VALIDATOR_GROUP + ".DefaultGroupSequenceProvider";
+
+		private static final String ORG_HIBERNATE_VALIDATOR_CONSTRAINTS = "org.hibernate.validator.constraints";
+
+		public final static String EMAIL = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".Email";
+		public final static String LENGTH = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".Length";
+		public final static String MOD_CHECK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".ModCheck";
+		public final static String NOT_BLANK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".NotBlank";
+		public final static String SAFE_HTML = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".SafeHtml";
+		public final static String SCRIPT_ASSERT = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".ScriptAssert";
+		public final static String URL = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".URL";
+	}
+
+	public static class JodaTypes {
+
+		private static final String ORG_JODA_TIME = "org.joda.time";
+
+		public final static String READABLE_PARTIAL = ORG_JODA_TIME + ".ReadablePartial";
+		public final static String READABLE_INSTANT = ORG_JODA_TIME + ".ReadableInstant";
+	}
+}
diff --git a/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/package.html b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/package.html
new file mode 100644
index 0000000..eb04eef
--- /dev/null
+++ b/project/annotation-processor/src/main/java/org/hibernate/validator/ap/util/package.html
@@ -0,0 +1,24 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>This package contains helper classes.</p>
+</body>
+</html>
diff --git a/hibernate-validator-annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/project/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hibernate-validator-annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
rename to project/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
diff --git a/project/annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties b/project/annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties
new file mode 100644
index 0000000..36fe35f
--- /dev/null
+++ b/project/annotation-processor/src/main/resources/org/hibernate/validator/ap/ValidationProcessorMessages.properties
@@ -0,0 +1,28 @@
+# Contains error messages to be used by the ConstraintValidationProcessor.
+
+ONLY_GETTERS_MAY_BE_ANNOTATED=Constraint annotations must not be specified at methods, which are no valid JavaBeans getter methods.
+NOT_SUPPORTED_TYPE=The annotation @{0} is disallowed for this data type.
+NOT_SUPPORTED_RETURN_TYPE=The annotation @{0} is disallowed for the return type of this method.
+ONLY_CONSTRAINT_ANNOTATIONS_MAY_BE_ANNOTATED=Constraint annotations must not be specified at annotation types, which are no constraint annotation types themselves.
+STATIC_METHODS_MAY_NOT_BE_ANNOTATED=Only non-static methods may be annotated with constraint annotations.
+STATIC_FIELDS_MAY_NOT_BE_ANNOTATED=Only non-static fields may be annotated with constraint annotations.
+INVALID_DIAGNOSTIC_KIND_GIVEN=The given value {0} is no valid diagnostic kind. Kind.ERROR will be used.
+ATVALID_NOT_ALLOWED_AT_PRIMITIVE_FIELD=Fields of a primitive type must not annotated with @Valid.
+ATVALID_NOT_ALLOWED_AT_METHOD_RETURNING_PRIMITIVE_TYPE=Methods returning a primitive type must not annotated with @Valid.
+CONSTRAINT_TYPE_WITH_MISSING_OR_WRONG_RETENTION=Constraint annotation types must be annotated with @Retention(RUNTIME).
+CONSTRAINT_TYPE_WITH_WRONG_TARGET=Constraint annotation types must have at least one of the element types FIELD, METHOD, TYPE or ANNOTATION_TYPE as target.
+CONSTRAINT_TYPE_WITHOUT_VALIDATOR=For non-composed constraints a validator implementation must be specified using @Constraint#validatedBy().
+CONSTRAINT_TYPE_MUST_DECLARE_MESSAGE_MEMBER=Constraint annotation types must declare a member 'String message()'.
+RETURN_TYPE_MUST_BE_STRING=Return type of constraint annotation type member 'message()' must be 'String'.
+CONSTRAINT_TYPE_MUST_DECLARE_GROUPS_MEMBER=Constraint annotation types must declare a member 'Class<?>[] groups() default {}'.
+RETURN_TYPE_MUST_BE_CLASS_ARRAY=Return type of constraint annotation type member 'groups()' must be 'Class<?>[]'.
+DEFAULT_VALUE_MUST_BE_EMPTY_ARRAY=Default value of the 'groups()' member must be an empty array.
+CONSTRAINT_TYPE_MUST_DECLARE_PAYLOAD_MEMBER=Constraint annotation types must declare a member 'Class<? extends Payload>[] payload() default {}'.
+PAYLOAD_RETURN_TYPE_MUST_BE_CLASS_ARRAY=Return type of constraint annotation type member 'payload()' must be 'Class<? extends Payload>[]'.
+PAYLOAD_DEFAULT_VALUE_MUST_BE_EMPTY_ARRAY=Default value of the 'payload()' member must be an empty array.
+GROUP_SEQUENCE_PROVIDER_ANNOTATION_MUST_BE_DEFINED_ON_A_CLASS=The annotation @GroupSequenceProvider must be defined on a class.
+GROUP_SEQUENCE_PROVIDER_ANNOTATION_NOT_ALLOWED_ON_CLASS_WITH_GROUP_SEQUENCE_ANNOTATION=The annotation @GroupSequenceProvider cannot be defined on class annotated with @GroupSequence.
+GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_MUST_BE_AN_IMPLEMENTATION_CLASS=The annotation @GroupSequenceProvider must define an implementation or a concrete implementation of DefaultGroupSequenceProvider interface.
+GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_DEFINED_PROVIDER_CLASS_WITH_WRONG_TYPE=The annotation @GroupSequenceProvider defines a default group sequence provider for type {0} instead of {1} (super)type.
+GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_CLASS_MUST_HAVE_DEFAULT_CONSTRUCTOR=The annotation @GroupSequenceProvider defines a default group sequence provider class without a public default constructor.
+ONLY_NON_VOID_METHODS_MAY_BE_ANNOTATED=Void methods may not be annotated with constraint annotations.
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/AnnotationTypeValidationTest.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/AnnotationTypeValidationTest.java
new file mode 100644
index 0000000..6844200
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/AnnotationTypeValidationTest.java
@@ -0,0 +1,168 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap;
+
+import java.io.File;
+import javax.tools.Diagnostic.Kind;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithIllegalRetentionPolicies;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithIllegalTargets;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithWrongGroupsAttribute;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithWrongMessageAttribute;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithWrongPayloadAttribute;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ConstraintsWithoutValidator;
+import org.hibernate.validator.ap.testmodel.constrainttypes.DummyValidator;
+import org.hibernate.validator.ap.testmodel.constrainttypes.ValidCustomerNumber;
+import org.hibernate.validator.ap.util.DiagnosticExpectation;
+
+import static org.hibernate.validator.ap.testutil.CompilerTestHelper.assertThatDiagnosticsMatch;
+import static org.testng.Assert.assertFalse;
+
+/**
+ * Test cases for {@link ConstraintValidationProcessor} testing the checking of constraint
+ * annotation type declarations.
+ *
+ * @author Gunnar Morling
+ */
+public class AnnotationTypeValidationTest extends ConstraintValidationProcessorTestBase {
+
+	@Test
+	public void testThatSpecifyingConstraintAnnotationAtNonConstraintAnnotationTypeCausesCompilationError() {
+
+		File sourceFile = compilerHelper.getSourceFile( ValidCustomerNumber.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics, new DiagnosticExpectation( Kind.ERROR, 27 ), new DiagnosticExpectation( Kind.ERROR, 28 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithWrongRetentionPolicyCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithIllegalRetentionPolicies.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 33 ), new DiagnosticExpectation( Kind.ERROR, 48 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithWrongTargetCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithIllegalTargets.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 42 ), new DiagnosticExpectation( Kind.ERROR, 58 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithoutValidatorCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithoutValidator.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 34 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithMissingOrWrongMessageAttributeCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithWrongMessageAttribute.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 34 ), new DiagnosticExpectation( Kind.ERROR, 49 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithMissingOrWrongGroupsAttributeCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithWrongGroupsAttribute.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 34 ),
+				new DiagnosticExpectation( Kind.ERROR, 51 ),
+				new DiagnosticExpectation( Kind.ERROR, 66 ),
+				new DiagnosticExpectation( Kind.ERROR, 81 ),
+				new DiagnosticExpectation( Kind.ERROR, 96 ),
+				new DiagnosticExpectation( Kind.ERROR, 111 ),
+				new DiagnosticExpectation( Kind.ERROR, 126 )
+		);
+	}
+
+	@Test
+	public void testThatConstraintAnnotationTypeWithMissingOrPayloadGroupsAttributeCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ConstraintsWithWrongPayloadAttribute.class );
+		File sourceFile2 = compilerHelper.getSourceFile( DummyValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 34 ),
+				new DiagnosticExpectation( Kind.ERROR, 52 ),
+				new DiagnosticExpectation( Kind.ERROR, 67 ),
+				new DiagnosticExpectation( Kind.ERROR, 82 ),
+				new DiagnosticExpectation( Kind.ERROR, 97 ),
+				new DiagnosticExpectation( Kind.ERROR, 112 ),
+				new DiagnosticExpectation( Kind.ERROR, 127 ),
+				new DiagnosticExpectation( Kind.ERROR, 142 )
+		);
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java
new file mode 100644
index 0000000..a14ab5b
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTest.java
@@ -0,0 +1,538 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap;
+
+import java.io.File;
+import java.util.EnumSet;
+import javax.tools.Diagnostic;
+import javax.tools.Diagnostic.Kind;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.ap.testmodel.FieldLevelValidationUsingBuiltInConstraints;
+import org.hibernate.validator.ap.testmodel.MethodLevelValidationUsingBuiltInConstraints;
+import org.hibernate.validator.ap.testmodel.ModelWithDateConstraints;
+import org.hibernate.validator.ap.testmodel.ModelWithJodaTypes;
+import org.hibernate.validator.ap.testmodel.ModelWithoutConstraints;
+import org.hibernate.validator.ap.testmodel.MultipleConstraintsOfSameType;
+import org.hibernate.validator.ap.testmodel.ValidationUsingAtValidAnnotation;
+import org.hibernate.validator.ap.testmodel.boxing.ValidLong;
+import org.hibernate.validator.ap.testmodel.boxing.ValidLongValidator;
+import org.hibernate.validator.ap.testmodel.boxing.ValidationUsingBoxing;
+import org.hibernate.validator.ap.testmodel.classlevelconstraints.ClassLevelValidation;
+import org.hibernate.validator.ap.testmodel.classlevelconstraints.ValidCustomer;
+import org.hibernate.validator.ap.testmodel.classlevelconstraints.ValidCustomerValidator;
+import org.hibernate.validator.ap.testmodel.composedconstraint.FieldLevelValidationUsingComposedConstraint;
+import org.hibernate.validator.ap.testmodel.composedconstraint.ValidOrderNumber;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposedConstraint;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForGregorianCalendar;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForList;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint1ValidatorForString;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForArrayList;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForCalendar;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.ComposingConstraint2ValidatorForCollection;
+import org.hibernate.validator.ap.testmodel.composedconstraint2.FieldLevelValidationUsingComplexComposedConstraint;
+import org.hibernate.validator.ap.testmodel.customconstraints.CaseMode;
+import org.hibernate.validator.ap.testmodel.customconstraints.CheckCase;
+import org.hibernate.validator.ap.testmodel.customconstraints.CheckCaseValidator;
+import org.hibernate.validator.ap.testmodel.customconstraints.FieldLevelValidationUsingCustomConstraints;
+import org.hibernate.validator.ap.testmodel.customconstraints.HibernateValidatorProvidedCustomConstraints;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.BazDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.FooBarBazDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.FooBarDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.FooDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.QuxDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.groupsequenceprovider.SampleDefaultGroupSequenceProvider;
+import org.hibernate.validator.ap.testmodel.inheritedvalidator.AbstractCustomConstraintValidator;
+import org.hibernate.validator.ap.testmodel.inheritedvalidator.CustomConstraint;
+import org.hibernate.validator.ap.testmodel.inheritedvalidator.CustomConstraintValidator;
+import org.hibernate.validator.ap.testmodel.inheritedvalidator.FieldLevelValidationUsingInheritedValidator;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.NoUniqueValidatorResolution;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SerializableCollection;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.Size;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForCollection;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForSerializable;
+import org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution.SizeValidatorForSet;
+import org.hibernate.validator.ap.testutil.CompilerTestHelper.Library;
+import org.hibernate.validator.ap.util.DiagnosticExpectation;
+
+import static org.hibernate.validator.ap.testutil.CompilerTestHelper.assertThatDiagnosticsMatch;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Miscellaneous tests for {@link ConstraintValidationProcessor}.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ConstraintValidationProcessorTest extends ConstraintValidationProcessorTestBase {
+
+	@Test
+	public void fieldLevelValidationUsingBuiltInConstraints() {
+
+		File sourceFile = compilerHelper.getSourceFile( FieldLevelValidationUsingBuiltInConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics, new DiagnosticExpectation( Kind.ERROR, 53 ), new DiagnosticExpectation( Kind.ERROR, 59 )
+		);
+	}
+
+	/**
+	 * HV-567
+	 */
+	@Test
+	public void hibernateValidatorProvidedCustomConstraints() {
+
+		File sourceFile = compilerHelper.getSourceFile( HibernateValidatorProvidedCustomConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 58 ),
+				new DiagnosticExpectation( Kind.ERROR, 59 ),
+				new DiagnosticExpectation( Kind.ERROR, 60 ),
+				new DiagnosticExpectation( Kind.ERROR, 61 ),
+				new DiagnosticExpectation( Kind.ERROR, 62 ),
+				new DiagnosticExpectation( Kind.ERROR, 63 ),
+				new DiagnosticExpectation( Kind.ERROR, 64 ),
+				new DiagnosticExpectation( Kind.ERROR, 65 ),
+				new DiagnosticExpectation( Kind.ERROR, 66 ),
+				new DiagnosticExpectation( Kind.ERROR, 67 ),
+				new DiagnosticExpectation( Kind.ERROR, 68 ),
+				new DiagnosticExpectation( Kind.ERROR, 69 )
+		);
+	}
+
+	/**
+	 * HV-575. Make sure that the AP can be applied to projects which don't have
+	 * the BV API or Hibernate Validator on the class path without failing.
+	 */
+	@Test
+	public void modelWithoutConstraintsCanBeProcessedWithoutBvAndHvOnClassPath() {
+
+		File sourceFile = compilerHelper.getSourceFile( ModelWithoutConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						EnumSet.noneOf( Library.class ),
+						sourceFile
+				);
+
+		assertTrue( compilationResult );
+	}
+
+	/**
+	 * HV-575. Make sure that @Past/@Future can be validated for JDK types, also
+	 * if JodaTime isn't available.
+	 */
+	@Test
+	public void modelWithDateConstraintsCanBeProcessedWithoutJodaTimeOnClassPath() {
+
+		File sourceFile = compilerHelper.getSourceFile( ModelWithDateConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						EnumSet.of( Library.VALIDATION_API ),
+						sourceFile
+				);
+
+		assertFalse( compilationResult );
+
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 27 )
+		);
+	}
+
+	/**
+	 * HV-575. Missing classes shall not break the AP, instead the compiler
+	 * should display appropriate errors.
+	 */
+	@Test
+	public void missingClassesHandledByCompiler() {
+
+		File sourceFile = compilerHelper.getSourceFile( ModelWithDateConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						EnumSet.noneOf( Library.class ),
+						sourceFile
+				);
+
+		assertFalse( compilationResult );
+
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 20 ),
+				new DiagnosticExpectation( Kind.ERROR, 27 ),
+				new DiagnosticExpectation( Kind.ERROR, 30 )
+		);
+	}
+
+	@Test
+	public void testThatProcessorOptionsAreEvaluated() {
+
+		File sourceFile = compilerHelper.getSourceFile( FieldLevelValidationUsingBuiltInConstraints.class );
+
+		// compile with -AdiagnosticKind=Kind.WARNING and -Averbose=true
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						Kind.WARNING,
+						true,
+						false,
+						EnumSet.allOf( Library.class ),
+						sourceFile
+				);
+
+		// compilation succeeds as there are problems, but Kind.WARNING won't stop compilation
+		assertTrue( compilationResult );
+
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.NOTE, Diagnostic.NOPOS ), //says that verbose messaging is enabled
+				new DiagnosticExpectation( Kind.WARNING, 53 ),
+				new DiagnosticExpectation( Kind.WARNING, 59 )
+		);
+	}
+
+	@Test
+	public void fieldLevelValidationUsingCustomConstraints() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingCustomConstraints.class );
+		File sourceFile2 = compilerHelper.getSourceFile( CheckCase.class );
+		File sourceFile3 = compilerHelper.getSourceFile( CaseMode.class );
+		File sourceFile4 = compilerHelper.getSourceFile( CheckCaseValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						sourceFile1,
+						sourceFile2,
+						sourceFile3,
+						sourceFile4
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 29 ) );
+	}
+
+	@Test
+	public void testThatInheritedValidatorClassesAreHandledCorrectly() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingInheritedValidator.class );
+		File sourceFile2 = compilerHelper.getSourceFile( CustomConstraint.class );
+		File sourceFile3 = compilerHelper.getSourceFile( AbstractCustomConstraintValidator.class );
+		File sourceFile4 = compilerHelper.getSourceFile( CustomConstraintValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						sourceFile1,
+						sourceFile2,
+						sourceFile3,
+						sourceFile4
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 29 ) );
+	}
+
+	@Test
+	public void methodLevelValidationUsingBuiltInConstraints() {
+
+		File sourceFile = compilerHelper.getSourceFile( MethodLevelValidationUsingBuiltInConstraints.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, false, false, sourceFile );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 31 ),
+				new DiagnosticExpectation( Kind.ERROR, 38 ),
+				new DiagnosticExpectation( Kind.ERROR, 46 ),
+				new DiagnosticExpectation( Kind.ERROR, 53 ),
+				new DiagnosticExpectation( Kind.ERROR, 61 ),
+				new DiagnosticExpectation( Kind.ERROR, 69 ),
+				new DiagnosticExpectation( Kind.ERROR, 77 ),
+				new DiagnosticExpectation( Kind.ERROR, 84 )
+		);
+	}
+
+	/**
+	 * Constraints are allowed at non-getters per processor option, but all other
+	 * checks (no static methods allowed etc.) still apply.
+	 */
+	@Test
+	public void methodLevelConstraintsAllowedAtNonGetterMethods() {
+
+		File sourceFile = compilerHelper.getSourceFile( MethodLevelValidationUsingBuiltInConstraints.class );
+
+		//compile with -AmethodConstraintsSupported
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, false, true, sourceFile );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 31 ),
+				new DiagnosticExpectation( Kind.ERROR, 38 ),
+				new DiagnosticExpectation( Kind.ERROR, 46 ),
+				new DiagnosticExpectation( Kind.ERROR, 53 ),
+				new DiagnosticExpectation( Kind.ERROR, 69 ),
+				new DiagnosticExpectation( Kind.ERROR, 77 ),
+				new DiagnosticExpectation( Kind.ERROR, 84 )
+		);
+	}
+
+	@Test
+	public void classLevelValidation() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ClassLevelValidation.class );
+		File sourceFile2 = compilerHelper.getSourceFile( ValidCustomer.class );
+		File sourceFile3 = compilerHelper.getSourceFile( ValidCustomerValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2, sourceFile3
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 27 ) );
+	}
+
+	@Test
+	public void validationUsingComposedConstraint() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingComposedConstraint.class );
+		File sourceFile2 = compilerHelper.getSourceFile( ValidOrderNumber.class );
+
+		boolean compilationResult =
+				compilerHelper.compile( new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2 );
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch( diagnostics, new DiagnosticExpectation( Kind.ERROR, 28 ) );
+	}
+
+	@Test
+	public void validationUsingComplexComposedConstraint() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( FieldLevelValidationUsingComplexComposedConstraint.class );
+		File sourceFile2 = compilerHelper.getSourceFile( ComposedConstraint.class );
+		File sourceFile3 = compilerHelper.getSourceFile( ComposingConstraint1.class );
+		File sourceFile4 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForString.class );
+		File sourceFile5 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForGregorianCalendar.class );
+		File sourceFile6 = compilerHelper.getSourceFile( ComposingConstraint1ValidatorForList.class );
+		File sourceFile7 = compilerHelper.getSourceFile( ComposingConstraint2.class );
+		File sourceFile8 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForArrayList.class );
+		File sourceFile9 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForCalendar.class );
+		File sourceFile10 = compilerHelper.getSourceFile( ComposingConstraint2ValidatorForCollection.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						sourceFile1,
+						sourceFile2,
+						sourceFile3,
+						sourceFile4,
+						sourceFile5,
+						sourceFile6,
+						sourceFile7,
+						sourceFile8,
+						sourceFile9,
+						sourceFile10
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 28 ),
+				new DiagnosticExpectation( Kind.ERROR, 40 ),
+				new DiagnosticExpectation( Kind.ERROR, 49 ),
+				new DiagnosticExpectation( Kind.ERROR, 55 )
+		);
+	}
+
+	@Test
+	public void validationUsingBoxing() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ValidationUsingBoxing.class );
+		File sourceFile2 = compilerHelper.getSourceFile( ValidLong.class );
+		File sourceFile3 = compilerHelper.getSourceFile( ValidLongValidator.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(), diagnostics, sourceFile1, sourceFile2, sourceFile3
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 30 ),
+				new DiagnosticExpectation( Kind.ERROR, 36 ),
+				new DiagnosticExpectation( Kind.ERROR, 42 ),
+				new DiagnosticExpectation( Kind.ERROR, 58 ),
+				new DiagnosticExpectation( Kind.ERROR, 66 )
+		);
+	}
+
+	@Test
+	public void testThatNonUniqueValidatorResolutionCausesCompilationError() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( NoUniqueValidatorResolution.class );
+		File sourceFile2 = compilerHelper.getSourceFile( Size.class );
+		File sourceFile3 = compilerHelper.getSourceFile( SizeValidatorForCollection.class );
+		File sourceFile4 = compilerHelper.getSourceFile( SizeValidatorForSerializable.class );
+		File sourceFile5 = compilerHelper.getSourceFile( SerializableCollection.class );
+		File sourceFile6 = compilerHelper.getSourceFile( SizeValidatorForSet.class );
+
+		boolean compilationResult =
+				compilerHelper.compile(
+						new ConstraintValidationProcessor(),
+						diagnostics,
+						sourceFile1,
+						sourceFile2,
+						sourceFile3,
+						sourceFile4,
+						sourceFile5,
+						sourceFile6
+				);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics, new DiagnosticExpectation(
+				Kind.ERROR, 32
+		)
+		);
+	}
+
+	@Test
+	public void testThatMultiValuedConstrainedIsOnlyGivenAtSupportedType() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( MultipleConstraintsOfSameType.class );
+
+		boolean compilationResult = compilerHelper.compile(
+				new ConstraintValidationProcessor(), diagnostics, sourceFile1
+		);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 32 ),
+				new DiagnosticExpectation( Kind.ERROR, 32 )
+		);
+	}
+
+	@Test
+	public void testThatAtValidAnnotationGivenAtNotSupportedTypesCausesCompilationErrors() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ValidationUsingAtValidAnnotation.class );
+
+		boolean compilationResult = compilerHelper.compile(
+				new ConstraintValidationProcessor(), diagnostics, false, false, sourceFile1
+		);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 33 ),
+				new DiagnosticExpectation( Kind.ERROR, 39 ),
+				new DiagnosticExpectation( Kind.ERROR, 55 ),
+				new DiagnosticExpectation( Kind.ERROR, 63 ),
+				new DiagnosticExpectation( Kind.ERROR, 71 ),
+				new DiagnosticExpectation( Kind.ERROR, 79 ),
+				new DiagnosticExpectation( Kind.ERROR, 87 )
+		);
+	}
+
+	@Test
+	public void groupSequenceProvider() {
+		File sourceFile1 = compilerHelper.getSourceFile( GroupSequenceProviderDefinition.class );
+		File sourceFile2 = compilerHelper.getSourceFile( BazDefaultGroupSequenceProvider.class );
+		File sourceFile3 = compilerHelper.getSourceFile( FooDefaultGroupSequenceProvider.class );
+		File sourceFile4 = compilerHelper.getSourceFile( QuxDefaultGroupSequenceProvider.class );
+		File sourceFile5 = compilerHelper.getSourceFile( SampleDefaultGroupSequenceProvider.class );
+		File sourceFile6 = compilerHelper.getSourceFile( FooBarDefaultGroupSequenceProvider.class );
+		File sourceFile7 = compilerHelper.getSourceFile( FooBarBazDefaultGroupSequenceProvider.class );
+
+		boolean compilationResult = compilerHelper.compile(
+				new ConstraintValidationProcessor(),
+				diagnostics,
+				sourceFile1,
+				sourceFile2,
+				sourceFile3,
+				sourceFile4,
+				sourceFile5,
+				sourceFile6,
+				sourceFile7
+		);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 35 ),
+				new DiagnosticExpectation( Kind.ERROR, 44 ),
+				new DiagnosticExpectation( Kind.ERROR, 52 ),
+				new DiagnosticExpectation( Kind.ERROR, 60 ),
+				new DiagnosticExpectation( Kind.ERROR, 68 ),
+				new DiagnosticExpectation( Kind.ERROR, 76 )
+		);
+	}
+
+	/**
+	 * HV-418: No error shall be raised, when @Past/@Future are given at Joda
+	 * date/time types.
+	 */
+	@Test()
+	public void timeConstraintsAllowedAtJodaTypes() {
+
+		File sourceFile1 = compilerHelper.getSourceFile( ModelWithJodaTypes.class );
+
+		boolean compilationResult = compilerHelper.compile(
+				new ConstraintValidationProcessor(), diagnostics, sourceFile1
+		);
+
+		assertFalse( compilationResult );
+		assertThatDiagnosticsMatch(
+				diagnostics,
+				new DiagnosticExpectation( Kind.ERROR, 59 ),
+				new DiagnosticExpectation( Kind.ERROR, 60 )
+		);
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTestBase.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTestBase.java
new file mode 100644
index 0000000..65c74bf
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/ConstraintValidationProcessorTestBase.java
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap;
+
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaFileObject;
+import javax.tools.ToolProvider;
+
+import org.hibernate.validator.ap.testutil.CompilerTestHelper;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * Base class providing common functionality for all tests for the constraint validation processor using the Java compiler
+ * API as defined by JSR 199.
+ *
+ * @author Gunnar Morling
+ */
+public abstract class ConstraintValidationProcessorTestBase {
+
+	protected static CompilerTestHelper compilerHelper;
+
+	protected DiagnosticCollector<JavaFileObject> diagnostics;
+
+	@BeforeClass
+	public static void setUpCompilerHelper() {
+
+		compilerHelper =
+				new CompilerTestHelper( ToolProvider.getSystemJavaCompiler() );
+	}
+
+	@BeforeMethod
+	public void setUpDiagnostics() {
+		diagnostics = new DiagnosticCollector<JavaFileObject>();
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java
new file mode 100644
index 0000000..521cbf3
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/FieldLevelValidationUsingBuiltInConstraints.java
@@ -0,0 +1,70 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import javax.validation.constraints.Size;
+
+public class FieldLevelValidationUsingBuiltInConstraints {
+
+	@Size(min = 10)
+	public String string;
+
+	@Size(min = 10)
+	public Collection collection1;
+
+	@Size(min = 10)
+	public Collection<?> collection2;
+
+	@Size(min = 10)
+	public Collection<String> stringCollection;
+
+	/**
+	 * Allowed, as List extends Collection.
+	 */
+	@Size(min = 10)
+	public List list1;
+
+	@Size(min = 10)
+	public List<?> list2;
+
+	@Size(min = 10)
+	public List<String> stringList;
+
+	/**
+	 * Not allowed (unsupported type).
+	 */
+	@Size(min = 10)
+	public Date date;
+
+	/**
+	 * Not allowed (static field).
+	 */
+	@Size(min = 10)
+	public static String staticString;
+
+	@Size(min = 10)
+	public Object[] objectArray;
+
+	@Size(min = 10)
+	public Integer[] integerArray;
+
+	@Size(min = 10)
+	public int[] intArray;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java
new file mode 100644
index 0000000..1d21b25
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MethodLevelValidationUsingBuiltInConstraints.java
@@ -0,0 +1,89 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Date;
+import javax.validation.constraints.Size;
+
+public class MethodLevelValidationUsingBuiltInConstraints {
+	@Size(min = 10)
+	public String getString() {
+		return null;
+	}
+
+	/**
+	 * Not allowed. Method is no getter.
+	 */
+	@Size(min = 10)
+	public void setString() {
+	}
+
+	/**
+	 * Not allowed. Return type doesn't match.
+	 */
+	@Size(min = 10)
+	public Date getDate() {
+		return null;
+	}
+
+	/**
+	 * Not allowed. No return type.
+	 */
+	@Size(min = 10)
+	public void getAnotherString() {
+	}
+
+	/**
+	 * Not allowed. Static method.
+	 */
+	@Size(min = 10)
+	public static String getStringStatically() {
+		return null;
+	}
+
+	/**
+	 * No getter, but allowed with -AmethodConstraintsSupported.
+	 */
+	@Size(min = 10)
+	public String doSomething() {
+		return null;
+	}
+
+	/**
+	 * Also with -AmethodConstraintsSupported not allowed, as return type doesn't match.
+	 */
+	@Size(min = 10)
+	public Date doSomethingReturningDate() {
+		return null;
+	}
+
+	/**
+	 * Also with -AmethodConstraintsSupported not allowed. No return type.
+	 */
+	@Size(min = 10)
+	public void voidDoSomething() {
+	}
+
+	/**
+	 * Also with -AmethodConstraintsSupported not allowed. Static method.
+	 */
+	@Size(min = 10)
+	public static String staticDoSomething() {
+		return null;
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithDateConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithDateConstraints.java
new file mode 100644
index 0000000..9e97974
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithDateConstraints.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Date;
+import javax.validation.constraints.Past;
+
+public class ModelWithDateConstraints {
+
+	/**
+	 * Not allowed.
+	 */
+	@Past
+	public String string;
+
+	@Past
+	public Date date;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithJodaTypes.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithJodaTypes.java
new file mode 100644
index 0000000..64945de
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithJodaTypes.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Past;
+
+import org.joda.time.DateMidnight;
+import org.joda.time.LocalDate;
+import org.joda.time.ReadableInstant;
+import org.joda.time.ReadablePartial;
+
+public class ModelWithJodaTypes {
+
+	@Past
+	@Future
+	public Date jdkDate;
+	
+	@Past
+	@Future
+	public GregorianCalendar jdkCalendar;
+	
+	@Past
+	@Future
+	public ReadableInstant jodaInstant;
+
+	@Past
+	@Future
+	public DateMidnight jodaDateMidnight;
+	
+	@Past
+	@Future
+	public ReadablePartial jodaPartial;
+
+	@Past
+	@Future
+	public LocalDate jodaLocalDate;
+	
+	/**
+	 * Not allowed.
+	 */
+	@Future
+	@Past
+	public String string;
+	
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithoutConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithoutConstraints.java
new file mode 100644
index 0000000..11490ee
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ModelWithoutConstraints.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+public class ModelWithoutConstraints {
+
+	@SomeAnnotation
+	public String string;
+
+	private @interface SomeAnnotation {
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java
new file mode 100644
index 0000000..616dc48
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/MultipleConstraintsOfSameType.java
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Date;
+
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Pattern.List;
+
+public class MultipleConstraintsOfSameType {
+	
+	@List(value = { @Pattern(regexp = ""), @Pattern(regexp = "") })
+	public String string;
+
+	/**
+	 * Not allowed.
+	 */
+	@List(value = { @Pattern(regexp = ""), @Pattern(regexp = "") })
+	public Date date;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java
new file mode 100644
index 0000000..67b5432
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/ValidationUsingAtValidAnnotation.java
@@ -0,0 +1,90 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel;
+
+import java.util.Collection;
+import javax.validation.Valid;
+
+public class ValidationUsingAtValidAnnotation {
+
+	@Valid
+	public Integer integer;
+
+	@Valid
+	public Collection<?> collection1;
+
+	/**
+	 * Not allowed (primitive type).
+	 */
+	@Valid
+	public int primitiveInt;
+
+	/**
+	 * Not allowed (static field).
+	 */
+	@Valid
+	public static Integer staticInteger;
+
+	@Valid
+	public Integer getInteger() {
+		return null;
+	}
+
+	@Valid
+	public Collection<?> getCollection() {
+		return null;
+	}
+
+	/**
+	 * Not allowed (primitive type).
+	 */
+	@Valid
+	public int getPrimitiveInt() {
+		return 0;
+	}
+
+	/**
+	 * Not allowed (static field).
+	 */
+	@Valid
+	public static Integer getStaticInteger() {
+		return null;
+	}
+
+	/**
+	 * Not allowed (no getter).
+	 */
+	@Valid
+	public Collection<?> getCollectionWithParams(int i) {
+		return null;
+	}
+
+	/**
+	 * Not allowed (no getter).
+	 */
+	@Valid
+	public Collection<?> setCollection() {
+		return null;
+	}
+
+	/**
+	 * Not allowed (no getter).
+	 */
+	@Valid
+	public void getVoid() {
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java
new file mode 100644
index 0000000..a9cdeb7
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLong.java
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.boxing;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = ValidLongValidator.class)
+ at Documented
+public @interface ValidLong {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java
new file mode 100644
index 0000000..0a12568
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidLongValidator.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.boxing;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ValidLongValidator implements ConstraintValidator<ValidLong, Long> {
+	public void initialize(ValidLong constraintAnnotation) {
+	}
+
+	public boolean isValid(Long object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java
new file mode 100644
index 0000000..959d522
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/boxing/ValidationUsingBoxing.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.boxing;
+
+public class ValidationUsingBoxing {
+
+	@ValidLong
+	public long primitiveLongField;
+
+	@ValidLong
+	public Long longField;
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidLong
+	public int intField;
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidLong
+	public Integer integerField;
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidLong
+	public double doubleField;
+
+	@ValidLong
+	public long getPrimitiveLong() {
+		return 0;
+	}
+
+	@ValidLong
+	public Long getLong() {
+		return Long.MIN_VALUE;
+	}
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidLong
+	public int getInt() {
+		return 0;
+	}
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidLong
+	public Integer getInteger() {
+		return Integer.MIN_VALUE;
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java
new file mode 100644
index 0000000..93d740e
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ClassLevelValidation.java
@@ -0,0 +1,30 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.classlevelconstraints;
+
+public class ClassLevelValidation {
+	@ValidCustomer
+	public static class Customer {
+	}
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidCustomer
+	public static class Order {
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java
new file mode 100644
index 0000000..358469f
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomer.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.classlevelconstraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = ValidCustomerValidator.class)
+ at Documented
+public @interface ValidCustomer {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java
new file mode 100644
index 0000000..e9f1587
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/classlevelconstraints/ValidCustomerValidator.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.classlevelconstraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.ap.testmodel.classlevelconstraints.ClassLevelValidation.Customer;
+
+public class ValidCustomerValidator implements ConstraintValidator<ValidCustomer, Customer> {
+	public void initialize(ValidCustomer constraintAnnotation) {
+	}
+
+	public boolean isValid(Customer customer, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java
new file mode 100644
index 0000000..7ecd72d
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/FieldLevelValidationUsingComposedConstraint.java
@@ -0,0 +1,30 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint;
+
+import java.util.Date;
+
+public class FieldLevelValidationUsingComposedConstraint {
+	@ValidOrderNumber
+	public String string;
+
+	/**
+	 * Not allowed.
+	 */
+	@ValidOrderNumber
+	public Date date;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java
new file mode 100644
index 0000000..c6fcf10
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint/ValidOrderNumber.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at NotNull
+ at Size(min = 10, max = 10)
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at Documented
+public @interface ValidOrderNumber {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java
new file mode 100644
index 0000000..4684282
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposedConstraint.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at ComposingConstraint1
+ at ComposingConstraint2
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at Documented
+public @interface ComposedConstraint {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java
new file mode 100644
index 0000000..a5f481d
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = {
+		ComposingConstraint1ValidatorForList.class,
+		ComposingConstraint1ValidatorForString.class,
+		ComposingConstraint1ValidatorForGregorianCalendar.class
+})
+ at Documented
+public @interface ComposingConstraint1 {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java
new file mode 100644
index 0000000..2a1c1e4
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForGregorianCalendar.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.GregorianCalendar;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint1ValidatorForGregorianCalendar
+		implements ConstraintValidator<ComposingConstraint1, GregorianCalendar> {
+	public void initialize(ComposingConstraint1 constraintAnnotation) {
+	}
+
+	public boolean isValid(GregorianCalendar object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java
new file mode 100644
index 0000000..d4caffe
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForList.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.List;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint1ValidatorForList implements ConstraintValidator<ComposingConstraint1, List<?>> {
+	public void initialize(ComposingConstraint1 constraintAnnotation) {
+
+	}
+
+	public boolean isValid(List<?> object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java
new file mode 100644
index 0000000..1b8532b
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint1ValidatorForString.java
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint1ValidatorForString implements
+ConstraintValidator<ComposingConstraint1, String> {
+
+	
+
+	public void initialize(ComposingConstraint1 constraintAnnotation) {
+		
+	}
+
+	public boolean isValid(String object,
+			ConstraintValidatorContext constraintContext) {
+
+		return true;
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java
new file mode 100644
index 0000000..b424667
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = {
+		ComposingConstraint2ValidatorForArrayList.class,
+		ComposingConstraint2ValidatorForCalendar.class,
+		ComposingConstraint2ValidatorForCollection.class
+})
+ at Documented
+public @interface ComposingConstraint2 {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java
new file mode 100644
index 0000000..4779702
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForArrayList.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.ArrayList;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint2ValidatorForArrayList
+		implements ConstraintValidator<ComposingConstraint2, ArrayList<?>> {
+
+	public void initialize(ComposingConstraint2 constraintAnnotation) {
+	}
+
+	public boolean isValid(ArrayList<?> object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java
new file mode 100644
index 0000000..0c40118
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCalendar.java
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.Calendar;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint2ValidatorForCalendar implements
+ConstraintValidator<ComposingConstraint2, Calendar> {
+
+	public void initialize(ComposingConstraint2 constraintAnnotation) {
+		
+	}
+
+	public boolean isValid(Calendar object,
+			ConstraintValidatorContext constraintContext) {
+
+		return true;
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java
new file mode 100644
index 0000000..b9ecfb0
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/ComposingConstraint2ValidatorForCollection.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.Collection;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class ComposingConstraint2ValidatorForCollection
+		implements ConstraintValidator<ComposingConstraint2, Collection<?>> {
+	public void initialize(ComposingConstraint2 constraintAnnotation) {
+	}
+
+	public boolean isValid(Collection<?> object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java
new file mode 100644
index 0000000..e66df22
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/composedconstraint2/FieldLevelValidationUsingComplexComposedConstraint.java
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.composedconstraint2;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.List;
+
+public class FieldLevelValidationUsingComplexComposedConstraint {
+
+	@ComposedConstraint
+	public String string;
+	
+	@ComposedConstraint
+	public List<?> list;
+	
+	/**
+	 * Allowed
+	 */
+	@ComposedConstraint
+	public GregorianCalendar gregorianCalendar;
+	
+	@ComposedConstraint
+	public Collection<?> collection;
+	
+	/**
+	 * Allowed
+	 */
+	@ComposedConstraint
+	public ArrayList<?> arrayList;
+	
+	@ComposedConstraint
+	public Calendar calendar;
+		
+	/**
+	 * Not allowed.
+	 */
+	@ComposedConstraint
+	public Date date;
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java
new file mode 100644
index 0000000..378c1ad
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithIllegalRetentionPolicies {
+
+	/**
+	 * Compilation error expected as wrong retention policy is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.CLASS)
+	public @interface ConstraintWithWrongRetentionPolicy {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected as no retention policy is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithoutRetentionPolicy {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected as correct retention policy is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	public @interface ConstraintWithCorrectRetentionPolicy {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalTargets.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalTargets.java
new file mode 100644
index 0000000..9e2cddd
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalTargets.java
@@ -0,0 +1,148 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithIllegalTargets {
+
+
+	/**
+	 * Compilation error expected due to none supported target type being given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ LOCAL_VARIABLE })
+	public @interface ConstraintWithWrongTarget {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected as no supported target type is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ })
+	public @interface ConstraintWithEmptyTarget {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected, as not specifying @Target allows this constraint for all element types.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	public @interface ConstraintWithDefaultTarget {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected, as supported target type FIELD is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ FIELD })
+	public @interface ConstraintWithAllowedTargetField {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected, as supported target type METHOD is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ METHOD })
+	public @interface ConstraintWithAllowedTargetMethod {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected, as supported target type TYPE is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ TYPE })
+	public @interface ConstraintWithAllowedTargetType {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected, as supported target type ANNOTATION_TYPE is given.
+	 */
+	@Constraint(validatedBy = { DummyValidator.class })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target({ ANNOTATION_TYPE })
+	public @interface ConstraintWithAllowedTargetAnnotationType {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongGroupsAttribute.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongGroupsAttribute.java
new file mode 100644
index 0000000..b333922
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongGroupsAttribute.java
@@ -0,0 +1,147 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithWrongGroupsAttribute {
+
+	/**
+	 * Compilation error expected due to missing groups attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithoutGroupsParameter {
+
+		String message() default "";
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to groups attribute of wrong type.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithWrongType1 {
+
+		String message() default "";
+
+		int[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to groups attribute of non-array class type.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithWrongType2 {
+
+		String message() default "";
+
+		Class<?> groups();
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to groups attribute with super bound.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithSuperBound {
+
+		String message() default "";
+
+		Class<? super Long>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to groups attribute with extends bound.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithExtendsBound {
+
+		String message() default "";
+
+		Class<? extends Long>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due missing default value for groups attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithoutDefaultValue {
+
+		String message() default "";
+
+		Class<?>[] groups();
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to non-empty default value for groups attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithGroupsParameterWithNonEmptyDefaultValue {
+
+		String message() default "";
+
+		Class<?>[] groups() default { Object.class };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithCorrectGroupsParameter {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongMessageAttribute.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongMessageAttribute.java
new file mode 100644
index 0000000..56f0f14
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongMessageAttribute.java
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithWrongMessageAttribute {
+
+	/**
+	 * Compilation error expected as no message() attribute is specified.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithoutMessageAttribute {
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected as message() attribute doesn't have String as return type.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithMessageAttributeWithWrongReturnType {
+
+		public int message();
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithMessageAttribute {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongPayloadAttribute.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongPayloadAttribute.java
new file mode 100644
index 0000000..7e1601e
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithWrongPayloadAttribute.java
@@ -0,0 +1,164 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithWrongPayloadAttribute {
+
+	/**
+	 * Compilation error expected due to missing payload attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithoutPayloadParameter {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+	}
+
+	/**
+	 * Compilation error expected due to payload attribute of wrong type.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithWrongType1 {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		int[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to payload attribute of non-array class type.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithWrongType2 {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload> payload();
+
+	}
+
+	/**
+	 * Compilation error expected due to payload attribute with wrong extends bound.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithWrongExtendsBound {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Long>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to payload attribute without extend bound.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithoutExtendsBound {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<?>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due to payload attribute with super bound.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithSuperBound {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? super Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * Compilation error expected due missing default value for payload attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithoutDefaultValue {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload();
+
+	}
+
+	/**
+	 * Compilation error expected due to non-empty default value for payload attribute.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithPayloadParameterWithNonEmptyDefaultValue {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { SamplePayload.class };
+
+	}
+
+	/**
+	 * No compilation error expected.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithCorrectPayloadParameter {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	public static class SamplePayload implements Payload {
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithoutValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithoutValidator.java
new file mode 100644
index 0000000..19a9faf
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithoutValidator.java
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithoutValidator {
+
+	/**
+	 * Compilation error expected as no validator is given.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { })
+	public @interface ConstraintWithoutValidator {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error expected as a validator is given.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { DummyValidator.class })
+	public @interface ConstraintWithValidator {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+	/**
+	 * No compilation error as this is a composed constraint.
+	 */
+	@Size
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = { })
+	public @interface ComposedConstraintWithoutValidator {
+
+		String message() default "";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/DummyValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/DummyValidator.java
new file mode 100644
index 0000000..190dad4
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/DummyValidator.java
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Annotation;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Gunnar Morling
+ */
+public class DummyValidator implements ConstraintValidator<Annotation, Object> {
+
+	public void initialize(Annotation constraintAnnotation) {
+		throw new UnsupportedOperationException( "Not implemented" );
+	}
+
+	public boolean isValid(Object value, ConstraintValidatorContext context) {
+		throw new UnsupportedOperationException( "Not implemented" );
+	}
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ValidCustomerNumber.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ValidCustomerNumber.java
new file mode 100644
index 0000000..0fc8526
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ValidCustomerNumber.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.constrainttypes;
+
+import javax.validation.Payload;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * Constraint annotations are not allowed here, as ValidCustomerNumber isn't a
+ * proper constraint type definition.
+ */
+ at NotNull
+ at Size(min = 10, max = 10)
+public @interface ValidCustomerNumber {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java
new file mode 100644
index 0000000..7078f42
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CaseMode.java
@@ -0,0 +1,22 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.customconstraints;
+
+public enum CaseMode {
+	UPPER,
+	LOWER;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java
new file mode 100644
index 0000000..22abbfc
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCase.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.customconstraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = CheckCaseValidator.class)
+ at Documented
+public @interface CheckCase {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	CaseMode value();
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java
new file mode 100644
index 0000000..bb101c9
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.customconstraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
+	private CaseMode caseMode;
+
+	public void initialize(CheckCase constraintAnnotation) {
+		this.caseMode = constraintAnnotation.value();
+	}
+
+	public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
+		if ( object == null ) {
+			return true;
+		}
+
+		if ( caseMode == CaseMode.UPPER ) {
+			return object.equals( object.toUpperCase() );
+		}
+		else {
+			return object.equals( object.toLowerCase() );
+		}
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java
new file mode 100644
index 0000000..d0ee42a
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/FieldLevelValidationUsingCustomConstraints.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.customconstraints;
+
+import java.util.Date;
+
+public class FieldLevelValidationUsingCustomConstraints {
+
+	@CheckCase(CaseMode.UPPER)
+	public String string;
+	
+	/**
+	 * Not allowed.
+	 */
+	@CheckCase(CaseMode.UPPER)
+	public Date date;
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/HibernateValidatorProvidedCustomConstraints.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/HibernateValidatorProvidedCustomConstraints.java
new file mode 100644
index 0000000..1574cd3
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/HibernateValidatorProvidedCustomConstraints.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.customconstraints;
+
+import java.util.Date;
+
+import org.hibernate.validator.constraints.CreditCardNumber;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.NotBlank;
+import org.hibernate.validator.constraints.NotEmpty;
+import org.hibernate.validator.constraints.Range;
+import org.hibernate.validator.constraints.SafeHtml;
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.constraints.URL;
+import org.hibernate.validator.constraints.br.CNPJ;
+import org.hibernate.validator.constraints.br.CPF;
+import org.hibernate.validator.constraints.br.TituloEleitoral;
+
+ at ScriptAssert(script = "", lang = "javascript")
+public class HibernateValidatorProvidedCustomConstraints {
+
+	/**
+	 * Allowed.
+	 */
+	@CreditCardNumber
+	@Email
+	@Length
+	@ModCheck(modType = ModCheck.ModType.MOD10, multiplier = 2)
+	@NotBlank
+	@NotEmpty
+	@Range
+	@SafeHtml
+	@URL
+	@CNPJ
+	@CPF
+	@TituloEleitoral
+	public String string;
+
+	/**
+	 * Not allowed.
+	 */
+	@CreditCardNumber
+	@Email
+	@Length
+	@ModCheck(modType = ModCheck.ModType.MOD10, multiplier = 2)
+	@NotBlank
+	@NotEmpty
+	@Range
+	@SafeHtml
+	@URL
+	@CNPJ
+	@CPF
+	@TituloEleitoral
+	public Date date;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/BazDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/BazDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..fc2ba25
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/BazDefaultGroupSequenceProvider.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.Baz;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface BazDefaultGroupSequenceProvider extends DefaultGroupSequenceProvider<Baz> {
+
+	public List<Class<?>> getValidationGroups(GroupSequenceProviderDefinition.Baz object);
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarBazDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarBazDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..197099e
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarBazDefaultGroupSequenceProvider.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.FooBarBaz;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FooBarBazDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<FooBarBaz> {
+
+	public FooBarBazDefaultGroupSequenceProvider(FooBarBaz fooBarBaz) {
+	}
+
+	public List<Class<?>> getValidationGroups(FooBarBaz object) {
+		return null;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..5b73959
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarDefaultGroupSequenceProvider.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.FooBar;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public abstract class FooBarDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<FooBar> {
+
+	public abstract List<Class<?>> getValidationGroups(FooBar object);
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..ea76a12
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooDefaultGroupSequenceProvider.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.Foo;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FooDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Foo> {
+
+	public List<Class<?>> getValidationGroups(Foo object) {
+		return null;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/GroupSequenceProviderDefinition.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/GroupSequenceProviderDefinition.java
new file mode 100644
index 0000000..047b826
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/GroupSequenceProviderDefinition.java
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import javax.validation.GroupSequence;
+
+import org.hibernate.validator.group.GroupSequenceProvider;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class GroupSequenceProviderDefinition {
+
+	@GroupSequenceProvider(FooDefaultGroupSequenceProvider.class)
+	public static class Foo {
+	}
+
+	/**
+	 * Not allowed
+	 */
+	@GroupSequenceProvider(SampleDefaultGroupSequenceProvider.class)
+	@GroupSequence( { Sample.class })
+	public static class Sample {
+	}
+
+	/**
+	 * Not allowed. Default group sequence provider class defines
+	 * a wrong generic type.
+	 */
+	@GroupSequenceProvider(FooDefaultGroupSequenceProvider.class)
+	public static class Bar {
+	}
+
+	/**
+	 * Not allowed. Default group sequence provider class is an
+	 * interface.
+	 */
+	@GroupSequenceProvider(BazDefaultGroupSequenceProvider.class)
+	public static class Baz {
+	}
+
+	/**
+	 * Not allowed. GroupSequenceProvider annotation is added on
+	 * on an interface.
+	 */
+	@GroupSequenceProvider(QuxDefaultGroupSequenceProvider.class)
+	public interface Qux {
+	}
+
+	/**
+	 * Not allowed. Default group sequence provider class is
+	 * abstract.
+	 */
+	@GroupSequenceProvider(FooBarDefaultGroupSequenceProvider.class)
+	public static class FooBar {
+	}
+
+	/**
+	 * Not allowed. Default group sequence provider class has
+	 * no public default constructor.
+	 */
+	@GroupSequenceProvider(FooBarBazDefaultGroupSequenceProvider.class)
+	public static class FooBarBaz {
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/QuxDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/QuxDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..81db866
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/QuxDefaultGroupSequenceProvider.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.Qux;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class QuxDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Qux> {
+
+	public List<Class<?>> getValidationGroups(Qux object) {
+		return null;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/SampleDefaultGroupSequenceProvider.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/SampleDefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..c02bc19
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/SampleDefaultGroupSequenceProvider.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.groupsequenceprovider;
+
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.ap.testmodel.groupsequenceprovider.GroupSequenceProviderDefinition.Sample;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class SampleDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Sample> {
+
+	public List<Class<?>> getValidationGroups(Sample object) {
+		return null;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java
new file mode 100644
index 0000000..baa4470
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/AbstractCustomConstraintValidator.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.inheritedvalidator;
+
+import javax.validation.ConstraintValidator;
+
+public abstract class AbstractCustomConstraintValidator implements ConstraintValidator<CustomConstraint, String> {
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java
new file mode 100644
index 0000000..b3d91b6
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraint.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.inheritedvalidator;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = CustomConstraintValidator.class)
+ at Documented
+public @interface CustomConstraint {
+
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java
new file mode 100644
index 0000000..75acb81
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/CustomConstraintValidator.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.inheritedvalidator;
+
+import javax.validation.ConstraintValidatorContext;
+
+public class CustomConstraintValidator extends AbstractCustomConstraintValidator {
+
+	public void initialize(CustomConstraint constraintAnnotation) {
+	}
+
+	public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java
new file mode 100644
index 0000000..e0e6a4d
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/inheritedvalidator/FieldLevelValidationUsingInheritedValidator.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.inheritedvalidator;
+
+import java.util.Date;
+
+public class FieldLevelValidationUsingInheritedValidator {
+
+	@CustomConstraint
+	public String string;
+
+	/**
+	 * Not allowed.
+	 */
+	@CustomConstraint
+	public Date date;
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java
new file mode 100644
index 0000000..979d231
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/NoUniqueValidatorResolution.java
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.util.Set;
+
+public class NoUniqueValidatorResolution {
+
+	/**
+	 * Allowed, as there is one maximally specific validator.
+	 */
+	@Size
+	public Set<?> set;
+
+	/**
+	 * Not allowed, as two maximally specific validators exist.
+	 */
+	@Size
+	public SerializableCollection<?> serializableCollection;
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java
new file mode 100644
index 0000000..b9d4278
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SerializableCollection.java
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+public interface SerializableCollection<T> extends Serializable, Collection<T> {
+
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java
new file mode 100644
index 0000000..a49084d
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/Size.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = {
+		SizeValidatorForCollection.class, SizeValidatorForSerializable.class, SizeValidatorForSet.class
+})
+ at Documented
+public @interface Size {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java
new file mode 100644
index 0000000..0c7d366
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForCollection.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.util.Collection;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class SizeValidatorForCollection implements ConstraintValidator<Size, Collection> {
+
+	public void initialize(Size constraintAnnotation) {
+	}
+
+	public boolean isValid(Collection object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java
new file mode 100644
index 0000000..431dbc1
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSerializable.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.io.Serializable;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class SizeValidatorForSerializable implements ConstraintValidator<Size, Serializable> {
+
+	public void initialize(Size constraintAnnotation) {
+	}
+
+	public boolean isValid(Serializable object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java
new file mode 100644
index 0000000..39936c3
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/nouniquevalidatorresolution/SizeValidatorForSet.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testmodel.nouniquevalidatorresolution;
+
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class SizeValidatorForSet implements ConstraintValidator<Size, Set> {
+
+	public void initialize(Size constraintAnnotation) {
+	}
+
+	public boolean isValid(Set object, ConstraintValidatorContext constraintContext) {
+		return true;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java
new file mode 100644
index 0000000..478d28e
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/testutil/CompilerTestHelper.java
@@ -0,0 +1,273 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.testutil;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.annotation.processing.Processor;
+import javax.tools.Diagnostic;
+import javax.tools.Diagnostic.Kind;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+
+import org.hibernate.validator.ap.util.CollectionHelper;
+import org.hibernate.validator.ap.util.Configuration;
+import org.hibernate.validator.ap.util.DiagnosticExpectation;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * Infrastructure for unit tests based on the Java Compiler API.
+ *
+ * @author Gunnar Morling
+ */
+public class CompilerTestHelper {
+
+	/**
+	 * Dependencies which are used as class path elements for the compilation tasks.
+	 *
+	 * @author Gunnar Morling
+	 */
+	public enum Library {
+
+		HIBERNATE_VALIDATOR( "hibernate-validator.jar" ),
+
+		VALIDATION_API( "validation-api.jar" ),
+
+		JODA_TIME( "joda-time.jar" );
+
+		private final String name;
+
+		private Library(String name) {
+			this.name = name;
+		}
+
+		public String getName() {
+			return name;
+		}
+	}
+
+	private final JavaCompiler compiler;
+
+	private final String sourceBaseDir;
+
+	private final String testLibraryDir;
+
+	public CompilerTestHelper(JavaCompiler compiler) {
+
+		this.compiler = compiler;
+
+		String basePath;
+
+		try {
+			basePath = new File( "." ).getCanonicalPath();
+		}
+		catch ( IOException e ) {
+			throw new RuntimeException( e );
+		}
+
+		this.sourceBaseDir = basePath + "/src/test/java";
+		this.testLibraryDir = basePath + "/target/test-dependencies";
+	}
+
+	/**
+	 * Retrieves a file object containing the source of the given class.
+	 *
+	 * @param clazz The class of interest.
+	 *
+	 * @return A file with the source of the given class.
+	 */
+	public File getSourceFile(Class<?> clazz) {
+
+		String sourceFileName =
+				File.separator + clazz.getName().replace( ".", File.separator ) + ".java";
+
+		return new File( sourceBaseDir + sourceFileName );
+	}
+
+	/**
+	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, Boolean, EnumSet, File...)
+	 */
+	public boolean compile(
+			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, File... sourceFiles) {
+
+		return compile(
+				annotationProcessor,
+				diagnostics,
+				null,
+				null,
+				null,
+				EnumSet.allOf( Library.class ),
+				sourceFiles
+		);
+	}
+
+	/**
+	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, Boolean, EnumSet, File...)
+	 */
+	public boolean compile(
+			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, Kind diagnosticKind, File... sourceFiles) {
+
+		return compile(
+				annotationProcessor,
+				diagnostics,
+				diagnosticKind,
+				null,
+				null,
+				EnumSet.allOf( Library.class ),
+				sourceFiles
+		);
+	}
+
+	/**
+	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, Boolean, EnumSet, File...)
+	 */
+	public boolean compile(
+			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, boolean verbose, boolean allowMethodConstraints, File... sourceFiles) {
+
+		return compile(
+				annotationProcessor,
+				diagnostics,
+				null,
+				verbose,
+				allowMethodConstraints,
+				EnumSet.allOf( Library.class ),
+				sourceFiles
+		);
+	}
+
+	/**
+	 * @see CompilerTestHelper#compile(Processor, DiagnosticCollector, Kind, Boolean, Boolean, EnumSet, File...)
+	 */
+	public boolean compile(
+			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, EnumSet<Library> dependencies, File... sourceFiles) {
+
+		return compile( annotationProcessor, diagnostics, null, null, null, dependencies, sourceFiles );
+	}
+
+
+	/**
+	 * Creates and executes a {@link CompilationTask} using the given input.
+	 *
+	 * @param annotationProcessor An annotation processor to be attached to the task.
+	 * @param diagnostics An diagnostics listener to be attached to the task.
+	 * @param diagnosticKind A value for the "diagnosticKind" option.
+	 * @param verbose A value for the "verbose" option.
+	 * @param allowMethodConstraints A value for the "methodConstraintsSupported" option.
+	 * @param dependencies A set with libraries which shall be added to the class path of
+	 * the compilation task.
+	 * @param sourceFiles The source files to be compiled.
+	 *
+	 * @return True, if the source files could be compiled successfully (meaning
+	 *         in especially, that the given annotation processor didn't raise
+	 *         any errors), false otherwise.
+	 */
+	public boolean compile(
+			Processor annotationProcessor, DiagnosticCollector<JavaFileObject> diagnostics, Kind diagnosticKind, Boolean verbose, Boolean allowMethodConstraints, EnumSet<Library> dependencies, File... sourceFiles) {
+
+		StandardJavaFileManager fileManager =
+				compiler.getStandardFileManager( null, null, null );
+
+		Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjects( sourceFiles );
+
+		List<String> options = new ArrayList<String>();
+
+		options.addAll( Arrays.asList( "-d", "target" ) );
+
+		if ( diagnosticKind != null ) {
+			options.add( String.format( "-A%s=%s", Configuration.DIAGNOSTIC_KIND_PROCESSOR_OPTION, diagnosticKind ) );
+		}
+
+		if ( verbose != null ) {
+			options.add( String.format( "-A%s=%b", Configuration.VERBOSE_PROCESSOR_OPTION, verbose ) );
+		}
+
+		if ( allowMethodConstraints != null ) {
+			options.add(
+					String.format(
+							"-A%s=%b",
+							Configuration.METHOD_CONSTRAINTS_SUPPORTED_PROCESSOR_OPTION,
+							allowMethodConstraints
+					)
+			);
+		}
+
+		try {
+			fileManager.setLocation( StandardLocation.CLASS_PATH, getDependenciesAsFiles( dependencies ) );
+		}
+		catch ( IOException e ) {
+			throw new RuntimeException( e );
+		}
+
+		CompilationTask task = compiler.getTask( null, fileManager, diagnostics, options, null, compilationUnits );
+		task.setProcessors( Arrays.asList( annotationProcessor ) );
+
+		return task.call();
+	}
+
+	/**
+	 * <p>
+	 * Asserts, that the given diagnostics match with the given expectations.
+	 * </p>
+	 * <p>
+	 * First checks, whether the number of actual diagnostics matches with the
+	 * number of given expectations. If that's the case, {@link Kind} and line
+	 * number of each expectation are compared.
+	 * </p>
+	 *
+	 * @param diagnostics The actual diagnostics as populated by the executed
+	 * {@link CompilationTask}.
+	 * @param expectations The expectations to compare against.
+	 */
+	public static void assertThatDiagnosticsMatch(DiagnosticCollector<JavaFileObject> diagnostics, DiagnosticExpectation... expectations) {
+
+		assertEquals( asExpectations( diagnostics.getDiagnostics() ), CollectionHelper.asSet( expectations ) );
+	}
+
+	private static Set<DiagnosticExpectation> asExpectations(Collection<Diagnostic<? extends JavaFileObject>> diagnosticsList) {
+
+		Set<DiagnosticExpectation> theValue = CollectionHelper.newHashSet();
+
+		for ( Diagnostic<? extends JavaFileObject> diagnostic : diagnosticsList ) {
+			theValue.add( new DiagnosticExpectation( diagnostic.getKind(), diagnostic.getLineNumber() ) );
+		}
+
+		return theValue;
+	}
+
+	private Set<File> getDependenciesAsFiles(EnumSet<Library> dependencies) {
+
+		Set<File> files = new HashSet<File>();
+
+		for ( Library oneDependency : dependencies ) {
+			files.add( new File( testLibraryDir + File.separator + oneDependency.getName() ) );
+		}
+
+		return files;
+	}
+}
diff --git a/project/annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java
new file mode 100644
index 0000000..0ced4ad
--- /dev/null
+++ b/project/annotation-processor/src/test/java/org/hibernate/validator/ap/util/DiagnosticExpectation.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.ap.util;
+
+import javax.tools.Diagnostic;
+import javax.tools.Diagnostic.Kind;
+
+/**
+ * Expectation value to be matched against a given {@link Diagnostic}.
+ *
+ * @author Gunnar Morling
+ */
+public class DiagnosticExpectation {
+
+	private final Kind kind;
+
+	private final long lineNumber;
+
+	public DiagnosticExpectation(Kind kind, long lineNumber) {
+		this.kind = kind;
+		this.lineNumber = lineNumber;
+	}
+
+	public Kind getKind() {
+		return kind;
+	}
+
+	public long getLineNumber() {
+		return lineNumber;
+	}
+
+	@Override
+	public String toString() {
+		return "DiagnosticExpectation [kind=" + kind + ", lineNumber=" + lineNumber + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((kind == null) ? 0 : kind.hashCode());
+		result = prime * result + (int) (lineNumber ^ (lineNumber >>> 32));
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		DiagnosticExpectation other = (DiagnosticExpectation) obj;
+		if (kind != other.kind)
+			return false;
+		if (lineNumber != other.lineNumber)
+			return false;
+		return true;
+	}
+}
diff --git a/project/archetype/archetype.properties b/project/archetype/archetype.properties
new file mode 100644
index 0000000..ca6be8b
--- /dev/null
+++ b/project/archetype/archetype.properties
@@ -0,0 +1,5 @@
+archetype.groupId=org.hibernate
+archetype.artifactId=hibernate-validator-quickstart-archetype
+
+archetype.filteredExtensions=java
+archetype.languages=java
diff --git a/project/archetype/pom.xml b/project/archetype/pom.xml
new file mode 100644
index 0000000..c05db6c
--- /dev/null
+++ b/project/archetype/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <!--
+        The link to the hibernate-validator parent POM only exists out of convenience since we are creating
+        this archetype from an existing module of the Hibernate Validator code base.
+        If you want to know more about this process check the maven-archetype-plugin documentation
+        http://maven.apache.org/archetype/maven-archetype-plugin, epecially the goal create-from-project
+
+        If you want to use this quick-start project as the base for your own application you should remove the
+        <parent> entry. See also the other pointers in this pom.
+    -->
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <groupId>com.example</groupId>
+    <artifactId>hibernate-validator-quickstart</artifactId>
+
+    <name>Hibernate Validator Quickstart</name>
+
+    <!-- When removing the parent project configuration you have to explicitly set the dependencies version -->
+    <dependencies>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <defaultGoal>test</defaultGoal>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <!-- When removing the parent project configuration this profile can be removed -->
+        <profile>
+            <id>archetype</id>
+            <activation>
+                <file>
+                    <exists>archetype.properties</exists>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-archetype-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+    <repositories>
+        <repository>
+            <id>jboss-public-repository</id>
+            <url>https://repository.jboss.org/nexus/content/repositories/public</url>
+        </repository>
+    </repositories>
+</project>
diff --git a/project/archetype/src/main/java/com/example/Car.java b/project/archetype/src/main/java/com/example/Car.java
new file mode 100644
index 0000000..e873065
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/Car.java
@@ -0,0 +1,112 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.example;
+
+import javax.validation.Valid;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * An example entity class enriched with constraint annotations from
+ * the Bean Validation API (<a href="http://jcp.org/en/jsr/detail?id=303">JSR
+ * 303</a>). Have a look at {@link org.hibernate.validator.quickstart.CarTest} to learn, how the Bean Validation
+ * API can be used to validate {@code Car} instances.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class Car {
+
+	//The definition of the message in the constraints is just for testing purpose.
+	//In a real world scenario you would place your messages into resource bundles.
+
+	/**
+	 * By annotating the field with @NotNull we specify, that null is not a valid
+	 * value.
+	 */
+	@NotNull(message = "may not be null")
+	private String manufacturer;
+
+	/**
+	 * This String field shall not only not allowed to be null, it shall also between
+	 * 2 and 14 characters long.
+	 */
+	@NotNull
+	@Size(min = 2, max = 14, message = "size must be between {min} and {max}")
+	private String licensePlate;
+
+	/**
+	 * This int field shall have a value of at least 2.
+	 */
+	@Min(value = 2, message = "must be greater than or equal to {value}")
+	private int seatCount;
+
+	@AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
+	private boolean passedVehicleInspection;
+
+	@Valid
+	private Driver driver;
+
+	public Car(String manufacturer, String licencePlate, int seatCount) {
+		this.manufacturer = manufacturer;
+		this.licensePlate = licencePlate;
+		this.seatCount = seatCount;
+	}
+
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	public String getLicensePlate() {
+		return licensePlate;
+	}
+
+	public void setLicensePlate(String licensePlate) {
+		this.licensePlate = licensePlate;
+	}
+
+	public int getSeatCount() {
+		return seatCount;
+	}
+
+	public void setSeatCount(int seatCount) {
+		this.seatCount = seatCount;
+	}
+
+	public boolean getPassedVehicleInspection() {
+		return passedVehicleInspection;
+	}
+
+	public void setPassedVehicleInspection(boolean passed) {
+		this.passedVehicleInspection = passed;
+	}
+
+	public Driver getDriver() {
+		return driver;
+	}
+
+	public void setDriver(Driver driver) {
+		this.driver = driver;
+	}
+}
diff --git a/project/archetype/src/main/java/com/example/CarChecks.java b/project/archetype/src/main/java/com/example/CarChecks.java
new file mode 100644
index 0000000..e1209ce
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/CarChecks.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface CarChecks {
+}
diff --git a/project/archetype/src/main/java/com/example/Driver.java b/project/archetype/src/main/java/com/example/Driver.java
new file mode 100644
index 0000000..3f7d517
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/Driver.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Min;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Driver extends Person {
+	@Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class)
+	private int age;
+
+	@AssertTrue(message = "You first have to pass the driving test", groups = DriverChecks.class)
+	private boolean hasDrivingLicense;
+
+	public Driver(String name) {
+		super( name );
+	}
+
+	public void passedDrivingTest(boolean b) {
+		hasDrivingLicense = b;
+	}
+
+	public int getAge() {
+		return age;
+	}
+
+	public void setAge(int age) {
+		this.age = age;
+	}
+}
diff --git a/project/archetype/src/main/java/com/example/DriverChecks.java b/project/archetype/src/main/java/com/example/DriverChecks.java
new file mode 100644
index 0000000..3d901a5
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/DriverChecks.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface DriverChecks {
+}
diff --git a/project/archetype/src/main/java/com/example/OrderedChecks.java b/project/archetype/src/main/java/com/example/OrderedChecks.java
new file mode 100644
index 0000000..a736b78
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/OrderedChecks.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+import javax.validation.GroupSequence;
+import javax.validation.groups.Default;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence({ Default.class, CarChecks.class, DriverChecks.class })
+public interface OrderedChecks {
+}
diff --git a/project/archetype/src/main/java/com/example/Person.java b/project/archetype/src/main/java/com/example/Person.java
new file mode 100644
index 0000000..5685791
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/Person.java
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Person {
+	@NotNull
+	private String name;
+
+	public Person(String name) {
+		super();
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
+
diff --git a/project/archetype/src/main/java/com/example/RentalCar.java b/project/archetype/src/main/java/com/example/RentalCar.java
new file mode 100644
index 0000000..6be4cb5
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/RentalCar.java
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+import javax.validation.GroupSequence;
+import javax.validation.constraints.AssertFalse;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence({ RentalChecks.class, CarChecks.class, RentalCar.class })
+public class RentalCar extends Car {
+	@AssertFalse(message = "The car is currently rented out", groups = RentalChecks.class)
+	private boolean rented;
+
+	public RentalCar(String manufacturer, String licencePlate, int seatCount) {
+		super( manufacturer, licencePlate, seatCount );
+	}
+
+	public boolean isRented() {
+		return rented;
+	}
+
+	public void setRented(boolean rented) {
+		this.rented = rented;
+	}
+}
diff --git a/project/archetype/src/main/java/com/example/RentalChecks.java b/project/archetype/src/main/java/com/example/RentalChecks.java
new file mode 100644
index 0000000..9bae211
--- /dev/null
+++ b/project/archetype/src/main/java/com/example/RentalChecks.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface RentalChecks {
+}
diff --git a/hibernate-validator-archetype/src/main/resources/log4j.properties b/project/archetype/src/main/resources/log4j.properties
similarity index 100%
rename from hibernate-validator-archetype/src/main/resources/log4j.properties
rename to project/archetype/src/main/resources/log4j.properties
diff --git a/project/archetype/src/test/java/com/example/BootstrapTest.java b/project/archetype/src/test/java/com/example/BootstrapTest.java
new file mode 100644
index 0000000..544fc7c
--- /dev/null
+++ b/project/archetype/src/test/java/com/example/BootstrapTest.java
@@ -0,0 +1,106 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.example;
+
+import java.lang.annotation.ElementType;
+import java.util.Locale;
+import javax.validation.Configuration;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+
+/**
+ * A module test that shows the different bootstrap possibilities of Hibernate Validator.
+ *
+ * @author Hardy Ferentschik
+ */
+public class BootstrapTest {
+
+	@Test
+	public void testBuildDefaultValidatorFactory() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		assertNotNull( validator );
+	}
+
+	@Test
+	public void testByDefaultProvider() {
+		Configuration<?> config = Validation.byDefaultProvider().configure();
+		config.messageInterpolator( new MyMessageInterpolator() )
+				.traversableResolver( new MyTraversableResolver() )
+				.constraintValidatorFactory( new MyConstraintValidatorFactory() );
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		assertNotNull( validator );
+	}
+
+	@Test
+	public void testByProvider() {
+		HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
+		config.messageInterpolator( new MyMessageInterpolator() )
+				.traversableResolver( new MyTraversableResolver() )
+				.constraintValidatorFactory( new MyConstraintValidatorFactory() );
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		assertNotNull( validator );
+	}
+
+	public class MyMessageInterpolator implements MessageInterpolator {
+
+		public String interpolate(String messageTemplate, Context context) {
+			return null;
+		}
+
+		public String interpolate(String messageTemplate, Context context, Locale locale) {
+			return null;
+		}
+	}
+
+	public class MyTraversableResolver implements TraversableResolver {
+
+		public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return true;
+		}
+
+		public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return true;
+		}
+	}
+
+	public class MyConstraintValidatorFactory implements ConstraintValidatorFactory {
+
+		public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
+			return null;
+		}
+	}
+}
diff --git a/project/archetype/src/test/java/com/example/CarTest.java b/project/archetype/src/test/java/com/example/CarTest.java
new file mode 100644
index 0000000..6eb7be2
--- /dev/null
+++ b/project/archetype/src/test/java/com/example/CarTest.java
@@ -0,0 +1,144 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.example;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * <p>
+ * A module test that shows how to use the Bean Validation (BV) API to validate
+ * the constraint annotations at the exemplary {@link Car} model class.
+ * </p>
+ * <p>
+ * The interface {@link Validator} is the main entry point the BV API. The
+ * test makes use of the <code>validate()</code> method of that interface, which
+ * returns a set of <code>ConstraintViolation</code>s, that describe the
+ * problems occurred during validation.
+ * </p>
+ * <p>
+ * In case the object in question could be validated successfully this set will
+ * be empty.
+ * </p>
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public class CarTest {
+
+	/**
+	 * The validator to be used for object validation. Will be retrieved once
+	 * for all test methods.
+	 */
+	private static Validator validator;
+
+	/**
+	 * Retrieves the validator instance.
+	 */
+	@BeforeClass
+	public static void setUp() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		validator = factory.getValidator();
+	}
+
+	/**
+	 * One constraint violation due to the manufacturer field being null
+	 * expected.
+	 */
+	@Test
+	public void manufacturerIsNull() {
+		Car car = new Car( null, "DD-AB-123", 4 );
+
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals( "may not be null", constraintViolations.iterator().next().getMessage() );
+	}
+
+	/**
+	 * One constraint violation due to the licensePlate field being too short
+	 * expected.
+	 */
+	@Test
+	public void licensePlateTooShort() {
+		Car car = new Car( "Morris", "D", 4 );
+
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals( "size must be between 2 and 14", constraintViolations.iterator().next().getMessage() );
+	}
+
+	/**
+	 * One constraint violation due to the seatCount field being too low
+	 * expected.
+	 */
+	@Test
+	public void seatCountTooLow() {
+		Car car = new Car( "Morris", "DD-AB-123", 1 );
+
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals( "must be greater than or equal to 2", constraintViolations.iterator().next().getMessage() );
+	}
+
+	/**
+	 * No constraint violation expected, as all fields of the validated Car
+	 * instance have proper values.
+	 */
+	@Test
+	public void carIsValid() {
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+
+		assertEquals( 0, constraintViolations.size() );
+	}
+
+	/**
+	 * Validating the default group leads to validation on the default group sequence of {@code RentalCar}.
+	 */
+	@Test
+	public void carIsRented() {
+		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
+		rentalCar.setPassedVehicleInspection( true );
+		rentalCar.setRented( true );
+
+		Set<ConstraintViolation<RentalCar>> constraintViolations = validator.validate( rentalCar );
+
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals(
+				"Wrong message",
+				"The car is currently rented out",
+				constraintViolations.iterator().next().getMessage()
+		);
+
+		rentalCar.setRented( false );
+		constraintViolations = validator.validate( rentalCar );
+
+		assertEquals( 0, constraintViolations.size() );
+	}
+}
diff --git a/project/archetype/src/test/java/com/example/GroupTest.java b/project/archetype/src/test/java/com/example/GroupTest.java
new file mode 100644
index 0000000..dc43c27
--- /dev/null
+++ b/project/archetype/src/test/java/com/example/GroupTest.java
@@ -0,0 +1,112 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.example;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.groups.Default;
+
+import static org.junit.Assert.assertEquals;
+
+import com.example.Car;
+import com.example.CarChecks;
+import com.example.Driver;
+import com.example.DriverChecks;
+import com.example.OrderedChecks;
+import com.example.RentalCar;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * A module test that shows how to use the grouping functionality of Bean Validation.
+ *
+ * @author Hardy Ferentschik
+ */
+public class GroupTest {
+
+
+	private static Validator validator;
+
+	@BeforeClass
+	public static void setUp() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		validator = factory.getValidator();
+	}
+
+	@Test
+	public void testDriveAway() {
+		// create a car and check that everything is ok with it.
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+		assertEquals( 0, constraintViolations.size() );
+
+		// but has it passed the vehicle inspection?
+		constraintViolations = validator.validate( car, CarChecks.class );
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals(
+				"The car has to pass the vehicle inspection first", constraintViolations.iterator().next().getMessage()
+		);
+
+		// let's go to the vehicle inspection
+		car.setPassedVehicleInspection( true );
+		assertEquals( 0, validator.validate( car ).size() );
+
+		// now let's add a driver. He is 18, but has not passed the driving test yet
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		car.setDriver( john );
+		constraintViolations = validator.validate( car, DriverChecks.class );
+		assertEquals( 1, constraintViolations.size() );
+		assertEquals( "You first have to pass the driving test", constraintViolations.iterator().next().getMessage() );
+
+		// ok, John passes the test
+		john.passedDrivingTest( true );
+		assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );
+
+		// just checking that everything is in order now
+		assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );
+	}
+
+	@Test
+	public void testOrderedChecks() {
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		car.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		car.setDriver( john );
+
+		assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );
+	}
+
+	@Test
+	public void testOrderedChecksWithRedefinedDefault() {
+		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
+		rentalCar.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		rentalCar.setDriver( john );
+
+		assertEquals( 0, validator.validate( rentalCar, Default.class, DriverChecks.class ).size() );
+	}
+}
diff --git a/project/distribution/pom.xml b/project/distribution/pom.xml
new file mode 100644
index 0000000..1978678
--- /dev/null
+++ b/project/distribution/pom.xml
@@ -0,0 +1,130 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-distribution</artifactId>
+
+    <name>Hibernate Validator Distribution</name>
+    <description>Builds the distribution bundles</description>
+
+    <properties>
+        <!-- Skip artifact deployment -->
+        <maven.deploy.skip>true</maven.deploy.skip>
+    </properties>
+
+    <dependencies>
+        <!-- The modules to include in the distribution. Any non-optional dependencies will
+                     automatically be included as well -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator-annotation-processor</artifactId>
+        </dependency>
+
+        <!-- Need to list out optional dependencies here again in order to include them via assembly dependency set -->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <sourcepath>
+                        ${basedir}/../engine/src/main/java;
+                        ${basedir}/../engine/target/generated-sources;
+                        ${basedir}/../annotation-processor/src/main/java
+                    </sourcepath>
+                    <links>
+                        <link>http://docs.oracle.com/javase/6/docs/api</link>
+                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api</link>
+                    </links>
+                    <packagesheader>Hibernate Validator Packages</packagesheader>
+                    <doctitle>Hibernate Validator ${project.version}</doctitle>
+                    <windowtitle>Hibernate Validator ${project.version}</windowtitle>
+                    <groups>
+                        <group>
+                            <title>Validator Packages</title>
+                            <packages>org.hibernate.validator*</packages>
+                        </group>
+                        <group>
+                            <title>Annotation Processor Packages</title>
+                            <packages>org.hibernate.validator.ap*</packages>
+                        </group>
+                    </groups>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>aggregate-javadoc</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>javadoc</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptors>
+                        <descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
+                    </descriptors>
+                    <finalName>hibernate-validator-${project.version}</finalName>
+                    <tarLongFileMode>gnu</tarLongFileMode>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
+
diff --git a/project/distribution/src/main/assembly/dist.xml b/project/distribution/src/main/assembly/dist.xml
new file mode 100644
index 0000000..b04b2dc
--- /dev/null
+++ b/project/distribution/src/main/assembly/dist.xml
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<assembly>
+    <id>dist</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+
+    <!-- Configure the artifacts to include  -->
+    <dependencySets>
+        <!-- first the actual project artifacts -->
+        <dependencySet>
+            <outputDirectory>dist</outputDirectory>
+            <includes>
+                <include>org.hibernate:hibernate-validator-annotation-processor</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>dist</outputDirectory>
+            <includes>
+                <include>org.hibernate:hibernate-validator</include>
+            </includes>
+        </dependencySet>
+
+        <!-- Now we take care of the transitive dependencies -->
+        <dependencySet>
+            <outputDirectory>dist/lib/required</outputDirectory>
+            <includes>
+                <include>javax.validation:validation-api</include>
+                <include>org.jboss.logging:jboss-logging</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>dist/lib/optional</outputDirectory>
+            <includes>
+                <include>log4j:log4j</include>
+                <include>joda-time:joda-time</include>
+                <include>org.hibernate.javax.persistence:hibernate-jpa-2.0-api</include>
+                <include>org.jsoup:jsoup</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+
+    <files>
+        <file>
+            <source>../README.md</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+        <file>
+            <source>../changelog.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+        <file>
+            <source>../copyright.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+        <file>
+            <source>../license.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+    </files>
+
+    <fileSets>
+        <!-- Include all sources  -->
+        <fileSet>
+            <directory>..</directory>
+            <outputDirectory>project</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+            <excludes>
+                <!-- we already have these files at the top level of the distribution -->
+                <exclude>README.md</exclude>
+                <exclude>changelog.txt</exclude>
+                <exclude>copyright.txt</exclude>
+                <exclude>license.txt</exclude>
+
+                <!-- only needed for documentation and helper scripts, no need to include them -->
+                <exclude>**/zanata.sh</exclude>
+                <exclude>**/zanata.xml</exclude>
+                <exclude>src/main/scripts/**</exclude>
+
+                <!-- actual files which should be ignored -->
+                <exclude>.git</exclude>
+                <exclude>.gitignore</exclude>
+                <exclude>**/target/**</exclude>
+                <exclude>**/.idea/**</exclude>
+                <exclude>.sonar-ide.properties</exclude>
+                <exclude>**/*.iml</exclude>
+                <exclude>**/*.ipr</exclude>
+                <exclude>**/*.iws</exclude>
+            </excludes>
+        </fileSet>
+
+        <!-- Include documentation -->
+        <fileSet>
+            <directory>target/site/apidocs</directory>
+            <outputDirectory>docs/api</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../documentation/target/docbook/publish</directory>
+            <outputDirectory>docs/reference</outputDirectory>
+        </fileSet>
+
+    </fileSets>
+
+</assembly>
diff --git a/project/documentation/pom.xml b/project/documentation/pom.xml
new file mode 100644
index 0000000..d2464db
--- /dev/null
+++ b/project/documentation/pom.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-documentation</artifactId>
+    <packaging>jdocbook</packaging>
+
+    <name>Hibernate Validator Manual</name>
+    <description>The Hibernate Validator reference manual</description>
+
+    <properties>
+        <jdocbookSourceDirectory>${basedir}/src/main/docbook</jdocbookSourceDirectory>
+        <jdocbook.ignoreTranslations>false</jdocbook.ignoreTranslations>
+        <!-- Skip artifact deployment -->
+        <maven.deploy.skip>true</maven.deploy.skip>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jboss.maven.plugins</groupId>
+                <artifactId>maven-jdocbook-plugin</artifactId>
+                <configuration>
+                    <sourceDirectory>${jdocbookSourceDirectory}</sourceDirectory>
+                    <sourceDocumentName>master.xml</sourceDocumentName>
+                    <masterTranslation>en-US</masterTranslation>
+                    <translations>
+                        <translation>zh-CN</translation>
+                    </translations>
+                    <!--
+                    The jdookbook plug-in doesn't define an expression for this property, therefore
+                    it can't be passed on the command line. To address this issue the value is retrieved
+                    from a custom property, which itself can be set using -DignoreTranslations=...
+                    -->
+                    <ignoreTranslations>${jdocbook.ignoreTranslations}</ignoreTranslations>
+                    <imageResource>
+                        <directory>${basedir}/src/main/docbook/en-US/images</directory>
+                    </imageResource>
+                    <formats>
+                        <format>
+                            <formatName>pdf</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl
+                            </stylesheetResource>
+                            <finalName>hibernate_validator_reference.pdf</finalName>
+                        </format>
+                        <format>
+                            <formatName>html_single</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl
+                            </stylesheetResource>
+                            <finalName>index.html</finalName>
+                        </format>
+                        <format>
+                            <formatName>html</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl
+                            </stylesheetResource>
+                            <finalName>index.html</finalName>
+                        </format>
+                    </formats>
+                    <options>
+                        <xincludeSupported>true</xincludeSupported>
+                        <xmlTransformerType>saxon</xmlTransformerType>
+                        <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+                        <!--     could also locate the docbook dependency and inspect its version... -->
+                        <docbookVersion>1.72.0</docbookVersion>
+                        <localeSeparator>-</localeSeparator>
+                    </options>
+                    <profiling>
+                        <enabled>true</enabled>
+                    </profiling>
+                </configuration>
+                <executions>
+                    <execution>
+                        <!--
+                            here we are attaching the translate goal so that the translations are processed
+                            before compilation so that the translated XML is also transformed during
+                            generation
+                        -->
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>translate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>
+                                println "[INFO] ------------------------------------------------------------------------";
+                                println "[INFO] DOCUMENTATION BUILD INFO                                                ";
+                                println "[INFO] ------------------------------------------------------------------------";
+                                println "[INFO] The documentation build requires the external tool po2xml for processing";
+                                println "[INFO] translations. You can skip the whole documentation build via specifying ";
+                                println "[INFO] the property 'disableDocumentationBuil':                                ";
+                                println "[INFO]                                                                         ";
+                                println "[INFO] mvn install -DdisableDocumentationBuild=true                            ";
+                                println "[INFO]                                                                         ";
+                                println "[INFO] Or you can just skip the translations:                                  ";
+                                println "[INFO]                                                                         ";
+                                println "[INFO] mvn install -Djdocbook.ignoreTranslations=true                          ";
+                                println "[INFO]                                                                         ";
+                                println "[INFO] See http://community.jboss.org/wiki/ContributingtoHibernateValidator    ";
+                                println "[INFO] ------------------------------------------------------------------------";
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.zanata</groupId>
+                <artifactId>zanata-maven-plugin</artifactId>
+                <configuration>
+                    <srcDir>${basedir}/src/main/docbook</srcDir>
+                    <srcDirPot>${basedir}/src/main/docbook/pot</srcDirPot>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/project/documentation/src/main/docbook/en-US/hv.ent b/project/documentation/src/main/docbook/en-US/hv.ent
new file mode 100644
index 0000000..7c61940
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/hv.ent
@@ -0,0 +1,5 @@
+<!ENTITY version "WORKING">
+<!ENTITY bvVersion "1.0.0.GA">
+<!ENTITY today "TODAY">
+<!ENTITY copyrightYear "2009 - 2011">
+<!ENTITY copyrightHolder "Red Hat, Inc. & Gunnar Morling">
\ No newline at end of file
diff --git a/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_eclipse.png b/project/documentation/src/main/docbook/en-US/images/annotation_processor_eclipse.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/annotation_processor_eclipse.png
rename to project/documentation/src/main/docbook/en-US/images/annotation_processor_eclipse.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_intellij.png b/project/documentation/src/main/docbook/en-US/images/annotation_processor_intellij.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/annotation_processor_intellij.png
rename to project/documentation/src/main/docbook/en-US/images/annotation_processor_intellij.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_netbeans.png b/project/documentation/src/main/docbook/en-US/images/annotation_processor_netbeans.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/annotation_processor_netbeans.png
rename to project/documentation/src/main/docbook/en-US/images/annotation_processor_netbeans.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/application-layers.png b/project/documentation/src/main/docbook/en-US/images/application-layers.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/application-layers.png
rename to project/documentation/src/main/docbook/en-US/images/application-layers.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/application-layers2.png b/project/documentation/src/main/docbook/en-US/images/application-layers2.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/application-layers2.png
rename to project/documentation/src/main/docbook/en-US/images/application-layers2.png
diff --git a/hibernate-validator-legacy/src/main/docbook/en-US/images/hibernate_logo_a.png b/project/documentation/src/main/docbook/en-US/images/hibernate_logo_a.png
similarity index 100%
rename from hibernate-validator-legacy/src/main/docbook/en-US/images/hibernate_logo_a.png
rename to project/documentation/src/main/docbook/en-US/images/hibernate_logo_a.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/validation-configuration-1.0.png b/project/documentation/src/main/docbook/en-US/images/validation-configuration-1.0.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/validation-configuration-1.0.png
rename to project/documentation/src/main/docbook/en-US/images/validation-configuration-1.0.png
diff --git a/hibernate-validator/src/main/docbook/en-US/images/validation-mapping-1.0.png b/project/documentation/src/main/docbook/en-US/images/validation-mapping-1.0.png
similarity index 100%
rename from hibernate-validator/src/main/docbook/en-US/images/validation-mapping-1.0.png
rename to project/documentation/src/main/docbook/en-US/images/validation-mapping-1.0.png
diff --git a/project/documentation/src/main/docbook/en-US/master.xml b/project/documentation/src/main/docbook/en-US/master.xml
new file mode 100644
index 0000000..d9224d2
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/master.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "hv.ent">
+%BOOK_ENTITIES;
+]>
+
+<book>
+    <bookinfo>
+        <title>Hibernate Validator</title>
+        <subtitle>JSR 303 Reference Implementation</subtitle>
+        <subtitle>Reference Guide</subtitle>
+        <releaseinfo>&version;</releaseinfo>
+        <pubdate>&today;</pubdate>
+        <productnumber>&version;</productnumber>
+        <copyright>
+            <year>©rightYear;</year>
+            <holder>©rightHolder;</holder>
+        </copyright>
+        <authorgroup>
+            <author>
+                <firstname>Hardy</firstname>
+                <surname>Ferentschik</surname>
+            </author>
+            <author>
+                <firstname>Gunnar</firstname>
+                <surname>Morling</surname>
+            </author>
+		    <othercredit class="translator" lang="zh-CN">
+		        <firstname>Shaozhuang</firstname>
+		        <surname>Liu</surname>
+		        <email>stliu at hibernate.org</email>
+		    </othercredit>
+        </authorgroup>
+    </bookinfo>
+
+    <toc></toc>
+
+    <xi:include href="modules/preface.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/gettingstarted.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/usingvalidator.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/customconstraints.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/xmlconfiguration.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/bootstrapping.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/metadataapi.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/integration.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+                
+    <xi:include href="modules/customoptions.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+              
+	<xi:include href="modules/annotationprocessor.xml"
+			    xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+    <xi:include href="modules/furtherreading.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"/>
+</book>
diff --git a/project/documentation/src/main/docbook/en-US/modules/annotationprocessor.xml b/project/documentation/src/main/docbook/en-US/modules/annotationprocessor.xml
new file mode 100644
index 0000000..020b0c8
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/annotationprocessor.xml
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-annotation-processor">
+  <title>Annotation Processor</title>
+
+  <para>Have you ever caught yourself by unintentionally doing things
+  like</para>
+
+  <itemizedlist>
+    <listitem>
+      <para>specifying constraint annotations at unsupported data types (e.g.
+      by annotating a String with @Past)</para>
+    </listitem>
+
+    <listitem>
+      <para>annotating the setter of a JavaBean property (instead of the
+      getter method)</para>
+    </listitem>
+
+    <listitem>
+      <para>annotating static fields/methods with constraint annotations
+      (which is not supported)?</para>
+    </listitem>
+  </itemizedlist>
+
+  <para>Then the Hibernate Validator Annotation Processor is the right thing
+  for you. It helps preventing such mistakes by plugging into the build
+  process and raising compilation errors whenever constraint annotations are
+  incorrectly used.</para>
+
+  <note>
+    <para>You can find the Hibernate Validator Annotation Processor as part of
+    the distribution bundle on <ulink
+    url="http://sourceforge.net/projects/hibernate/files/hibernate-validator">Sourceforge</ulink>
+    or in the JBoss Maven Repository (see <xref
+    linkend="example-jboss-maven-url"/>) under the GAV
+    org.hibernate:hibernate-validator-annotation-processor.</para>
+  </note>
+
+  <section id="validator-annotationprocessor-prerequisites">
+    <title>Prerequisites</title>
+
+    <para>The Hibernate Validator Annotation Processor is based on the
+    "Pluggable Annotation Processing API" as defined by <ulink
+    url="http://jcp.org/en/jsr/detail?id=269">JSR 269</ulink> which is
+    part of the Java Platform since Java 6.</para>
+  </section>
+
+  <section id="validator-annotationprocessor-features">
+    <title>Features</title>
+
+    <para>As of Hibernate Validator &version; the Hibernate Validator
+    Annotation Processor checks that:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>constraint annotations are allowed for the type of the annotated
+        element</para>
+      </listitem>
+
+      <listitem>
+        <para>only non-static fields or methods are annotated with constraint
+        annotations</para>
+      </listitem>
+
+      <listitem>
+        <para>only non-primitive fields or methods are annotated with
+        @Valid</para>
+      </listitem>
+
+      <listitem>
+        <para>only such methods are annotated with constraint annotations
+        which are valid JavaBeans getter methods (optionally, see
+        below)</para>
+      </listitem>
+
+      <listitem>
+        <para>only such annotation types are annotated with constraint
+        annotations which are constraint annotations themselves</para>
+      </listitem>
+
+      <listitem>
+        <para>definition of dynamic default group sequence with
+        @GroupSequenceProvider is valid</para>
+      </listitem>
+    </itemizedlist>
+  </section>
+
+  <section id="validator-annotationprocessor-options">
+    <title>Options</title>
+
+    <para>The behavior of the Hibernate Validator Annotation Processor can be
+    controlled using the <ulink
+    url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
+    options</ulink> listed in table<xref
+    linkend="table_processor_options"/>:</para>
+
+    <table id="table_processor_options">
+      <title>Hibernate Validator Annotation Processor options</title>
+
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry align="center">Option</entry>
+
+            <entry align="center">Explanation</entry>
+          </row>
+        </thead>
+
+        <tbody>
+          <row>
+            <entry><varname>diagnosticKind</varname></entry>
+
+            <entry>Controls how constraint problems are reported. Must be the
+            string representation of one of the values from the enum
+            <classname>javax.tools.Diagnostic.Kind</classname>, e.g.
+            <classname>WARNING</classname>. A value of
+            <classname>ERROR</classname> will cause compilation to halt
+            whenever the AP detects a constraint problem. Defaults to
+            <classname>ERROR</classname>.</entry>
+          </row>
+
+          <row>
+            <entry><varname>methodConstraintsSupported</varname></entry>
+
+            <entry>Controls whether constraints are allowed at methods of any
+            kind. Must be set to <varname>true</varname> when working with
+            method level constraints as supported by Hibernate Validator. Can
+            be set to <varname>false</varname> to allow constraints only at
+            JavaBeans getter methods as defined by the Bean Validation API.
+            Defaults to <varname>true</varname>.</entry>
+          </row>
+
+          <row>
+            <entry><varname>verbose</varname></entry>
+
+            <entry>Controls whether detailed processing information shall be
+            displayed or not, useful for debugging purposes. Must be either
+            <varname>true</varname> or <varname>false</varname>. Defaults to
+            <varname>false</varname>.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  </section>
+
+  <section id="validator-annotationprocessor-usage">
+    <title>Using the Annotation Processor</title>
+
+    <para>This section shows in detail how to integrate the Hibernate
+    Validator Annotation Processor into command line builds (javac, Ant,
+    Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA,
+    NetBeans).</para>
+
+    <section id="validator-annotationprocessor-commandline">
+      <title>Command line builds</title>
+
+      <section id="validator-annotationprocessor-javac">
+        <title>javac</title>
+
+        <para>When compiling on the command line using <ulink
+        url="http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html">javac</ulink>,
+        specify the JAR hibernate-validator-annotation-processor-&version;.jar
+        using the "processorpath" option as shown in the following listing.
+        The processor will be detected automatically by the compiler and
+        invoked during compilation.</para>
+
+        <example>
+          <title>Using the annotation processor with javac</title>
+
+          <programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java \
+   -cp /path/to/validation-api-&bvVersion;.jar \
+   -processorpath /path/to/hibernate-validator-annotation-processor-&version;.jar</programlisting>
+        </example>
+      </section>
+
+      <section id="validator-annotationprocessor-ant">
+        <title>Apache Ant</title>
+
+        <para>Similar to directly working with javac, the annotation processor
+        can be added as as compiler argument when invoking the <ulink
+        url="http://ant.apache.org/manual/CoreTasks/javac.html">javac
+        task</ulink> for <ulink url="http://ant.apache.org/">Apache
+        Ant</ulink>:</para>
+
+        <example>
+          <title>Using the annotation processor with Ant</title>
+
+          <programlisting><javac srcdir="src/main"
+       destdir="build/classes"
+       classpath="/path/to/validation-api-&bvVersion;.jar">
+       <compilerarg value="-processorpath" />
+       <compilerarg value="/path/to/hibernate-validator-annotation-processor-&version;.jar"/>
+</javac></programlisting>
+        </example>
+      </section>
+
+      <section>
+        <title>Maven</title>
+
+        <para>There are several options for integrating the annotation
+        processor with <ulink url="http://maven.apache.org/">Apache
+        Maven</ulink>. Generally it is sufficient to add the Hibernate
+        Validator Annotation Processor as dependency to your project:</para>
+
+        <example>
+          <title>Adding the HV Annotation Processor as dependency</title>
+
+          <programlisting>...
+<dependency>
+    <groupId>org.hibernate</groupId>
+    <artifactId>hibernate-validator-annotation-processor</artifactId>
+    <version>&version;</version>
+    <scope>compile</scope>
+</dependency>
+...        </programlisting>
+        </example>
+
+        <para>The processor will then be executed automatically by the
+        compiler. This basically works, but comes with the disadavantage that
+        in some cases messages from the annotation processor are not displayed
+        (see <ulink
+        url="http://jira.codehaus.org/browse/MCOMPILER-66">MCOMPILER-66</ulink>).</para>
+
+        <para>Another option is using the <ulink
+        url="http://code.google.com/p/maven-annotation-plugin/">Maven
+        Annotation Plugin</ulink>. At the time of this writing the plugin is
+        not yet available in any of the well-known repositories. Therefore you
+        have to add the project's own repository to your settings.xml or
+        pom.xml:</para>
+
+        <example>
+          <title>Adding the Maven Annotation Plugin repository</title>
+
+          <programlisting>...
+<pluginRepositories>
+    <pluginRepository>
+        <id>maven-annotation-plugin-repo</id>
+        <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>
+    </pluginRepository>
+</pluginRepositories>
+...                      </programlisting>
+        </example>
+
+        <para>Now disable the standard annotation processing performed by the
+        compiler plugin and configure the annotation plugin by specifying an
+        execution and adding the Hibernate Validator Annotation Processor as
+        plugin dependency (that way the AP is not visible on the project's
+        actual classpath):</para>
+
+        <example>
+          <title>Configuring the Maven Annotation Plugin</title>
+
+          <programlisting>...
+<plugin>
+    <artifactId>maven-compiler-plugin</artifactId>
+    <configuration>
+        <source>1.6</source>
+        <target>1.6</target>
+        <compilerArgument>-proc:none</compilerArgument>
+    </configuration>
+</plugin>
+<plugin>
+    <groupId>org.bsc.maven</groupId>
+    <artifactId>maven-processor-plugin</artifactId>
+    <version>1.3.4</version>
+    <executions>
+        <execution>
+            <id>process</id>
+            <goals>
+                <goal>process</goal>
+            </goals>
+            <phase>process-sources</phase>
+        </execution>
+    </executions>
+    <dependencies>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator-annotation-processor</artifactId>
+            <version>&version;</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+</plugin>
+...
+                    </programlisting>
+        </example>
+      </section>
+    </section>
+
+    <section id="validator-annotationprocessor-ide">
+      <title>IDE builds</title>
+
+      <section>
+        <title>Eclipse</title>
+
+        <para>Do the following to use the annotation processor within the
+        <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE:</para>
+
+        <itemizedlist>
+          <listitem>
+            <para>Right-click your project, choose "Properties"</para>
+          </listitem>
+
+          <listitem>
+            <para>Go to "Java Compiler" and make sure, that "Compiler
+            compliance level" is set to "1.6". Otherwise the processor won't
+            be activated</para>
+          </listitem>
+
+          <listitem>
+            <para>Go to "Java Compiler - Annotation Processing" and choose
+            "Enable annotation processing"</para>
+          </listitem>
+
+          <listitem>
+            <para>Go to "Java Compiler - Annotation Processing - Factory Path"
+            and add the JAR
+            hibernate-validator-annotation-processor-&version;.jar</para>
+          </listitem>
+
+          <listitem>
+            <para>Confirm the workspace rebuild</para>
+          </listitem>
+        </itemizedlist>
+
+        <para>You now should see any annotation problems as regular error
+        markers within the editor and in the "Problem" view:</para>
+
+        <mediaobject>
+          <imageobject>
+            <imagedata align="center" arch="" contentwidth="150mm"
+                       fileref="annotation_processor_eclipse.png"/>
+          </imageobject>
+        </mediaobject>
+      </section>
+
+      <section id="validator-annotationprocessor-idea">
+        <title>IntelliJ IDEA</title>
+
+        <para>The following steps must be followed to use the annotation
+        processor within <ulink url="http://www.jetbrains.com/idea/">IntelliJ
+        IDEA</ulink> (version 9 and above):</para>
+
+        <itemizedlist>
+          <listitem>
+            <para>Go to "File", then "Settings",</para>
+          </listitem>
+
+          <listitem>
+            <para>Expand the node "Compiler", then "Annotation
+            Processors"</para>
+          </listitem>
+
+          <listitem>
+            <para>Choose "Enable annotation processing" and enter the
+            following as "Processor path":
+            /path/to/hibernate-validator-annotation-processor-&version;.jar</para>
+          </listitem>
+
+          <listitem>
+            <para>Add the processor's fully qualified name
+            <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>
+            to the "Annotation Processors" list</para>
+          </listitem>
+
+          <listitem>
+            <para>If applicable add you module to the "Processed Modules"
+            list</para>
+          </listitem>
+        </itemizedlist>
+
+        <para>Rebuilding your project then should show any erronous constraint
+        annotations:</para>
+
+        <mediaobject>
+          <imageobject>
+            <imagedata align="center" arch="" contentwidth="150mm"
+                       fileref="annotation_processor_intellij.png"/>
+          </imageobject>
+        </mediaobject>
+      </section>
+
+      <section id="validator-annotationprocessor-netbeans">
+        <title>NetBeans</title>
+
+        <para>Starting with version 6.9, also the <ulink
+        url="http://www.netbeans.org/">NetBeans</ulink> IDE supports using
+        annotation processors within the IDE build. To do so, do the
+        following:</para>
+
+        <itemizedlist>
+          <listitem>
+            <para>Right-click your project, choose "Properties"</para>
+          </listitem>
+
+          <listitem>
+            <para>Go to "Libraries", tab "Processor", and add the JAR
+            hibernate-validator-annotation-processor-&version;.jar</para>
+          </listitem>
+
+          <listitem>
+            <para>Go to "Build - Compiling", select "Enable Annotation
+            Processing" and "Enable Annotation Processing in Editor". Add the
+            annotation processor by specifying its fully qualified name
+            <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname></para>
+          </listitem>
+        </itemizedlist>
+
+        <para>Any constraint annotation problems will then be marked directly
+        within the editor:</para>
+
+        <mediaobject>
+          <imageobject>
+            <imagedata align="center" arch="" contentwidth="150mm"
+                       fileref="annotation_processor_netbeans.png"/>
+          </imageobject>
+        </mediaobject>
+      </section>
+    </section>
+  </section>
+
+  <section id="validator-annotationprocessor-known-issues">
+    <title>Known issues</title>
+
+    <para>The following known issues exist as of May 2010:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para><ulink
+        url="http://opensource.atlassian.com/projects/hibernate/browse/HV-308">HV-308</ulink>:
+        Additional validators registered for a constraint <ulink
+        url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/#d0e1957">using
+        XML</ulink> are not evaluated by the annotation processor.</para>
+      </listitem>
+
+      <listitem>
+        <para>Sometimes custom constraints can't be <ulink
+        url="http://opensource.atlassian.com/projects/hibernate/browse/HV-293">properly
+        evaluated</ulink> when using the processor within Eclipse. Cleaning
+        the project can help in these situations. This seems to be an issue
+        with the Eclipse JSR 269 API implementation, but further investigation
+        is required here.</para>
+      </listitem>
+
+      <listitem>
+        <para>When using the processor within Eclipse, the check of dynamic
+        default group sequence definitions doesn't work. After further
+        investigation, it seems to be an issue with the Eclipse JSR 269 API
+        implementation.</para>
+      </listitem>
+    </itemizedlist>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/bootstrapping.xml b/project/documentation/src/main/docbook/en-US/modules/bootstrapping.xml
new file mode 100644
index 0000000..4850b0a
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/bootstrapping.xml
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-bootstrapping">
+  <title>Bootstrapping</title>
+
+  <para>We already seen in <xref linkend="section-validator-instance"/> the
+  easiest way to create a <classname>Validator</classname> instance -
+  <methodname>Validation.buildDefaultValidatorFactory</methodname>. In this
+  chapter we have a look at the other methods in
+  <classname>javax.validation.Validation</classname> and how they allow to
+  configure several aspects of Bean Validation at bootstrapping time.</para>
+
+  <para>The different bootstrapping options allow, amongst other things, to
+  bootstrap any Bean Validation implementation on the classpath. Generally, an
+  available provider is discovered by the <ulink
+  url="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider">Java
+  Service Provider</ulink> mechanism. A Bean Validation implementation
+  includes the file
+  <filename>javax.validation.spi.ValidationProvider</filename> in
+  <filename>META-INF/services</filename>. This file contains the fully
+  qualified classname of the <classname>ValidationProvider</classname> of the
+  implementation. In the case of Hibernate Validator this is
+  <classname>org.hibernate.validator.HibernateValidator</classname>.</para>
+
+  <note>
+    <para>If there are more than one Bean Validation implementation providers
+    in the classpath and
+    <methodname>Validation.buildDefaultValidatorFactory()</methodname> is
+    used, there is no guarantee which provider will be chosen. To enforce the
+    provider <methodname>Validation.byProvider()</methodname> should be
+    used.</para>
+  </note>
+
+  <section id="section-validator-instance">
+    <title><classname>Configuration</classname> and
+    <classname>ValidatorFactory</classname></title>
+
+    <para>There are three different methods in the Validation class to create
+    a Validator instance. The easiest in shown in <xref
+    linkend="example-build-default-validator-factory"/>.</para>
+
+    <example id="example-build-default-validator-factory">
+      <title>Validation.buildDefaultValidatorFactory()</title>
+
+      <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+Validator validator = factory.getValidator();</programlisting>
+    </example>
+
+    <para>You can also use the method
+    <methodname>Validation.byDefaultProvider()</methodname> which will allow
+    you to configure several aspects of the created Validator instance:</para>
+
+    <example>
+      <title>Validation.byDefaultProvider()</title>
+
+      <programlisting language="JAVA" role="JAVA">Configuration<?> config = Validation.byDefaultProvider().configure();
+config.messageInterpolator(new MyMessageInterpolator())
+    .traversableResolver( new MyTraversableResolver())
+    .constraintValidatorFactory(new MyConstraintValidatorFactory());
+
+ValidatorFactory factory = config.buildValidatorFactory();
+Validator validator = factory.getValidator();
+</programlisting>
+    </example>
+
+    <para>We will learn more about <classname>MessageInterpolator</classname>,
+    <classname>TraversableResolver</classname> and
+    <classname>ConstraintValidatorFactory</classname> in the following
+    sections.</para>
+
+    <para>Last but not least you can ask for a Configuration object of a
+    specific Bean Validation provider. This is useful if you have more than
+    one Bean Validation provider in your classpath. In this situation you can
+    make an explicit choice about which implementation to use. In the case of
+    Hibernate Validator the <classname>Validator</classname> creation looks
+    like:</para>
+
+    <example>
+      <title>Validation.byProvider( HibernateValidator.class )</title>
+
+      <programlisting language="JAVA" role="JAVA">HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
+config.messageInterpolator(new MyMessageInterpolator())
+    .traversableResolver( new MyTraversableResolver())
+    .constraintValidatorFactory(new MyConstraintValidatorFactory());
+
+ValidatorFactory factory = config.buildValidatorFactory();
+Validator validator = factory.getValidator();</programlisting>
+    </example>
+
+    <para><tip>
+        <para>The generated <classname>Validator</classname> instance is
+        thread safe and can be cached.</para>
+      </tip></para>
+  </section>
+
+  <section id="section-validation-provider-resolver">
+    <title><classname>ValidationProviderResolver</classname></title>
+
+    <para>In the case that the Java Service Provider mechanism does not work
+    in your environment or you have a special classloader setup, you are able
+    to provide a custom <classname>ValidationProviderResolver</classname>. An
+    example in an OSGi environment you could plug your custom provider
+    resolver like seen in <xref linkend="example-provider-resolver"/>.</para>
+
+    <example id="example-provider-resolver">
+      <title>Providing a custom ValidationProviderResolver</title>
+
+      <programlisting language="JAVA" role="JAVA">Configuration<?> config = Validation.byDefaultProvider()
+    .providerResolver( new OSGiServiceDiscoverer() )
+    .configure();
+
+ValidatorFactory factory = config.buildValidatorFactory();
+Validator validator = factory.getValidator();
+</programlisting>
+    </example>
+
+    <para>Your <classname>OSGiServiceDiscoverer</classname> must in this case
+    implement the interface
+    <classname>ValidationProviderResolver</classname>:</para>
+
+    <example>
+      <title>ValidationProviderResolver interface</title>
+
+      <programlisting language="JAVA" role="JAVA">public interface ValidationProviderResolver {
+    /**
+     * Returns a list of ValidationProviders available in the runtime environment.
+     *
+     * @return list of validation providers.  
+     */
+    List<ValidationProvider<?>> getValidationProviders();
+}
+</programlisting>
+    </example>
+  </section>
+
+  <section id="section-message-interpolator">
+    <title><classname>MessageInterpolator</classname></title>
+
+    <para><xref linkend="section-message-interpolation"/> already discussed
+    the default message interpolation algorithm. If you have special
+    requirements for your message interpolation you can provide a custom
+    interpolator using
+    <methodname>Configuration.messageInterpolator()</methodname>. This message
+    interpolator will be shared by all validators generated by the
+    <classname>ValidatorFactory</classname> created from this
+    <classname>Configuration</classname>. <xref
+    linkend="example-message-interpolator"/> shows an interpolator (available
+    in Hibernate Validator) which can interpolate the value being validated in
+    the constraint message. To refer to this value in the constraint message
+    you can use: <itemizedlist>
+        <listitem>
+          <para>${validatedValue}: this will call <methodname>String.valueOf
+          </methodname>on the validated value.</para>
+        </listitem>
+
+        <listitem>
+          <para>${validatedValue:<format>}: provide your own format
+          string which will be passed to <code>String.format</code> together
+          with the validated value. Refer to the javadoc of
+          <code>String.format</code> for more information about the format
+          options.</para>
+        </listitem>
+      </itemizedlist></para>
+
+    <example id="example-message-interpolator">
+      <title>Providing a custom MessageInterpolator</title>
+
+      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
+ValidatorFactory factory = configuration
+    .messageInterpolator(new ValueFormatterMessageInterpolator(configuration.getDefaultMessageInterpolator()))
+    .buildValidatorFactory();
+
+Validator validator = factory.getValidator();
+</programlisting>
+    </example>
+
+    <tip>
+      <para>It is recommended that <classname>MessageInterpolator</classname>
+      implementations delegate final interpolation to the Bean Validation
+      default <classname>MessageInterpolator</classname> to ensure standard
+      Bean Validation interpolation rules are followed. The default
+      implementation is accessible through
+      <methodname>Configuration.getDefaultMessageInterpolator()</methodname>.</para>
+    </tip>
+
+    <section id="section-resource-bundle-locator">
+      <title>ResourceBundleLocator</title>
+
+      <para>A common use case is the ability to specify your own resource
+      bundles for message interpolation. The default
+      <classname>MessageInterpolator</classname> implementation in Hibernate
+      Validator is called
+      <classname>ResourceBundleMessageInterpolator</classname> and per default
+      loads resource bundles via
+      <methodname>ResourceBundle.getBundle</methodname>. However,
+      <classname>ResourceBundleMessageInterpolator</classname> also allows you
+      to specify a custom implementation of
+      <classname>ResourceBundleLocator</classname> allowing you to provide
+      your own resource bundles. <xref
+      linkend="example-resource-bundle-locator"/> shows an example. In the
+      example<methodname>
+      HibernateValidatorConfiguration.getDefaultResourceBundleLocator</methodname>
+      is used to retrieve the default
+      <classname>ResourceBundleLocator</classname> which then can be passed to
+      the custom implementation in order implement delegation.</para>
+
+      <example id="example-resource-bundle-locator">
+        <title>Providing a custom ResourceBundleLocator</title>
+
+        <programlisting language="JAVA" role="JAVA">HibernateValidatorConfiguration configure = Validation.byProvider(HibernateValidator.class).configure();
+
+ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator(); 
+ResourceBundleLocator myResourceBundleLocator = new MyCustomResourceBundleLocator(defaultResourceBundleLocator);
+
+configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBundleLocator));
+</programlisting>
+      </example>
+
+      <para>Hibernate Validator provides the following implementation of
+      <classname>ResourceBundleLocator</classname> -
+      <classname>PlatformResourceBundleLocator</classname> (the default) and
+      <classname>AggregateResourceBundleLocator</classname>. The latter can be
+      used to specify a list of resource bundle names which will get loaded
+      and merged into a single resource bundle. Refer to the JavaDoc
+      documentation for more information.</para>
+    </section>
+  </section>
+
+  <section>
+    <title><classname>TraversableResolver</classname></title>
+
+    <para>The usage of the <classname>TraversableResolver</classname> has so
+    far not been discussed. The idea is that in some cases, the state of a
+    property should not be accessed. The most obvious example for that is a
+    lazy loaded property or association of a Java Persistence provider.
+    Validating this lazy property or association would mean that its state
+    would have to be accessed triggering a load from the database. Bean
+    Validation controls which property can and cannot be accessed via the
+    <classname>TraversableResolver</classname> interface (see <xref
+    linkend="example-traversable-resolver"/>). In the example
+    HibernateValidatorConfiguration.</para>
+
+    <example id="example-traversable-resolver">
+      <title>TraversableResolver interface</title>
+
+      <programlisting language="JAVA" role="JAVA">/**
+ * Contract determining if a property can be accessed by the Bean Validation provider
+ * This contract is called for each property that is being either validated or cascaded.
+ *
+ * A traversable resolver implementation must be thread-safe.
+ *
+ */
+public interface TraversableResolver {
+    /**
+     * Determine if the Bean Validation provider is allowed to reach the property state
+     *
+     * @param traversableObject object hosting <code>traversableProperty</code> or null  
+     *                          if validateValue is called
+     * @param traversableProperty the traversable property.
+     * @param rootBeanType type of the root object passed to the Validator.
+     * @param pathToTraversableObject path from the root object to
+     *        <code>traversableObject</code>
+     *        (using the path specification defined by Bean Validator).
+     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.
+     *
+     * @return <code>true</code> if the Bean Validation provider is allowed to
+     *         reach the property state, <code>false</code> otherwise.
+     */
+     boolean isReachable(Object traversableObject,
+                         Path.Node traversableProperty,
+                         Class<?> rootBeanType,
+                         Path pathToTraversableObject,
+                         ElementType elementType);
+
+    /**
+     * Determine if the Bean Validation provider is allowed to cascade validation on
+     * the bean instance returned by the property value
+     * marked as <code>@Valid</code>.
+     * Note that this method is called only if isReachable returns true for the same set of
+     * arguments and if the property is marked as <code>@Valid</code>
+     *
+     * @param traversableObject object hosting <code>traversableProperty</code> or null
+     *                          if validateValue is called
+     * @param traversableProperty the traversable property.
+     * @param rootBeanType type of the root object passed to the Validator.
+     * @param pathToTraversableObject path from the root object to
+     *        <code>traversableObject</code>
+     *        (using the path specification defined by Bean Validator).
+     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.
+     *
+     * @return <code>true</code> if the Bean Validation provider is allowed to
+     *         cascade validation, <code>false</code> otherwise.
+     */
+     boolean isCascadable(Object traversableObject,
+                          Path.Node traversableProperty,
+                          Class<?> rootBeanType,
+                          Path pathToTraversableObject,
+                          ElementType elementType);
+}
+</programlisting>
+    </example>
+
+    <para>Hibernate Validator provides two
+    <classname>TraversableResolver</classname>s out of the box which will be
+    enabled automatically depending on your environment. The first is the
+    <classname>DefaultTraversableResolver</classname> which will always return
+    true for <methodname>isReachable()</methodname> and
+    <methodname>isTraversable()</methodname>. The second is the
+    <classname>JPATraversableResolver</classname> which gets enabled when
+    Hibernate Validator gets used in combination with JPA 2. In case you have
+    to provide your own resolver you can do so again using the
+    <classname>Configuration</classname> object as seen in <xref
+    linkend="example-traversable-resolver-config"/>.</para>
+
+    <example id="example-traversable-resolver-config">
+      <title>Providing a custom TraversableResolver</title>
+
+      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
+ValidatorFactory factory = configuration
+    .traversableResolver(new MyTraversableResolver())
+    .buildValidatorFactory();
+
+Validator validator = factory.getValidator();
+</programlisting>
+    </example>
+  </section>
+
+  <section>
+    <title><classname>ConstraintValidatorFactory</classname></title>
+
+    <para>Last but not least, there is one more configuration option to
+    discuss, the <classname>ConstraintValidatorFactory</classname>. The
+    default <classname>ConstraintValidatorFactory</classname> provided by
+    Hibernate Validator requires a public no-arg constructor to instantiate
+    <classname>ConstraintValidator</classname> instances (see <xref
+    linkend="section-constraint-validator"/>). Using a custom
+    <classname>ConstraintValidatorFactory</classname> offers for example the
+    possibility to use dependency injection in constraint implementations. The
+    configuration of the custom factory is once more via the
+    <classname>Configuration</classname> (<xref
+    linkend="example-constraint-validator-factory"/>).</para>
+
+    <example id="example-constraint-validator-factory">
+      <title>Providing a custom ConstraintValidatorFactory</title>
+
+      <programlisting language="JAVA" role="JAVA">Configuration<?> configuration = Validation.byDefaultProvider().configure();
+ValidatorFactory factory = configuration
+    .constraintValidatorFactory(new IOCConstraintValidatorFactory())
+    .buildValidatorFactory();
+
+Validator validator = factory.getValidator();
+</programlisting>
+    </example>
+
+    <para>The interface you have to implement is:</para>
+
+    <example>
+      <title>ConstraintValidatorFactory interface</title>
+
+      <programlisting language="JAVA" role="JAVA">public interface ConstraintValidatorFactory {
+    /**
+     * @param key The class of the constraint validator to instantiate.
+     *
+     * @return A constraint validator instance of the specified class.
+     */
+     <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key);
+}
+</programlisting>
+    </example>
+
+    <warning>
+      <para>Any constraint implementation relying on
+      <classname>ConstraintValidatorFactory</classname> behaviors specific to
+      an implementation (dependency injection, no no-arg constructor and so
+      on) are not considered portable.</para>
+    </warning>
+
+    <note>
+      <para>ConstraintValidatorFactory should not cache instances as the state
+      of each instance can be altered in the initialize method.</para>
+    </note>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/customconstraints.xml b/project/documentation/src/main/docbook/en-US/modules/customconstraints.xml
new file mode 100644
index 0000000..75dcf28
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/customconstraints.xml
@@ -0,0 +1,611 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-customconstraints">
+  <title>Creating custom constraints</title>
+
+  <para>Though the Bean Validation API defines a whole set of standard
+  constraint annotations one can easily think of situations in which these
+  standard annotations won't suffice. For these cases you are able to create
+  custom constraints tailored to your specific validation requirements in a
+  simple manner.</para>
+
+  <section id="validator-customconstraints-simple">
+    <title>Creating a simple constraint</title>
+
+    <para>To create a custom constraint, the following three steps are
+    required:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>Create a constraint annotation</para>
+      </listitem>
+
+      <listitem>
+        <para>Implement a validator</para>
+      </listitem>
+
+      <listitem>
+        <para>Define a default error message</para>
+      </listitem>
+    </itemizedlist>
+
+    <section id="validator-customconstraints-constraintannotation">
+      <title>The constraint annotation</title>
+
+      <para>Let's write a constraint annotation, that can be used to express
+      that a given string shall either be upper case or lower case. We'll
+      apply it later on to the <property>licensePlate</property> field of the
+      <classname>Car</classname> class from <xref
+      linkend="validator-gettingstarted" /> to ensure, that the field is
+      always an upper-case string.</para>
+
+      <para>First we need a way to express the two case modes. We might use
+      <classname>String</classname> constants, but a better way to go is to
+      use a Java 5 enum for that purpose:</para>
+
+      <example>
+        <title>Enum <classname>CaseMode</classname> to express upper vs. lower
+        case</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+public enum CaseMode {
+    UPPER, 
+    LOWER;
+}</programlisting>
+      </example>
+
+      <para>Now we can define the actual constraint annotation. If you've
+      never designed an annotation before, this may look a bit scary, but
+      actually it's not that hard:</para>
+
+      <example id="example-defining-custom-constraint">
+        <title>Defining CheckCase constraint annotation</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+ at Target( { METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = CheckCaseValidator.class)
+ at Documented
+public @interface CheckCase {
+
+    String message() default "{com.mycompany.constraints.checkcase}";
+
+    Class<?>[] groups() default {};
+
+    Class<? extends Payload>[] payload() default {};
+    
+    CaseMode value();
+
+}</programlisting>
+      </example>
+
+      <para>An annotation type is defined using the <code>@interface</code>
+      keyword. All attributes of an annotation type are declared in a
+      method-like manner. The specification of the Bean Validation API
+      demands, that any constraint annotation defines</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>an attribute <property>message</property> that returns the
+          default key for creating error messages in case the constraint is
+          violated</para>
+        </listitem>
+
+        <listitem>
+          <para>an attribute <property>groups</property> that allows the
+          specification of validation groups, to which this constraint belongs
+          (see <xref linkend="validator-usingvalidator-validationgroups" />).
+          This must default to an empty array of type
+          <classname>Class<?></classname>.</para>
+        </listitem>
+
+        <listitem>
+          <para>an attribute <classname>payload</classname> that can be used
+          by clients of the Bean Validation API to assign custom payload
+          objects to a constraint. This attribute is not used by the API
+          itself. <tip>
+              <para>An example for a custom payload could be the definition of
+              a severity.</para>
+
+              <programlisting>public class Severity {
+    public static class Info extends Payload {};
+    public static class Error extends Payload {};
+}
+
+public class ContactDetails {
+    @NotNull(message="Name is mandatory", payload=Severity.Error.class)
+    private String name;
+
+    @NotNull(message="Phone number not specified, but not mandatory", payload=Severity.Info.class)
+    private String phoneNumber;
+
+    // ...
+}</programlisting>
+
+              <para>Now a client can after the validation of a
+              <classname>ContactDetails</classname> instance access the
+              severity of a constraint using
+              <methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</methodname>
+              and adjust its behaviour depending on the severity.</para>
+            </tip></para>
+        </listitem>
+      </itemizedlist>
+
+      <para>Besides those three mandatory attributes
+      (<property>message</property>, <property>groups</property> and
+      <property>payload</property>) we add another one allowing for the
+      required case mode to be specified. The name <property>value</property>
+      is a special one, which can be omitted upon using the annotation, if it
+      is the only attribute specified, as e.g. in
+      <code>@CheckCase(CaseMode.UPPER)</code>.</para>
+
+      <para>In addition we annotate the annotation type with a couple of
+      so-called meta annotations:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para><code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>:
+          Says, that methods, fields and annotation declarations may be
+          annotated with @CheckCase (but not type declarations e.g.)</para>
+        </listitem>
+
+        <listitem>
+          <para><code>@Retention(RUNTIME)</code>: Specifies, that annotations
+          of this type will be available at runtime by the means of
+          reflection</para>
+        </listitem>
+
+        <listitem>
+          <para><code>@Constraint(validatedBy =
+          CheckCaseValidator.class)</code>: Specifies the validator to be used
+          to validate elements annotated with @CheckCase</para>
+        </listitem>
+
+        <listitem>
+          <para><code>@Documented</code>: Says, that the use of
+          <code>@CheckCase</code> will be contained in the JavaDoc of elements
+          annotated with it</para>
+        </listitem>
+      </itemizedlist>
+
+      <tip>
+        <para>Hibernate Validator provides support for the validation of
+        method parameters using constraint annotations (see <xref
+        linkend="validator-customoptions-methodvalidation" />).</para>
+
+        <para>In order to use a custom constraint for parameter validation the
+        <classname>ElementType.PARAMETER</classname> must be specified within
+        the <classname>@Target</classname> annotation. This is already the
+        case for all constraints defined by the Bean Validation API and also
+        the custom constraints provided by Hibernate Validator.</para>
+      </tip>
+    </section>
+
+    <section id="validator-customconstraints-validator">
+      <title id="section-constraint-validator">The constraint
+      validator</title>
+
+      <para>Next, we need to implement a constraint validator, that's able to
+      validate elements with a <classname>@CheckCase</classname> annotation.
+      To do so, we implement the interface
+      <classname>ConstraintValidator</classname> as shown below:</para>
+
+      <example id="example-constraint-validator">
+        <title>Implementing a constraint validator for the constraint
+        <classname>CheckCase</classname></title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
+
+    private CaseMode caseMode;
+
+    public void initialize(CheckCase constraintAnnotation) {
+        this.caseMode = constraintAnnotation.value();
+    }
+
+    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
+
+        if (object == null)
+            return true;
+
+        if (caseMode == CaseMode.UPPER)
+            return object.equals(object.toUpperCase());
+        else
+            return object.equals(object.toLowerCase());
+    }
+
+}</programlisting>
+      </example>
+
+      <para>The <classname>ConstraintValidator</classname> interface defines
+      two type parameters, which we set in our implementation. The first one
+      specifies the annotation type to be validated (in our example
+      <classname>CheckCase</classname>), the second one the type of elements,
+      which the validator can handle (here
+      <classname>String</classname>).</para>
+
+      <para>In case a constraint annotation is allowed at elements of
+      different types, a <classname>ConstraintValidator</classname> for each
+      allowed type has to be implemented and registered at the constraint
+      annotation as shown above.</para>
+
+      <para>The implementation of the validator is straightforward. The
+      <methodname>initialize()</methodname> method gives us access to the
+      attribute values of the annotation to be validated. In the example we
+      store the <classname>CaseMode</classname> in a field of the validator
+      for further usage.</para>
+
+      <para>In the <methodname>isValid()</methodname> method we implement the
+      logic, that determines, whether a <classname>String</classname> is valid
+      according to a given <classname>@CheckCase</classname> annotation or
+      not. This decision depends on the case mode retrieved in
+      <classname>initialize()</classname>. As the Bean Validation
+      specification recommends, we consider <code>null</code> values as being
+      valid. If <code>null</code> is not a valid value for an element, it
+      should be annotated with <code>@NotNull</code> explicitly.</para>
+
+      <section>
+        <title>The ConstraintValidatorContext</title>
+
+        <para><xref linkend="example-constraint-validator" /> relies on the
+        default error message generation by just returning
+        <constant>true</constant> or <constant>false</constant> from the
+        <methodname>isValid</methodname> call. Using the passed
+        <classname>ConstraintValidatorContext</classname> object it is
+        possible to either add additional error messages or completely disable
+        the default error message generation and solely define custom error
+        messages. The <classname>ConstraintValidatorContext</classname> API is
+        modeled as fluent interface and is best demonstrated with an
+        example:</para>
+
+        <example id="example-constraint-validator-context">
+          <title>Use of ConstraintValidatorContext to define custom error
+          messages</title>
+
+          <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
+
+    private CaseMode caseMode;
+
+    public void initialize(CheckCase constraintAnnotation) {
+        this.caseMode = constraintAnnotation.value();
+    }
+
+    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
+
+        if (object == null)
+            return true;
+        
+        boolean isValid;
+        if (caseMode == CaseMode.UPPER) {
+            isValid = object.equals(object.toUpperCase());
+        }
+        else {
+            isValid = object.equals(object.toLowerCase());
+        }
+        
+        if(!isValid) {
+            constraintContext.disableDefaultConstraintViolation();
+            constraintContext.buildConstraintViolationWithTemplate( "{com.mycompany.constraints.CheckCase.message}"  ).addConstraintViolation();
+        }
+        return result;
+    }
+
+}</programlisting>
+        </example>
+
+        <para><xref linkend="example-constraint-validator-context" os="" />
+        shows how you can disable the default error message generation and add
+        a custom error message using a specified message template. In this
+        example the use of the
+        <classname>ConstraintValidatorContext</classname> results in the same
+        error message as the default error message generation. <tip>
+            <para>It is important to end each new constraint violation with
+            <methodname>addConstraintViolation</methodname>. Only after that
+            the new constraint violation will be created.</para>
+          </tip></para>
+
+        <para>In case you are implementing a
+        <classname>ConstraintValidator</classname> a class level constraint it
+        is also possible to adjust set the property path for the created
+        constraint violations. This is important for the case where you
+        validate multiple properties of the class or even traverse the object
+        graph. A custom property path creation could look like <xref
+        linkend="example-custom-error" />.</para>
+
+        <example id="example-custom-error">
+          <title>Adding new <classname>ConstraintViolation</classname> with
+          custom property path</title>
+
+          <programlisting language="JAVA" role="JAVA">public boolean isValid(Group group, ConstraintValidatorContext constraintValidatorContext) {
+    boolean isValid = false;
+    ...
+
+    if(!isValid) {
+        constraintValidatorContext
+            .buildConstraintViolationWithTemplate( "{my.custom.template}" )
+            .addNode( "myProperty" ).addConstraintViolation();
+    }
+    return isValid;
+}
+
+</programlisting>
+        </example>
+      </section>
+    </section>
+
+    <section id="validator-customconstraints-errormessage">
+      <title>The error message</title>
+
+      <para>Finally we need to specify the error message, that shall be used,
+      in case a <classname>@CheckCase</classname> constraint is violated. To
+      do so, we add the following to our custom
+      <filename>ValidationMessages.properties</filename> (see also <xref
+      linkend="section-message-interpolation" />)</para>
+
+      <example>
+        <title>Defining a custom error message for the
+        <classname>CheckCase</classname> constraint</title>
+
+        <programlisting>com.mycompany.constraints.CheckCase.message=Case mode must be {value}.</programlisting>
+      </example>
+
+      <para>If a validation error occurs, the validation runtime will use the
+      default value, that we specified for the message attribute of the
+      <classname>@CheckCase</classname> annotation to look up the error
+      message in this file.</para>
+    </section>
+
+    <section id="validator-customconstraints-using">
+      <title>Using the constraint</title>
+
+      <para>Now that our first custom constraint is completed, we can use it
+      in the <classname>Car</classname> class from the <xref
+      linkend="validator-gettingstarted" /> chapter to specify that the
+      <property>licensePlate</property> field shall only contain upper-case
+      strings:</para>
+
+      <example id="example-car-with-checkcase">
+        <title>Applying the <classname>CheckCase</classname>
+        constraint</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+public class Car {
+
+    @NotNull
+    private String manufacturer;
+
+    @NotNull
+    @Size(min = 2, max = 14)
+    @CheckCase(CaseMode.UPPER)
+    private String licensePlate;
+
+    @Min(2)
+    private int seatCount;
+    
+    public Car(String manufacturer, String licencePlate, int seatCount) {
+
+        this.manufacturer = manufacturer;
+        this.licensePlate = licencePlate;
+        this.seatCount = seatCount;
+    }
+
+    //getters and setters ...
+
+}</programlisting>
+      </example>
+
+      <para>Finally let's demonstrate in a little test that the
+      <classname>@CheckCase</classname> constraint is properly
+      validated:</para>
+
+      <example>
+        <title>Testcase demonstrating the <classname>CheckCase</classname>
+        validation</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import static org.junit.Assert.*;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CarTest {
+
+    private static Validator validator;
+
+    @BeforeClass
+    public static void setUp() {
+        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+        validator = factory.getValidator();
+    }
+
+    @Test
+    public void testLicensePlateNotUpperCase() {
+
+        Car car = new Car("Morris", "dd-ab-123", 4);
+
+        Set<ConstraintViolation<Car>> constraintViolations =
+            validator.validate(car);
+        assertEquals(1, constraintViolations.size());
+        assertEquals(
+            "Case mode must be UPPER.", 
+            constraintViolations.iterator().next().getMessage());
+    }
+
+    @Test
+    public void carIsValid() {
+
+        Car car = new Car("Morris", "DD-AB-123", 4);
+
+        Set<ConstraintViolation<Car>> constraintViolations =
+            validator.validate(car);
+
+        assertEquals(0, constraintViolations.size());
+    }
+}</programlisting>
+      </example>
+    </section>
+  </section>
+
+  <section id="validator-customconstraints-compound">
+    <title id="section-constraint-composition">Constraint composition</title>
+
+    <para>Looking at the <property>licensePlate</property> field of the
+    <classname>Car</classname> class in <xref
+    linkend="example-car-with-checkcase" />, we see three constraint
+    annotations already. In complexer scenarios, where even more constraints
+    could be applied to one element, this might become a bit confusing easily.
+    Furthermore, if we had a <property>licensePlate</property> field in
+    another class, we would have to copy all constraint declarations to the
+    other class as well, violating the DRY principle.</para>
+
+    <para>This problem can be tackled using compound constraints. In the
+    following we create a new constraint annotation
+    <classname>@ValidLicensePlate</classname>, that comprises the constraints
+    <classname>@NotNull</classname>, <classname>@Size</classname> and
+    <classname>@CheckCase</classname>:</para>
+
+    <example>
+      <title>Creating a composing constraint
+      <classname>ValidLicensePlate</classname></title>
+
+      <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+ at NotNull
+ at Size(min = 2, max = 14)
+ at CheckCase(CaseMode.UPPER)
+ at Target( { METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = {})
+ at Documented
+public @interface ValidLicensePlate {
+
+    String message() default "{com.mycompany.constraints.validlicenseplate}";
+
+    Class<?>[] groups() default {};
+
+    Class<? extends Payload>[] payload() default {};
+
+}</programlisting>
+    </example>
+
+    <para>To do so, we just have to annotate the constraint declaration with
+    its comprising constraints (btw. that's exactly why we allowed annotation
+    types as target for the <classname>@CheckCase</classname> annotation). As
+    no additional validation is required for the
+    <classname>@ValidLicensePlate</classname> annotation itself, we don't
+    declare a validator within the <classname>@Constraint </classname>meta
+    annotation.</para>
+
+    <para>Using the new compound constraint at the
+    <property>licensePlate</property> field now is fully equivalent to the
+    previous version, where we declared the three constraints directly at the
+    field itself:</para>
+
+    <example>
+      <title>Application of composing constraint
+      <classname>ValidLicensePlate</classname></title>
+
+      <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+public class Car {
+
+    @ValidLicensePlate
+    private String licensePlate;
+
+    //...
+
+}</programlisting>
+    </example>
+
+    <para>The set of <classname>ConstraintViolations</classname> retrieved
+    when validating a <classname>Car</classname> instance will contain an
+    entry for each violated composing constraint of the
+    <classname>@ValidLicensePlate</classname> constraint. If you rather prefer
+    a single <classname>ConstraintViolation</classname> in case any of the
+    composing constraints is violated, the
+    <classname>@ReportAsSingleViolation</classname> meta constraint can be
+    used as follows:</para>
+
+    <example>
+      <title>Usage of <classname>@ReportAsSingleViolation</classname></title>
+
+      <programlisting language="JAVA" role="JAVA">//...
+ at ReportAsSingleViolation
+public @interface ValidLicensePlate {
+
+    String message() default "{com.mycompany.constraints.validlicenseplate}";
+
+    Class<?>[] groups() default {};
+
+    Class<? extends Payload>[] payload() default {};
+
+}</programlisting>
+    </example>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/customoptions.xml b/project/documentation/src/main/docbook/en-US/modules/customoptions.xml
new file mode 100644
index 0000000..d16b291
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/customoptions.xml
@@ -0,0 +1,731 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-specifics">
+  <title>Hibernate Validator Specifics</title>
+
+  <para>In the following sections we are having a closer look at some of the
+  Hibernate Validator specific features (features which are not part of the
+  Bean Validation specification). This includes the fail fast mode, the
+  programmatic constraint configuration API and boolean composition of
+  composing constraints.</para>
+
+  <note>
+    <para>The features described in the following sections are not portable
+    between Bean Validation providers/implementations.</para>
+  </note>
+
+  <section>
+    <title>Public API</title>
+
+    <para>Let's start, however, with a look at the public API of Hibernate
+    Validator. <xref linkend="validator-public-api"/> lists all packages
+    belonging to this API and describes their purpose.</para>
+
+    <para>Any packages not listed in that table are internal packages of
+    Hibernate Validator and are not intended to be accessed by clients. The
+    contents of these internal packages can change from release to release
+    without notice, thus possibly breaking any client code relying on
+    it.</para>
+
+    <note>
+      <para>In the following table, when a package is public its not
+      necessarily true for its nested packages.</para>
+    </note>
+
+    <table id="validator-public-api">
+      <title>Hibernate Validator public API</title>
+
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Packages</entry>
+
+            <entry>Description</entry>
+          </row>
+        </thead>
+
+        <tbody valign="top">
+          <row>
+            <entry><package>org.hibernate.validator</package></entry>
+
+            <entry>This package contains the classes used by the Bean
+            Validation bootstrap mechanism (eg. validation provider,
+            configuration class). For more details see <xref
+            linkend="validator-bootstrapping"/>.</entry>
+          </row>
+
+          <row>
+            <entry><package>org.hibernate.validator.cfg</package>,
+            <package>org.hibernate.validator.cfg.context</package>,
+            <package>org.hibernate.validator.cfg.defs</package></entry>
+
+            <entry>With Hibernate Validator you can define constraints via a
+            fluent API. These packages contain all classes needed to use this
+            feature. In the package
+            <package>org.hibernate.validator.cfg</package> you will find the
+            <classname>ConstraintMapping</classname> class and in package
+            <package>org.hibernate.validator.cfg.defs</package> all constraint
+            definitions. For more details see <xref
+            linkend="programmaticapi"/>.</entry>
+          </row>
+
+          <row>
+            <entry><package>org.hibernate.validator.constraints</package>,
+            <package>org.hibernate.validator.constraints.br</package></entry>
+
+            <entry>In addition to Bean Validation constraints, Hibernate
+            Validator provides some useful custom constraints. These packages
+            contain all custom annotation classes. For more details see <xref
+            linkend="validator-defineconstraints-hv-constraints"/>.</entry>
+          </row>
+
+          <row>
+            <entry><package>org.hibernate.validator.group</package>,
+            <package>org.hibernate.validator.spi.group</package></entry>
+
+            <entry>With Hibernate Validator you can define dynamic default
+            group sequences in function of the validated object state. These
+            packages contain all classes needed to use this feature
+            (<classname>GroupSequenceProvider</classname> annotation and
+            <classname>DefaultGroupSequenceProvider</classname> contract). For
+            more details see <xref
+            linkend="section-default-group-class"/>.</entry>
+          </row>
+
+          <row>
+            <entry><package>org.hibernate.validator.messageinterpolation</package>,
+            <package>org.hibernate.validator.resourceloading</package>,
+            <package>org.hibernate.validator.spi.resourceloading</package></entry>
+
+            <entry>These packages contain the classes related to constraint
+            message interpolation. The first package contains two
+            implementations of <classname>MessageInterpolator</classname>. The
+            first one,
+            <classname>ValueFormatterMessageInterpolator</classname> allows to
+            interpolate the validated value into the constraint message, see
+            <xref linkend="section-message-interpolator"/>. The second
+            implementation named
+            <classname>ResourceBundleMessageInterpolator</classname> is the
+            implementation used by default by Hibernate Validator. This
+            implementation relies on a
+            <classname>ResourceBundleLocator</classname>, see <xref
+            linkend="section-resource-bundle-locator"/>. Hibernate Validator
+            provides different <classname>ResourceBundleLocator</classname>
+            implementations located in the package
+            <package>org.hibernate.validator.resourceloading</package>.</entry>
+          </row>
+
+          <row>
+            <entry><package>org.hibernate.validator.method</package>,
+            <package>org.hibernate.validator.method.metadata</package></entry>
+
+            <entry>Hibernate Validator provides support for method-level
+            constraints based on appendix C of the Bean Validation
+            specification. The first package contains the
+            <classname>MethodValidator</classname> interface allowing you to
+            validate method return values and parameters. The second package
+            contains meta data for constraints hosted on parameters and
+            methods which can be retrieved via the
+            <classname>MethodValidator</classname>.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+
+    <note>
+      <para>The public packages of Hibernate Validator fall into two
+      categories: while the actual API parts are intended to be
+      <emphasis>invoked</emphasis> or <emphasis>used</emphasis> by clients
+      (e.g. the API for programmatic constraint declaration or the custom
+      constraints), the SPI (service provider interface) packages contain
+      interfaces which are intended to be <emphasis>implemented</emphasis> by
+      clients (e.g. <classname>ResourceBundleLocator</classname>).</para>
+    </note>
+  </section>
+
+  <section>
+    <title>Fail fast mode</title>
+
+    <para>First off, the fail fast mode. Hibernate Validator allows to return
+    from the current validation as soon as the first constraint violation
+    occurs. This is called the <emphasis>fail fast mode</emphasis> and can be
+    useful for validation of large object graphs where one is only interested
+    whether there is a constraint violation or not. <xref
+    linkend="example-fail-fast-property"/>, <xref
+    linkend="example-fail-fast-configuration"/> and <xref
+    linkend="example-fail-fast-factory"/> show multiple ways to enable the
+    fail fast mode.</para>
+
+    <example floatstyle="" id="example-fail-fast-property">
+      <title>Enabling <option>failFast</option> via a property</title>
+
+      <programlisting language="" role="">HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();
+ValidatorFactory factory = configuration.addProperty( "hibernate.validator.fail_fast", "true" ).buildValidatorFactory();
+Validator validator = factory.getValidator();
+
+// do some actual fail fast validation
+...</programlisting>
+    </example>
+
+    <example id="example-fail-fast-configuration">
+      <title>Enabling <option>failFast</option> at the
+      <classname>Configuration</classname> level</title>
+
+      <programlisting lang="">HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();
+ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();
+Validator validator = factory.getValidator();
+
+// do some actual fail fast validation
+...</programlisting>
+    </example>
+
+    <example id="example-fail-fast-factory">
+      <title>Enabling <option>failFast</option> at the
+      <classname>ValidatorFactory</classname> level</title>
+
+      <programlisting language="" role="">HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();
+ValidatorFactory factory = configuration.buildValidatorFactory();
+
+Validator validator = factory.getValidator();
+
+// do some non fail fast validation
+...
+
+validator = factory.unwrap( HibernateValidatorFactory.class )
+            .usingContext()
+            .failFast( true )
+            .getValidator();
+
+// do fail fast validation
+...</programlisting>
+    </example>
+  </section>
+
+  <section id="validator-customoptions-methodvalidation">
+    <title>Method validation</title>
+
+    <para>The Bean Validation API allows to specify constraints for fields,
+    properties and types. Hibernate Validator goes one step further and allows
+    to place contraint annotations also on method parameters and method return
+    values, thus enabling a programming style known as "Programming by
+    Contract".</para>
+
+    <para>More specifically this means that Bean Validation constraints can be
+    used to specify</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>the preconditions that must be met before a method invocation
+        (by annotating method parameters with constraints) and</para>
+      </listitem>
+
+      <listitem>
+        <para>the postconditions that are guaranteed after a method invocation
+        (by annotating methods)</para>
+      </listitem>
+    </itemizedlist>
+
+    <para>This approach has several advantages over traditional ways of
+    parameter and return value checking:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>The checks don't have to be performed manually (e.g. by throwing
+        <classname>IllegalArgumentExceptions</classname> or similar),
+        resulting in less code to write and maintain.</para>
+      </listitem>
+
+      <listitem>
+        <para>A method's pre- and postconditions don't have to be expressed
+        again in the method's JavaDoc, since the constraint annotations will
+        automatically be included in the generated JavaDoc. This avoids
+        redundancy and reduces the chance of inconsistencies between
+        implementation and documentation.</para>
+      </listitem>
+    </itemizedlist>
+
+    <note>
+      <para>Method validation was also considered to be included in the Bean
+      Validation API as defined by JSR 303, but it didn't become part of the
+      1.0 version. A basic draft is outlined in appendix C of the
+      specification, and the implementation in Hibernate Validator is largely
+      influenced by this draft. The feature is considered again for inclusion
+      in BV 1.1.</para>
+    </note>
+
+    <section>
+      <title>Defining method-level constraints</title>
+
+      <para><xref lang="" linkend="example-method-constraints"/> demonstrates
+      the definition of method-level constraints.<example
+          id="example-method-constraints">
+          <title>Using method-level constraints</title>
+
+          <programlisting language="" role="">public class RentalStation {
+
+    @NotNull 
+    public Car rentCar(@NotNull Customer customer, @NotNull @Future Date startDate, @Min(1) int durationInDays) { 
+        //...
+    }
+}</programlisting>
+        </example></para>
+
+      <para>Here the following pre- and postconditions for the
+      <methodname>rentCar()</methodname> method are declared:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>The renting customer may not be null</para>
+        </listitem>
+
+        <listitem>
+          <para>The rental's start date must not be null and must be in the
+          future</para>
+        </listitem>
+
+        <listitem>
+          <para>The rental duration must be at least one day</para>
+        </listitem>
+
+        <listitem>
+          <para>The returned <classname>Car</classname> instance may not be
+          null</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>Using the <classname>@Valid</classname> annotation it's also
+      possible to define that a cascaded validation of parameter or return
+      value objects shall be performed. An example can be found in <xref
+      lang="" linkend="example-cascaded-method-constraints"/>.</para>
+
+      <example id="example-cascaded-method-constraints">
+        <title>Cascaded validation of method-level constraints</title>
+
+        <programlisting language="" role="">public class RentalStation {
+
+    @Valid
+    public Set<Rental> getRentalsByCustomer(@Valid Customer customer) { 
+        //...
+    }
+}</programlisting>
+      </example>
+
+      <para>Here all the constraints declared at the
+      <classname>Customer</classname> type will be evaluated when validating
+      the method parameter and all constraints declared at the returned
+      <classname>Rental</classname> objects will be evaluated when validating
+      the method's return value.</para>
+
+      <section>
+        <title>Using method constraints in type hierarchies</title>
+
+        <para>Special care must be taken when defining parameter constraints
+        in inheritance hierarchies.</para>
+
+        <para>When a method is overridden in sub-types method parameter
+        constraints can only be declared at the base type. The reason for this
+        restriction is that the preconditions to be fulfilled by a type's
+        client must not be strengthened in sub-types (which may not even be
+        known to the base type's client). Note that also if the base method
+        doesn't declare any parameter constraints at all, no parameter
+        constraints may be added in overriding methods.</para>
+
+        <para>The same restriction applies to interface methods: no parameter
+        constraints may be defined at the implementing method (or the same
+        method declared in sub-interfaces).</para>
+
+        <para>If a violation of this rule is detected by the validation
+        engine, a
+        <classname>javax.validation.ConstraintDeclarationException</classname>
+        will be thrown. In <xref lang=""
+        linkend="example-illegal-method-constraints"/> some examples for
+        illegal parameter constraints declarations are shown.</para>
+
+        <example id="example-illegal-method-constraints">
+          <title>Illegal parameter constraint declarations</title>
+
+          <programlisting>public class Car {
+
+    public void drive(Person driver) { ... }
+
+}
+
+public class RentalCar extends Car {
+
+    //not allowed, parameter constraint added in overriding method
+    public void drive(@NotNull Person driver) { ... }
+
+}
+
+public interface ICar {
+
+    void drive(Person driver);
+
+}
+
+public class CarImpl implements ICar {
+
+    //not allowed, parameter constraint added in implementation of interface method
+    public void drive(@NotNull Person driver) { ... }
+
+}</programlisting>
+        </example>
+
+        <para>This rule only applies to parameter constraints, return value
+        constraints may be added in sub-types without any restrictions as it
+        is alright to strengthen the postconditions guaranteed to a type's
+        client.</para>
+      </section>
+    </section>
+
+    <section>
+      <title>Evaluating method-level constraints</title>
+
+      <para>To validate method-level constraints Hibernate Validator provides
+      the interface
+      <classname>org.hibernate.validator.method.MethodValidator</classname>.</para>
+
+      <para>As shown in <xref lang="" linkend="example-methodvalidator"/> this
+      interface defines methods for the evaluation of parameter as well as
+      return value constraints and for retrieving an extended type descriptor
+      providing method constraint related meta data.</para>
+
+      <example id="example-methodvalidator">
+        <title>The <classname>MethodValidator</classname> interface</title>
+
+        <programlisting language="" role="">public interface MethodValidator {
+
+    <T> Set<MethodConstraintViolation<T>> validateParameter(T object, Method method, Object parameterValue, int parameterIndex, Class<?>... groups);
+    
+    <T> Set<MethodConstraintViolation<T>> validateAllParameters(T object, Method method, Object[] parameterValues, Class<?>... groups);
+    
+    <T> Set<MethodConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups);
+ 
+    TypeDescriptor getConstraintsForType(Class<?> clazz);
+}    </programlisting>
+      </example>
+
+      <para>To retrieve a method validator get hold of an instance of HV's
+      <classname>javax.validation.Validator</classname> implementation and
+      unwrap it to <classname>MethodValidator</classname> as shown in <xref
+      lang="" linkend="example-retrieving-methodvalidator"/>.</para>
+
+      <example id="example-retrieving-methodvalidator">
+        <title>Retrieving a <classname>MethodValidator</classname>
+        instance</title>
+
+        <programlisting language="" role="">MethodValidator methodValidator = Validation.byProvider( HibernateValidator.class )
+    .configure()
+    .buildValidatorFactory()
+    .getValidator()
+    .unwrap( MethodValidator.class ); </programlisting>
+      </example>
+
+      <para>The validation methods defined on
+      <classname>MethodValidator</classname> each return a
+      <classname>Set<MethodConstraintViolation></classname>. The type
+      <classname>MethodConstraintViolation</classname> (see <xref lang=""
+      linkend="example-methodconstraintviolation"/>) extends
+      <classname>javax.validation.ConstraintViolation</classname> and provides
+      additional method level validation specific information such as the
+      method and index of the parameter which caused the constraint
+      violation.</para>
+
+      <example id="example-methodconstraintviolation">
+        <title>The <classname>MethodConstraintViolation</classname>
+        type</title>
+
+        <programlisting language="" role="">public interface MethodConstraintViolation<T> extends ConstraintViolation<T> {
+    
+    public static enum Kind { PARAMETER, RETURN_VALUE }
+
+    Method getMethod();
+
+    Integer getParameterIndex();
+
+    String getParameterName();
+
+    Kind getKind();
+}</programlisting>
+      </example>
+
+      <note>
+        <para>The method <methodname>getParameterName()</methodname> currently
+        returns synthetic parameter identifiers such as "arg0", "arg1" etc. In
+        a future version of Hibernate Validator support for specifying
+        parameter identifiers might be added.</para>
+      </note>
+
+      <para>Typically the validation of method-level constraints is not
+      invoked manually but automatically upon method invocation by an
+      integration layer using AOP (aspect-oriented programming) or similar
+      method interception facilities such as the JDK's
+      <classname>java.lang.reflect.Proxy</classname> API or CDI ("JSR 299:
+      Contexts and Dependency Injection for the
+      Java<superscript>TM</superscript> EE platform").</para>
+
+      <para>If a parameter or return value constraint can't be validated
+      sucessfully such an integration layer typically will throw a
+      <classname>MethodConstraintViolationException</classname> which similar
+      to <classname>javax.validation.ConstraintViolationException</classname>
+      contains a set with the occurred constraint violations.</para>
+
+      <tip>
+        <para>If you are using CDI you might be interested in the <ulink
+        url="http://seamframework.org/Seam3/ValidationModule">Seam
+        Validation</ulink> project. This Seam module provides an interceptor
+        which integrates the method validation functionality with CDI.</para>
+      </tip>
+    </section>
+
+    <section>
+      <title>Retrieving method-level constraint meta data</title>
+
+      <para>As outlined in <xref lang="" linkend="validator-metadata-api"/>
+      the Bean Validation API provides rich capabilities for retrieving
+      constraint related meta data. Hibernate Validator extends this API and
+      allows to retrieve constraint meta data also for method-level
+      constraints.</para>
+
+      <para><xref lang="" linkend="example-method-level-meta-data"/> shows how
+      to use this extended API to retrieve constraint meta data for the
+      <methodname>rentCar()</methodname> method from the
+      <classname>RentalStation</classname> type.</para>
+
+      <example id="example-method-level-meta-data">
+        <title>Retrieving meta data for method-level constraints</title>
+
+        <programlisting language="" role="">TypeDescriptor typeDescriptor = methodValidator.getConstraintsForType(RentalStation.class)
+
+//retrieve a descriptor for the rentCar() method
+MethodDescriptor rentCarMethod = typeDescriptor.getConstraintsForMethod("rentCar", Customer.class, Date.class, int.class);
+assertEquals(rentCarMethod.getMethodName(), "rentCar");
+assertTrue(rentCarMethod.hasConstraints());
+assertFalse(rentCarMethod.isCascaded());
+
+//retrieve constraints from the return value
+Set<ConstraintDescriptor<?>> returnValueConstraints = rentCarMethod.findConstraints().getConstraintDescriptors();
+assertEquals(returnValueConstraints.size(), 1);
+assertEquals(returnValueConstraints.iterator().next().getAnnotation().annotationType(), NotNull.class);
+
+List<ParameterDescriptor> allParameters = rentCarMethod.getParameterDescriptors();
+assertEquals(allParameters.size(), 3);
+
+//retrieve a descriptor for the startDate parameter
+ParameterDescriptor startDateParameter = allParameters.get(1);
+assertEquals(startDateParameter.getIndex(), 1);
+assertFalse(startDateParameter.isCascaded());
+assertEquals(startDateParameter.findConstraints().getConstraintDescriptors().size(), 2);</programlisting>
+      </example>
+
+      <para>Refer to the <ulink
+      url="http://docs.jboss.org/hibernate/validator/4.2/api/index.html?org/hibernate/validator/method/metadata/package-summary.html">JavaDoc</ulink>
+      of the package
+      <classname>org.hibernate.validator.method.metadata</classname> for more
+      details on the extended meta data API.</para>
+    </section>
+  </section>
+
+  <section id="programmaticapi">
+    <title>Programmatic constraint definition</title>
+
+    <para>Another addition to the Bean Validation specification is the ability
+    to configure constraints via a fluent API. This API can be used
+    exclusively or in combination with annotations and xml. If used in
+    combination programmatic constraints are additive to constraints
+    configured via the standard configuration capabilities.</para>
+
+    <para>The API is centered around the
+    <classname>ConstraintMapping</classname> class which can be found in the
+    package<package> org.hibernate.validator.cfg</package>. Starting with the
+    instantiation of a new <classname>ConstraintMapping</classname>,
+    constraints can be defined in a fluent manner as shown in <xref lang=""
+    linkend="example-constraint-mapping"/>.</para>
+
+    <para><example id="example-constraint-mapping">
+        <title>Programmatic constraint definition</title>
+
+        <programlisting language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+mapping.type( Car.class )
+    .property( "manufacturer", FIELD )
+        .constraint( new NotNullDef() )
+    .property( "licensePlate", FIELD )
+        .constraint( new NotNullDef() )
+        .constraint( new SizeDef().min( 2 ).max( 14 ) )
+    .property( "seatCount", FIELD )
+        .constraint( new MinDef()value ( 2 ) )
+.type( RentalCar.class )
+    .property( "rentalStation", METHOD )
+        .constraint( new NotNullDef() );      </programlisting>
+      </example></para>
+
+    <para>As you can see constraints can be configured on multiple classes and
+    properties using method chaining. The constraint definition classes
+    <classname>NotNullDef</classname>, <classname>SizeDef</classname> and
+    <classname>MinDef</classname> are helper classes which allow to configure
+    constraint parameters in a type-safe fashion. Definition classes exist for
+    all built-in constraints in the
+    <classname>org.hibernate.validator.cfg.defs</classname> package.</para>
+
+    <para>For custom constraints you can either create your own definition
+    classes extending <classname>ConstraintDef</classname> or you can use
+    <classname>GenericConstraintDef</classname> as seen in <xref
+    linkend="example-generic-constraint-mapping"/>.</para>
+
+    <para><example id="example-generic-constraint-mapping">
+        <title>Programmatic constraint definition using
+        <methodname>createGeneric()</methodname></title>
+
+        <programlisting language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+mapping.type( Car.class )
+    .property( "licensePlate", FIELD )
+        .constraint( new GenericConstraintDef<CheckCase.class>( CheckCase.class ).param( "value", CaseMode.UPPER ) );   </programlisting>
+      </example></para>
+
+    <para>Not only standard class- and property-level constraints but also
+    method constraints can be configured using the API. As shown in <xref
+    lang="" linkend="example-method-constraint-mapping"/> methods are
+    identified by their name and their parameters (if there are any). Having
+    selected a method, constraints can be placed on the method's parameters
+    and/or return value.</para>
+
+    <example id="example-method-constraint-mapping">
+      <title>Programmatic definition of method constraints</title>
+
+      <programlisting language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+mapping.type( Car.class )
+    .method( "drive", String.class, Integer.class )
+        .parameter( 0 )
+            .constraint( new NotNullDef() )
+            .constraint( new MinDef().value ( 1 ) )
+        .parameter( 1 )
+            .constraint( new NotNullDef() )
+        .returnValue()
+            .constraint( new NotNullDef() )
+    .method( "check" )
+        .returnValue()
+            .constraint( new NotNullDef() );      </programlisting>
+    </example>
+
+    <para>Using the API it's also possible to mark properties, method
+    parameters and method return values as cascading (equivalent to annotating
+    them with <classname>@Valid</classname>). An example can be found in <xref
+    lang="" linkend="example-cascading-constraints"/>.</para>
+
+    <para><example id="example-cascading-constraints">
+        <title>Marking constraints for cascaded validation</title>
+
+        <programlisting language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+mapping.type( Car.class )
+    .property( "manufacturer", FIELD )
+        .valid()
+    .property( "licensePlate", METHOD )
+        .valid()
+    .method( "drive", String.class, Integer.class )
+        .parameter( 0 )
+            .valid()
+        .parameter( 1 )
+            .valid()
+        .returnValue()
+            .valid()
+.type( RentalCar.class )
+    .property( "rentalStation", METHOD )
+        .valid();</programlisting>
+      </example></para>
+
+    <para>Last but not least you can configure the default group sequence or
+    the default group sequence provider of a type as shown in <xref lang=""
+    linkend="example-sequences"/>.<example id="example-sequences">
+        <title>Configuration of default group sequence and default group
+        sequence provider</title>
+
+        <programlisting language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+mapping.type( Car.class )
+    .defaultGroupSequence( Car.class, CarChecks.class )
+.type( RentalCar.class )
+    .defaultGroupSequenceProvider( RentalCarGroupSequenceProvider.class ); </programlisting>
+      </example></para>
+
+    <para>Once a <classname>ConstraintMapping</classname> is set up it has to
+    be passed to the configuration. Since the programmatic API is not part of
+    the official Bean Validation specification you need to get hold of a
+    <classname>HibernateValidatorConfiguration</classname> instance as shown
+    in <xref linkend="example-hibernate-specific-config"/>.</para>
+
+    <para><example id="example-hibernate-specific-config">
+        <title>Creating a Hibernate Validator specific configuration</title>
+
+        <programlisting lang="" language="" role="">ConstraintMapping mapping = new ConstraintMapping();
+// configure mapping instance
+
+HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();
+config.addMapping( mapping );
+ValidatorFactory factory = config.buildValidatorFactory();
+Validator validator = factory.getValidator();</programlisting>
+      </example></para>
+  </section>
+
+  <section>
+    <title>Boolean composition for constraint composition</title>
+
+    <para>As per Bean Validation specification the constraints of a composed
+    constraint (see <xref linkend="section-constraint-composition"/>) are all
+    combined via a logical <emphasis>AND</emphasis>. This means all of the
+    composing constraints need to return <constant>true</constant> in order
+    for an overall successful validation. Hibernate Validator offers an
+    extension to this logical <emphasis>AND</emphasis> combination which
+    allows you to compose constraints via a logical <emphasis>OR</emphasis> or
+    <emphasis>NOT</emphasis>. To do so you have to use the
+    <classname>ConstraintComposition</classname> annotation and the enum
+    <classname>CompositionType</classname> with its values
+    <emphasis>AND</emphasis>, <emphasis>OR</emphasis> and
+    <emphasis>ALL_FALSE</emphasis>. <xref
+    linkend="example-boolean-constraint-composition"/> shows how to build a
+    composing constraint where only one of the constraints has to be
+    successful in order to pass the validation. Either the validated string is
+    all lowercased or it is between two and three characters long.</para>
+
+    <example id="example-boolean-constraint-composition">
+      <title>OR composition of constraints</title>
+
+      <programlisting language="JAVA" role="JAVA"><emphasis role="bold">@ConstraintComposition(OR)</emphasis>
+ at Pattern(regexp = "[a-z]")
+ at Size(min = 2, max = 3)
+ at ReportAsSingleViolation
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+public @interface PatternOrSize {
+   public abstract String message() default "{PatternOrSize.message}";
+   public abstract Class<?>[] groups() default { };
+   public abstract Class<? extends Payload>[] payload() default { };
+}</programlisting>
+    </example>
+
+    <tip>
+      <para>Using <emphasis>ALL_FALSE</emphasis> as composition type
+      implicitly enforces that only a single violation will get reported in
+      case validation of the constraint composition fails.</para>
+    </tip>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/furtherreading.xml b/project/documentation/src/main/docbook/en-US/modules/furtherreading.xml
new file mode 100644
index 0000000..4c001fa
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/furtherreading.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-further-reading">
+  <title>Further reading</title>
+
+  <para>Last but not least, a few pointers to further information.</para>
+
+  <para>A great source for examples is the Bean Validation TCK which is
+  available for anonymous access on <ulink
+  url="https://github.com/beanvalidation/beanvalidation-tck">GitHub</ulink>.
+  In particular the TCK's <ulink
+  url="https://github.com/beanvalidation/beanvalidation-tck/tree/master/src/main/java/org/hibernate/jsr303/tck/tests">tests</ulink>
+  might be of interest. <ulink url="http://jcp.org/en/jsr/detail?id=303">The
+  JSR 303</ulink> specification itself is also a great way to deepen your
+  understanding of Bean Validation resp. Hibernate Validator.</para>
+
+  <para>If you have any further questions to Hibernate Validator or want to
+  share some of your use cases have a look at the <ulink
+  url="http://community.jboss.org/en/hibernate/validator">Hibernate Validator
+  Wiki</ulink> and the <ulink
+  url="https://forum.hibernate.org/viewforum.php?f=9">Hibernate Validator
+  Forum</ulink>.</para>
+
+  <para>In case you would like to report a bug use <ulink
+  url="http://opensource.atlassian.com/projects/hibernate/browse/HV">Hibernate's
+  Jira</ulink> instance. Feedback is always welcome!</para>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/gettingstarted.xml b/project/documentation/src/main/docbook/en-US/modules/gettingstarted.xml
new file mode 100644
index 0000000..72ac1da
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/gettingstarted.xml
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-gettingstarted">
+  <title id="getting-started">Getting started</title>
+
+  <para>This chapter will show you how to get started with Hibernate
+  Validator, the reference implementation (RI) of Bean Validation. For the
+  following quickstart you need:</para>
+
+  <itemizedlist>
+    <listitem>
+      <para>A JDK >= 6</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="http://maven.apache.org/">Apache Maven</ulink></para>
+    </listitem>
+
+    <listitem>
+      <para>An Internet connection (Maven has to download all required
+      libraries)</para>
+    </listitem>
+
+    <listitem>
+      <para>A properly configured remote repository. Add the following to your
+      <filename>settings.xml</filename>: <example id="example-jboss-maven-url">
+          <title>Configuring the JBoss Maven repository</title>
+
+          <programlisting><repositories>
+    <repository>
+        <id>jboss-public-repository-group</id>
+        <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
+        <releases>
+          <enabled>true</enabled>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+        </snapshots>
+     </repository>
+</repositories>        </programlisting>
+        </example>More information about <filename>settings.xml</filename> can
+      be found in the <ulink
+      url="http://maven.apache.org/ref/2.0.8/maven-settings/settings.html">Maven
+      Local Settings Model</ulink>.</para>
+    </listitem>
+  </itemizedlist>
+
+  <section id="validator-gettingstarted-createproject">
+    <title>Project set up</title>
+
+    <para>In order to use Hibernate Validator within an existing Maven
+    project, simply add the following dependency to your
+    <filename>pom.xml</filename>:<example>
+        <title>Maven dependency of Hibernate Validator</title>
+
+        <programlisting><dependency>
+    <groupId>org.hibernate</groupId>
+    <artifactId>hibernate-validator</artifactId>
+    <version>&version;</version>
+</dependency></programlisting>
+      </example></para>
+
+    <para>Alternatively, you can start by creating a sample project using
+    Hibernate Validator's Quickstart Maven archetype as follows:</para>
+
+    <para><example>
+        <title>Using Maven's archetype plugin to create a sample project using
+        Hibernate Validator</title>
+
+        <programlisting>mvn archetype:generate -DarchetypeGroupId=org.hibernate \
+                       -DarchetypeArtifactId=hibernate-validator-quickstart-archetype \
+                       -DarchetypeVersion=&version; \
+                       -DarchetypeRepository=http://repository.jboss.org/nexus/content/groups/public-jboss/ \
+                       -DgroupId=com.mycompany \
+                       -DartifactId=hv-quickstart</programlisting>
+      </example></para>
+
+    <para>Maven will create your project in the directory hv-quickstart.
+    Change into this directory and run:</para>
+
+    <para><programlisting>mvn test</programlisting> Maven will compile the
+    example code and run the implemented unit tests. Let's have a look at the
+    actual code in the next section.</para>
+
+    <tip>
+      <para>For the purposes of logging, Hibernate Validator uses the JBoss
+      Logging API. This is an abstraction layer which supports several known
+      logging solutions (e.g. log4j or the logging framework provided by the
+      JDK) as implementation. Just add your preferred logging library to the
+      classpath and all log requests from Hibernate Validator will
+      automatically be delegated to that logging provider.</para>
+
+      <para>Alternatively, you can explicitely specify a provider using the
+      system property <varname>org.jboss.logging.provider</varname>. Supported
+      values currently are <varname>jboss</varname>, <varname>jdk</varname>,
+      <varname>log4j</varname> and <varname>slf4j</varname>.</para>
+    </tip>
+  </section>
+
+  <section id="validator-gettingstarted-createmodel">
+    <title>Applying constraints</title>
+
+    <para>Open the project in the IDE of your choice and have a look at the
+    class <classname>Car</classname>:</para>
+
+    <example id="example-class-car">
+      <title>Class Car annotated with constraints</title>
+
+      <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+public class Car {
+
+    @NotNull
+    private String manufacturer;
+
+    @NotNull
+    @Size(min = 2, max = 14)
+    private String licensePlate;
+
+    @Min(2)
+    private int seatCount;
+    
+    public Car(String manufacturer, String licencePlate, int seatCount) {
+        this.manufacturer = manufacturer;
+        this.licensePlate = licencePlate;
+        this.seatCount = seatCount;
+    }
+
+    //getters and setters ...
+}</programlisting>
+    </example>
+
+    <para><classname>@NotNull</classname>, <classname>@Size</classname> and
+    <classname>@Min</classname> are so-called constraint annotations, that we
+    use to declare constraints, which shall be applied to the fields of a
+    <classname>Car</classname> instance:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para><property>manufacturer</property> shall never be null</para>
+      </listitem>
+
+      <listitem>
+        <para><property>licensePlate</property> shall never be null and must
+        be between 2 and 14 characters long</para>
+      </listitem>
+
+      <listitem>
+        <para><property>seatCount</property> shall be at least 2.</para>
+      </listitem>
+    </itemizedlist>
+  </section>
+
+  <section>
+    <title>Validating constraints</title>
+
+    <para>To perform a validation of these constraints, we use a
+    <classname>Validator</classname> instance. Let's have a look at the
+    <classname>CarTest</classname> class:</para>
+
+    <example>
+      <title>Class CarTest showing validation examples</title>
+
+      <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import static org.junit.Assert.*;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CarTest {
+
+    private static Validator validator;
+
+    @BeforeClass
+    public static void setUp() {
+        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+        validator = factory.getValidator();
+    }
+
+    @Test
+    public void manufacturerIsNull() {
+        Car car = new Car(null, "DD-AB-123", 4);
+
+        Set<ConstraintViolation<Car>> constraintViolations =
+            validator.validate(car);
+
+        assertEquals(1, constraintViolations.size());
+        assertEquals("may not be null", constraintViolations.iterator().next().getMessage());
+    }
+
+    @Test
+    public void licensePlateTooShort() {
+        Car car = new Car("Morris", "D", 4);
+
+        Set<ConstraintViolation<Car>> constraintViolations = 
+            validator.validate(car);
+
+        assertEquals(1, constraintViolations.size());
+        assertEquals("size must be between 2 and 14", constraintViolations.iterator().next().getMessage());
+    }
+    
+    @Test
+    public void seatCountTooLow() {
+        Car car = new Car("Morris", "DD-AB-123", 1);
+
+        Set<ConstraintViolation<Car>> constraintViolations =
+            validator.validate(car);
+
+        assertEquals(1, constraintViolations.size());
+        assertEquals("must be greater than or equal to 2", constraintViolations.iterator().next().getMessage());
+    }
+
+    @Test
+    public void carIsValid() {
+        Car car = new Car("Morris", "DD-AB-123", 2);
+
+        Set<ConstraintViolation<Car>> constraintViolations =
+            validator.validate(car);
+
+        assertEquals(0, constraintViolations.size());
+    }
+}</programlisting>
+    </example>
+
+    <para>In the <methodname>setUp()</methodname> method we get a
+    <classname>Validator</classname> instance from the
+    <classname>ValidatorFactory</classname>. A
+    <classname>Validator</classname> instance is thread-safe and may be reused
+    multiple times. For this reason we store it as field of our test class. We
+    can use the <classname>Validator</classname> now to validate the different
+    car instances in the test methods.</para>
+
+    <para>The <methodname>validate()</methodname> method returns a set of
+    <classname>ConstraintViolation</classname> instances, which we can iterate
+    in order to see which validation errors occurred. The first three test
+    methods show some expected constraint violations:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>The <classname>@NotNull</classname> constraint on manufacturer
+        is violated in <methodname>manufacturerIsNull()</methodname></para>
+      </listitem>
+
+      <listitem>
+        <para>The <classname>@Size</classname> constraint on licensePlate is
+        violated in <methodname>licensePlateTooShort()</methodname></para>
+      </listitem>
+
+      <listitem>
+        <para>The <classname>@Min</classname> constraint on seatCount is
+        violated in <methodname>seatCountTooLow()</methodname></para>
+      </listitem>
+    </itemizedlist>
+
+    <para>If the object validates successfully,
+    <methodname>validate()</methodname> returns an empty set.</para>
+
+    <para>Note that we only use classes from the package
+    <package>javax.validation</package> from the Bean Validation API. As we
+    don't reference any classes of the RI directly, it would be no problem to
+    switch to another implementation of the API, should that need
+    arise.</para>
+  </section>
+
+  <section id="validator-gettingstarted-whatsnext">
+    <title>Where to go next?</title>
+
+    <para>That concludes our 5 minute tour through the world of Hibernate
+    Validator. Continue exploring the code examples or look at further
+    examples referenced in <xref linkend="validator-further-reading"/>. To
+    deepen your understanding of Hibernate Validator just continue reading
+    <xref linkend="validator-usingvalidator"/>. In case your application has
+    specific validation requirements have a look at <xref
+    linkend="validator-customconstraints"/>.</para>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/integration.xml b/project/documentation/src/main/docbook/en-US/modules/integration.xml
new file mode 100644
index 0000000..426b05e
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/integration.xml
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-integration">
+  <title>Integration with other frameworks</title>
+
+  <para>Hibernate Validator is intended to be used to implement multi-layered
+  data validation, where constraints are expressed in a single place (the
+  annotated domain model) and checked in various different layers of the
+  application.</para>
+
+  <section id="validator-osgi">
+    <title>OSGi</title>
+
+    <para>The Hibernate Validator jar file is conform to the OSGi specification
+    and can be used within any OSGi container. The following lists represent the
+    packages imported and exported by Hibernate Validator. The classes within the
+    exported packages are considered part of Hibernate Validator public API.</para>
+
+    <tip>
+        <para>The Java Service Provider mechanism used by Bean Validation to automatically
+        discover validation providers doesn't work in an OSGi environment. To solve this,
+        you have to provide a custom <classname>ValidationProviderResolver</classname>. See
+        <xref linkend="section-validation-provider-resolver"/></para>
+    </tip>
+
+    <itemizedlist>
+        <title>Exported packages</title>
+        <listitem>
+            <para><package>org.hibernate.validator</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.constraints</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.cfg</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.cfg.context</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.cfg.defs</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.group</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.messageinterpolation</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.method</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.method.metadata</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.hibernate.validator.resourceloading</package></para>
+        </listitem>
+    </itemizedlist>
+
+    <itemizedlist>
+        <title>Imported packages</title>
+        <listitem>
+            <para><package>javax.persistence.*</package>, [2.0.0,3.0.0), optional</para>
+        </listitem>
+        <listitem>
+            <para><package>javax.validation.*</package>, [1.0.0,2.0.0)</para>
+        </listitem>
+        <listitem>
+            <para><package>javax.xml.*</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.xml.sax.*</package></para>
+        </listitem>
+        <listitem>
+            <para><package>org.jboss.logging.*</package>, [3.1.0,4.0.0)</para>
+        </listitem>
+        <listitem>
+            <para><package>org.joda.time.*</package>, [1.6.0,2.0.0), optional</para>
+        </listitem>
+        <listitem>
+            <para><package>org.jsoup.*</package>, [1.5.2,2.0.0), optional</para>
+        </listitem>
+    </itemizedlist>
+  </section>
+
+  <section id="validator-checkconstraints-db">
+    <title>Database schema-level validation</title>
+
+    <para>Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will
+    translate the constraints you have defined for your entities into mapping
+    metadata. For example, if a property of your entity is annotated
+    <literal>@NotNull</literal>, its columns will be declared as <literal>not
+    null</literal> in the DDL schema generated by Hibernate.</para>
+
+    <para>If, for some reason, the feature needs to be disabled, set
+    <literal>hibernate.validator.apply_to_ddl</literal> to
+    <literal>false</literal>. See also <xref
+    linkend="table-builtin-constraints" />.</para>
+
+    <para>You can also limit the DDL constraint generation to a subset of the
+    defined constraints by setting the property
+    <property>org.hibernate.validator.group.ddl</property>. The property
+    specifies the comma-separated, fully specified class names of the groups a
+    constraint has to be part of in order to be considered for DDL schema
+    generation.</para>
+  </section>
+
+  <section id="validator-checkconstraints-orm">
+    <title>ORM integration</title>
+
+    <para>Hibernate Validator integrates with both Hibernate and all pure Java
+    Persistence providers.</para>
+
+    <tip>
+      <para>When lazy loaded associations are supposed to be validated it is
+      recommended to place the constraint on the getter of the association.
+      Hibernate replaces lazy loaded associations with proxy instances which
+      get initialized/loaded when requested via the getter. If, in such a
+      case, the constraint is placed on field level the actual proxy instance
+      is used which will lead to validation errors.</para>
+    </tip>
+
+    <section id="validator-checkconstraints-orm-hibernateevent">
+      <title>Hibernate event-based validation</title>
+
+      <para>Hibernate Validator has a built-in Hibernate event listener -
+      <ulink
+      url="http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</classname></ulink>
+      - which is part of Hibernate Annotations (as of Hibernate 3.5.x).
+      Whenever a <literal>PreInsertEvent</literal>,
+      <literal>PreUpdateEvent</literal> or
+      <classname>PreDeleteEvent</classname> occurs, the listener will verify
+      all constraints of the entity instance and throw an exception if any
+      constraint is violated. Per default objects will be checked before any
+      inserts or updates are made by Hibernate. Pre deletion events will per
+      default not trigger a validation. You can configure the groups to be
+      validated per event type using the properties
+      <property>javax.persistence.validation.group.pre-persist</property>,
+      <property>javax.persistence.validation.group.pre-update</property> and
+      <property>javax.persistence.validation.group.pre-remove</property>. The
+      values of these properties are the comma-separated, fully specified
+      class names of the groups to validate. <xref
+      linkend="example-beanvalidationeventlistener-config" /> shows the
+      default values for these properties. In this case they could also be
+      omitted.</para>
+
+      <para>On constraint violation, the event will raise a runtime
+      <classname>ConstraintViolationException</classname> which contains a set
+      of <literal>ConstraintViolation</literal>s describing each
+      failure.</para>
+
+      <para>If Hibernate Validator is present in the classpath, Hibernate
+      Annotations (or Hibernate EntityManager) will use it transparently. To
+      avoid validation even though Hibernate Validator is in the classpath set
+      <property>javax.persistence.validation.mode</property> to
+      <constant>none</constant>.</para>
+
+      <para><note>
+          <para>If the beans are not annotated with validation annotations,
+          there is no runtime performance cost.</para>
+        </note></para>
+
+      <para>In case you need to manually set the event listeners for Hibernate
+      Core, use the following configuration in
+      <literal>hibernate.cfg.xml</literal>:</para>
+
+      <example id="example-beanvalidationeventlistener-config">
+        <title>Manual configuration of
+        <classname>BeanValidationEvenListener</classname></title>
+
+        <programlisting language="XML" role="XML"><hibernate-configuration>
+    <session-factory>
+       ...
+       <property name="javax.persistence.validation.group.pre-persist">javax.validation.groups.Default</property>
+       <property name="javax.persistence.validation.group.pre-update">javax.validation.groups.Default</property>
+       <property name="javax.persistence.validation.group.pre-remove"></property>
+       ...
+       <event type="pre-update">
+         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
+       </event>
+       <event type="pre-insert">
+         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
+       </event>
+       <event type="pre-delete">
+         <listener class="org.hibernate.cfg.beanvalidation.BeanValidationEventListener"/>
+       </event>
+    </session-factory>
+</hibernate-configuration></programlisting>
+      </example>
+    </section>
+
+    <section>
+      <title>JPA</title>
+
+      <para>If you are using JPA 2 and Hibernate Validator is in the classpath
+      the JPA2 specification requires that Bean Validation gets enabled. The
+      properties
+      <property>javax.persistence.validation.group.pre-persist</property>,
+      <property>javax.persistence.validation.group.pre-update</property> and
+      <property>javax.persistence.validation.group.pre-remove</property> as
+      described in <xref
+      linkend="validator-checkconstraints-orm-hibernateevent" /> can in this
+      case be configured in <filename>persistence.xml</filename>.
+      <filename>persistence.xml</filename> also defines a node validation-mode
+      which can be set to <constant>AUTO</constant>,
+      <constant>CALLBACK</constant>, <constant>NONE</constant>. The default is
+      <constant>AUTO</constant>.</para>
+
+      <para>In a JPA 1 you will have to create and register Hibernate
+      Validator yourself. In case you are using Hibernate EntityManager you
+      can add a customized version of the
+      <classname>BeanValidationEventListener</classname> described in <xref
+      linkend="validator-checkconstraints-orm-hibernateevent" /> to your
+      project and register it manually.</para>
+    </section>
+  </section>
+
+  <section id="section-presentation-layer">
+    <title>Presentation layer validation</title>
+
+    <para>When working with JSF2 or <productname>JBoss Seam</productname> and
+    Hibernate Validator (Bean Validation) is present in the runtime
+    environment validation is triggered for every field in the application.
+    <xref linkend="example-jsf2" /> shows an example of the f:validateBean tag
+    in a JSF page. For more information refer to the Seam documentation or the
+    JSF 2 specification.</para>
+
+    <example id="example-jsf2">
+      <title>Usage of Bean Validation within JSF2</title>
+
+      <programlisting><h:form>
+  <emphasis role="bold"><f:validateBean></emphasis>
+    <h:inputText value=”#{model.property}” />
+    <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:selectOneRadio>
+    <!-- other input components here -->
+  <emphasis role="bold"></f:validateBean></emphasis>
+</h:form>
+</programlisting>
+    </example>
+
+    <tip>
+      <para>The integration between JSF 2 and Bean Validation is described in
+      the "Bean Validation Integration" chapter of <ulink
+      url="http://jcp.org/en/jsr/detail?id=314">JSR-314</ulink>. It is
+      interesting to know that JSF 2 implements a custom MessageInterpolator
+      to ensure ensure proper localization. To encourage the use of the Bean
+      Validation message facility, JSF 2 will per default only display the
+      generated Bean Validation message. This can, however, be configured via
+      the application resource bundle by providing the following configuration
+      (<parameter>{0}</parameter> is replaced with the Bean Validation message
+      and <parameter>{1}</parameter> is replaced with the JSF component
+      label):</para>
+
+      <programlisting>javax.faces.validator.BeanValidator.MESSAGE={1}: {0}</programlisting>
+
+      <para>The default is:</para>
+
+      <programlisting>javax.faces.validator.BeanValidator.MESSAGE={0}</programlisting>
+    </tip>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/metadataapi.xml b/project/documentation/src/main/docbook/en-US/modules/metadataapi.xml
new file mode 100644
index 0000000..09811b1
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/metadataapi.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-metadata-api">
+  <title>Metadata API</title>
+
+  <para>The Bean Validation specification provides not only a validation
+  engine, but also a metadata repository for all defined constraints. The
+  following paragraphs are discussing this API. All the introduced classes can
+  be found in the <package>javax.validation.metadata</package> package.</para>
+
+  <section>
+    <title><classname
+    id="section-bean-descriptor">BeanDescriptor</classname></title>
+
+    <para>The entry into the metadata API is via
+    <code>Validator.getConstraintsForClass</code> which returns an instance of
+    the <ulink
+    url="http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/BeanDescriptor.html"><classname>BeanDescriptor</classname></ulink>
+    interface. Using this bean descriptor you can determine whether the
+    specified class hosts any constraints at all via
+    <code>beanDescriptor.isBeanConstrained</code>. <tip>
+        <para>If a constraint declaration hosted by the requested class is
+        invalid, a <classname>ValidationException</classname> is
+        thrown.</para>
+      </tip></para>
+
+    <para>You can then call
+    <code>beanDescriptor.getConstraintDescriptors</code> to get a set of
+    <classname>ConstraintDescriptor</classname>s representing all class level
+    constraints.</para>
+
+    <para>If you are interested in property level constraints, you can call
+    <code>beanDescriptor.getConstraintsForProperty</code> or
+    <code>beanDescriptor.getConstrainedProperties</code> to get a single resp.
+    set of <classname>PropertyDescriptor</classname>s (see <xref
+    linkend="section-property-descriptor" />). </para>
+  </section>
+
+  <section id="section-property-descriptor">
+    <title><classname>PropertyDescriptor</classname></title>
+
+    <para>The <ulink
+    url="http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/PropertyDescriptor.html"><classname>PropertyDescriptor</classname></ulink>
+    interface extends the <classname>ElementDescriptor</classname> interface
+    and represents constraints on properties of a class. The constraint can be
+    declared on the attribute itself or on the getter of the attribute -
+    provided Java Bean naming conventions are respected. A
+    <classname>PropertyDescriptor</classname> adds <code>isCascaded</code>
+    (returning <constant>true</constant> if the property is marked with
+    <classname>@Valid</classname>) and <code>getPropertyName</code> to the
+    <classname>ElementDescriptor</classname> functionality.</para>
+  </section>
+
+  <section>
+    <title><classname>ElementDescriptor</classname></title>
+
+    <para>The <ulink
+    url="http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/ElementDescriptor.html"><classname>ElementDiscriptor</classname></ulink>
+    interface is the common base class for
+    <classname>BeanDescriptor</classname> and
+    <classname>PropertyDescriptor</classname>. Next to the
+    <code>hasConstraints </code>and <code>getConstraintDescriptors</code>
+    methods it also offers access to the
+    <classname>ConstraintFinder</classname> API which allows you to query the
+    metadata API in a more fine grained way. For example you can restrict your
+    search to constraints described on fields or on getters or a given set of
+    groups. Given an <classname>ElementDescriptor</classname> instance you
+    just call <code>findConstraints</code> to retrieve a
+    <classname>ConstraintFinder</classname> instance. </para>
+
+    <example id="example-constraint-finder">
+      <title>Usage of ConstraintFinder</title>
+
+      <programlisting>Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+BeanDescriptor beanDescriptor = validator.getConstraintsForClass(Person.class);
+PropertyDescriptor propertyDescriptor = beanDescriptor.getConstraintsForProperty("name");
+Set<ConstraintDescriptor<?>> constraints = propertyDescriptor.findConstraints()
+                                           .declaredOn(ElementType.METHOD)
+                                           .unorderedAndMatchingGroups(Default.class)
+                                           .lookingAt(Scope.LOCAL_ELEMENT)
+                                           .getConstraintDescriptors();</programlisting>
+    </example>
+
+    <para><xref linkend="example-constraint-finder" /> shows an example on how
+    to use the <classname>ConstraintFinder</classname> API. Interesting are
+    especially the restrictions <code>unorderedAndMatchingGroups</code> and
+    <code>lookingAt(<ulink
+    url="http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/Scope.html">Scope.LOCAL_ELEMENT</ulink>)</code>.
+    The former allows to only return
+    <classname>ConstraintDescriptors</classname> matching a specified set of
+    groups wheras the latter allows to distinguish between constraint directly
+    specified on the element (<constant>Scope.LOCAL_ELEMENT</constant>) or
+    constraints belonging to the element but hosted anywhere in the class
+    hierarchy (<constant>Scope.HIERARCHY</constant>).<warning>
+        <para>Order is not respected by unorderedAndMatchingGroups, but group
+        inheritance and inheritance via sequence are.</para>
+      </warning></para>
+  </section>
+
+  <section id="section-constraint-descriptor">
+    <title><classname>ConstraintDescriptor</classname></title>
+
+    <para>Last but not least, the <ulink
+    url="http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/ConstraintDescriptor.html"><classname>ConstraintDescriptor</classname></ulink>
+    interface describes a single constraint together with its composing
+    constraints. Via an instance of this interface you get access to the
+    constraint annotation and its parameters, as well as the groups the
+    constraint is supposed to be applied on. It also also you to access the
+    pass-through constraint payload (see <xref
+    linkend="example-defining-custom-constraint" />).</para>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/preface.xml b/project/documentation/src/main/docbook/en-US/modules/preface.xml
new file mode 100644
index 0000000..c1f37fe
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/preface.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<preface id="preface">
+  <title>Preface</title>
+
+  <para>Validating data is a common task that occurs throughout any
+  application, from the presentation layer to the persistence layer. Often the
+  same validation logic is implemented in each layer, proving time consuming
+  and error-prone. To avoid duplication of these validations in each layer,
+  developers often bundle validation logic directly into the domain model,
+  cluttering domain classes with validation code which is really metadata
+  about the class itself.</para>
+
+  <mediaobject>
+    <imageobject role="fo">
+      <imagedata align="center" contentdepth="" contentwidth="150mm"
+                 fileref="application-layers.png" scalefit="" />
+    </imageobject>
+
+    <imageobject role="html">
+      <imagedata depth="" fileref="application-layers.png" scalefit="1" />
+    </imageobject>
+  </mediaobject>
+
+  <para>JSR 303 - Bean Validation - defines a metadata model and API for
+  entity validation. The default metadata source is annotations, with the
+  ability to override and extend the meta-data through the use of XML. The API
+  is not tied to a specific application tier or programming model. It is
+  specifically not tied to either the web tier or the persistence tier, and is
+  available for both server-side application programming, as well as rich
+  client Swing application developers.</para>
+
+  <para><mediaobject>
+      <imageobject role="fo">
+        <imagedata align="center" contentdepth="" contentwidth="150mm"
+                   fileref="application-layers2.png" scalefit="" />
+      </imageobject>
+
+      <imageobject role="html">
+        <imagedata depth="" fileref="application-layers2.png" scalefit="1" />
+      </imageobject>
+    </mediaobject></para>
+
+  <para>Hibernate Validator is the reference implementation of this JSR. The
+  implementation itself as well as the Bean Validation API and TCK are all
+  provided and distributed under the <ulink
+  url="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License
+  2.0</ulink>.</para>
+</preface>
diff --git a/project/documentation/src/main/docbook/en-US/modules/usingvalidator.xml b/project/documentation/src/main/docbook/en-US/modules/usingvalidator.xml
new file mode 100644
index 0000000..886d9fd
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/usingvalidator.xml
@@ -0,0 +1,1653 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-usingvalidator">
+  <title>Validation step by step</title>
+
+  <para>In this chapter we will see in more detail how to use Hibernate
+  Validator to validate constraints for a given entity model. We will also
+  learn which default constraints the Bean Validation specification provides
+  and which additional constraints are only provided by Hibernate Validator.
+  Let's start with how to add constraints to an entity.</para>
+
+  <section id="validator-usingvalidator-annotate">
+    <title>Defining constraints</title>
+
+    <para>Constraints in Bean Validation are expressed via Java annotations.
+    In this section we show how to annotate an object model with these
+    annotations. We have to differentiate between three different type of
+    constraint annotations - field-, property-, and class-level
+    annotations.</para>
+
+    <note>
+      <para>Not all constraints can be placed on all of these levels. In fact,
+      none of the default constraints defined by Bean Validation can be placed
+      at class level. The <classname>java.lang.annotation.Target</classname>
+      annotation in the constraint annotation itself determines on which
+      elements a constraint can be placed. See <xref
+      linkend="validator-customconstraints"/> for more information.</para>
+    </note>
+
+    <section>
+      <title>Field-level constraints</title>
+
+      <para>Constraints can be expressed by annotating a field of a class.
+      <xref linkend="example-field-level"/> shows a field level configuration
+      example:</para>
+
+      <example id="example-field-level">
+        <title>Field level constraint</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.NotNull;
+
+public class Car {
+
+    @NotNull
+    private String manufacturer;
+
+    @AssertTrue
+    private boolean isRegistered;
+
+    public Car(String manufacturer, boolean isRegistered) {
+        super();
+        this.manufacturer = manufacturer;
+        this.isRegistered = isRegistered;
+    }
+}</programlisting>
+      </example>
+
+      <para>When using field level constraints field access strategy is used
+      to access the value to be validated. This means the bean validation
+      provider directly accesses the instance variable and does not invoke the
+      property accessor method also if such a method exists.</para>
+
+      <note>
+        <para>The access type (private, protected or public) does not
+        matter.</para>
+      </note>
+
+      <note>
+        <para>Static fields and properties cannot be validated.</para>
+      </note>
+
+      <tip>
+        <para>When validating byte code enhanced objects property level
+        constraints should be used, because the byte code enhancing library
+        won't be able to determine a field access via reflection.</para>
+      </tip>
+    </section>
+
+    <section>
+      <title>Property-level constraints</title>
+
+      <para>If your model class adheres to the <ulink type=""
+      url="http://java.sun.com/javase/technologies/desktop/javabeans/index.jsp">JavaBeans</ulink>
+      standard, it is also possible to annotate the properties of a bean class
+      instead of its fields. <xref linkend="example-property-level"/> uses the
+      same entity as in <xref linkend="example-field-level"/>, however,
+      property level constraints are used.<note>
+          <para>The property's getter method has to be annotated, not its
+          setter.</para>
+        </note></para>
+
+      <example id="example-property-level">
+        <title>Property level constraint</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.NotNull;
+
+public class Car {
+
+    private String manufacturer;
+
+    private boolean isRegistered;
+      
+    public Car(String manufacturer, boolean isRegistered) {
+        super();
+        this.manufacturer = manufacturer;
+        this.isRegistered = isRegistered;
+    }
+
+    @NotNull
+    public String getManufacturer() {
+        return manufacturer;
+    }
+
+    public void setManufacturer(String manufacturer) {
+        this.manufacturer = manufacturer;
+    }
+
+    @AssertTrue
+    public boolean isRegistered() {
+        return isRegistered;
+    }
+
+    public void setRegistered(boolean isRegistered) {
+        this.isRegistered = isRegistered;
+    }
+}</programlisting>
+      </example>
+
+      <para>When using property level constraints property access strategy is
+      used to access the value to be validated. This means the bean validation
+      provider accesses the state via the property accessor method. One
+      advantage of annotating properties instead of fields is that the
+      constraints become part of the constrained type's API that way and users
+      are aware of the existing constraints without having to examine the
+      type's implementation.</para>
+
+      <tip>
+        <para>It is recommended to stick either to field
+        <emphasis>or</emphasis> property annotations within one class. It is
+        not recommended to annotate a field <emphasis>and</emphasis> the
+        accompanying getter method as this would cause the field to be
+        validated twice.</para>
+      </tip>
+    </section>
+
+    <section>
+      <title id="validator-usingvalidator-classlevel">Class-level
+      constraints</title>
+
+      <para>Last but not least, a constraint can also be placed on class
+      level. When a constraint annotation is placed on this level the class
+      instance itself passed to the
+      <classname>ConstraintValidator</classname>. Class level constraints are
+      useful if it is necessary to inspect more than a single property of the
+      class to validate it or if a correlation between different state
+      variables has to be evaluated. In <xref linkend="example-class-level"/>
+      we add the property <property>passengers</property> to the class
+      <classname>Car</classname>. We also add the constraint
+      <classname>PassengerCount</classname> on the class level. We will later
+      see how we can actually create this custom constraint (see <xref
+      linkend="validator-customconstraints"/>). For now it is enough to know
+      that <classname>PassengerCount</classname> will ensure that there cannot
+      be more passengers in a car than there are seats.</para>
+
+      <example id="example-class-level">
+        <title>Class level constraint</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+ at PassengerCount
+public class Car {
+
+    @NotNull
+    private String manufacturer;
+
+    @NotNull
+    @Size(min = 2, max = 14)
+    private String licensePlate;
+
+    @Min(2)
+    private int seatCount;
+    
+    private List<Person> passengers;
+    
+    public Car(String manufacturer, String licencePlate, int seatCount) {
+        this.manufacturer = manufacturer;
+        this.licensePlate = licencePlate;
+        this.seatCount = seatCount;
+    }
+
+    //getters and setters ...
+}</programlisting>
+      </example>
+    </section>
+
+    <section>
+      <title>Constraint inheritance</title>
+
+      <para>When validating an object that implements an interface or extends
+      another class, all constraint annotations on the implemented interface
+      and parent class apply in the same manner as the constraints specified
+      on the validated object itself. To make things clearer let's have a look
+      at the following example:</para>
+
+      <example>
+        <title>Constraint inheritance using RentalCar</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.NotNull;
+
+public class RentalCar extends Car {
+
+    private String rentalStation;
+    
+    public RentalCar(String manufacturer, String rentalStation) {
+        super(manufacturer);
+        this.rentalStation = rentalStation;
+    }
+    
+    @NotNull
+    public String getRentalStation() {
+        return rentalStation;
+    }
+
+    public void setRentalStation(String rentalStation) {
+        this.rentalStation = rentalStation;
+    }
+}</programlisting>
+      </example>
+
+      <para>Our well-known class <classname>Car</classname> is now extended by
+      <classname>RentalCar</classname> with the additional property
+      <property>rentalStation</property>. If an instance of
+      <classname>RentalCar</classname> is validated, not only the
+      <classname>@NotNull</classname> constraint on
+      <property>rentalStation</property> is validated, but also the constraint
+      on <property>manufacturer</property> from the parent class.</para>
+
+      <para>The same would hold true, if <classname>Car</classname> were an
+      interface implemented by <classname>RentalCar</classname>.</para>
+
+      <para>Constraint annotations are aggregated if methods are overridden.
+      If <classname>RentalCar</classname> would override the
+      <methodname>getManufacturer()</methodname> method from
+      <classname>Car</classname> any constraints annotated at the overriding
+      method would be evaluated in addition to the
+      <classname>@NotNull</classname> constraint from the super-class.</para>
+    </section>
+
+    <section>
+      <title>Object graphs</title>
+
+      <para>The Bean Validation API does not only allow to validate single
+      class instances but also complete object graphs. To do so, just annotate
+      a field or property representing a reference to another object with
+      <classname>@Valid</classname>. If the parent object is validated, all
+      referenced objects annotated with <classname>@Valid</classname> will be
+      validated as well (as will be their children etc.). See <xref
+      linkend="example-car-with-driver"/>.</para>
+
+      <example>
+        <title>Class Person</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.constraints.NotNull;
+
+public class Person {
+
+    @NotNull
+    private String name;
+    
+    public Person(String name) {
+        super();
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}</programlisting>
+      </example>
+
+      <example id="example-car-with-driver">
+        <title>Adding a driver to the car</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+public class Car {
+
+    @NotNull
+    @Valid
+    private Person driver;
+    
+    public Car(Person driver) {
+        this.driver = driver;
+    }
+
+    //getters and setters ...
+}</programlisting>
+      </example>
+
+      <para>If an instance of <classname>Car</classname> is validated, the
+      referenced <classname>Person</classname> object will be validated as
+      well, as the <property>driver</property> field is annotated with
+      <classname>@Valid</classname>. Therefore the validation of a
+      <classname>Car</classname> will fail if the <property>name</property>
+      field of the referenced <classname>Person</classname> instance is
+      <code>null</code>.</para>
+
+      <para>Object graph validation also works for collection-typed fields.
+      That means any attributes that</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>are arrays</para>
+        </listitem>
+
+        <listitem>
+          <para>implement <classname>java.lang.Iterable</classname>
+          (especially <classname>Collection</classname>,
+          <classname>List</classname> and <classname>Set</classname>)</para>
+        </listitem>
+
+        <listitem>
+          <para>implement <classname>java.util.Map</classname></para>
+        </listitem>
+      </itemizedlist>
+
+      <para>can be annotated with <classname>@Valid</classname>, which will
+      cause each contained element to be validated, when the parent object is
+      validated.</para>
+
+      <example>
+        <title>Car with a list of passengers</title>
+
+        <programlisting language="JAVA" role="JAVA">package com.mycompany;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+public class Car {
+
+    @NotNull
+    @Valid
+    private List<Person> passengers = new ArrayList<Person>();
+
+    public Car(List<Person> passengers) {
+        this.passengers = passengers;
+    }
+
+    //getters and setters ...
+}</programlisting>
+      </example>
+
+      <para>If a <classname>Car</classname> instance is validated, a
+      <classname>ConstraintValidation</classname> will be created, if any of
+      the <classname>Person</classname> objects contained in the
+      <property>passengers</property> list has a <code>null</code> name.<note>
+          <para><classname>null</classname> values are getting ignored when
+          validating object graphs.</para>
+        </note></para>
+    </section>
+  </section>
+
+  <section id="validator-usingvalidator-validate">
+    <title>Validating constraints</title>
+
+    <para>The <classname>Validator</classname> interface is the main entry
+    point to Bean Validation. In <xref linkend="section-validator-instance"/>
+    we will first show how to obtain an <classname>Validator</classname>
+    instance. Afterwards we will learn how to use the different methods of the
+    <classname>Validator</classname> interface.</para>
+
+    <section id="section-obtaining-validator">
+      <title>Obtaining a <classname>Validator</classname> instance</title>
+
+      <para>The first step towards validating an entity instance is to get
+      hold of a <classname>Validator</classname> instance. The road to this
+      instance leads via the <classname>Validation</classname> class and a
+      <classname>ValidatorFactory</classname>. The easiest way is to use the
+      static
+      <methodname>Validation.buildDefaultValidatorFactory()</methodname>
+      method:</para>
+
+      <example>
+        <title>Validation.buildDefaultValidatorFactory()</title>
+
+        <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+Validator validator = factory.getValidator();</programlisting>
+      </example>
+
+      <para>For other ways of obtaining a Validator instance see <xref
+      linkend="validator-bootstrapping"/>. For now we just want to see how we
+      can use the <classname>Validator</classname> instance to validate entity
+      instances.</para>
+    </section>
+
+    <section>
+      <title>Validator methods</title>
+
+      <para>The <classname>Validator</classname> interface contains three
+      methods that can be used to either validate entire entities or just a
+      single properties of the entity.</para>
+
+      <para>All three methods return a
+      <classname>Set<ConstraintViolation></classname>. The set is empty,
+      if the validation succeeds. Otherwise a
+      <classname>ConstraintViolation</classname> instance is added for each
+      violated constraint.</para>
+
+      <para>All the validation methods have a var-args parameter which can be
+      used to specify, which validation groups shall be considered when
+      performing the validation. If the parameter is not specified the default
+      validation group
+      (<classname>javax.validation.groups.Default</classname>) will be used.
+      We will go into more detail on the topic of validation groups in <xref
+      linkend="validator-usingvalidator-validationgroups"/></para>
+
+      <section>
+        <title><methodname>validate</methodname></title>
+
+        <para>Use the <methodname>validate()</methodname> method to perform
+        validation of all constraints of a given entity instance (see <xref
+        linkend="example-validator-validate"/> ).</para>
+
+        <example id="example-validator-validate">
+          <title>Usage of
+          <methodname>Validator.validate()</methodname></title>
+
+          <programlisting language="JAVA" role="JAVA">ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+Validator validator = factory.getValidator();
+
+Car car = new Car(null);
+
+Set<ConstraintViolation<Car>> constraintViolations = validator.validate(car);
+
+assertEquals(1, constraintViolations.size());
+assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
+        </example>
+      </section>
+
+      <section>
+        <title><methodname>validateProperty</methodname></title>
+
+        <para>With help of the <methodname>validateProperty()</methodname> a
+        single named property of a given object can be validated. The property
+        name is the JavaBeans property name.</para>
+
+        <example>
+          <title>Usage of
+          <methodname>Validator.validateProperty()</methodname></title>
+
+          <programlisting language="JAVA" role="JAVA">Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+
+Car car = new Car(null);
+
+Set<ConstraintViolation<Car>> constraintViolations = validator.validateProperty(car, "manufacturer");
+
+assertEquals(1, constraintViolations.size());
+assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
+        </example>
+
+        <para><methodname>Validator.validateProperty</methodname> is for
+        example used in the integration of Bean Validation into JSF 2 (see
+        <xref linkend="section-presentation-layer"/>).</para>
+      </section>
+
+      <section>
+        <title><methodname>validateValue</methodname></title>
+
+        <para>Using the <methodname>validateValue() </methodname>method you
+        can check, whether a single property of a given class can be validated
+        successfully, if the property had the specified value:</para>
+
+        <example>
+          <title>Usage of
+          <methodname>Validator.validateValue()</methodname></title>
+
+          <programlisting language="JAVA" role="JAVA">Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+
+Set<ConstraintViolation<Car>> constraintViolations = validator.validateValue(Car.class, "manufacturer", null);
+
+assertEquals(1, constraintViolations.size());
+assertEquals("may not be null", constraintViolations.iterator().next().getMessage());</programlisting>
+        </example>
+
+        <note>
+          <para><classname>@Valid</classname> is not honored by
+          <methodname>validateProperty()</methodname> or
+          <methodname>validateValue()</methodname>.</para>
+        </note>
+      </section>
+    </section>
+
+    <section>
+      <title><classname>ConstraintViolation</classname> methods</title>
+
+      <para>Now it is time to have a closer look at what a
+      <classname>ConstraintViolation</classname>. Using the different methods
+      of <classname>ConstraintViolation</classname> a lot of useful
+      information about the cause of the validation failure can be determined.
+      <xref linkend="table-constraint-violation"/> gives an overview of these
+      methods:</para>
+
+      <table id="table-constraint-violation">
+        <title>The various <classname>ConstraintViolation</classname>
+        methods</title>
+
+        <tgroup cols="3">
+          <thead>
+            <row>
+              <entry>Method</entry>
+
+              <entry>Usage</entry>
+
+              <entry>Example (referring to <xref
+              linkend="example-validator-validate"/>)</entry>
+            </row>
+          </thead>
+
+          <tbody>
+            <row>
+              <entry><methodname>getMessage()</methodname></entry>
+
+              <entry>The interpolated error message.</entry>
+
+              <entry>may not be null</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getMessageTemplate()</methodname></entry>
+
+              <entry>The non-interpolated error message.</entry>
+
+              <entry>{javax.validation.constraints.NotNull.message}</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getRootBean()</methodname></entry>
+
+              <entry>The root bean being validated.</entry>
+
+              <entry>car</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getRootBeanClass()</methodname></entry>
+
+              <entry>The class of the root bean being validated.</entry>
+
+              <entry>Car.class</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getLeafBean()</methodname></entry>
+
+              <entry>If a bean constraint, the bean instance the constraint is
+              applied on. If a property constraint, the bean instance hosting
+              the property the constraint is applied on.</entry>
+
+              <entry>car</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getPropertyPath()</methodname></entry>
+
+              <entry>The property path to the value from root bean.</entry>
+
+              <entry/>
+            </row>
+
+            <row>
+              <entry><methodname>getInvalidValue()</methodname></entry>
+
+              <entry>The value failing to pass the constraint.</entry>
+
+              <entry>passengers</entry>
+            </row>
+
+            <row>
+              <entry><methodname>getConstraintDescriptor()</methodname></entry>
+
+              <entry>Constraint metadata reported to fail.</entry>
+
+              <entry/>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+    </section>
+
+    <section id="section-message-interpolation">
+      <title>Message interpolation</title>
+
+      <para>As we will see in <xref linkend="validator-customconstraints"/>
+      each constraint definition must define a default message descriptor.
+      This message can be overridden at declaration time using the
+      <methodname>message</methodname> attribute of the constraint. You can
+      see this in <xref linkend="example-driver"/>. This message descriptors
+      get interpolated when a constraint validation fails using the configured
+      <classname>MessageInterpolator</classname>. The interpolator will try to
+      resolve any message parameters, meaning string literals enclosed in
+      braces. In order to resolve these parameters Hibernate Validator's
+      default <classname>MessageInterpolator</classname> first recursively
+      resolves parameters against a custom
+      <classname>ResourceBundle</classname> called
+      <filename>ValidationMessages.properties</filename> at the root of the
+      classpath (It is up to you to create this file). If no further
+      replacements are possible against the custom bundle the default
+      <classname>ResourceBundle</classname> under
+      <filename>/org/hibernate/validator/ValidationMessages.properties</filename>
+      gets evaluated. If a replacement occurs against the default bundle the
+      algorithm looks again at the custom bundle (and so on). Once no further
+      replacements against these two resource bundles are possible remaining
+      parameters are getting resolved against the attributes of the constraint
+      to be validated.</para>
+
+      <para>Since the braces { and } have special meaning in the messages they
+      need to be escaped if they are used literally. The following The
+      following rules apply:<itemizedlist>
+          <listitem>
+            <para>\{ is considered as the literal {</para>
+          </listitem>
+
+          <listitem>
+            <para>\} is considered as the literal }</para>
+          </listitem>
+
+          <listitem>
+            <para>\\ is considered as the literal \</para>
+          </listitem>
+        </itemizedlist></para>
+
+      <para>If the default message interpolator does not fit your requirements
+      it is possible to plug a custom
+      <classname>MessageInterpolator</classname> when the
+      <classname>ValidatorFactory</classname> gets created. This can be seen
+      in <xref linkend="validator-bootstrapping"/>.</para>
+    </section>
+  </section>
+
+  <section id="validator-usingvalidator-validationgroups">
+    <title>Validating groups</title>
+
+    <para>Groups allow you to restrict the set of constraints applied during
+    validation. This makes for example wizard like validation possible where
+    in each step only a specified subset of constraints get validated. The
+    groups targeted are passed as var-args parameters to
+    <methodname>validate</methodname>,
+    <methodname>validateProperty</methodname> and
+    <methodname>validateValue</methodname>. Let's have a look at an extended
+    <classname>Car</classname> with <classname>Driver</classname> example.
+    First we have the class <classname>Person</classname> (<xref
+    linkend="example-person"/>) which has a <classname>@NotNull
+    </classname>constraint on <property>name</property>. Since no group is
+    specified for this annotation its default group is
+    <classname>javax.validation.groups.Default</classname>.</para>
+
+    <note>
+      <para>When more than one group is requested, the order in which the
+      groups are evaluated is not deterministic. If no group is specified the
+      default group <classname>javax.validation.groups.Default</classname> is
+      assumed.</para>
+    </note>
+
+    <example id="example-person">
+      <title>Person</title>
+
+      <programlisting language="JAVA" role="JAVA">public class Person {
+    @NotNull
+    private String name;
+
+    public Person(String name) {
+        this.name = name;
+    }
+    // getters and setters ...
+}</programlisting>
+    </example>
+
+    <para>Next we have the class <classname>Driver</classname> (<xref
+    linkend="example-driver"/>) extending <classname>Person</classname>. Here
+    we are adding the properties <property>age</property> and
+    <property>hasDrivingLicense</property>. In order to drive you must be at
+    least 18 (<classname>@Min(18)</classname>) and you must have a driving
+    license (<classname>@AssertTrue</classname>). Both constraints defined on
+    these properties belong to the group <classname>DriverChecks</classname>.
+    As you can see in <xref linkend="example-group-interfaces"/> the group
+    <classname>DriverChecks</classname> is just a simple tagging interface.
+    Using interfaces makes the usage of groups type safe and allows for easy
+    refactoring. It also means that groups can inherit from each other via
+    class inheritance.</para>
+
+    <example id="example-driver">
+      <title>Driver</title>
+
+      <programlisting language="JAVA" role="JAVA">public class Driver extends Person {
+    @Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class)
+    public int age;
+
+    @AssertTrue(message = "You first have to pass the driving test", groups = DriverChecks.class)
+    public boolean hasDrivingLicense;
+
+    public Driver(String name) {
+        super( name );
+    }
+
+    public void passedDrivingTest(boolean b) {
+        hasDrivingLicense = b;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+}</programlisting>
+    </example>
+
+    <example id="example-group-interfaces">
+      <title>Group interfaces</title>
+
+      <programlisting language="JAVA" role="JAVA">public interface DriverChecks {
+}
+
+public interface CarChecks {
+}</programlisting>
+    </example>
+
+    <para>Last but not least we add the property
+    <property>passedVehicleInspection</property> to the
+    <classname>Car</classname> class (<xref linkend="example-car"/>)
+    indicating whether a car passed the road worthy tests.</para>
+
+    <example id="example-car">
+      <title>Car</title>
+
+      <programlisting language="JAVA" role="JAVA">public class Car {
+    @NotNull
+    private String manufacturer;
+
+    @NotNull
+    @Size(min = 2, max = 14)
+    private String licensePlate;
+
+    @Min(2)
+    private int seatCount;
+
+    @AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
+    private boolean passedVehicleInspection;
+
+    @Valid
+    private Driver driver;
+
+    public Car(String manufacturer, String licencePlate, int seatCount) {
+        this.manufacturer = manufacturer;
+        this.licensePlate = licencePlate;
+        this.seatCount = seatCount;
+    }
+}</programlisting>
+    </example>
+
+    <para>Overall three different groups are used in our example.
+    <property>Person.name</property>, <property>Car.manufacturer</property>,
+    <property>Car.licensePlate</property> and
+    <property>Car.seatCount</property> all belong to the
+    <classname>Default</classname> group. <property>Driver.age</property> and
+    <property>Driver.hasDrivingLicense</property> belong to
+    <classname>DriverChecks</classname> and last but not least
+    <property>Car.passedVehicleInspection</property> belongs to the group
+    <classname>CarChecks</classname>. <xref linkend="example-drive-away"/>
+    shows how passing different group combinations to the
+    <methodname>Validator.validate</methodname> method result in different
+    validation results.</para>
+
+    <example id="example-drive-away">
+      <title>Drive away</title>
+
+      <programlisting language="JAVA" role="JAVA">public class GroupTest {
+
+    private static Validator validator;
+
+    @BeforeClass
+    public static void setUp() {
+        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+        validator = factory.getValidator();
+    }
+
+    @Test
+    public void driveAway() {
+        // create a car and check that everything is ok with it.
+        Car car = new Car( "Morris", "DD-AB-123", 2 );
+        Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+        assertEquals( 0, constraintViolations.size() );
+
+        // but has it passed the vehicle inspection?
+        constraintViolations = validator.validate( car, CarChecks.class );
+        assertEquals( 1, constraintViolations.size() );
+        assertEquals("The car has to pass the vehicle inspection first", constraintViolations.iterator().next().getMessage());
+
+        // let's go to the vehicle inspection
+        car.setPassedVehicleInspection( true );
+        assertEquals( 0, validator.validate( car ).size() );
+
+        // now let's add a driver. He is 18, but has not passed the driving test yet
+        Driver john = new Driver( "John Doe" );
+        john.setAge( 18 );
+        car.setDriver( john );
+        constraintViolations = validator.validate( car, DriverChecks.class );
+        assertEquals( 1, constraintViolations.size() );
+        assertEquals( "You first have to pass the driving test", constraintViolations.iterator().next().getMessage() );
+
+        // ok, John passes the test
+        john.passedDrivingTest( true );
+        assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );
+
+        // just checking that everything is in order now
+        assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );
+    }
+}</programlisting>
+    </example>
+
+    <para>First we create a car and validate it using no explicit group. There
+    are no validation errors, even though the property
+    <property>passedVehicleInspection</property> is per default
+    <constant>false</constant>. However, the constraint defined on this
+    property does not belong to the default group. Next we just validate the
+    <classname>CarChecks</classname> group which will fail until we make sure
+    that the car passes the vehicle inspection. When we then add a driver to
+    the car and validate against <classname>DriverChecks</classname> we get
+    again a constraint violation due to the fact that the driver has not yet
+    passed the driving test. Only after setting
+    <property>passedDrivingTest</property> to true the validation against
+    <classname>DriverChecks</classname> will pass.</para>
+
+    <para>Last but not least, we show that all constraints are passing by
+    validating against all defined groups.</para>
+
+    <section>
+      <title>Group sequences</title>
+
+      <para>By default, constraints are evaluated in no particular order,
+      regardless of which groups they belong to. In some situations, however,
+      it is useful to control the order constraints are evaluated. In our
+      example from <xref linkend="validator-usingvalidator-validationgroups"/>
+      we could for example require that first all default car constraints are
+      passing before we check the road worthiness of the car. Finally before
+      we drive away we check the actual driver constraints. In order to
+      implement such an order one would define a new interface and annotate it
+      with <classname>@GroupSequence</classname> defining the order in which
+      the groups have to be validated.</para>
+
+      <note>
+        <para>If at least one constraint fails in a sequenced group none of
+        the constraints of the following groups in the sequence get
+        validated.</para>
+      </note>
+
+      <example id="example-orderedChecks">
+        <title>Interface with @GroupSequence</title>
+
+        <programlisting language="JAVA" role="JAVA">@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})
+public interface OrderedChecks {
+}</programlisting>
+      </example>
+
+      <para><warning>
+          <para>Groups defining a sequence and groups composing a sequence
+          must not be involved in a cyclic dependency either directly or
+          indirectly, either through cascaded sequence definition or group
+          inheritance. If a group containing such a circularity is evaluated,
+          a <classname>GroupDefinitionException</classname> is raised.</para>
+        </warning>The usage of the new sequence could then look like in <xref
+      linkend="example-group-sequence"/>.</para>
+
+      <example id="example-group-sequence">
+        <title>Usage of a group sequence</title>
+
+        <programlisting language="JAVA" role="JAVA">@Test
+public void testOrderedChecks() {
+    Car car = new Car( "Morris", "DD-AB-123", 2 );
+    car.setPassedVehicleInspection( true );
+
+    Driver john = new Driver( "John Doe" );
+    john.setAge( 18 );
+    john.passedDrivingTest( true );
+    car.setDriver( john );
+
+    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );
+}</programlisting>
+      </example>
+    </section>
+
+    <section id="section-default-group-class">
+      <title>Redefining the default group sequence of a class</title>
+
+      <section>
+        <title>@GroupSequence</title>
+
+        <para>The <classname>@GroupSequence</classname> annotation also
+        fulfills a second purpose. It allows you to redefine what the
+        <constant>Default</constant> group means for a given class. To
+        redefine <classname>Default</classname> for a given class, add a
+        <classname>@GroupSequence</classname> annotation to the class. The
+        defined groups in the annotation express the sequence of groups that
+        substitute <classname>Default</classname> for this class. <xref
+        linkend="example-rental-car"/> introduces a new class
+        <classname>RentalCar</classname> with a redefined default group. With
+        this definition you can evaluate the constraints belonging to
+        <classname>RentalChecks</classname>, <classname>CarChecks</classname>
+        and <classname>RentalCar</classname> by just requesting the
+        <classname>Default</classname> group as seen in <xref
+        linkend="example-testCarIsRented"/>.</para>
+
+        <example id="example-rental-car">
+          <title>RentalCar with @GroupSequence</title>
+
+          <programlisting language="JAVA" role="JAVA">@GroupSequence({ RentalChecks.class, CarChecks.class, RentalCar.class })
+public class RentalCar extends Car {
+    @AssertFalse(message = "The car is currently rented out", groups = RentalChecks.class)
+    private boolean rented;
+
+    public RentalCar(String manufacturer, String licencePlate, int seatCount) {
+        super( manufacturer, licencePlate, seatCount );
+    }
+
+    public boolean isRented() {
+        return rented;
+    }
+
+    public void setRented(boolean rented) {
+        this.rented = rented;
+    }
+}</programlisting>
+        </example>
+
+        <example id="example-testCarIsRented">
+          <title>RentalCar with redefined default group</title>
+
+          <programlisting language="JAVA" role="JAVA">/**
+ * Validating the default group leads to validation on the default group sequence of {@code RentalCar}.
+ */
+ at Test
+public void carIsRented() {
+  RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
+  rentalCar.setPassedVehicleInspection( true );
+  rentalCar.setRented( true );
+
+  Set<ConstraintViolation<RentalCar>> constraintViolations = validator.validate( rentalCar );
+
+  assertEquals( 1, constraintViolations.size() );
+  assertEquals(
+    "Wrong message",
+    "The car is currently rented out",
+    constraintViolations.iterator().next().getMessage()
+  );
+
+  rentalCar.setRented( false );
+  constraintViolations = validator.validate( rentalCar );
+
+  assertEquals( 0, constraintViolations.size() );
+}</programlisting>
+        </example>
+
+        <note>
+          <para>Due to the fact that there cannot be a cyclic dependency in
+          the group and group sequence definitions one cannot just add
+          <classname>Default</classname> to the sequence redefining
+          <classname>Default</classname> for a class. Instead the class itself
+          has to be added!</para>
+        </note>
+
+        <note>
+          <para>The <classname>Default</classname> group sequence overriding
+          is local to the class it is defined on and is not propagated to the
+          associated objects. This means in particular that adding
+          <classname>DriverChecks</classname> to the default group sequence of
+          <classname>RentalCar</classname> would not have any effects. Only
+          the group <classname>Default</classname> will be propagated to the
+          driver association when validation a rental car instance.</para>
+        </note>
+      </section>
+
+      <section>
+        <title>@GroupSequenceProvider</title>
+
+        <para>The <classname>@javax.validation.GroupSequence</classname>
+        annotation is a standardized Bean Validation annotation. As seen in
+        the previous section it allows you to statically redefine the default
+        group sequence for a class. Hibernate Validator also offers a custom,
+        non standardized annotation -
+        <classname>org.hibernate.validator.group.GroupSequenceProvider
+        </classname>- which allows for dynamic redefinition of the default
+        group sequence. Using the rental car scenario again, one could
+        dynamically add the <classname>CarChecks</classname> as seen in <xref
+        linkend="example-rental-car-group-sequence-provider"/> and <xref
+        linkend="example-group-sequence-provider-implementation"/>.</para>
+
+        <example id="example-rental-car-group-sequence-provider">
+          <title>RentalCar with @GroupSequenceProvider</title>
+
+          <programlisting language="JAVA" role="JAVA">@GroupSequenceProvider(RentalCarGroupSequenceProvider.class)
+public class RentalCar extends Car {
+    @AssertFalse(message = "The car is currently rented out", groups = RentalChecks.class)
+    private boolean rented;
+
+    public RentalCar(String manufacturer, String licencePlate, int seatCount) {
+        super( manufacturer, licencePlate, seatCount );
+    }
+
+    public boolean isRented() {
+        return rented;
+    }
+
+    public void setRented(boolean rented) {
+        this.rented = rented;
+    }
+}</programlisting>
+        </example>
+
+        <example id="example-group-sequence-provider-implementation" label="">
+          <title>DefaultGroupSequenceProvider implementation</title>
+
+          <programlisting language="JAVA" role="JAVA">public class RentalCarGroupSequenceProvider implements DefaultGroupSequenceProvider<RentalCar> {
+    public List<Class<?>> getValidationGroups(RentalCar car) {
+        List<Class<?>> defaultGroupSequence = new ArrayList<Class<?>>();
+        defaultGroupSequence.add( RentalCar.class );
+
+        if ( car != null && !car.isRented() ) {
+            defaultGroupSequence.add( CarChecks.class );
+        }
+
+        return defaultGroupSequence;
+    }
+}</programlisting>
+        </example>
+      </section>
+    </section>
+  </section>
+
+  <section id="validator-defineconstraints-builtin">
+    <title>Built-in constraints</title>
+
+    <para>Hibernate Validator comprises a basic set of commonly used
+    constraints. These are foremost the constraints defined by the Bean
+    Validation specification (see <xref linkend="table-spec-constraints"/>).
+    Additionally, Hibernate Validator provides useful custom constraints (see
+    <xref linkend="table-custom-constraints"/> and <xref
+    linkend="table-custom-country-constraints"/>).</para>
+
+    <section id="validator-defineconstraints-spec">
+      <title>Bean Validation constraints</title>
+
+      <para><xref linkend="table-spec-constraints"/> shows purpose and
+      supported data types of all constraints specified in the Bean Validation
+      API. All these constraints apply to the field/property level, there are
+      no class-level constraints defined in the Bean Validation specification.
+      If you are using the Hibernate object-relational mapper, some of the
+      constraints are taken into account when creating the DDL for your model
+      (see column "Hibernate metadata impact").</para>
+
+      <note>
+        <para>Hibernate Validator allows some constraints to be applied to
+        more data types than required by the Bean Validation specification
+        (e.g. @Max can be applied to <classname>Strings</classname>). Relying
+        on this feature can impact portability of your application between
+        Bean Validation providers.</para>
+      </note>
+
+      <table id="table-spec-constraints">
+        <title>Bean Validation constraints</title>
+
+        <tgroup cols="4">
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <thead>
+            <row>
+              <entry>Annotation</entry>
+
+              <entry>Supported data types</entry>
+
+              <entry>Use</entry>
+
+              <entry>Hibernate metadata impact</entry>
+            </row>
+          </thead>
+
+          <tbody valign="top">
+            <row>
+              <entry>@AssertFalse</entry>
+
+              <entry><classname>Boolean</classname>,
+              <classname>boolean</classname></entry>
+
+              <entry>Checks that the annotated element is
+              <constant>false</constant>.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@AssertTrue</entry>
+
+              <entry><classname>Boolean</classname>,
+              <classname>boolean</classname></entry>
+
+              <entry>Checks that the annotated element is
+              <constant>true</constant>.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@DecimalMax</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>,
+              <classname>String</classname>, <classname>byte</classname>,
+              <classname>short</classname>, <classname>int</classname>,
+              <classname>long</classname> and the respective wrappers of the
+              primitive types. Additionally supported by HV: any sub-type of
+              <classname>Number</classname> and
+              <classname>CharSequence</classname>.</entry>
+
+              <entry>The annotated element must be a number whose value must
+              be lower or equal to the specified maximum. The parameter value
+              is the string representation of the max value according to the
+              <classname>BigDecimal</classname> string representation.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@DecimalMin</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>,
+              <classname>String</classname>, <classname>byte</classname>,
+              <classname>short</classname>, <classname>int</classname>,
+              <classname>long</classname> and the respective wrappers of the
+              primitive types. Additionally supported by HV: any sub-type of
+              <classname>Number </classname>and
+              <classname>CharSequence</classname>.</entry>
+
+              <entry>The annotated element must be a number whose value must
+              be higher or equal to the specified minimum. The parameter value
+              is the string representation of the min value according to the
+              <classname>BigDecimal</classname> string representation.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Digits(integer=, fraction=)</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>,
+              <classname>String</classname>, <classname>byte</classname>,
+              <classname>short</classname>, <classname>int</classname>,
+              <classname>long</classname> and the respective wrappers of the
+              primitive types. Additionally supported by HV: any sub-type of
+              <classname>Number</classname> and
+              <classname>CharSequence</classname>.</entry>
+
+              <entry>Checks whether the annoted value is a number having up to
+              <literal>integer</literal> digits and
+              <literal>fraction</literal> fractional digits.</entry>
+
+              <entry>Define column precision and scale.</entry>
+            </row>
+
+            <row>
+              <entry>@Future</entry>
+
+              <entry><classname>java.util.Date</classname>,
+              <classname>java.util.Calendar</classname>; Additionally
+              supported by HV, if the <ulink
+              url="http://joda-time.sourceforge.net/">Joda Time</ulink>
+              date/time API is on the class path: any implementations of
+              <classname>ReadablePartial</classname> and
+              <classname>ReadableInstant</classname>.</entry>
+
+              <entry>Checks whether the annotated date is in the
+              future.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Max</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>, <classname>byte</classname>,
+              <classname>short</classname>, <classname>int</classname>,
+              <classname>long</classname> and the respective wrappers of the
+              primitive types. Additionally supported by HV: any sub-type
+              of<classname>CharSequence</classname> (the numeric value
+              represented by the character sequence is evaluated), any
+              sub-type of <classname>Number</classname>.</entry>
+
+              <entry>Checks whether the annotated value is less than or equal
+              to the specified maximum.</entry>
+
+              <entry>Add a check constraint on the column.</entry>
+            </row>
+
+            <row>
+              <entry>@Min</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>, <classname>byte</classname>,
+              <classname>short</classname>, <classname>int</classname>,
+              <classname>long</classname> and the respective wrappers of the
+              primitive types. Additionally supported by HV: any sub-type of
+              <classname>CharSequence</classname> (the numeric value
+              represented by the char sequence is evaluated), any sub-type of
+              <classname>Number</classname>.</entry>
+
+              <entry>Checks whether the annotated value is higher than or
+              equal to the specified minimum.</entry>
+
+              <entry>Add a check constraint on the column.</entry>
+            </row>
+
+            <row>
+              <entry>@NotNull</entry>
+
+              <entry>Any type</entry>
+
+              <entry>Checks that the annotated value is not
+              <constant>null.</constant></entry>
+
+              <entry>Column(s) are not null.</entry>
+            </row>
+
+            <row>
+              <entry>@Null</entry>
+
+              <entry>Any type</entry>
+
+              <entry>Checks that the annotated value is
+              <constant>null.</constant></entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Past</entry>
+
+              <entry><classname>java.util.Date</classname>,
+              <classname>java.util.Calendar</classname>; Additionally
+              supported by HV, if the <ulink
+              url="http://joda-time.sourceforge.net/">Joda Time</ulink>
+              date/time API is on the class path: any implementations of
+              <classname>ReadablePartial</classname> and
+              <classname>ReadableInstant</classname>.</entry>
+
+              <entry>Checks whether the annotated date is in the past.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Pattern(regex=, flag=)</entry>
+
+              <entry><classname>String</classname>. Additionally supported by
+              HV: any sub-type of <classname>CharSequence</classname>.</entry>
+
+              <entry>Checks if the annotated string matches the regular
+              expression <parameter>regex</parameter> considering the given
+              flag <parameter>match</parameter>.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Size(min=, max=)</entry>
+
+              <entry><classname>String</classname>,
+              <classname>Collection</classname>, <classname>Map</classname>
+              and <classname>arrays</classname>. Additionally supported by HV:
+              any sub-type of <classname>CharSequence</classname>.</entry>
+
+              <entry>Checks if the annotated element's size is between min and
+              max (inclusive).</entry>
+
+              <entry>Column length will be set to max.</entry>
+            </row>
+
+            <row>
+              <entry>@Valid</entry>
+
+              <entry>Any non-primitive type</entry>
+
+              <entry>Performs validation recursively on the associated object.
+              If the object is a collection or an array, the elements are
+              validated recursively. If the object is a map, the value
+              elements are validated recursively.</entry>
+
+              <entry>none</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+
+      <note>
+        <para>On top of the parameters indicated in <xref
+        linkend="table-spec-constraints"/> each constraint supports the
+        parameters <parameter>message</parameter>,
+        <parameter>groups</parameter> and <parameter>payload</parameter>. This
+        is a requirement of the Bean Validation specification.</para>
+      </note>
+    </section>
+
+    <section id="validator-defineconstraints-hv-constraints">
+      <title>Additional constraints</title>
+
+      <para>In addition to the constraints defined by the Bean Validation API
+      Hibernate Validator provides several useful custom constraints which are
+      listed in <xref linkend="table-custom-constraints"/>. With one exception
+      also these constraints apply to the field/property level, only
+      @ScriptAssert is a class-level constraint.</para>
+
+      <table id="table-custom-constraints">
+        <title>Custom constraints</title>
+
+        <tgroup cols="4">
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <colspec align="left"/>
+
+          <thead>
+            <row>
+              <entry>Annotation</entry>
+
+              <entry>Supported data types</entry>
+
+              <entry>Use</entry>
+
+              <entry>Hibernate metadata impact</entry>
+            </row>
+          </thead>
+
+          <tbody valign="top">
+            <row>
+              <entry>@CreditCardNumber</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks that the annotated character sequence passes the
+              Luhn checksum test. Note, this validation aims to check for user
+              mistakes, not credit card validity! See also <ulink
+              url="http://www.merriampark.com/anatomycc.htm">Anatomy of Credit
+              Card Numbers</ulink>.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Email</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks whether the specified character sequence is a
+              valid email address. The optional parameters
+              <parameter>regexp</parameter> and <parameter>flags</parameter>
+              allow to specify an additional regular expression (including
+              regular expression flags) which the email must match.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Length(min=, max=)</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Validates that the annotated character sequence is
+              between <parameter>min</parameter> and
+              <parameter>max</parameter> included.</entry>
+
+              <entry>Column length will be set to max.</entry>
+            </row>
+
+            <row>
+              <entry>@ModCheck(modType=, multiplier=, startIndex=, endIndex=,
+              checkDigitPosition=, ignoreNonDigitCharacters=)</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks that the digits within the annotated character
+              sequence pass the mod 10 or mod 11 checksum algorithm.
+              <constant>modType</constant> is used to select the modulo type
+              and the <constant>multiplier</constant> determines the algorithm
+              specific multiplier (see also <ulink
+              url="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn
+              algorithm</ulink>). <constant>startIndex</constant> and
+              <constant>endIndex</constant> allow to only run the modulo
+              algorithm on the specified sub-string.
+              <constant>checkDigitPosition</constant> allows to use an
+              arbitrary digit within the character sequence to be the check
+              digit. If not specified it is assumed that the check digit is
+              part of the specified range. Last but not least,
+              <constant>ignoreNonDigitCharacters</constant> allows to ignore
+              non digit characters.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@NotBlank</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks that the annotated character sequence is not null
+              and the trimmed length is greater than 0. The difference to
+              @NotEmpty is that this constraint can only be applied on strings
+              and that trailing whitespaces are ignored.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@NotEmpty</entry>
+
+              <entry><classname>CharSequence</classname>,
+              <classname>Collection</classname>, <classname>Map</classname>
+              and arrays</entry>
+
+              <entry>Checks whether the annotated element is not
+              <constant>null</constant> nor empty.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@Range(min=, max=)</entry>
+
+              <entry><classname>BigDecimal</classname>,
+              <classname>BigInteger</classname>,
+              <classname>CharSequence</classname>,
+              <classname>byte</classname>, <classname>short</classname>,
+              <classname>int</classname>, <classname>long</classname> and the
+              respective wrappers of the primitive types</entry>
+
+              <entry>Checks whether the annotated value lies between
+              (inclusive) the specified minimum and maximum.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@SafeHtml(whitelistType=, additionalTags=)</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks whether the annotated value contains potentially
+              malicious fragments such as <code><script/></code>. In
+              order to use this constraint, the <ulink
+              url="http://jsoup.org/">jsoup</ulink> library must be part of
+              the class path. With the <parameter>whitelistType</parameter>
+              attribute predefined whitelist types can be chosen. You can also
+              specify additional html tags for the whitelist with the
+              <parameter>additionalTags</parameter> attribute.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@ScriptAssert(lang=, script=, alias=)</entry>
+
+              <entry>Any type</entry>
+
+              <entry>Checks whether the given script can successfully be
+              evaluated against the annotated element. In order to use this
+              constraint, an implementation of the Java Scripting API as
+              defined by JSR 223 ("Scripting for the
+              Java<superscript>TM</superscript> Platform") must part of the
+              class path. The expressions to be evaluated can be written
+              in any scripting or expression language, for which a JSR 223
+              compatible engine can be found in the class path.</entry>
+
+              <entry>none</entry>
+            </row>
+
+            <row>
+              <entry>@URL(protocol=, host=, port=, regexp=, flags=)</entry>
+
+              <entry><classname>CharSequence</classname></entry>
+
+              <entry>Checks if the annotated character sequence is a valid URL
+              according to RFC2396. If any of the optional parameters
+              <parameter>protocol</parameter>, <parameter>host</parameter> or
+              <parameter>port</parameter> are specified, the corresponding URL
+              fragments must match the specified values. The optional
+              parameters <parameter>regexp</parameter> and
+              <parameter>flags</parameter> allow to specify an additional
+              regular expression (including regular expression flags) which
+              the URL must match.</entry>
+
+              <entry>none</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+
+      <section>
+        <title>Country specific constraints</title>
+
+        <para>Hibernate Validator offers also some country specific
+        constraints, e.g. for the validation of social security numbers. <note>
+            <para>If you have to implement a country specific constraint,
+            consider making it a contribution to Hibernate Validator!</para>
+          </note></para>
+
+        <table id="table-custom-country-constraints">
+          <title>Custom country specific constraints</title>
+
+          <tgroup cols="5">
+            <colspec align="left"/>
+
+            <colspec align="left"/>
+
+            <colspec align="left"/>
+
+            <colspec align="left"/>
+
+            <colspec align="left"/>
+
+            <thead>
+              <row>
+                <entry>Annotation</entry>
+
+                <entry>Supported data types</entry>
+
+                <entry>Use</entry>
+
+                <entry>Country</entry>
+
+                <entry>Hibernate metadata impact</entry>
+              </row>
+            </thead>
+
+            <tbody valign="top">
+              <row>
+                <entry>@CNPJ</entry>
+
+                <entry><classname>CharSequence</classname></entry>
+
+                <entry>Checks that the annotated character sequence represents
+                a Brazilian corporate tax payer registry number (Cadastro de
+                Pessoa Juríeddica)</entry>
+
+                <entry>Brazil</entry>
+
+                <entry>none</entry>
+              </row>
+
+              <row>
+                <entry>@CPF</entry>
+
+                <entry><classname>CharSequence</classname></entry>
+
+                <entry>Checks that the annotated character sequence represents
+                a Brazilian individual taxpayer registry number (Cadastro de
+                Pessoa Fídsica).</entry>
+
+                <entry>Brazil</entry>
+
+                <entry>none</entry>
+              </row>
+
+              <row>
+                <entry>@TituloEleitoral</entry>
+
+                <entry><classname>CharSequence</classname></entry>
+
+                <entry>Checks that the annotated character sequence represents
+                a Brazilian voter ID card number (<ulink
+                url="http://ghiorzi.org/cgcancpf.htm">Título
+                Eleitoral</ulink>).</entry>
+
+                <entry>Brazil</entry>
+
+                <entry>none</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </table>
+
+        <tip>
+          <para>In some cases neither the Bean Validation constraints nor the
+          custom constraints provided by Hibernate Validator will fulfill your
+          requirements. In this case you can easily write your own constraint.
+          We will discuss this in <xref
+          linkend="validator-customconstraints"/>.</para>
+        </tip>
+      </section>
+    </section>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/en-US/modules/xmlconfiguration.xml b/project/documentation/src/main/docbook/en-US/modules/xmlconfiguration.xml
new file mode 100644
index 0000000..941ec0b
--- /dev/null
+++ b/project/documentation/src/main/docbook/en-US/modules/xmlconfiguration.xml
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	~ JBoss, Home of Professional Open Source
+	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+	~ by the @authors tag. See the copyright.txt in the distribution for a
+	~ full listing of individual contributors.
+	~
+	~ Licensed under the Apache License, Version 2.0 (the "License");
+	~ you may not use this file except in compliance with the License.
+	~ You may obtain a copy of the License at
+	~ http://www.apache.org/licenses/LICENSE-2.0
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="validator-xmlconfiguration">
+  <title>XML configuration</title>
+
+  <section>
+    <title><filename>validation.xml</filename></title>
+
+    <para>The key to enable XML configuration for Hibernate Validator is the
+    file <filename>validation.xml</filename>. If this file exists in the
+    classpath its configuration will be applied when the
+    <classname>ValidationFactory</classname> gets created. <xref
+    linkend="image-validation-configuration" /> shows a model view of the xsd
+    <filename>valiation.xml</filename> has to adhere to.<example
+        id="image-validation-configuration">
+        <title>validation-configuration-1.0.xsd</title>
+
+        <mediaobject>
+          <imageobject role="fo">
+            <imagedata align="center"
+                       fileref="validation-configuration-1.0.png" scalefit="1" />
+          </imageobject>
+
+          <imageobject role="html">
+            <imagedata depth="" fileref="validation-configuration-1.0.png"
+                       scalefit="1" />
+          </imageobject>
+        </mediaobject>
+      </example></para>
+
+    <para><xref linkend="example-validation-xml" /> shows the several
+    configuration options of <filename>validation.xml</filename>.</para>
+
+    <example id="example-validation-xml">
+      <title>validation.xml</title>
+
+      <programlisting language="XML" role="XML"><validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration">
+    <default-provider>org.hibernate.validator.HibernateValidator</default-provider>
+    <message-interpolator>org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator</message-interpolator>
+    <traversable-resolver>org.hibernate.validator.engine.resolver.DefaultTraversableResolver</traversable-resolver>
+    <constraint-validator-factory>org.hibernate.validator.engine.ConstraintValidatorFactoryImpl</constraint-validator-factory>
+    <constraint-mapping>/constraints-car.xml</constraint-mapping>
+    <property name="prop1">value1</property>
+    <property name="prop2">value2</property>
+</validation-config></programlisting>
+    </example>
+
+    <warning>
+      <para>There can only be one <filename>validation.xml</filename> in the
+      classpath. If more than one is found an exception is thrown.</para>
+    </warning>
+
+    <para>All settings shown in the <filename>validation.xml</filename> are
+    optional and in the case of <xref linkend="example-validation-xml" /> show
+    the defaults used within Hibernate Validator. The node
+    <property>default-provider</property> allows to choose the Bean Validation
+    provider. This is useful if there is more than one provider in the
+    classpath. <property>message-interpolator</property>,
+    <property>traversable-resolver</property> and
+    <property>constraint-validator-factory</property> allow to customize the
+    <classname>javax.validation.MessageInterpolator</classname>,
+    <classname>javax.validation.TraversableResolver</classname> resp.
+    <classname>javax.validation.ConstraintValidatorFactory</classname>. The
+    same configuration options are also available programmatically through the
+    <classname>javax.validation.Configuration</classname>. In fact XML
+    configuration will be overridden by values explicitly specified via the
+    API. It is even possible to ignore the XML configuration completely via
+    <methodname> Configuration.ignoreXmlConfiguration()</methodname>. See also
+    <xref linkend="validator-bootstrapping" />.</para>
+
+    <para>Via the <property>constraint-mapping</property> you can list an
+    arbitrary number of additional XML files containing the actual constraint
+    configuration. See <xref linkend="section-mapping-constraints" />.</para>
+
+    <para>Last but not least, you can specify provider specific properties via
+    the <property>property</property> nodes.</para>
+  </section>
+
+  <section>
+    <title id="section-mapping-constraints">Mapping constraints</title>
+
+    <para>Expressing constraints in XML is possible via files adhering to the
+    xsd seen in <xref linkend="image-mapping-configuration" />. Note that
+    these mapping files are only processed if listed via
+    <property>constraint-mapping</property> in your
+    <filename>validation.xml</filename>.</para>
+
+    <example id="image-mapping-configuration">
+      <title>validation-mapping-1.0.xsd</title>
+
+      <mediaobject>
+        <imageobject role="fo">
+          <imagedata align="center" contentdepth="240mm"
+                     fileref="validation-mapping-1.0.png" scalefit="" />
+        </imageobject>
+
+        <imageobject role="html">
+          <imagedata depth="" fileref="validation-mapping-1.0.png"
+                     scalefit="1" />
+        </imageobject>
+      </mediaobject>
+    </example>
+
+    <para><xref linkend="example-constraints-car" /> shows how our classes Car
+    and RentalCar from <xref linkend="example-car" /> resp. <xref
+    linkend="example-rental-car" /> could be mapped in XML.</para>
+
+    <example id="example-constraints-car">
+      <title>constraints-car.xml</title>
+
+      <programlisting language="XML" role="XML"><constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
+                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+    <default-package>org.hibernate.validator.quickstart</default-package>
+    <bean class="Car" ignore-annotations="true">
+        <field name="manufacturer">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </field>
+        <field name="licensePlate">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </field>
+        <field name="seatCount">
+            <constraint annotation="javax.validation.constraints.Min">
+                <element name="value">2</element>
+            </constraint>
+        </field>
+        <field name="driver">
+            <valid/>
+        </field>
+        <getter name="passedVehicleInspection" ignore-annotations="true">
+            <constraint annotation="javax.validation.constraints.AssertTrue">
+                <message>The car has to pass the vehicle inspection first</message>
+                <groups>
+                    <value>CarChecks</value>
+                </groups>
+                <element name="max">10</element>
+            </constraint>
+        </getter>
+    </bean>
+    <bean class="RentalCar" ignore-annotations="true">
+        <class ignore-annotations="true">
+            <group-sequence>
+                <value>RentalCar</value>
+                <value>CarChecks</value>
+            </group-sequence>
+        </class>
+    </bean>
+    <constraint-definition annotation="org.mycompany.CheckCase">
+        <validated-by include-existing-validators="false">
+            <value>org.mycompany.CheckCaseValidator</value>
+        </validated-by>
+    </constraint-definition>
+</constraint-mappings></programlisting>
+    </example>
+
+    <para>The XML configuration is closely mirroring the programmatic API. For
+    this reason it should suffice to just add some comments.
+    <property>default-package</property> is used for all fields where a
+    classname is expected. If the specified class is not fully qualified the
+    configured default package will be used. Every mapping file can then have
+    several <property>bean</property> nodes, each describing the constraints
+    on the entity with the specified class name.<warning>
+        <para>A given entity can only be configured once across all
+        configuration files. If the same class is configured more than once an
+        exception is thrown.</para>
+      </warning>Settings <property>ignore-annotations</property> to true means
+    that constraint annotations placed on the configured bean are ignored. The
+    default for this value is <constant>true</constant>. ignore-annotations is
+    also available for the nodes <property>class</property>,
+    <property>fields</property> and <property>getter</property>. If not
+    explicitly specified on these levels the configured
+    <property>bean</property> value applies. Otherwise do the nodes
+    <property>class</property>, <property>fields</property> and
+    <property>getter</property> determine on which level the constraints are
+    placed (see <xref linkend="validator-usingvalidator-annotate" />). The
+    <property>constraint</property> node is then used to add a constraint on
+    the corresponding level. Each constraint definition must define the class
+    via the annotation attribute. The constraint attributes required by the
+    Bean Validation specification (<property>message</property>,
+    <property>groups</property> and <property>payload</property>) have
+    dedicated nodes. All other constraint specific attributes are configured
+    using the the <property>element</property> node.</para>
+
+    <para>The class node also allows to reconfigure the default group sequence
+    (see <xref linkend="section-default-group-class" />) via the
+    <property>group-sequence</property> node.</para>
+
+    <para>Last but not least, the list of
+    <classname>ConstraintValidator</classname>s associated to a given
+    constraint can be altered via the
+    <property>constraint-definition</property> node. The
+    <property>annotation</property> attribute represents the constraint
+    annotation being altered. The <property>validated-by</property> elements
+    represent the (ordered) list of <classname>ConstraintValidator</classname>
+    implementations associated to the constraint. If
+    <property>include-existing-validator</property> is set to
+    <constant>false</constant>, validators defined on the constraint
+    annotation are ignored. If set to <constant>true</constant>, the list of
+    ConstraintValidators described in XML are concatenated to the list of
+    validators described on the annotation.</para>
+  </section>
+</chapter>
diff --git a/project/documentation/src/main/docbook/pot/master.pot b/project/documentation/src/main/docbook/pot/master.pot
new file mode 100644
index 0000000..94859ec
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/master.pot
@@ -0,0 +1,64 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-02-11 15:21+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:25
+#, no-c-format
+msgid "Hibernate Validator"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:26
+#, no-c-format
+msgid "JSR 303 Reference Implementation"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:27
+#, no-c-format
+msgid "Reference Guide"
+msgstr ""
+
+#. Tag: releaseinfo
+#: master.xml:28
+#, no-c-format
+msgid "&version;"
+msgstr ""
+
+#. Tag: holder
+#: master.xml:33
+#, no-c-format
+msgid "©rightHolder;"
+msgstr ""
+
+#. Tag: author
+#: master.xml:36
+#, no-c-format
+msgid "<firstname>Hardy</firstname> <surname>Ferentschik</surname>"
+msgstr ""
+
+#. Tag: author
+#: master.xml:40
+#, no-c-format
+msgid "<firstname>Gunnar</firstname> <surname>Morling</surname>"
+msgstr ""
+
+#. Tag: othercredit
+#: master.xml:44
+#, no-c-format
+msgid "<firstname>Shaozhuang</firstname> <surname>Liu</surname> <email>stliu at hibernate.org</email>"
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/annotationprocessor.pot b/project/documentation/src/main/docbook/pot/modules/annotationprocessor.pot
new file mode 100644
index 0000000..ce918da
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/annotationprocessor.pot
@@ -0,0 +1,535 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: annotationprocessor.xml:24
+#, no-c-format
+msgid "Annotation Processor"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:26
+#, no-c-format
+msgid "Have you ever caught yourself by unintentionally doing things like"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:31
+#, no-c-format
+msgid "specifying constraint annotations at unsupported data types (e.g. by annotating a String with @Past)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:36
+#, no-c-format
+msgid "annotating the setter of a JavaBean property (instead of the getter method)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:41
+#, no-c-format
+msgid "annotating static fields/methods with constraint annotations (which is not supported)?"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:46
+#, no-c-format
+msgid "Then the Hibernate Validator Annotation Processor is the right thing for you. It helps preventing such mistakes by plugging into the build process and raising compilation errors whenever constraint annotations are incorrectly used."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:52
+#, no-c-format
+msgid "You can find the Hibernate Validator Annotation Processor as part of the distribution bundle on <ulink url=\"http://sourceforge.net/projects/hibernate/files/hibernate-validator\">Sourceforge</ulink> or in the JBoss Maven Repository (see <xref linkend=\"example-jboss-maven-url\"/>) under the GAV org.hibernate:hibernate-validator-annotation-processor."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:61
+#, no-c-format
+msgid "Prerequisites"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:63
+#, no-c-format
+msgid "The Hibernate Validator Annotation Processor is based on the \"Pluggable Annotation Processing API\" as defined by <ulink url=\"http://jcp.org/en/jsr/detail?id=269\">JSR 269</ulink> which is part of the Java Platform since Java 6."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:70
+#, no-c-format
+msgid "Features"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:72
+#, no-c-format
+msgid "As of Hibernate Validator &version; the Hibernate Validator Annotation Processor checks that:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:77
+#, no-c-format
+msgid "constraint annotations are allowed for the type of the annotated element"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:82
+#, no-c-format
+msgid "only non-static fields or methods are annotated with constraint annotations"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:87
+#, no-c-format
+msgid "only non-primitive fields or methods are annotated with @Valid"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:92
+#, no-c-format
+msgid "only such methods are annotated with constraint annotations which are valid JavaBeans getter methods (optionally, see below)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:98
+#, no-c-format
+msgid "only such annotation types are annotated with constraint annotations which are constraint annotations themselves"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:103
+#, no-c-format
+msgid "definition of dynamic default group sequence with @GroupSequenceProvider is valid"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:110
+#, no-c-format
+msgid "Options"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:112
+#, no-c-format
+msgid "The behavior of the Hibernate Validator Annotation Processor can be controlled using the <ulink url=\"http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options\">processor options</ulink> listed in table<xref linkend=\"table_processor_options\"/>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:119
+#, no-c-format
+msgid "Hibernate Validator Annotation Processor options"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:124
+#, no-c-format
+msgid "Option"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:126
+#, no-c-format
+msgid "Explanation"
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:132
+#, no-c-format
+msgid "diagnosticKind"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:134
+#, no-c-format
+msgid "Controls how constraint problems are reported. Must be the string representation of one of the values from the enum <classname>javax.tools.Diagnostic.Kind</classname>, e.g. <classname>WARNING</classname>. A value of <classname>ERROR</classname> will cause compilation to halt whenever the AP detects a constraint problem. Defaults to <classname>ERROR</classname>."
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:144
+#, no-c-format
+msgid "methodConstraintsSupported"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:146
+#, no-c-format
+msgid "Controls whether constraints are allowed at methods of any kind. Must be set to <varname>true</varname> when working with method level constraints as supported by Hibernate Validator. Can be set to <varname>false</varname> to allow constraints only at JavaBeans getter methods as defined by the Bean Validation API. Defaults to <varname>true</varname>."
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:155
+#, no-c-format
+msgid "verbose"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:157
+#, no-c-format
+msgid "Controls whether detailed processing information shall be displayed or not, useful for debugging purposes. Must be either <varname>true</varname> or <varname>false</varname>. Defaults to <varname>false</varname>."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:168
+#, no-c-format
+msgid "Using the Annotation Processor"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:170
+#, no-c-format
+msgid "This section shows in detail how to integrate the Hibernate Validator Annotation Processor into command line builds (javac, Ant, Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA, NetBeans)."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:176
+#, no-c-format
+msgid "Command line builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:179
+#, no-c-format
+msgid "javac"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:181
+#, no-c-format
+msgid "When compiling on the command line using <ulink url=\"http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html\">javac</ulink>, specify the JAR hibernate-validator-annotation-processor-&version;.jar using the \"processorpath\" option as shown in the following listing. The processor will be detected automatically by the compiler and invoked during compilation."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:189
+#, no-c-format
+msgid "Using the annotation processor with javac"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:191
+#, no-c-format
+msgid ""
+      "javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
+      "   -cp /path/to/validation-api-&bvVersion;.jar \\\n"
+      "   -processorpath /path/to/hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:196
+#, no-c-format
+msgid "Apache Ant"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:198
+#, no-c-format
+msgid "Similar to directly working with javac, the annotation processor can be added as as compiler argument when invoking the <ulink url=\"http://ant.apache.org/manual/CoreTasks/javac.html\">javac task</ulink> for <ulink url=\"http://ant.apache.org/\">Apache Ant</ulink>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:205
+#, no-c-format
+msgid "Using the annotation processor with Ant"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:207
+#, no-c-format
+msgid ""
+      "<javac srcdir=\"src/main\"\n"
+      "       destdir=\"build/classes\"\n"
+      "       classpath=\"/path/to/validation-api-&bvVersion;.jar\">\n"
+      "       <compilerarg value=\"-processorpath\" />\n"
+      "       <compilerarg value=\"/path/to/hibernate-validator-annotation-processor-&version;.jar\"/>\n"
+      "</javac>"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:212
+#, no-c-format
+msgid "Maven"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:214
+#, no-c-format
+msgid "There are several options for integrating the annotation processor with <ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>. Generally it is sufficient to add the Hibernate Validator Annotation Processor as dependency to your project:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:220
+#, no-c-format
+msgid "Adding the HV Annotation Processor as dependency"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:222
+#, no-c-format
+msgid ""
+      "...\n"
+      "<dependency>\n"
+      "    <groupId>org.hibernate</groupId>\n"
+      "    <artifactId>hibernate-validator-annotation-processor</artifactId>\n"
+      "    <version>&version;</version>\n"
+      "    <scope>compile</scope>\n"
+      "</dependency>\n"
+      "..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:225
+#, no-c-format
+msgid "The processor will then be executed automatically by the compiler. This basically works, but comes with the disadavantage that in some cases messages from the annotation processor are not displayed (see <ulink url=\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:231
+#, no-c-format
+msgid "Another option is using the <ulink url=\"http://code.google.com/p/maven-annotation-plugin/\">Maven Annotation Plugin</ulink>. At the time of this writing the plugin is not yet available in any of the well-known repositories. Therefore you have to add the project's own repository to your settings.xml or pom.xml:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:239
+#, no-c-format
+msgid "Adding the Maven Annotation Plugin repository"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:241
+#, no-c-format
+msgid ""
+      "...\n"
+      "<pluginRepositories>\n"
+      "    <pluginRepository>\n"
+      "        <id>maven-annotation-plugin-repo</id>\n"
+      "        <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>\n"
+      "    </pluginRepository>\n"
+      "</pluginRepositories>\n"
+      "..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:244
+#, no-c-format
+msgid "Now disable the standard annotation processing performed by the compiler plugin and configure the annotation plugin by specifying an execution and adding the Hibernate Validator Annotation Processor as plugin dependency (that way the AP is not visible on the project's actual classpath):"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:251
+#, no-c-format
+msgid "Configuring the Maven Annotation Plugin"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:253
+#, no-c-format
+msgid ""
+      "...\n"
+      "<plugin>\n"
+      "    <artifactId>maven-compiler-plugin</artifactId>\n"
+      "    <configuration>\n"
+      "        <source>1.6</source>\n"
+      "        <target>1.6</target>\n"
+      "        <compilerArgument>-proc:none</compilerArgument>\n"
+      "    </configuration>\n"
+      "</plugin>\n"
+      "<plugin>\n"
+      "    <groupId>org.bsc.maven</groupId>\n"
+      "    <artifactId>maven-processor-plugin</artifactId>\n"
+      "    <version>1.3.4</version>\n"
+      "    <executions>\n"
+      "        <execution>\n"
+      "            <id>process</id>\n"
+      "            <goals>\n"
+      "                <goal>process</goal>\n"
+      "            </goals>\n"
+      "            <phase>process-sources</phase>\n"
+      "        </execution>\n"
+      "    </executions>\n"
+      "    <dependencies>\n"
+      "        <dependency>\n"
+      "            <groupId>org.hibernate</groupId>\n"
+      "            <artifactId>hibernate-validator-annotation-processor</artifactId>\n"
+      "            <version>&version;</version>\n"
+      "            <scope>compile</scope>\n"
+      "        </dependency>\n"
+      "    </dependencies>\n"
+      "</plugin>\n"
+      "..."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:259
+#, no-c-format
+msgid "IDE builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:262
+#, no-c-format
+msgid "Eclipse"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:264
+#, no-c-format
+msgid "Do the following to use the annotation processor within the <ulink url=\"http://www.eclipse.org/\">Eclipse</ulink> IDE:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:269 annotationprocessor.xml:361
+#, no-c-format
+msgid "Right-click your project, choose \"Properties\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:273
+#, no-c-format
+msgid "Go to \"Java Compiler\" and make sure, that \"Compiler compliance level\" is set to \"1.6\". Otherwise the processor won't be activated"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:279
+#, no-c-format
+msgid "Go to \"Java Compiler - Annotation Processing\" and choose \"Enable annotation processing\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:284
+#, no-c-format
+msgid "Go to \"Java Compiler - Annotation Processing - Factory Path\" and add the JAR hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:290
+#, no-c-format
+msgid "Confirm the workspace rebuild"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:294
+#, no-c-format
+msgid "You now should see any annotation problems as regular error markers within the editor and in the \"Problem\" view:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:306
+#, no-c-format
+msgid "IntelliJ IDEA"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:308
+#, no-c-format
+msgid "The following steps must be followed to use the annotation processor within <ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ IDEA</ulink> (version 9 and above):"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:314
+#, no-c-format
+msgid "Go to \"File\", then \"Settings\","
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:318
+#, no-c-format
+msgid "Expand the node \"Compiler\", then \"Annotation Processors\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:323
+#, no-c-format
+msgid "Choose \"Enable annotation processing\" and enter the following as \"Processor path\": /path/to/hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:329
+#, no-c-format
+msgid "Add the processor's fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname> to the \"Annotation Processors\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:335
+#, no-c-format
+msgid "If applicable add you module to the \"Processed Modules\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:340
+#, no-c-format
+msgid "Rebuilding your project then should show any erronous constraint annotations:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:352
+#, no-c-format
+msgid "NetBeans"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:354
+#, no-c-format
+msgid "Starting with version 6.9, also the <ulink url=\"http://www.netbeans.org/\">NetBeans</ulink> IDE supports using annotation processors within the IDE build. To do so, do the following:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:365
+#, no-c-format
+msgid "Go to \"Libraries\", tab \"Processor\", and add the JAR hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:370
+#, no-c-format
+msgid "Go to \"Build - Compiling\", select \"Enable Annotation Processing\" and \"Enable Annotation Processing in Editor\". Add the annotation processor by specifying its fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:377
+#, no-c-format
+msgid "Any constraint annotation problems will then be marked directly within the editor:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:391
+#, no-c-format
+msgid "Known issues"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:393
+#, no-c-format
+msgid "The following known issues exist as of May 2010:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:397
+#, no-c-format
+msgid "<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-308\">HV-308</ulink>: Additional validators registered for a constraint <ulink url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation processor."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:405
+#, no-c-format
+msgid "Sometimes custom constraints can't be <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-293\">properly evaluated</ulink> when using the processor within Eclipse. Cleaning the project can help in these situations. This seems to be an issue with the Eclipse JSR 269 API implementation, but further investigation is required here."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:414
+#, no-c-format
+msgid "When using the processor within Eclipse, the check of dynamic default group sequence definitions doesn't work. After further investigation, it seems to be an issue with the Eclipse JSR 269 API implementation."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/bootstrapping.pot b/project/documentation/src/main/docbook/pot/modules/bootstrapping.pot
new file mode 100644
index 0000000..e1b1e36
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/bootstrapping.pot
@@ -0,0 +1,438 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: bootstrapping.xml:24
+#, no-c-format
+msgid "Bootstrapping"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:26
+#, no-c-format
+msgid "We already seen in <xref linkend=\"section-validator-instance\"/> the easiest way to create a <classname>Validator</classname> instance - <methodname>Validation.buildDefaultValidatorFactory</methodname>. In this chapter we have a look at the other methods in <classname>javax.validation.Validation</classname> and how they allow to configure several aspects of Bean Validation at bootstrapping time."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:33
+#, no-c-format
+msgid "The different bootstrapping options allow, amongst other things, to bootstrap any Bean Validation implementation on the classpath. Generally, an available provider is discovered by the <ulink url=\"http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider\">Java Service Provider</ulink> mechanism. A Bean Validation implementation includes the file <filename>javax.validation.spi.ValidationProvider</filename> in <filename>META-INF/services</filename>. Thi [...]
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:46
+#, no-c-format
+msgid "If there are more than one Bean Validation implementation providers in the classpath and <methodname>Validation.buildDefaultValidatorFactory()</methodname> is used, there is no guarantee which provider will be chosen. To enforce the provider <methodname>Validation.byProvider()</methodname> should be used."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:55
+#, no-c-format
+msgid "<classname>Configuration</classname> and <classname>ValidatorFactory</classname>"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:58
+#, no-c-format
+msgid "There are three different methods in the Validation class to create a Validator instance. The easiest in shown in <xref linkend=\"example-build-default-validator-factory\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:63
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:65
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:68
+#, no-c-format
+msgid "You can also use the method <methodname>Validation.byDefaultProvider()</methodname> which will allow you to configure several aspects of the created Validator instance:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:73
+#, no-c-format
+msgid "Validation.byDefaultProvider()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:75
+#, no-c-format
+msgid ""
+      "Configuration<?> config = Validation.byDefaultProvider().configure();\n"
+      "config.messageInterpolator(new MyMessageInterpolator())\n"
+      "    .traversableResolver( new MyTraversableResolver())\n"
+      "    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:78
+#, no-c-format
+msgid "We will learn more about <classname>MessageInterpolator</classname>, <classname>TraversableResolver</classname> and <classname>ConstraintValidatorFactory</classname> in the following sections."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:83
+#, no-c-format
+msgid "Last but not least you can ask for a Configuration object of a specific Bean Validation provider. This is useful if you have more than one Bean Validation provider in your classpath. In this situation you can make an explicit choice about which implementation to use. In the case of Hibernate Validator the <classname>Validator</classname> creation looks like:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:91
+#, no-c-format
+msgid "Validation.byProvider( HibernateValidator.class )"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:93
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "config.messageInterpolator(new MyMessageInterpolator())\n"
+      "    .traversableResolver( new MyTraversableResolver())\n"
+      "    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:97
+#, no-c-format
+msgid "The generated <classname>Validator</classname> instance is thread safe and can be cached."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:103
+#, no-c-format
+msgid "ValidationProviderResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:105
+#, no-c-format
+msgid "In the case that the Java Service Provider mechanism does not work in your environment or you have a special classloader setup, you are able to provide a custom <classname>ValidationProviderResolver</classname>. An example in an OSGi environment you could plug your custom provider resolver like seen in <xref linkend=\"example-provider-resolver\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:112
+#, no-c-format
+msgid "Providing a custom ValidationProviderResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:114
+#, no-c-format
+msgid ""
+      "Configuration<?> config = Validation.byDefaultProvider()\n"
+      "    .providerResolver( new OSGiServiceDiscoverer() )\n"
+      "    .configure();\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:117
+#, no-c-format
+msgid "Your <classname>OSGiServiceDiscoverer</classname> must in this case implement the interface <classname>ValidationProviderResolver</classname>:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:122
+#, no-c-format
+msgid "ValidationProviderResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:124
+#, no-c-format
+msgid ""
+      "public interface ValidationProviderResolver {\n"
+      "    /**\n"
+      "     * Returns a list of ValidationProviders available in the runtime environment.\n"
+      "     *\n"
+      "     * @return list of validation providers.  \n"
+      "     */\n"
+      "    List<ValidationProvider<?>> getValidationProviders();\n"
+      "}"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:129
+#, no-c-format
+msgid "MessageInterpolator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:131
+#, no-c-format
+msgid "already discussed the default message interpolation algorithm. If you have special requirements for your message interpolation you can provide a custom interpolator using <methodname>Configuration.messageInterpolator()</methodname>. This message interpolator will be shared by all validators generated by the <classname>ValidatorFactory</classname> created from this <classname>Configuration</classname>. <xref linkend=\"example-message-interpolator\"/> shows an interpolator (availabl [...]
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:144
+#, no-c-format
+msgid "${validatedValue}: this will call <methodname>String.valueOf </methodname>on the validated value."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:149
+#, no-c-format
+msgid "${validatedValue:<format>}: provide your own format string which will be passed to <code>String.format</code> together with the validated value. Refer to the javadoc of <code>String.format</code> for more information about the format options."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:158
+#, no-c-format
+msgid "Providing a custom MessageInterpolator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:160
+#, no-c-format
+msgid ""
+      "Configuration<?> configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .messageInterpolator(new ValueFormatterMessageInterpolator(configuration.getDefaultMessageInterpolator()))\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:164
+#, no-c-format
+msgid "It is recommended that <classname>MessageInterpolator</classname> implementations delegate final interpolation to the Bean Validation default <classname>MessageInterpolator</classname> to ensure standard Bean Validation interpolation rules are followed. The default implementation is accessible through <methodname>Configuration.getDefaultMessageInterpolator()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:173
+#, no-c-format
+msgid "ResourceBundleLocator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:175
+#, no-c-format
+msgid "A common use case is the ability to specify your own resource bundles for message interpolation. The default <classname>MessageInterpolator</classname> implementation in Hibernate Validator is called <classname>ResourceBundleMessageInterpolator</classname> and per default loads resource bundles via <methodname>ResourceBundle.getBundle</methodname>. However, <classname>ResourceBundleMessageInterpolator</classname> also allows you to specify a custom implementation of <classname>Res [...]
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:194
+#, no-c-format
+msgid "Providing a custom ResourceBundleLocator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:196
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration configure = Validation.byProvider(HibernateValidator.class).configure();\n"
+      "\n"
+      "ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator(); \n"
+      "ResourceBundleLocator myResourceBundleLocator = new MyCustomResourceBundleLocator(defaultResourceBundleLocator);\n"
+      "\n"
+      "configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBundleLocator));"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:199
+#, no-c-format
+msgid "Hibernate Validator provides the following implementation of <classname>ResourceBundleLocator</classname> - <classname>PlatformResourceBundleLocator</classname> (the default) and <classname>AggregateResourceBundleLocator</classname>. The latter can be used to specify a list of resource bundle names which will get loaded and merged into a single resource bundle. Refer to the JavaDoc documentation for more information."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:210
+#, no-c-format
+msgid "TraversableResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:212
+#, no-c-format
+msgid "The usage of the <classname>TraversableResolver</classname> has so far not been discussed. The idea is that in some cases, the state of a property should not be accessed. The most obvious example for that is a lazy loaded property or association of a Java Persistence provider. Validating this lazy property or association would mean that its state would have to be accessed triggering a load from the database. Bean Validation controls which property can and cannot be accessed via th [...]
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:224
+#, no-c-format
+msgid "TraversableResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:226
+#, no-c-format
+msgid ""
+      "/**\n"
+      " * Contract determining if a property can be accessed by the Bean Validation provider\n"
+      " * This contract is called for each property that is being either validated or cascaded.\n"
+      " *\n"
+      " * A traversable resolver implementation must be thread-safe.\n"
+      " *\n"
+      " */\n"
+      "public interface TraversableResolver {\n"
+      "    /**\n"
+      "     * Determine if the Bean Validation provider is allowed to reach the property state\n"
+      "     *\n"
+      "     * @param traversableObject object hosting <code>traversableProperty</code> or null  \n"
+      "     *                          if validateValue is called\n"
+      "     * @param traversableProperty the traversable property.\n"
+      "     * @param rootBeanType type of the root object passed to the Validator.\n"
+      "     * @param pathToTraversableObject path from the root object to\n"
+      "     *        <code>traversableObject</code>\n"
+      "     *        (using the path specification defined by Bean Validator).\n"
+      "     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.\n"
+      "     *\n"
+      "     * @return <code>true</code> if the Bean Validation provider is allowed to\n"
+      "     *         reach the property state, <code>false</code> otherwise.\n"
+      "     */\n"
+      "     boolean isReachable(Object traversableObject,\n"
+      "                         Path.Node traversableProperty,\n"
+      "                         Class<?> rootBeanType,\n"
+      "                         Path pathToTraversableObject,\n"
+      "                         ElementType elementType);\n"
+      "\n"
+      "    /**\n"
+      "     * Determine if the Bean Validation provider is allowed to cascade validation on\n"
+      "     * the bean instance returned by the property value\n"
+      "     * marked as <code>@Valid</code>.\n"
+      "     * Note that this method is called only if isReachable returns true for the same set of\n"
+      "     * arguments and if the property is marked as <code>@Valid</code>\n"
+      "     *\n"
+      "     * @param traversableObject object hosting <code>traversableProperty</code> or null\n"
+      "     *                          if validateValue is called\n"
+      "     * @param traversableProperty the traversable property.\n"
+      "     * @param rootBeanType type of the root object passed to the Validator.\n"
+      "     * @param pathToTraversableObject path from the root object to\n"
+      "     *        <code>traversableObject</code>\n"
+      "     *        (using the path specification defined by Bean Validator).\n"
+      "     * @param elementType either <code>FIELD</code> or <code>METHOD</code>.\n"
+      "     *\n"
+      "     * @return <code>true</code> if the Bean Validation provider is allowed to\n"
+      "     *         cascade validation, <code>false</code> otherwise.\n"
+      "     */\n"
+      "     boolean isCascadable(Object traversableObject,\n"
+      "                          Path.Node traversableProperty,\n"
+      "                          Class<?> rootBeanType,\n"
+      "                          Path pathToTraversableObject,\n"
+      "                          ElementType elementType);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:229
+#, no-c-format
+msgid "Hibernate Validator provides two <classname>TraversableResolver</classname>s out of the box which will be enabled automatically depending on your environment. The first is the <classname>DefaultTraversableResolver</classname> which will always return true for <methodname>isReachable()</methodname> and <methodname>isTraversable()</methodname>. The second is the <classname>JPATraversableResolver</classname> which gets enabled when Hibernate Validator gets used in combination with JP [...]
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:242
+#, no-c-format
+msgid "Providing a custom TraversableResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:244
+#, no-c-format
+msgid ""
+      "Configuration<?> configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .traversableResolver(new MyTraversableResolver())\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:249
+#, no-c-format
+msgid "ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:251
+#, no-c-format
+msgid "Last but not least, there is one more configuration option to discuss, the <classname>ConstraintValidatorFactory</classname>. The default <classname>ConstraintValidatorFactory</classname> provided by Hibernate Validator requires a public no-arg constructor to instantiate <classname>ConstraintValidator</classname> instances (see <xref linkend=\"section-constraint-validator\"/>). Using a custom <classname>ConstraintValidatorFactory</classname> offers for example the possibility to u [...]
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:264
+#, no-c-format
+msgid "Providing a custom ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:266
+#, no-c-format
+msgid ""
+      "Configuration<?> configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .constraintValidatorFactory(new IOCConstraintValidatorFactory())\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:269
+#, no-c-format
+msgid "The interface you have to implement is:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:272
+#, no-c-format
+msgid "ConstraintValidatorFactory interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:274
+#, no-c-format
+msgid ""
+      "public interface ConstraintValidatorFactory {\n"
+      "    /**\n"
+      "     * @param key The class of the constraint validator to instantiate.\n"
+      "     *\n"
+      "     * @return A constraint validator instance of the specified class.\n"
+      "     */\n"
+      "     <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:278
+#, no-c-format
+msgid "Any constraint implementation relying on <classname>ConstraintValidatorFactory</classname> behaviors specific to an implementation (dependency injection, no no-arg constructor and so on) are not considered portable."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:285
+#, no-c-format
+msgid "ConstraintValidatorFactory should not cache instances as the state of each instance can be altered in the initialize method."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/customconstraints.pot b/project/documentation/src/main/docbook/pot/modules/customconstraints.pot
new file mode 100644
index 0000000..19dc028
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/customconstraints.pot
@@ -0,0 +1,687 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customconstraints.xml:24
+#, no-c-format
+msgid "Creating custom constraints"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:26
+#, no-c-format
+msgid "Though the Bean Validation API defines a whole set of standard constraint annotations one can easily think of situations in which these standard annotations won't suffice. For these cases you are able to create custom constraints tailored to your specific validation requirements in a simple manner."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:33
+#, no-c-format
+msgid "Creating a simple constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:35
+#, no-c-format
+msgid "To create a custom constraint, the following three steps are required:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:40
+#, no-c-format
+msgid "Create a constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:44
+#, no-c-format
+msgid "Implement a validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:48
+#, no-c-format
+msgid "Define a default error message"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:53
+#, no-c-format
+msgid "The constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:55
+#, no-c-format
+msgid "Let's write a constraint annotation, that can be used to express that a given string shall either be upper case or lower case. We'll apply it later on to the <property>licensePlate</property> field of the <classname>Car</classname> class from <xref linkend=\"validator-gettingstarted\"/> to ensure, that the field is always an upper-case string."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:62
+#, no-c-format
+msgid "First we need a way to express the two case modes. We might use <classname>String</classname> constants, but a better way to go is to use a Java 5 enum for that purpose:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:67
+#, no-c-format
+msgid "Enum <classname>CaseMode</classname> to express upper vs. lower case"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:70
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "public enum CaseMode {\n"
+      "    UPPER, \n"
+      "    LOWER;\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:73
+#, no-c-format
+msgid "Now we can define the actual constraint annotation. If you've never designed an annotation before, this may look a bit scary, but actually it's not that hard:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:78
+#, no-c-format
+msgid "Defining CheckCase constraint annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:80
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static java.lang.annotation.ElementType.*;\n"
+      "import static java.lang.annotation.RetentionPolicy.*;\n"
+      "\n"
+      "import java.lang.annotation.Documented;\n"
+      "import java.lang.annotation.Retention;\n"
+      "import java.lang.annotation.Target;\n"
+      "\n"
+      "import javax.validation.Constraint;\n"
+      "import javax.validation.Payload;\n"
+      "\n"
+      "@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+      "@Retention(RUNTIME)\n"
+      "@Constraint(validatedBy = CheckCaseValidator.class)\n"
+      "@Documented\n"
+      "public @interface CheckCase {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.checkcase}\";\n"
+      "\n"
+      "    Class<?>[] groups() default {};\n"
+      "\n"
+      "    Class<? extends Payload>[] payload() default {};\n"
+      "    \n"
+      "    CaseMode value();\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:83
+#, no-c-format
+msgid "An annotation type is defined using the <code>@interface</code> keyword. All attributes of an annotation type are declared in a method-like manner. The specification of the Bean Validation API demands, that any constraint annotation defines"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:90
+#, no-c-format
+msgid "an attribute <property>message</property> that returns the default key for creating error messages in case the constraint is violated"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:96
+#, no-c-format
+msgid "an attribute <property>groups</property> that allows the specification of validation groups, to which this constraint belongs (see <xref linkend=\"validator-usingvalidator-validationgroups\"/>). This must default to an empty array of type <classname>Class<?></classname>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:104
+#, no-c-format
+msgid "an attribute <classname>payload</classname> that can be used by clients of the Bean Validation API to assign custom payload objects to a constraint. This attribute is not used by the API itself."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:108
+#, no-c-format
+msgid "An example for a custom payload could be the definition of a severity."
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:111
+#, no-c-format
+msgid ""
+      "public class Severity {\n"
+      "    public static class Info extends Payload {};\n"
+      "    public static class Error extends Payload {};\n"
+      "}\n"
+      "\n"
+      "public class ContactDetails {\n"
+      "    @NotNull(message=\"Name is mandatory\", payload=Severity.Error.class)\n"
+      "    private String name;\n"
+      "\n"
+      "    @NotNull(message=\"Phone number not specified, but not mandatory\", payload=Severity.Info.class)\n"
+      "    private String phoneNumber;\n"
+      "\n"
+      "    // ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:113
+#, no-c-format
+msgid "Now a client can after the validation of a <classname>ContactDetails</classname> instance access the severity of a constraint using <methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</methodname> and adjust its behaviour depending on the severity."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:122
+#, no-c-format
+msgid "Besides those three mandatory attributes (<property>message</property>, <property>groups</property> and <property>payload</property>) we add another one allowing for the required case mode to be specified. The name <property>value</property> is a special one, which can be omitted upon using the annotation, if it is the only attribute specified, as e.g. in <code>@CheckCase(CaseMode.UPPER)</code>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:130
+#, no-c-format
+msgid "In addition we annotate the annotation type with a couple of so-called meta annotations:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:135
+#, no-c-format
+msgid "<code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>: Says, that methods, fields and annotation declarations may be annotated with @CheckCase (but not type declarations e.g.)"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:141
+#, no-c-format
+msgid "<code>@Retention(RUNTIME)</code>: Specifies, that annotations of this type will be available at runtime by the means of reflection"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:147
+#, no-c-format
+msgid "<code>@Constraint(validatedBy = CheckCaseValidator.class)</code>: Specifies the validator to be used to validate elements annotated with @CheckCase"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:153
+#, no-c-format
+msgid "<code>@Documented</code>: Says, that the use of <code>@CheckCase</code> will be contained in the JavaDoc of elements annotated with it"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:160
+#, no-c-format
+msgid "Hibernate Validator provides support for the validation of method parameters using constraint annotations (see <xref linkend=\"validator-customoptions-methodvalidation\"/>)."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:164
+#, no-c-format
+msgid "In order to use a custom constraint for parameter validation the <classname>ElementType.PARAMETER</classname> must be specified within the <classname>@Target</classname> annotation. This is already the case for all constraints defined by the Bean Validation API and also the custom constraints provided by Hibernate Validator."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:173
+#, no-c-format
+msgid "The constraint validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:176
+#, no-c-format
+msgid "Next, we need to implement a constraint validator, that's able to validate elements with a <classname>@CheckCase</classname> annotation. To do so, we implement the interface <classname>ConstraintValidator</classname> as shown below:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:182
+#, no-c-format
+msgid "Implementing a constraint validator for the constraint <classname>CheckCase</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:185
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.ConstraintValidator;\n"
+      "import javax.validation.ConstraintValidatorContext;\n"
+      "\n"
+      "public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {\n"
+      "\n"
+      "    private CaseMode caseMode;\n"
+      "\n"
+      "    public void initialize(CheckCase constraintAnnotation) {\n"
+      "        this.caseMode = constraintAnnotation.value();\n"
+      "    }\n"
+      "\n"
+      "    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {\n"
+      "\n"
+      "        if (object == null)\n"
+      "            return true;\n"
+      "\n"
+      "        if (caseMode == CaseMode.UPPER)\n"
+      "            return object.equals(object.toUpperCase());\n"
+      "        else\n"
+      "            return object.equals(object.toLowerCase());\n"
+      "    }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:188
+#, no-c-format
+msgid "The <classname>ConstraintValidator</classname> interface defines two type parameters, which we set in our implementation. The first one specifies the annotation type to be validated (in our example <classname>CheckCase</classname>), the second one the type of elements, which the validator can handle (here <classname>String</classname>)."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:195
+#, no-c-format
+msgid "In case a constraint annotation is allowed at elements of different types, a <classname>ConstraintValidator</classname> for each allowed type has to be implemented and registered at the constraint annotation as shown above."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:200
+#, no-c-format
+msgid "The implementation of the validator is straightforward. The <methodname>initialize()</methodname> method gives us access to the attribute values of the annotation to be validated. In the example we store the <classname>CaseMode</classname> in a field of the validator for further usage."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:206
+#, no-c-format
+msgid "In the <methodname>isValid()</methodname> method we implement the logic, that determines, whether a <classname>String</classname> is valid according to a given <classname>@CheckCase</classname> annotation or not. This decision depends on the case mode retrieved in <classname>initialize()</classname>. As the Bean Validation specification recommends, we consider <code>null</code> values as being valid. If <code>null</code> is not a valid value for an element, it should be annotated  [...]
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:216
+#, no-c-format
+msgid "The ConstraintValidatorContext"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:218
+#, no-c-format
+msgid "relies on the default error message generation by just returning <constant>true</constant> or <constant>false</constant> from the <methodname>isValid</methodname> call. Using the passed <classname>ConstraintValidatorContext</classname> object it is possible to either add additional error messages or completely disable the default error message generation and solely define custom error messages. The <classname>ConstraintValidatorContext</classname> API is modeled as fluent interfac [...]
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:230
+#, no-c-format
+msgid "Use of ConstraintValidatorContext to define custom error messages"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:233
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.ConstraintValidator;\n"
+      "import javax.validation.ConstraintValidatorContext;\n"
+      "\n"
+      "public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {\n"
+      "\n"
+      "    private CaseMode caseMode;\n"
+      "\n"
+      "    public void initialize(CheckCase constraintAnnotation) {\n"
+      "        this.caseMode = constraintAnnotation.value();\n"
+      "    }\n"
+      "\n"
+      "    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {\n"
+      "\n"
+      "        if (object == null)\n"
+      "            return true;\n"
+      "        \n"
+      "        boolean isValid;\n"
+      "        if (caseMode == CaseMode.UPPER) {\n"
+      "            isValid = object.equals(object.toUpperCase());\n"
+      "        }\n"
+      "        else {\n"
+      "            isValid = object.equals(object.toLowerCase());\n"
+      "        }\n"
+      "        \n"
+      "        if(!isValid) {\n"
+      "            constraintContext.disableDefaultConstraintViolation();\n"
+      "            constraintContext.buildConstraintViolationWithTemplate( \"{com.mycompany.constraints.CheckCase.message}\"  ).addConstraintViolation();\n"
+      "        }\n"
+      "        return result;\n"
+      "    }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:236
+#, no-c-format
+msgid "shows how you can disable the default error message generation and add a custom error message using a specified message template. In this example the use of the <classname>ConstraintValidatorContext</classname> results in the same error message as the default error message generation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:242
+#, no-c-format
+msgid "It is important to end each new constraint violation with <methodname>addConstraintViolation</methodname>. Only after that the new constraint violation will be created."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:247
+#, no-c-format
+msgid "In case you are implementing a <classname>ConstraintValidator</classname> a class level constraint it is also possible to adjust set the property path for the created constraint violations. This is important for the case where you validate multiple properties of the class or even traverse the object graph. A custom property path creation could look like <xref linkend=\"example-custom-error\"/>."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:256
+#, no-c-format
+msgid "Adding new <classname>ConstraintViolation</classname> with custom property path"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:259
+#, no-c-format
+msgid ""
+      "public boolean isValid(Group group, ConstraintValidatorContext constraintValidatorContext) {\n"
+      "    boolean isValid = false;\n"
+      "    ...\n"
+      "\n"
+      "    if(!isValid) {\n"
+      "        constraintValidatorContext\n"
+      "            .buildConstraintViolationWithTemplate( \"{my.custom.template}\" )\n"
+      "            .addNode( \"myProperty\" ).addConstraintViolation();\n"
+      "    }\n"
+      "    return isValid;\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:265
+#, no-c-format
+msgid "The error message"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:267
+#, no-c-format
+msgid "Finally we need to specify the error message, that shall be used, in case a <classname>@CheckCase</classname> constraint is violated. To do so, we add the following to our custom <filename>ValidationMessages.properties</filename> (see also <xref linkend=\"section-message-interpolation\"/>)"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:274
+#, no-c-format
+msgid "Defining a custom error message for the <classname>CheckCase</classname> constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:277
+#, no-c-format
+msgid "com.mycompany.constraints.CheckCase.message=Case mode must be {value}."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:280
+#, no-c-format
+msgid "If a validation error occurs, the validation runtime will use the default value, that we specified for the message attribute of the <classname>@CheckCase</classname> annotation to look up the error message in this file."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:287
+#, no-c-format
+msgid "Using the constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:289
+#, no-c-format
+msgid "Now that our first custom constraint is completed, we can use it in the <classname>Car</classname> class from the <xref linkend=\"validator-gettingstarted\"/> chapter to specify that the <property>licensePlate</property> field shall only contain upper-case strings:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:296
+#, no-c-format
+msgid "Applying the <classname>CheckCase</classname> constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:299
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    @CheckCase(CaseMode.UPPER)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:302
+#, no-c-format
+msgid "Finally let's demonstrate in a little test that the <classname>@CheckCase</classname> constraint is properly validated:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:307
+#, no-c-format
+msgid "Testcase demonstrating the <classname>CheckCase</classname> validation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:310
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static org.junit.Assert.*;\n"
+      "\n"
+      "import java.util.Set;\n"
+      "\n"
+      "import javax.validation.ConstraintViolation;\n"
+      "import javax.validation.Validation;\n"
+      "import javax.validation.Validator;\n"
+      "import javax.validation.ValidatorFactory;\n"
+      "\n"
+      "import org.junit.BeforeClass;\n"
+      "import org.junit.Test;\n"
+      "\n"
+      "public class CarTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void testLicensePlateNotUpperCase() {\n"
+      "\n"
+      "        Car car = new Car(\"Morris\", \"dd-ab-123\", 4);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\n"
+      "            \"Case mode must be UPPER.\", \n"
+      "            constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void carIsValid() {\n"
+      "\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 4);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(0, constraintViolations.size());\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:316
+#, no-c-format
+msgid "Constraint composition"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:318
+#, no-c-format
+msgid "Looking at the <property>licensePlate</property> field of the <classname>Car</classname> class in <xref linkend=\"example-car-with-checkcase\"/>, we see three constraint annotations already. In complexer scenarios, where even more constraints could be applied to one element, this might become a bit confusing easily. Furthermore, if we had a <property>licensePlate</property> field in another class, we would have to copy all constraint declarations to the other class as well, violat [...]
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:327
+#, no-c-format
+msgid "This problem can be tackled using compound constraints. In the following we create a new constraint annotation <classname>@ValidLicensePlate</classname>, that comprises the constraints <classname>@NotNull</classname>, <classname>@Size</classname> and <classname>@CheckCase</classname>:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:334
+#, no-c-format
+msgid "Creating a composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:337
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static java.lang.annotation.ElementType.*;\n"
+      "import static java.lang.annotation.RetentionPolicy.*;\n"
+      "\n"
+      "import java.lang.annotation.Documented;\n"
+      "import java.lang.annotation.Retention;\n"
+      "import java.lang.annotation.Target;\n"
+      "\n"
+      "import javax.validation.Constraint;\n"
+      "import javax.validation.Payload;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "@NotNull\n"
+      "@Size(min = 2, max = 14)\n"
+      "@CheckCase(CaseMode.UPPER)\n"
+      "@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+      "@Retention(RUNTIME)\n"
+      "@Constraint(validatedBy = {})\n"
+      "@Documented\n"
+      "public @interface ValidLicensePlate {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.validlicenseplate}\";\n"
+      "\n"
+      "    Class<?>[] groups() default {};\n"
+      "\n"
+      "    Class<? extends Payload>[] payload() default {};\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:340
+#, no-c-format
+msgid "To do so, we just have to annotate the constraint declaration with its comprising constraints (btw. that's exactly why we allowed annotation types as target for the <classname>@CheckCase</classname> annotation). As no additional validation is required for the <classname>@ValidLicensePlate</classname> annotation itself, we don't declare a validator within the <classname>@Constraint </classname>meta annotation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:348
+#, no-c-format
+msgid "Using the new compound constraint at the <property>licensePlate</property> field now is fully equivalent to the previous version, where we declared the three constraints directly at the field itself:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:354
+#, no-c-format
+msgid "Application of composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:357
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @ValidLicensePlate\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    //...\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:360
+#, no-c-format
+msgid "The set of <classname>ConstraintViolations</classname> retrieved when validating a <classname>Car</classname> instance will contain an entry for each violated composing constraint of the <classname>@ValidLicensePlate</classname> constraint. If you rather prefer a single <classname>ConstraintViolation</classname> in case any of the composing constraints is violated, the <classname>@ReportAsSingleViolation</classname> meta constraint can be used as follows:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:370
+#, no-c-format
+msgid "Usage of <classname>@ReportAsSingleViolation</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:372
+#, no-c-format
+msgid ""
+      "//...\n"
+      "@ReportAsSingleViolation\n"
+      "public @interface ValidLicensePlate {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.validlicenseplate}\";\n"
+      "\n"
+      "    Class<?>[] groups() default {};\n"
+      "\n"
+      "    Class<? extends Payload>[] payload() default {};\n"
+      "\n"
+      "}"
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/customoptions.pot b/project/documentation/src/main/docbook/pot/modules/customoptions.pot
new file mode 100644
index 0000000..a4318f9
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/customoptions.pot
@@ -0,0 +1,841 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customoptions.xml:24
+#, no-c-format
+msgid "Hibernate Validator Specifics"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:26
+#, no-c-format
+msgid "In the following sections we are having a closer look at some of the Hibernate Validator specific features (features which are not part of the Bean Validation specification). This includes the fail fast mode, the programmatic constraint configuration API and boolean composition of composing constraints."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:33
+#, no-c-format
+msgid "The features described in the following sections are not portable between Bean Validation providers/implementations."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:38
+#, no-c-format
+msgid "Public API"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:40
+#, no-c-format
+msgid "Let's start, however, with a look at the public API of Hibernate Validator. <xref linkend=\"validator-public-api\"/> lists all packages belonging to this API and describes their purpose."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:44
+#, no-c-format
+msgid "Any packages not listed in that table are internal packages of Hibernate Validator and are not intended to be accessed by clients. The contents of these internal packages can change from release to release without notice, thus possibly breaking any client code relying on it."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:51
+#, no-c-format
+msgid "In the following table, when a package is public its not necessarily true for its nested packages."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:56
+#, no-c-format
+msgid "Hibernate Validator public API"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:61
+#, no-c-format
+msgid "Packages"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:63
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: package
+#: customoptions.xml:69
+#, no-c-format
+msgid "org.hibernate.validator"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:71
+#, no-c-format
+msgid "This package contains the classes used by the Bean Validation bootstrap mechanism (eg. validation provider, configuration class). For more details see <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:78
+#, no-c-format
+msgid "<package>org.hibernate.validator.cfg</package>, <package>org.hibernate.validator.cfg.context</package>, <package>org.hibernate.validator.cfg.defs</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:82
+#, no-c-format
+msgid "With Hibernate Validator you can define constraints via a fluent API. These packages contain all classes needed to use this feature. In the package <package>org.hibernate.validator.cfg</package> you will find the <classname>ConstraintMapping</classname> class and in package <package>org.hibernate.validator.cfg.defs</package> all constraint definitions. For more details see <xref linkend=\"programmaticapi\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:93
+#, no-c-format
+msgid "<package>org.hibernate.validator.constraints</package>, <package>org.hibernate.validator.constraints.br</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:96
+#, no-c-format
+msgid "In addition to Bean Validation constraints, Hibernate Validator provides some useful custom constraints. These packages contain all custom annotation classes. For more details see <xref linkend=\"validator-defineconstraints-hv-constraints\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:103
+#, no-c-format
+msgid "<package>org.hibernate.validator.group</package>, <package>org.hibernate.validator.spi.group</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:106
+#, no-c-format
+msgid "With Hibernate Validator you can define dynamic default group sequences in function of the validated object state. These packages contain all classes needed to use this feature (<classname>GroupSequenceProvider</classname> annotation and <classname>DefaultGroupSequenceProvider</classname> contract). For more details see <xref linkend=\"section-default-group-class\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:116
+#, no-c-format
+msgid "<package>org.hibernate.validator.messageinterpolation</package>, <package>org.hibernate.validator.resourceloading</package>, <package>org.hibernate.validator.spi.resourceloading</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:120
+#, no-c-format
+msgid "These packages contain the classes related to constraint message interpolation. The first package contains two implementations of <classname>MessageInterpolator</classname>. The first one, <classname>ValueFormatterMessageInterpolator</classname> allows to interpolate the validated value into the constraint message, see <xref linkend=\"section-message-interpolator\"/>. The second implementation named <classname>ResourceBundleMessageInterpolator</classname> is the implementation use [...]
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:139
+#, no-c-format
+msgid "<package>org.hibernate.validator.method</package>, <package>org.hibernate.validator.method.metadata</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:142
+#, no-c-format
+msgid "Hibernate Validator provides support for method-level constraints based on appendix C of the Bean Validation specification. The first package contains the <classname>MethodValidator</classname> interface allowing you to validate method return values and parameters. The second package contains meta data for constraints hosted on parameters and methods which can be retrieved via the <classname>MethodValidator</classname>."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:156
+#, no-c-format
+msgid "The public packages of Hibernate Validator fall into two categories: while the actual API parts are intended to be <emphasis>invoked</emphasis> or <emphasis>used</emphasis> by clients (e.g. the API for programmatic constraint declaration or the custom constraints), the SPI (service provider interface) packages contain interfaces which are intended to be <emphasis>implemented</emphasis> by clients (e.g. <classname>ResourceBundleLocator</classname>)."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:167
+#, no-c-format
+msgid "Fail fast mode"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:169
+#, no-c-format
+msgid "First off, the fail fast mode. Hibernate Validator allows to return from the current validation as soon as the first constraint violation occurs. This is called the <emphasis>fail fast mode</emphasis> and can be useful for validation of large object graphs where one is only interested whether there is a constraint violation or not. <xref linkend=\"example-fail-fast-property\"/>, <xref linkend=\"example-fail-fast-configuration\"/> and <xref linkend=\"example-fail-fast-factory\"/> s [...]
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:180
+#, no-c-format
+msgid "Enabling <option>failFast</option> via a property"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:182
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "ValidatorFactory factory = configuration.addProperty( \"hibernate.validator.fail_fast\", \"true\" ).buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();\n"
+      "\n"
+      "// do some actual fail fast validation\n"
+      "..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:186
+#, no-c-format
+msgid "Enabling <option>failFast</option> at the <classname>Configuration</classname> level"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:189
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();\n"
+      "\n"
+      "// do some actual fail fast validation\n"
+      "..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:193
+#, no-c-format
+msgid "Enabling <option>failFast</option> at the <classname>ValidatorFactory</classname> level"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:196
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "ValidatorFactory factory = configuration.buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();\n"
+      "\n"
+      "// do some non fail fast validation\n"
+      "...\n"
+      "\n"
+      "validator = factory.unwrap( HibernateValidatorFactory.class )\n"
+      "            .usingContext()\n"
+      "            .failFast( true )\n"
+      "            .getValidator();\n"
+      "\n"
+      "// do fail fast validation\n"
+      "..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:201
+#, no-c-format
+msgid "Method validation"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:203
+#, no-c-format
+msgid "The Bean Validation API allows to specify constraints for fields, properties and types. Hibernate Validator goes one step further and allows to place contraint annotations also on method parameters and method return values, thus enabling a programming style known as \"Programming by Contract\"."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:209
+#, no-c-format
+msgid "More specifically this means that Bean Validation constraints can be used to specify"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:214
+#, no-c-format
+msgid "the preconditions that must be met before a method invocation (by annotating method parameters with constraints) and"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:219
+#, no-c-format
+msgid "the postconditions that are guaranteed after a method invocation (by annotating methods)"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:224
+#, no-c-format
+msgid "This approach has several advantages over traditional ways of parameter and return value checking:"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:229
+#, no-c-format
+msgid "The checks don't have to be performed manually (e.g. by throwing <classname>IllegalArgumentExceptions</classname> or similar), resulting in less code to write and maintain."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:235
+#, no-c-format
+msgid "A method's pre- and postconditions don't have to be expressed again in the method's JavaDoc, since the constraint annotations will automatically be included in the generated JavaDoc. This avoids redundancy and reduces the chance of inconsistencies between implementation and documentation."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:244
+#, no-c-format
+msgid "Method validation was also considered to be included in the Bean Validation API as defined by JSR 303, but it didn't become part of the 1.0 version. A basic draft is outlined in appendix C of the specification, and the implementation in Hibernate Validator is largely influenced by this draft. The feature is considered again for inclusion in BV 1.1."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:253
+#, no-c-format
+msgid "Defining method-level constraints"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:255
+#, no-c-format
+msgid "demonstrates the definition of method-level constraints."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:258
+#, no-c-format
+msgid "Using method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:260
+#, no-c-format
+msgid ""
+      "public class RentalStation {\n"
+      "\n"
+      "    @NotNull \n"
+      "    public Car rentCar(@NotNull Customer customer, @NotNull @Future Date startDate, @Min(1) int durationInDays) { \n"
+      "        //...\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:263
+#, no-c-format
+msgid "Here the following pre- and postconditions for the <methodname>rentCar()</methodname> method are declared:"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:268
+#, no-c-format
+msgid "The renting customer may not be null"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:272
+#, no-c-format
+msgid "The rental's start date must not be null and must be in the future"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:277
+#, no-c-format
+msgid "The rental duration must be at least one day"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:281
+#, no-c-format
+msgid "The returned <classname>Car</classname> instance may not be null"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:286
+#, no-c-format
+msgid "Using the <classname>@Valid</classname> annotation it's also possible to define that a cascaded validation of parameter or return value objects shall be performed. An example can be found in <xref lang=\"\" linkend=\"example-cascaded-method-constraints\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:292
+#, no-c-format
+msgid "Cascaded validation of method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:294
+#, no-c-format
+msgid ""
+      "public class RentalStation {\n"
+      "\n"
+      "    @Valid\n"
+      "    public Set<Rental> getRentalsByCustomer(@Valid Customer customer) { \n"
+      "        //...\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:297
+#, no-c-format
+msgid "Here all the constraints declared at the <classname>Customer</classname> type will be evaluated when validating the method parameter and all constraints declared at the returned <classname>Rental</classname> objects will be evaluated when validating the method's return value."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:304
+#, no-c-format
+msgid "Using method constraints in type hierarchies"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:306
+#, no-c-format
+msgid "Special care must be taken when defining parameter constraints in inheritance hierarchies."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:309
+#, no-c-format
+msgid "When a method is overridden in sub-types method parameter constraints can only be declared at the base type. The reason for this restriction is that the preconditions to be fulfilled by a type's client must not be strengthened in sub-types (which may not even be known to the base type's client). Note that also if the base method doesn't declare any parameter constraints at all, no parameter constraints may be added in overriding methods."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:317
+#, no-c-format
+msgid "The same restriction applies to interface methods: no parameter constraints may be defined at the implementing method (or the same method declared in sub-interfaces)."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:321
+#, no-c-format
+msgid "If a violation of this rule is detected by the validation engine, a <classname>javax.validation.ConstraintDeclarationException</classname> will be thrown. In <xref lang=\"\" linkend=\"example-illegal-method-constraints\"/> some examples for illegal parameter constraints declarations are shown."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:329
+#, no-c-format
+msgid "Illegal parameter constraint declarations"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:331
+#, no-c-format
+msgid ""
+      "public class Car {\n"
+      "\n"
+      "    public void drive(Person driver) { ... }\n"
+      "\n"
+      "}\n"
+      "\n"
+      "public class RentalCar extends Car {\n"
+      "\n"
+      "    //not allowed, parameter constraint added in overriding method\n"
+      "    public void drive(@NotNull Person driver) { ... }\n"
+      "\n"
+      "}\n"
+      "\n"
+      "public interface ICar {\n"
+      "\n"
+      "    void drive(Person driver);\n"
+      "\n"
+      "}\n"
+      "\n"
+      "public class CarImpl implements ICar {\n"
+      "\n"
+      "    //not allowed, parameter constraint added in implementation of interface method\n"
+      "    public void drive(@NotNull Person driver) { ... }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:334
+#, no-c-format
+msgid "This rule only applies to parameter constraints, return value constraints may be added in sub-types without any restrictions as it is alright to strengthen the postconditions guaranteed to a type's client."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:342
+#, no-c-format
+msgid "Evaluating method-level constraints"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:344
+#, no-c-format
+msgid "To validate method-level constraints Hibernate Validator provides the interface <classname>org.hibernate.validator.method.MethodValidator</classname>."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:348
+#, no-c-format
+msgid "As shown in <xref lang=\"\" linkend=\"example-methodvalidator\"/> this interface defines methods for the evaluation of parameter as well as return value constraints and for retrieving an extended type descriptor providing method constraint related meta data."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:354
+#, no-c-format
+msgid "The <classname>MethodValidator</classname> interface"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:356
+#, no-c-format
+msgid ""
+      "public interface MethodValidator {\n"
+      "\n"
+      "    <T> Set<MethodConstraintViolation<T>> validateParameter(T object, Method method, Object parameterValue, int parameterIndex, Class<?>... groups);\n"
+      "    \n"
+      "    <T> Set<MethodConstraintViolation<T>> validateAllParameters(T object, Method method, Object[] parameterValues, Class<?>... groups);\n"
+      "    \n"
+      "    <T> Set<MethodConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups);\n"
+      " \n"
+      "    TypeDescriptor getConstraintsForType(Class<?> clazz);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:359
+#, no-c-format
+msgid "To retrieve a method validator get hold of an instance of HV's <classname>javax.validation.Validator</classname> implementation and unwrap it to <classname>MethodValidator</classname> as shown in <xref lang=\"\" linkend=\"example-retrieving-methodvalidator\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:365
+#, no-c-format
+msgid "Retrieving a <classname>MethodValidator</classname> instance"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:368
+#, no-c-format
+msgid ""
+      "MethodValidator methodValidator = Validation.byProvider( HibernateValidator.class )\n"
+      "    .configure()\n"
+      "    .buildValidatorFactory()\n"
+      "    .getValidator()\n"
+      "    .unwrap( MethodValidator.class );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:371
+#, no-c-format
+msgid "The validation methods defined on <classname>MethodValidator</classname> each return a <classname>Set<MethodConstraintViolation></classname>. The type <classname>MethodConstraintViolation</classname> (see <xref lang=\"\" linkend=\"example-methodconstraintviolation\"/>) extends <classname>javax.validation.ConstraintViolation</classname> and provides additional method level validation specific information such as the method and index of the parameter which caused the constrain [...]
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:382
+#, no-c-format
+msgid "The <classname>MethodConstraintViolation</classname> type"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:385
+#, no-c-format
+msgid ""
+      "public interface MethodConstraintViolation<T> extends ConstraintViolation<T> {\n"
+      "    \n"
+      "    public static enum Kind { PARAMETER, RETURN_VALUE }\n"
+      "\n"
+      "    Method getMethod();\n"
+      "\n"
+      "    Integer getParameterIndex();\n"
+      "\n"
+      "    String getParameterName();\n"
+      "\n"
+      "    Kind getKind();\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:389
+#, no-c-format
+msgid "The method <methodname>getParameterName()</methodname> currently returns synthetic parameter identifiers such as \"arg0\", \"arg1\" etc. In a future version of Hibernate Validator support for specifying parameter identifiers might be added."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:395
+#, no-c-format
+msgid "Typically the validation of method-level constraints is not invoked manually but automatically upon method invocation by an integration layer using AOP (aspect-oriented programming) or similar method interception facilities such as the JDK's <classname>java.lang.reflect.Proxy</classname> API or CDI (\"JSR 299: Contexts and Dependency Injection for the Java<superscript>TM</superscript> EE platform\")."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:403
+#, no-c-format
+msgid "If a parameter or return value constraint can't be validated sucessfully such an integration layer typically will throw a <classname>MethodConstraintViolationException</classname> which similar to <classname>javax.validation.ConstraintViolationException</classname> contains a set with the occurred constraint violations."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:410
+#, no-c-format
+msgid "If you are using CDI you might be interested in the <ulink url=\"http://seamframework.org/Seam3/ValidationModule\">Seam Validation</ulink> project. This Seam module provides an interceptor which integrates the method validation functionality with CDI."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:418
+#, no-c-format
+msgid "Retrieving method-level constraint meta data"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:420
+#, no-c-format
+msgid "As outlined in <xref lang=\"\" linkend=\"validator-metadata-api\"/> the Bean Validation API provides rich capabilities for retrieving constraint related meta data. Hibernate Validator extends this API and allows to retrieve constraint meta data also for method-level constraints."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:426
+#, no-c-format
+msgid "shows how to use this extended API to retrieve constraint meta data for the <methodname>rentCar()</methodname> method from the <classname>RentalStation</classname> type."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:432
+#, no-c-format
+msgid "Retrieving meta data for method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:434
+#, no-c-format
+msgid ""
+      "TypeDescriptor typeDescriptor = methodValidator.getConstraintsForType(RentalStation.class)\n"
+      "\n"
+      "//retrieve a descriptor for the rentCar() method\n"
+      "MethodDescriptor rentCarMethod = typeDescriptor.getConstraintsForMethod(\"rentCar\", Customer.class, Date.class, int.class);\n"
+      "assertEquals(rentCarMethod.getMethodName(), \"rentCar\");\n"
+      "assertTrue(rentCarMethod.hasConstraints());\n"
+      "assertFalse(rentCarMethod.isCascaded());\n"
+      "\n"
+      "//retrieve constraints from the return value\n"
+      "Set<ConstraintDescriptor<?>> returnValueConstraints = rentCarMethod.findConstraints().getConstraintDescriptors();\n"
+      "assertEquals(returnValueConstraints.size(), 1);\n"
+      "assertEquals(returnValueConstraints.iterator().next().getAnnotation().annotationType(), NotNull.class);\n"
+      "\n"
+      "List<ParameterDescriptor> allParameters = rentCarMethod.getParameterDescriptors();\n"
+      "assertEquals(allParameters.size(), 3);\n"
+      "\n"
+      "//retrieve a descriptor for the startDate parameter\n"
+      "ParameterDescriptor startDateParameter = allParameters.get(1);\n"
+      "assertEquals(startDateParameter.getIndex(), 1);\n"
+      "assertFalse(startDateParameter.isCascaded());\n"
+      "assertEquals(startDateParameter.findConstraints().getConstraintDescriptors().size(), 2);"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:437
+#, no-c-format
+msgid "Refer to the <ulink url=\"http://docs.jboss.org/hibernate/validator/4.2/api/index.html?org/hibernate/validator/method/metadata/package-summary.html\">JavaDoc</ulink> of the package <classname>org.hibernate.validator.method.metadata</classname> for more details on the extended meta data API."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:446 customoptions.xml:462
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:448
+#, no-c-format
+msgid "Another addition to the Bean Validation specification is the ability to configure constraints via a fluent API. This API can be used exclusively or in combination with annotations and xml. If used in combination programmatic constraints are additive to constraints configured via the standard configuration capabilities."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:454
+#, no-c-format
+msgid "The API is centered around the <classname>ConstraintMapping</classname> class which can be found in the package<package> org.hibernate.validator.cfg</package>. Starting with the instantiation of a new <classname>ConstraintMapping</classname>, constraints can be defined in a fluent manner as shown in <xref lang=\"\" linkend=\"example-constraint-mapping\"/>."
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:464
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"manufacturer\", FIELD )\n"
+      "        .constraint( new NotNullDef() )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .constraint( new NotNullDef() )\n"
+      "        .constraint( new SizeDef().min( 2 ).max( 14 ) )\n"
+      "    .property( \"seatCount\", FIELD )\n"
+      "        .constraint( new MinDef()value ( 2 ) )\n"
+      ".type( RentalCar.class )\n"
+      "    .property( \"rentalStation\", METHOD )\n"
+      "        .constraint( new NotNullDef() );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:467
+#, no-c-format
+msgid "As you can see constraints can be configured on multiple classes and properties using method chaining. The constraint definition classes <classname>NotNullDef</classname>, <classname>SizeDef</classname> and <classname>MinDef</classname> are helper classes which allow to configure constraint parameters in a type-safe fashion. Definition classes exist for all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</classname> package."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:475
+#, no-c-format
+msgid "For custom constraints you can either create your own definition classes extending <classname>ConstraintDef</classname> or you can use <classname>GenericConstraintDef</classname> as seen in <xref linkend=\"example-generic-constraint-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:481
+#, no-c-format
+msgid "Programmatic constraint definition using <methodname>createGeneric()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:484
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .constraint( new GenericConstraintDef<CheckCase.class>( CheckCase.class ).param( \"value\", CaseMode.UPPER ) );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:487
+#, no-c-format
+msgid "Not only standard class- and property-level constraints but also method constraints can be configured using the API. As shown in <xref lang=\"\" linkend=\"example-method-constraint-mapping\"/> methods are identified by their name and their parameters (if there are any). Having selected a method, constraints can be placed on the method's parameters and/or return value."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:495
+#, no-c-format
+msgid "Programmatic definition of method constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:497
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .method( \"drive\", String.class, Integer.class )\n"
+      "        .parameter( 0 )\n"
+      "            .constraint( new NotNullDef() )\n"
+      "            .constraint( new MinDef().value ( 1 ) )\n"
+      "        .parameter( 1 )\n"
+      "            .constraint( new NotNullDef() )\n"
+      "        .returnValue()\n"
+      "            .constraint( new NotNullDef() )\n"
+      "    .method( \"check\" )\n"
+      "        .returnValue()\n"
+      "            .constraint( new NotNullDef() );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:500
+#, no-c-format
+msgid "Using the API it's also possible to mark properties, method parameters and method return values as cascading (equivalent to annotating them with <classname>@Valid</classname>). An example can be found in <xref lang=\"\" linkend=\"example-cascading-constraints\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:506
+#, no-c-format
+msgid "Marking constraints for cascaded validation"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:508
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"manufacturer\", FIELD )\n"
+      "        .valid()\n"
+      "    .property( \"licensePlate\", METHOD )\n"
+      "        .valid()\n"
+      "    .method( \"drive\", String.class, Integer.class )\n"
+      "        .parameter( 0 )\n"
+      "            .valid()\n"
+      "        .parameter( 1 )\n"
+      "            .valid()\n"
+      "        .returnValue()\n"
+      "            .valid()\n"
+      ".type( RentalCar.class )\n"
+      "    .property( \"rentalStation\", METHOD )\n"
+      "        .valid();"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:511
+#, no-c-format
+msgid "Last but not least you can configure the default group sequence or the default group sequence provider of a type as shown in <xref lang=\"\" linkend=\"example-sequences\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:514
+#, no-c-format
+msgid "Configuration of default group sequence and default group sequence provider"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:517
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .defaultGroupSequence( Car.class, CarChecks.class )\n"
+      ".type( RentalCar.class )\n"
+      "    .defaultGroupSequenceProvider( RentalCarGroupSequenceProvider.class );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:520
+#, no-c-format
+msgid "Once a <classname>ConstraintMapping</classname> is set up it has to be passed to the configuration. Since the programmatic API is not part of the official Bean Validation specification you need to get hold of a <classname>HibernateValidatorConfiguration</classname> instance as shown in <xref linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:527
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:529
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "// configure mapping instance\n"
+      "\n"
+      "HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "config.addMapping( mapping );\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:534
+#, no-c-format
+msgid "Boolean composition for constraint composition"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:536
+#, no-c-format
+msgid "As per Bean Validation specification the constraints of a composed constraint (see <xref linkend=\"section-constraint-composition\"/>) are all combined via a logical <emphasis>AND</emphasis>. This means all of the composing constraints need to return <constant>true</constant> in order for an overall successful validation. Hibernate Validator offers an extension to this logical <emphasis>AND</emphasis> combination which allows you to compose constraints via a logical <emphasis>OR</ [...]
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:554
+#, no-c-format
+msgid "OR composition of constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:556
+#, no-c-format
+msgid ""
+      "<emphasis role=\"bold\">@ConstraintComposition(OR)</emphasis>\n"
+      "@Pattern(regexp = \"[a-z]\")\n"
+      "@Size(min = 2, max = 3)\n"
+      "@ReportAsSingleViolation\n"
+      "@Target({ METHOD, FIELD })\n"
+      "@Retention(RUNTIME)\n"
+      "@Constraint(validatedBy = { })\n"
+      "public @interface PatternOrSize {\n"
+      "   public abstract String message() default \"{PatternOrSize.message}\";\n"
+      "   public abstract Class<?>[] groups() default { };\n"
+      "   public abstract Class<? extends Payload>[] payload() default { };\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:560
+#, no-c-format
+msgid "Using <emphasis>ALL_FALSE</emphasis> as composition type implicitly enforces that only a single violation will get reported in case validation of the constraint composition fails."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/furtherreading.pot b/project/documentation/src/main/docbook/pot/modules/furtherreading.pot
new file mode 100644
index 0000000..f84f228
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/furtherreading.pot
@@ -0,0 +1,46 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: furtherreading.xml:24
+#, no-c-format
+msgid "Further reading"
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:26
+#, no-c-format
+msgid "Last but not least, a few pointers to further information."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:28
+#, no-c-format
+msgid "A great source for examples is the Bean Validation TCK which is available for anonymous access on <ulink url=\"https://github.com/beanvalidation/beanvalidation-tck\">GitHub</ulink>. In particular the TCK's <ulink url=\"https://github.com/beanvalidation/beanvalidation-tck/tree/master/src/main/java/org/hibernate/jsr303/tck/tests\">tests</ulink> might be of interest. <ulink url=\"http://jcp.org/en/jsr/detail?id=303\">The JSR 303</ulink> specification itself is also a great way to dee [...]
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:37
+#, no-c-format
+msgid "If you have any further questions to Hibernate Validator or want to share some of your use cases have a look at the <ulink url=\"http://community.jboss.org/en/hibernate/validator\">Hibernate Validator Wiki</ulink> and the <ulink url=\"https://forum.hibernate.org/viewforum.php?f=9\">Hibernate Validator Forum</ulink>."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:44
+#, no-c-format
+msgid "In case you would like to report a bug use <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV\">Hibernate's Jira</ulink> instance. Feedback is always welcome!"
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/gettingstarted.pot b/project/documentation/src/main/docbook/pot/modules/gettingstarted.pot
new file mode 100644
index 0000000..f2a1aa2
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/gettingstarted.pot
@@ -0,0 +1,366 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: gettingstarted.xml:24
+#, no-c-format
+msgid "Getting started"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:26
+#, no-c-format
+msgid "This chapter will show you how to get started with Hibernate Validator, the reference implementation (RI) of Bean Validation. For the following quickstart you need:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:32
+#, no-c-format
+msgid "A JDK >= 6"
+msgstr ""
+
+#. Tag: ulink
+#: gettingstarted.xml:36
+#, no-c-format
+msgid "Apache Maven"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:40
+#, no-c-format
+msgid "An Internet connection (Maven has to download all required libraries)"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:45
+#, no-c-format
+msgid ""
+      "A properly configured remote repository. Add the following to your <filename>settings.xml</filename>: <example id=\"example-jboss-maven-url\"> <title>Configuring the JBoss Maven repository</title> <programlisting><repositories>\n"
+      "    <repository>\n"
+      "        <id>jboss-public-repository-group</id>\n"
+      "        <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>\n"
+      "        <releases>\n"
+      "          <enabled>true</enabled>\n"
+      "        </releases>\n"
+      "        <snapshots>\n"
+      "          <enabled>true</enabled>\n"
+      "        </snapshots>\n"
+      "     </repository>\n"
+      "</repositories>        </programlisting> </example>More information about <filename>settings.xml</filename> can be found in the <ulink url=\"http://maven.apache.org/ref/2.0.8/maven-settings/settings.html\">Maven Local Settings Model</ulink>."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:58
+#, no-c-format
+msgid "Project set up"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:60
+#, no-c-format
+msgid "In order to use Hibernate Validator within an existing Maven project, simply add the following dependency to your <filename>pom.xml</filename>:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:63
+#, no-c-format
+msgid "Maven dependency of Hibernate Validator"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:65
+#, no-c-format
+msgid ""
+      "<dependency>\n"
+      "    <groupId>org.hibernate</groupId>\n"
+      "    <artifactId>hibernate-validator</artifactId>\n"
+      "    <version>&version;</version>\n"
+      "</dependency>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:68
+#, no-c-format
+msgid "Alternatively, you can start by creating a sample project using Hibernate Validator's Quickstart Maven archetype as follows:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:72
+#, no-c-format
+msgid "Using Maven's archetype plugin to create a sample project using Hibernate Validator"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:75
+#, no-c-format
+msgid ""
+      "mvn archetype:generate -DarchetypeGroupId=org.hibernate \\\n"
+      "                       -DarchetypeArtifactId=hibernate-validator-quickstart-archetype \\\n"
+      "                       -DarchetypeVersion=&version; \\\n"
+      "                       -DarchetypeRepository=http://repository.jboss.org/nexus/content/groups/public-jboss/ \\\n"
+      "                       -DgroupId=com.mycompany \\\n"
+      "                       -DartifactId=hv-quickstart"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:78
+#, no-c-format
+msgid "Maven will create your project in the directory hv-quickstart. Change into this directory and run:"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:81
+#, no-c-format
+msgid "mvn test"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:81
+#, no-c-format
+msgid "Maven will compile the example code and run the implemented unit tests. Let's have a look at the actual code in the next section."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:86
+#, no-c-format
+msgid "For the purposes of logging, Hibernate Validator uses the JBoss Logging API. This is an abstraction layer which supports several known logging solutions (e.g. log4j or the logging framework provided by the JDK) as implementation. Just add your preferred logging library to the classpath and all log requests from Hibernate Validator will automatically be delegated to that logging provider."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:93
+#, no-c-format
+msgid "Alternatively, you can explicitely specify a provider using the system property <varname>org.jboss.logging.provider</varname>. Supported values currently are <varname>jboss</varname>, <varname>jdk</varname>, <varname>log4j</varname> and <varname>slf4j</varname>."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:101
+#, no-c-format
+msgid "Applying constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:103
+#, no-c-format
+msgid "Open the project in the IDE of your choice and have a look at the class <classname>Car</classname>:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:107
+#, no-c-format
+msgid "Class Car annotated with constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:109
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:112
+#, no-c-format
+msgid "<classname>@NotNull</classname>, <classname>@Size</classname> and <classname>@Min</classname> are so-called constraint annotations, that we use to declare constraints, which shall be applied to the fields of a <classname>Car</classname> instance:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:119
+#, no-c-format
+msgid "<property>manufacturer</property> shall never be null"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:123
+#, no-c-format
+msgid "<property>licensePlate</property> shall never be null and must be between 2 and 14 characters long"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:128
+#, no-c-format
+msgid "<property>seatCount</property> shall be at least 2."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:134
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:136
+#, no-c-format
+msgid "To perform a validation of these constraints, we use a <classname>Validator</classname> instance. Let's have a look at the <classname>CarTest</classname> class:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:141
+#, no-c-format
+msgid "Class CarTest showing validation examples"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:143
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static org.junit.Assert.*;\n"
+      "\n"
+      "import java.util.Set;\n"
+      "\n"
+      "import javax.validation.ConstraintViolation;\n"
+      "import javax.validation.Validation;\n"
+      "import javax.validation.Validator;\n"
+      "import javax.validation.ValidatorFactory;\n"
+      "\n"
+      "import org.junit.BeforeClass;\n"
+      "import org.junit.Test;\n"
+      "\n"
+      "public class CarTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void manufacturerIsNull() {\n"
+      "        Car car = new Car(null, \"DD-AB-123\", 4);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void licensePlateTooShort() {\n"
+      "        Car car = new Car(\"Morris\", \"D\", 4);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations = \n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"size must be between 2 and 14\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "    \n"
+      "    @Test\n"
+      "    public void seatCountTooLow() {\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 1);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"must be greater than or equal to 2\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void carIsValid() {\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 2);\n"
+      "\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(0, constraintViolations.size());\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:146
+#, no-c-format
+msgid "In the <methodname>setUp()</methodname> method we get a <classname>Validator</classname> instance from the <classname>ValidatorFactory</classname>. A <classname>Validator</classname> instance is thread-safe and may be reused multiple times. For this reason we store it as field of our test class. We can use the <classname>Validator</classname> now to validate the different car instances in the test methods."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:154
+#, no-c-format
+msgid "The <methodname>validate()</methodname> method returns a set of <classname>ConstraintViolation</classname> instances, which we can iterate in order to see which validation errors occurred. The first three test methods show some expected constraint violations:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:161
+#, no-c-format
+msgid "The <classname>@NotNull</classname> constraint on manufacturer is violated in <methodname>manufacturerIsNull()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:166
+#, no-c-format
+msgid "The <classname>@Size</classname> constraint on licensePlate is violated in <methodname>licensePlateTooShort()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:171
+#, no-c-format
+msgid "The <classname>@Min</classname> constraint on seatCount is violated in <methodname>seatCountTooLow()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:176
+#, no-c-format
+msgid "If the object validates successfully, <methodname>validate()</methodname> returns an empty set."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:179
+#, no-c-format
+msgid "Note that we only use classes from the package <package>javax.validation</package> from the Bean Validation API. As we don't reference any classes of the RI directly, it would be no problem to switch to another implementation of the API, should that need arise."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:187
+#, no-c-format
+msgid "Where to go next?"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:189
+#, no-c-format
+msgid "That concludes our 5 minute tour through the world of Hibernate Validator. Continue exploring the code examples or look at further examples referenced in <xref linkend=\"validator-further-reading\"/>. To deepen your understanding of Hibernate Validator just continue reading <xref linkend=\"validator-usingvalidator\"/>. In case your application has specific validation requirements have a look at <xref linkend=\"validator-customconstraints\"/>."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/integration.pot b/project/documentation/src/main/docbook/pot/modules/integration.pot
new file mode 100644
index 0000000..9d5c867
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/integration.pot
@@ -0,0 +1,341 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: integration.xml:24
+#, no-c-format
+msgid "Integration with other frameworks"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:26
+#, no-c-format
+msgid "Hibernate Validator is intended to be used to implement multi-layered data validation, where constraints are expressed in a single place (the annotated domain model) and checked in various different layers of the application."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:32
+#, no-c-format
+msgid "OSGi"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:34
+#, no-c-format
+msgid "The Hibernate Validator jar file is conform to the OSGi specification and can be used within any OSGi container. The following lists represent the packages imported and exported by Hibernate Validator. The classes within the exported packages are considered part of Hibernate Validator public API."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:40
+#, no-c-format
+msgid "The Java Service Provider mechanism used by Bean Validation to automatically discover validation providers doesn't work in an OSGi environment. To solve this, you have to provide a custom <classname>ValidationProviderResolver</classname>. See"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:47
+#, no-c-format
+msgid "Exported packages"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:49
+#, no-c-format
+msgid "org.hibernate.validator"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:52
+#, no-c-format
+msgid "org.hibernate.validator.constraints"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:55
+#, no-c-format
+msgid "org.hibernate.validator.cfg"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:58
+#, no-c-format
+msgid "org.hibernate.validator.cfg.context"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:61
+#, no-c-format
+msgid "org.hibernate.validator.cfg.defs"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:64
+#, no-c-format
+msgid "org.hibernate.validator.group"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:67
+#, no-c-format
+msgid "org.hibernate.validator.messageinterpolation"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:70
+#, no-c-format
+msgid "org.hibernate.validator.method"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:73
+#, no-c-format
+msgid "org.hibernate.validator.method.metadata"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:76
+#, no-c-format
+msgid "org.hibernate.validator.resourceloading"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:81
+#, no-c-format
+msgid "Imported packages"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:83
+#, no-c-format
+msgid "<package>javax.persistence.*</package>, [2.0.0,3.0.0), optional"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:86
+#, no-c-format
+msgid "<package>javax.validation.*</package>, [1.0.0,2.0.0)"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:89
+#, no-c-format
+msgid "javax.xml.*"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:92
+#, no-c-format
+msgid "org.xml.sax.*"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:95
+#, no-c-format
+msgid "<package>org.slf4j.*</package>, [1.5.6,2.0.0)"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:98
+#, no-c-format
+msgid "<package>org.joda.time.*</package>, [1.6.0,2.0.0), optional"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:101
+#, no-c-format
+msgid "<package>org.jsoup.*</package>, [1.5.2,2.0.0), optional"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:107
+#, no-c-format
+msgid "Database schema-level validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:109
+#, no-c-format
+msgid "Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will translate the constraints you have defined for your entities into mapping metadata. For example, if a property of your entity is annotated <literal>@NotNull</literal>, its columns will be declared as <literal>not null</literal> in the DDL schema generated by Hibernate."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:115
+#, no-c-format
+msgid "If, for some reason, the feature needs to be disabled, set <literal>hibernate.validator.apply_to_ddl</literal> to <literal>false</literal>. See also <xref linkend=\"table-builtin-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:120
+#, no-c-format
+msgid "You can also limit the DDL constraint generation to a subset of the defined constraints by setting the property <property>org.hibernate.validator.group.ddl</property>. The property specifies the comma-separated, fully specified class names of the groups a constraint has to be part of in order to be considered for DDL schema generation."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:129
+#, no-c-format
+msgid "ORM integration"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:131
+#, no-c-format
+msgid "Hibernate Validator integrates with both Hibernate and all pure Java Persistence providers."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:135
+#, no-c-format
+msgid "When lazy loaded associations are supposed to be validated it is recommended to place the constraint on the getter of the association. Hibernate replaces lazy loaded associations with proxy instances which get initialized/loaded when requested via the getter. If, in such a case, the constraint is placed on field level the actual proxy instance is used which will lead to validation errors."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:144
+#, no-c-format
+msgid "Hibernate event-based validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:146
+#, no-c-format
+msgid "Hibernate Validator has a built-in Hibernate event listener - <ulink url=\"http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java\"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</classname></ulink> - which is part of Hibernate Annotations (as of Hibernate 3.5.x). Whenever a <literal>PreInsertEvent</literal>, <literal>PreUpdateEvent</literal> or <classname>PreDeleteEv [...]
+msgstr ""
+
+#. Tag: para
+#: integration.xml:167
+#, no-c-format
+msgid "On constraint violation, the event will raise a runtime <classname>ConstraintViolationException</classname> which contains a set of <literal>ConstraintViolation</literal>s describing each failure."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:172
+#, no-c-format
+msgid "If Hibernate Validator is present in the classpath, Hibernate Annotations (or Hibernate EntityManager) will use it transparently. To avoid validation even though Hibernate Validator is in the classpath set <property>javax.persistence.validation.mode</property> to <constant>none</constant>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:179
+#, no-c-format
+msgid "If the beans are not annotated with validation annotations, there is no runtime performance cost."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:183
+#, no-c-format
+msgid "In case you need to manually set the event listeners for Hibernate Core, use the following configuration in <literal>hibernate.cfg.xml</literal>:"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:188
+#, no-c-format
+msgid "Manual configuration of <classname>BeanValidationEvenListener</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:191
+#, no-c-format
+msgid ""
+      "<hibernate-configuration>\n"
+      "    <session-factory>\n"
+      "       ...\n"
+      "       <property name=\"javax.persistence.validation.group.pre-persist\">javax.validation.groups.Default</property>\n"
+      "       <property name=\"javax.persistence.validation.group.pre-update\">javax.validation.groups.Default</property>\n"
+      "       <property name=\"javax.persistence.validation.group.pre-remove\"></property>\n"
+      "       ...\n"
+      "       <event type=\"pre-update\">\n"
+      "         <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
+      "       </event>\n"
+      "       <event type=\"pre-insert\">\n"
+      "         <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
+      "       </event>\n"
+      "       <event type=\"pre-delete\">\n"
+      "         <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
+      "       </event>\n"
+      "    </session-factory>\n"
+      "</hibernate-configuration>"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:196
+#, no-c-format
+msgid "<title>JPA</title>"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:198
+#, no-c-format
+msgid "If you are using JPA 2 and Hibernate Validator is in the classpath the JPA2 specification requires that Bean Validation gets enabled. The properties <property>javax.persistence.validation.group.pre-persist</property>, <property>javax.persistence.validation.group.pre-update</property> and <property>javax.persistence.validation.group.pre-remove</property> as described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/> can in this case be configured in <filename>per [...]
+msgstr ""
+
+#. Tag: para
+#: integration.xml:212
+#, no-c-format
+msgid "In a JPA 1 you will have to create and register Hibernate Validator yourself. In case you are using Hibernate EntityManager you can add a customized version of the <classname>BeanValidationEventListener</classname> described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/> to your project and register it manually."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:222
+#, no-c-format
+msgid "Presentation layer validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:224
+#, no-c-format
+msgid "When working with JSF2 or <productname>JBoss Seam</productname> and Hibernate Validator (Bean Validation) is present in the runtime environment validation is triggered for every field in the application. <xref linkend=\"example-jsf2\"/> shows an example of the f:validateBean tag in a JSF page. For more information refer to the Seam documentation or the JSF 2 specification."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:232
+#, no-c-format
+msgid "Usage of Bean Validation within JSF2"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:234
+#, no-c-format
+msgid ""
+      "<h:form>\n"
+      "  <emphasis role=\"bold\"><f:validateBean></emphasis>\n"
+      "    <h:inputText value=”#{model.property}” />\n"
+      "    <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:selectOneRadio>\n"
+      "    <!-- other input components here -->\n"
+      "  <emphasis role=\"bold\"></f:validateBean></emphasis>\n"
+      "</h:form>"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:238
+#, no-c-format
+msgid "The integration between JSF 2 and Bean Validation is described in the \"Bean Validation Integration\" chapter of <ulink url=\"http://jcp.org/en/jsr/detail?id=314\">JSR-314</ulink>. It is interesting to know that JSF 2 implements a custom MessageInterpolator to ensure ensure proper localization. To encourage the use of the Bean Validation message facility, JSF 2 will per default only display the generated Bean Validation message. This can, however, be configured via the application [...]
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:250
+#, no-c-format
+msgid "javax.faces.validator.BeanValidator.MESSAGE={1}: {0}"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:252
+#, no-c-format
+msgid "The default is:"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:254
+#, no-c-format
+msgid "javax.faces.validator.BeanValidator.MESSAGE={0}"
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/metadataapi.pot b/project/documentation/src/main/docbook/pot/modules/metadataapi.pot
new file mode 100644
index 0000000..fc1bb1c
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/metadataapi.pot
@@ -0,0 +1,126 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: metadataapi.xml:24
+#, no-c-format
+msgid "Metadata API"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:26
+#, no-c-format
+msgid "The Bean Validation specification provides not only a validation engine, but also a metadata repository for all defined constraints. The following paragraphs are discussing this API. All the introduced classes can be found in the <package>javax.validation.metadata</package> package."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:33
+#, no-c-format
+msgid "BeanDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:35
+#, no-c-format
+msgid "The entry into the metadata API is via <code>Validator.getConstraintsForClass</code> which returns an instance of the <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/BeanDescriptor.html\"><classname>BeanDescriptor</classname></ulink> interface. Using this bean descriptor you can determine whether the specified class hosts any constraints at all via <code>beanDescriptor.isBeanConstrained</code>."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:42
+#, no-c-format
+msgid "If a constraint declaration hosted by the requested class is invalid, a <classname>ValidationException</classname> is thrown."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:47
+#, no-c-format
+msgid "You can then call <code>beanDescriptor.getConstraintDescriptors</code> to get a set of <classname>ConstraintDescriptor</classname>s representing all class level constraints."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:52
+#, no-c-format
+msgid "If you are interested in property level constraints, you can call <code>beanDescriptor.getConstraintsForProperty</code> or <code>beanDescriptor.getConstrainedProperties</code> to get a single resp. set of <classname>PropertyDescriptor</classname>s (see <xref linkend=\"section-property-descriptor\"/>)."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:60
+#, no-c-format
+msgid "PropertyDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:62
+#, no-c-format
+msgid "The <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/PropertyDescriptor.html\"><classname>PropertyDescriptor</classname></ulink> interface extends the <classname>ElementDescriptor</classname> interface and represents constraints on properties of a class. The constraint can be declared on the attribute itself or on the getter of the attribute - provided Java Bean naming conventions are respected. A <classname>PropertyDescriptor</class [...]
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:75
+#, no-c-format
+msgid "ElementDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:77
+#, no-c-format
+msgid "The <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/ElementDescriptor.html\"><classname>ElementDiscriptor</classname></ulink> interface is the common base class for <classname>BeanDescriptor</classname> and <classname>PropertyDescriptor</classname>. Next to the <code>hasConstraints </code>and <code>getConstraintDescriptors</code> methods it also offers access to the <classname>ConstraintFinder</classname> API which allows you to que [...]
+msgstr ""
+
+#. Tag: title
+#: metadataapi.xml:92
+#, no-c-format
+msgid "Usage of ConstraintFinder"
+msgstr ""
+
+#. Tag: programlisting
+#: metadataapi.xml:94
+#, no-c-format
+msgid ""
+      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
+      "BeanDescriptor beanDescriptor = validator.getConstraintsForClass(Person.class);\n"
+      "PropertyDescriptor propertyDescriptor = beanDescriptor.getConstraintsForProperty(\"name\");\n"
+      "Set<ConstraintDescriptor<?>> constraints = propertyDescriptor.findConstraints()\n"
+      "                                           .declaredOn(ElementType.METHOD)\n"
+      "                                           .unorderedAndMatchingGroups(Default.class)\n"
+      "                                           .lookingAt(Scope.LOCAL_ELEMENT)\n"
+      "                                           .getConstraintDescriptors();"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:97
+#, no-c-format
+msgid "shows an example on how to use the <classname>ConstraintFinder</classname> API. Interesting are especially the restrictions <code>unorderedAndMatchingGroups</code> and <code>lookingAt(<ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/Scope.html\">Scope.LOCAL_ELEMENT</ulink>)</code>. The former allows to only return <classname>ConstraintDescriptors</classname> matching a specified set of groups wheras the latter allows to distinguish b [...]
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:108
+#, no-c-format
+msgid "Order is not respected by unorderedAndMatchingGroups, but group inheritance and inheritance via sequence are."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:114
+#, no-c-format
+msgid "ConstraintDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:116
+#, no-c-format
+msgid "Last but not least, the <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/metadata/ConstraintDescriptor.html\"><classname>ConstraintDescriptor</classname></ulink> interface describes a single constraint together with its composing constraints. Via an instance of this interface you get access to the constraint annotation and its parameters, as well as the groups the constraint is supposed to be applied on. It also also you to access the pass-th [...]
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/preface.pot b/project/documentation/src/main/docbook/pot/modules/preface.pot
new file mode 100644
index 0000000..a55b349
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/preface.pot
@@ -0,0 +1,40 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: preface.xml:24
+#, no-c-format
+msgid "Preface"
+msgstr ""
+
+#. Tag: para
+#: preface.xml:26
+#, no-c-format
+msgid "Validating data is a common task that occurs throughout any application, from the presentation layer to the persistence layer. Often the same validation logic is implemented in each layer, proving time consuming and error-prone. To avoid duplication of these validations in each layer, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code which is really metadata about the class itself."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:45
+#, no-c-format
+msgid "JSR 303 - Bean Validation - defines a metadata model and API for entity validation. The default metadata source is annotations, with the ability to override and extend the meta-data through the use of XML. The API is not tied to a specific application tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:64
+#, no-c-format
+msgid "Hibernate Validator is the reference implementation of this JSR. The implementation itself as well as the Bean Validation API and TCK are all provided and distributed under the <ulink url=\"http://www.apache.org/licenses/LICENSE-2.0\">Apache Software License 2.0</ulink>."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/programmaticapi.pot b/project/documentation/src/main/docbook/pot/modules/programmaticapi.pot
new file mode 100644
index 0000000..90b286d
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/programmaticapi.pot
@@ -0,0 +1,132 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-01-12 15:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: programmaticapi.xml:24 programmaticapi.xml:47
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:27
+#, no-c-format
+msgid "Use of the features described in the following sections is not portable between Bean Validation providers/implementations."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:31
+#, no-c-format
+msgid "Hibernate Validator allows to configure constraints not only via annotations and xml, but also via a programmatic API. This API can be used exclusively or in combination with annotations and xml. If used in combination programmatic constraints are additive to otherwise configured constraints."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:37
+#, no-c-format
+msgid "The programmatic API is centered around the <classname>ConstraintMapping</classname> class which can be found together with its supporting classes in the <package>org.hibernate.validator.cfg</package> package. <classname>ConstraintMapping</classname> is the entry point to a fluent API allowing the definition of constraints. <xref lang=\"\" linkend=\"example-constraint-mapping\"/> shows how the API can be used."
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:49
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"manufacturer\", FIELD )\n"
+      "        .constraint( NotNullDef.class )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .constraint( NotNullDef.class )\n"
+      "        .constraint( SizeDef.class )\n"
+      "            .min( 2 )\n"
+      "            .max( 14 )\n"
+      "    .property( \"seatCount\", FIELD )\n"
+      "        .constraint( MinDef.class )\n"
+      "            .value ( 2 )\n"
+      ".type( RentalCar.class )\n"
+      "    .property( \"rentalStation\", METHOD)\n"
+      "        .constraint( NotNullDef.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:52
+#, no-c-format
+msgid "As you can see you can configure constraints on multiple classes and properties using method chaining. The constraint definition classes <classname>NotNullDef</classname>, <classname>SizeDef</classname> and <classname>MinDef</classname> are helper classes which allow to configure constraint parameters in a type-safe fashion. Definition classes exists for all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</classname> package. For a custom constraint you can [...]
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:65
+#, no-c-format
+msgid "Programmatic constraint definition using <classname>GenericConstraintDef</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:68
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .genericConstraint( CheckCase.class )\n"
+      "            .param( \"value\", CaseMode.UPPER );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:71
+#, no-c-format
+msgid "Last but not least, you can also define cascading constraints as well as the default group sequence of an entity."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:75
+#, no-c-format
+msgid "Cascading constraints and group redefinition"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:77
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .valid( \"driver\", FIELD )\n"
+      ".type( RentalCar.class)\n"
+      "    .defaultGroupSequence( RentalCar.class, CarChecks.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:80
+#, no-c-format
+msgid "Once you have your <classname>ConstraintMapping</classname> you will have to pass it to the configuration. Since the programmatic configuration is not part of the official Bean Validation specification you will have to get hold of the Hibernate Validator specific configuration instance. See <xref linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:87
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:89
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "// configure mapping instance\n"
+      "\n"
+      "HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "config.addMapping( mapping );\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/usingvalidator.pot b/project/documentation/src/main/docbook/pot/modules/usingvalidator.pot
new file mode 100644
index 0000000..fe9add3
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/usingvalidator.pot
@@ -0,0 +1,1830 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: usingvalidator.xml:24
+#, no-c-format
+msgid "Validation step by step"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:26
+#, no-c-format
+msgid "In this chapter we will see in more detail how to use Hibernate Validator to validate constraints for a given entity model. We will also learn which default constraints the Bean Validation specification provides and which additional constraints are only provided by Hibernate Validator. Let's start with how to add constraints to an entity."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:33
+#, no-c-format
+msgid "Defining constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:35
+#, no-c-format
+msgid "Constraints in Bean Validation are expressed via Java annotations. In this section we show how to annotate an object model with these annotations. We have to differentiate between three different type of constraint annotations - field-, property-, and class-level annotations."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:42
+#, no-c-format
+msgid "Not all constraints can be placed on all of these levels. In fact, none of the default constraints defined by Bean Validation can be placed at class level. The <classname>java.lang.annotation.Target</classname> annotation in the constraint annotation itself determines on which elements a constraint can be placed. See <xref linkend=\"validator-customconstraints\"/> for more information."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:51
+#, no-c-format
+msgid "Field-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:53
+#, no-c-format
+msgid "Constraints can be expressed by annotating a field of a class. <xref linkend=\"example-field-level\"/> shows a field level configuration example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:58
+#, no-c-format
+msgid "Field level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:60
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @AssertTrue\n"
+      "    private boolean isRegistered;\n"
+      "\n"
+      "    public Car(String manufacturer, boolean isRegistered) {\n"
+      "        super();\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:63
+#, no-c-format
+msgid "When using field level constraints field access strategy is used to access the value to be validated. This means the bean validation provider directly accesses the instance variable and does not invoke the property accessor method also if such a method exists."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:69
+#, no-c-format
+msgid "The access type (private, protected or public) does not matter."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:74
+#, no-c-format
+msgid "Static fields and properties cannot be validated."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:78
+#, no-c-format
+msgid "When validating byte code enhanced objects property level constraints should be used, because the byte code enhancing library won't be able to determine a field access via reflection."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:85
+#, no-c-format
+msgid "Property-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:87
+#, no-c-format
+msgid "If your model class adheres to the <ulink type=\"\" url=\"http://java.sun.com/javase/technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink> standard, it is also possible to annotate the properties of a bean class instead of its fields. <xref linkend=\"example-property-level\"/> uses the same entity as in <xref linkend=\"example-field-level\"/>, however, property level constraints are used."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:93
+#, no-c-format
+msgid "The property's getter method has to be annotated, not its setter."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:98
+#, no-c-format
+msgid "Property level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:100
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.AssertTrue;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    private boolean isRegistered;\n"
+      "      \n"
+      "    public Car(String manufacturer, boolean isRegistered) {\n"
+      "        super();\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "\n"
+      "    @NotNull\n"
+      "    public String getManufacturer() {\n"
+      "        return manufacturer;\n"
+      "    }\n"
+      "\n"
+      "    public void setManufacturer(String manufacturer) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "    }\n"
+      "\n"
+      "    @AssertTrue\n"
+      "    public boolean isRegistered() {\n"
+      "        return isRegistered;\n"
+      "    }\n"
+      "\n"
+      "    public void setRegistered(boolean isRegistered) {\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:103
+#, no-c-format
+msgid "When using property level constraints property access strategy is used to access the value to be validated. This means the bean validation provider accesses the state via the property accessor method. One advantage of annotating properties instead of fields is that the constraints become part of the constrained type's API that way and users are aware of the existing constraints without having to examine the type's implementation."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:112
+#, no-c-format
+msgid "It is recommended to stick either to field <emphasis>or</emphasis> property annotations within one class. It is not recommended to annotate a field <emphasis>and</emphasis> the accompanying getter method as this would cause the field to be validated twice."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:121
+#, no-c-format
+msgid "Class-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:124
+#, no-c-format
+msgid "Last but not least, a constraint can also be placed on class level. When a constraint annotation is placed on this level the class instance itself passed to the <classname>ConstraintValidator</classname>. Class level constraints are useful if it is necessary to inspect more than a single property of the class to validate it or if a correlation between different state variables has to be evaluated. In <xref linkend=\"example-class-level\"/> we add the property <property>passengers< [...]
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:140
+#, no-c-format
+msgid "Class level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:142
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "@PassengerCount\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    private List<Person> passengers;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:147
+#, no-c-format
+msgid "Constraint inheritance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:149
+#, no-c-format
+msgid "When validating an object that implements an interface or extends another class, all constraint annotations on the implemented interface and parent class apply in the same manner as the constraints specified on the validated object itself. To make things clearer let's have a look at the following example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:156
+#, no-c-format
+msgid "Constraint inheritance using RentalCar"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:158
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class RentalCar extends Car {\n"
+      "\n"
+      "    private String rentalStation;\n"
+      "    \n"
+      "    public RentalCar(String manufacturer, String rentalStation) {\n"
+      "        super(manufacturer);\n"
+      "        this.rentalStation = rentalStation;\n"
+      "    }\n"
+      "    \n"
+      "    @NotNull\n"
+      "    public String getRentalStation() {\n"
+      "        return rentalStation;\n"
+      "    }\n"
+      "\n"
+      "    public void setRentalStation(String rentalStation) {\n"
+      "        this.rentalStation = rentalStation;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:161
+#, no-c-format
+msgid "Our well-known class <classname>Car</classname> is now extended by <classname>RentalCar</classname> with the additional property <property>rentalStation</property>. If an instance of <classname>RentalCar</classname> is validated, not only the <classname>@NotNull</classname> constraint on <property>rentalStation</property> is validated, but also the constraint on <property>manufacturer</property> from the parent class."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:169
+#, no-c-format
+msgid "The same would hold true, if <classname>Car</classname> were an interface implemented by <classname>RentalCar</classname>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:172
+#, no-c-format
+msgid "Constraint annotations are aggregated if methods are overridden. If <classname>RentalCar</classname> would override the <methodname>getManufacturer()</methodname> method from <classname>Car</classname> any constraints annotated at the overriding method would be evaluated in addition to the <classname>@NotNull</classname> constraint from the super-class."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:181
+#, no-c-format
+msgid "Object graphs"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:183
+#, no-c-format
+msgid "The Bean Validation API does not only allow to validate single class instances but also complete object graphs. To do so, just annotate a field or property representing a reference to another object with <classname>@Valid</classname>. If the parent object is validated, all referenced objects annotated with <classname>@Valid</classname> will be validated as well (as will be their children etc.). See <xref linkend=\"example-car-with-driver\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:192
+#, no-c-format
+msgid "Class Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:194
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Person {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String name;\n"
+      "    \n"
+      "    public Person(String name) {\n"
+      "        super();\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "\n"
+      "    public String getName() {\n"
+      "        return name;\n"
+      "    }\n"
+      "\n"
+      "    public void setName(String name) {\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:198
+#, no-c-format
+msgid "Adding a driver to the car"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:200
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.Valid;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Valid\n"
+      "    private Person driver;\n"
+      "    \n"
+      "    public Car(Person driver) {\n"
+      "        this.driver = driver;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:203
+#, no-c-format
+msgid "If an instance of <classname>Car</classname> is validated, the referenced <classname>Person</classname> object will be validated as well, as the <property>driver</property> field is annotated with <classname>@Valid</classname>. Therefore the validation of a <classname>Car</classname> will fail if the <property>name</property> field of the referenced <classname>Person</classname> instance is <code>null</code>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:211
+#, no-c-format
+msgid "Object graph validation also works for collection-typed fields. That means any attributes that"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:216
+#, no-c-format
+msgid "are arrays"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:220
+#, no-c-format
+msgid "implement <classname>java.lang.Iterable</classname> (especially <classname>Collection</classname>, <classname>List</classname> and <classname>Set</classname>)"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:226
+#, no-c-format
+msgid "implement <classname>java.util.Map</classname>"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:230
+#, no-c-format
+msgid "can be annotated with <classname>@Valid</classname>, which will cause each contained element to be validated, when the parent object is validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:235
+#, no-c-format
+msgid "Car with a list of passengers"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:237
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import java.util.ArrayList;\n"
+      "import java.util.List;\n"
+      "\n"
+      "import javax.validation.Valid;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Valid\n"
+      "    private List<Person> passengers = new ArrayList<Person>();\n"
+      "\n"
+      "    public Car(List<Person> passengers) {\n"
+      "        this.passengers = passengers;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:240
+#, no-c-format
+msgid "If a <classname>Car</classname> instance is validated, a <classname>ConstraintValidation</classname> will be created, if any of the <classname>Person</classname> objects contained in the <property>passengers</property> list has a <code>null</code> name."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:244
+#, no-c-format
+msgid "<classname>null</classname> values are getting ignored when validating object graphs."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:251
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:253
+#, no-c-format
+msgid "The <classname>Validator</classname> interface is the main entry point to Bean Validation. In <xref linkend=\"section-validator-instance\"/> we will first show how to obtain an <classname>Validator</classname> instance. Afterwards we will learn how to use the different methods of the <classname>Validator</classname> interface."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:260
+#, no-c-format
+msgid "Obtaining a <classname>Validator</classname> instance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:262
+#, no-c-format
+msgid "The first step towards validating an entity instance is to get hold of a <classname>Validator</classname> instance. The road to this instance leads via the <classname>Validation</classname> class and a <classname>ValidatorFactory</classname>. The easiest way is to use the static <methodname>Validation.buildDefaultValidatorFactory()</methodname> method:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:271
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:273
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:276
+#, no-c-format
+msgid "For other ways of obtaining a Validator instance see <xref linkend=\"validator-bootstrapping\"/>. For now we just want to see how we can use the <classname>Validator</classname> instance to validate entity instances."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:283
+#, no-c-format
+msgid "Validator methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:285
+#, no-c-format
+msgid "The <classname>Validator</classname> interface contains three methods that can be used to either validate entire entities or just a single properties of the entity."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:289
+#, no-c-format
+msgid "All three methods return a <classname>Set<ConstraintViolation></classname>. The set is empty, if the validation succeeds. Otherwise a <classname>ConstraintViolation</classname> instance is added for each violated constraint."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:295
+#, no-c-format
+msgid "All the validation methods have a var-args parameter which can be used to specify, which validation groups shall be considered when performing the validation. If the parameter is not specified the default validation group (<classname>javax.validation.groups.Default</classname>) will be used. We will go into more detail on the topic of validation groups in"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:304
+#, no-c-format
+msgid "validate"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:306
+#, no-c-format
+msgid "Use the <methodname>validate()</methodname> method to perform validation of all constraints of a given entity instance (see <xref linkend=\"example-validator-validate\"/> )."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:311
+#, no-c-format
+msgid "Usage of <methodname>Validator.validate()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:314
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();\n"
+      "\n"
+      "Car car = new Car(null);\n"
+      "\n"
+      "Set<ConstraintViolation<Car>> constraintViolations = validator.validate(car);\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:319
+#, no-c-format
+msgid "validateProperty"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:321
+#, no-c-format
+msgid "With help of the <methodname>validateProperty()</methodname> a single named property of a given object can be validated. The property name is the JavaBeans property name."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:326
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateProperty()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:329
+#, no-c-format
+msgid ""
+      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
+      "\n"
+      "Car car = new Car(null);\n"
+      "\n"
+      "Set<ConstraintViolation<Car>> constraintViolations = validator.validateProperty(car, \"manufacturer\");\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:332
+#, no-c-format
+msgid "<methodname>Validator.validateProperty</methodname> is for example used in the integration of Bean Validation into JSF 2 (see <xref linkend=\"section-presentation-layer\"/>)."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:338
+#, no-c-format
+msgid "validateValue"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:340
+#, no-c-format
+msgid "Using the <methodname>validateValue() </methodname>method you can check, whether a single property of a given class can be validated successfully, if the property had the specified value:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:345
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateValue()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:348
+#, no-c-format
+msgid ""
+      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
+      "\n"
+      "Set<ConstraintViolation<Car>> constraintViolations = validator.validateValue(Car.class, \"manufacturer\", null);\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:352
+#, no-c-format
+msgid "<classname>@Valid</classname> is not honored by <methodname>validateProperty()</methodname> or <methodname>validateValue()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:360
+#, no-c-format
+msgid "<classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:362
+#, no-c-format
+msgid "Now it is time to have a closer look at what a <classname>ConstraintViolation</classname>. Using the different methods of <classname>ConstraintViolation</classname> a lot of useful information about the cause of the validation failure can be determined. <xref linkend=\"table-constraint-violation\"/> gives an overview of these methods:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:370
+#, no-c-format
+msgid "The various <classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:376
+#, no-c-format
+msgid "Method"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:378
+#, no-c-format
+msgid "Usage"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:380
+#, no-c-format
+msgid "Example (referring to <xref linkend=\"example-validator-validate\"/>)"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:387
+#, no-c-format
+msgid "getMessage()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:389
+#, no-c-format
+msgid "The interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:391
+#, no-c-format
+msgid "may not be null"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:395
+#, no-c-format
+msgid "getMessageTemplate()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:397
+#, no-c-format
+msgid "The non-interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:399
+#, no-c-format
+msgid "{javax.validation.constraints.NotNull.message}"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:403
+#, no-c-format
+msgid "getRootBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:405
+#, no-c-format
+msgid "The root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:407 usingvalidator.xml:425
+#, no-c-format
+msgid "<entry>car</entry>"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:411
+#, no-c-format
+msgid "getRootBeanClass()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:413
+#, no-c-format
+msgid "The class of the root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:415
+#, no-c-format
+msgid "Car.class"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:419
+#, no-c-format
+msgid "getLeafBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:421
+#, no-c-format
+msgid "If a bean constraint, the bean instance the constraint is applied on. If a property constraint, the bean instance hosting the property the constraint is applied on."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:429
+#, no-c-format
+msgid "getPropertyPath()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:431
+#, no-c-format
+msgid "The property path to the value from root bean."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:437
+#, no-c-format
+msgid "getInvalidValue()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:439
+#, no-c-format
+msgid "The value failing to pass the constraint."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:441
+#, no-c-format
+msgid "passengers"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:445
+#, no-c-format
+msgid "getConstraintDescriptor()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:447
+#, no-c-format
+msgid "Constraint metadata reported to fail."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:457
+#, no-c-format
+msgid "Message interpolation"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:459
+#, no-c-format
+msgid "As we will see in <xref linkend=\"validator-customconstraints\"/> each constraint definition must define a default message descriptor. This message can be overridden at declaration time using the <methodname>message</methodname> attribute of the constraint. You can see this in <xref linkend=\"example-driver\"/>. This message descriptors get interpolated when a constraint validation fails using the configured <classname>MessageInterpolator</classname>. The interpolator will try to  [...]
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:482
+#, no-c-format
+msgid "Since the braces { and } have special meaning in the messages they need to be escaped if they are used literally. The following The following rules apply:"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:486
+#, no-c-format
+msgid "\\{ is considered as the literal {"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:490
+#, no-c-format
+msgid "\\} is considered as the literal }"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:494
+#, no-c-format
+msgid "\\\\ is considered as the literal \\"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:498
+#, no-c-format
+msgid "If the default message interpolator does not fit your requirements it is possible to plug a custom <classname>MessageInterpolator</classname> when the <classname>ValidatorFactory</classname> gets created. This can be seen in <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:507
+#, no-c-format
+msgid "Validating groups"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:509
+#, no-c-format
+msgid "Groups allow you to restrict the set of constraints applied during validation. This makes for example wizard like validation possible where in each step only a specified subset of constraints get validated. The groups targeted are passed as var-args parameters to <methodname>validate</methodname>, <methodname>validateProperty</methodname> and <methodname>validateValue</methodname>. Let's have a look at an extended <classname>Car</classname> with <classname>Driver</classname> examp [...]
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:524
+#, no-c-format
+msgid "When more than one group is requested, the order in which the groups are evaluated is not deterministic. If no group is specified the default group <classname>javax.validation.groups.Default</classname> is assumed."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:531
+#, no-c-format
+msgid "Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:533
+#, no-c-format
+msgid ""
+      "public class Person {\n"
+      "    @NotNull\n"
+      "    private String name;\n"
+      "\n"
+      "    public Person(String name) {\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "    // getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:536
+#, no-c-format
+msgid "Next we have the class <classname>Driver</classname> (<xref linkend=\"example-driver\"/>) extending <classname>Person</classname>. Here we are adding the properties <property>age</property> and <property>hasDrivingLicense</property>. In order to drive you must be at least 18 (<classname>@Min(18)</classname>) and you must have a driving license (<classname>@AssertTrue</classname>). Both constraints defined on these properties belong to the group <classname>DriverChecks</classname>. [...]
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:550
+#, no-c-format
+msgid "Driver"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:552
+#, no-c-format
+msgid ""
+      "public class Driver extends Person {\n"
+      "    @Min(value = 18, message = \"You have to be 18 to drive a car\", groups = DriverChecks.class)\n"
+      "    public int age;\n"
+      "\n"
+      "    @AssertTrue(message = \"You first have to pass the driving test\", groups = DriverChecks.class)\n"
+      "    public boolean hasDrivingLicense;\n"
+      "\n"
+      "    public Driver(String name) {\n"
+      "        super( name );\n"
+      "    }\n"
+      "\n"
+      "    public void passedDrivingTest(boolean b) {\n"
+      "        hasDrivingLicense = b;\n"
+      "    }\n"
+      "\n"
+      "    public int getAge() {\n"
+      "        return age;\n"
+      "    }\n"
+      "\n"
+      "    public void setAge(int age) {\n"
+      "        this.age = age;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:556
+#, no-c-format
+msgid "Group interfaces"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:558
+#, no-c-format
+msgid ""
+      "public interface DriverChecks {\n"
+      "}\n"
+      "\n"
+      "public interface CarChecks {\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:561
+#, no-c-format
+msgid "Last but not least we add the property <property>passedVehicleInspection</property> to the <classname>Car</classname> class (<xref linkend=\"example-car\"/>) indicating whether a car passed the road worthy tests."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:567
+#, no-c-format
+msgid "<title>Car</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:569
+#, no-c-format
+msgid ""
+      "public class Car {\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "\n"
+      "    @AssertTrue(message = \"The car has to pass the vehicle inspection first\", groups = CarChecks.class)\n"
+      "    private boolean passedVehicleInspection;\n"
+      "\n"
+      "    @Valid\n"
+      "    private Driver driver;\n"
+      "\n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:572
+#, no-c-format
+msgid "Overall three different groups are used in our example. <property>Person.name</property>, <property>Car.manufacturer</property>, <property>Car.licensePlate</property> and <property>Car.seatCount</property> all belong to the <classname>Default</classname> group. <property>Driver.age</property> and <property>Driver.hasDrivingLicense</property> belong to <classname>DriverChecks</classname> and last but not least <property>Car.passedVehicleInspection</property> belongs to the group <c [...]
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:586
+#, no-c-format
+msgid "Drive away"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:588
+#, no-c-format
+msgid ""
+      "public class GroupTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void driveAway() {\n"
+      "        // create a car and check that everything is ok with it.\n"
+      "        Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "        Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );\n"
+      "        assertEquals( 0, constraintViolations.size() );\n"
+      "\n"
+      "        // but has it passed the vehicle inspection?\n"
+      "        constraintViolations = validator.validate( car, CarChecks.class );\n"
+      "        assertEquals( 1, constraintViolations.size() );\n"
+      "        assertEquals(\"The car has to pass the vehicle inspection first\", constraintViolations.iterator().next().getMessage());\n"
+      "\n"
+      "        // let's go to the vehicle inspection\n"
+      "        car.setPassedVehicleInspection( true );\n"
+      "        assertEquals( 0, validator.validate( car ).size() );\n"
+      "\n"
+      "        // now let's add a driver. He is 18, but has not passed the driving test yet\n"
+      "        Driver john = new Driver( \"John Doe\" );\n"
+      "        john.setAge( 18 );\n"
+      "        car.setDriver( john );\n"
+      "        constraintViolations = validator.validate( car, DriverChecks.class );\n"
+      "        assertEquals( 1, constraintViolations.size() );\n"
+      "        assertEquals( \"You first have to pass the driving test\", constraintViolations.iterator().next().getMessage() );\n"
+      "\n"
+      "        // ok, John passes the test\n"
+      "        john.passedDrivingTest( true );\n"
+      "        assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );\n"
+      "\n"
+      "        // just checking that everything is in order now\n"
+      "        assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:591
+#, no-c-format
+msgid "First we create a car and validate it using no explicit group. There are no validation errors, even though the property <property>passedVehicleInspection</property> is per default <constant>false</constant>. However, the constraint defined on this property does not belong to the default group. Next we just validate the <classname>CarChecks</classname> group which will fail until we make sure that the car passes the vehicle inspection. When we then add a driver to the car and valid [...]
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:604
+#, no-c-format
+msgid "Last but not least, we show that all constraints are passing by validating against all defined groups."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:608
+#, no-c-format
+msgid "Group sequences"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:610
+#, no-c-format
+msgid "By default, constraints are evaluated in no particular order, regardless of which groups they belong to. In some situations, however, it is useful to control the order constraints are evaluated. In our example from <xref linkend=\"validator-usingvalidator-validationgroups\"/> we could for example require that first all default car constraints are passing before we check the road worthiness of the car. Finally before we drive away we check the actual driver constraints. In order to [...]
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:622
+#, no-c-format
+msgid "If at least one constraint fails in a sequenced group none of the constraints of the following groups in the sequence get validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:628
+#, no-c-format
+msgid "Interface with @GroupSequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:630
+#, no-c-format
+msgid ""
+      "@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})\n"
+      "public interface OrderedChecks {\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:634
+#, no-c-format
+msgid "Groups defining a sequence and groups composing a sequence must not be involved in a cyclic dependency either directly or indirectly, either through cascaded sequence definition or group inheritance. If a group containing such a circularity is evaluated, a <classname>GroupDefinitionException</classname> is raised."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:638
+#, no-c-format
+msgid "The usage of the new sequence could then look like in <xref linkend=\"example-group-sequence\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:643
+#, no-c-format
+msgid "Usage of a group sequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:645
+#, no-c-format
+msgid ""
+      "@Test\n"
+      "public void testOrderedChecks() {\n"
+      "    Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "    car.setPassedVehicleInspection( true );\n"
+      "\n"
+      "    Driver john = new Driver( \"John Doe\" );\n"
+      "    john.setAge( 18 );\n"
+      "    john.passedDrivingTest( true );\n"
+      "    car.setDriver( john );\n"
+      "\n"
+      "    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:650
+#, no-c-format
+msgid "Redefining the default group sequence of a class"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:653
+#, no-c-format
+msgid "@GroupSequence"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:655
+#, no-c-format
+msgid "The <classname>@GroupSequence</classname> annotation also fulfills a second purpose. It allows you to redefine what the <constant>Default</constant> group means for a given class. To redefine <classname>Default</classname> for a given class, add a <classname>@GroupSequence</classname> annotation to the class. The defined groups in the annotation express the sequence of groups that substitute <classname>Default</classname> for this class. <xref linkend=\"example-rental-car\"/> intr [...]
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:671
+#, no-c-format
+msgid "RentalCar with @GroupSequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:673
+#, no-c-format
+msgid ""
+      "@GroupSequence({ RentalChecks.class, CarChecks.class, RentalCar.class })\n"
+      "public class RentalCar extends Car {\n"
+      "    @AssertFalse(message = \"The car is currently rented out\", groups = RentalChecks.class)\n"
+      "    private boolean rented;\n"
+      "\n"
+      "    public RentalCar(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        super( manufacturer, licencePlate, seatCount );\n"
+      "    }\n"
+      "\n"
+      "    public boolean isRented() {\n"
+      "        return rented;\n"
+      "    }\n"
+      "\n"
+      "    public void setRented(boolean rented) {\n"
+      "        this.rented = rented;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:677
+#, no-c-format
+msgid "RentalCar with redefined default group"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:679
+#, no-c-format
+msgid ""
+      "/**\n"
+      " * Validating the default group leads to validation on the default group sequence of {@code RentalCar}.\n"
+      " */\n"
+      "@Test\n"
+      "public void carIsRented() {\n"
+      "  RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "  rentalCar.setPassedVehicleInspection( true );\n"
+      "  rentalCar.setRented( true );\n"
+      "\n"
+      "  Set<ConstraintViolation<RentalCar>> constraintViolations = validator.validate( rentalCar );\n"
+      "\n"
+      "  assertEquals( 1, constraintViolations.size() );\n"
+      "  assertEquals(\n"
+      "    \"Wrong message\",\n"
+      "    \"The car is currently rented out\",\n"
+      "    constraintViolations.iterator().next().getMessage()\n"
+      "  );\n"
+      "\n"
+      "  rentalCar.setRented( false );\n"
+      "  constraintViolations = validator.validate( rentalCar );\n"
+      "\n"
+      "  assertEquals( 0, constraintViolations.size() );\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:683
+#, no-c-format
+msgid "Due to the fact that there cannot be a cyclic dependency in the group and group sequence definitions one cannot just add <classname>Default</classname> to the sequence redefining <classname>Default</classname> for a class. Instead the class itself has to be added!"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:691
+#, no-c-format
+msgid "The <classname>Default</classname> group sequence overriding is local to the class it is defined on and is not propagated to the associated objects. This means in particular that adding <classname>DriverChecks</classname> to the default group sequence of <classname>RentalCar</classname> would not have any effects. Only the group <classname>Default</classname> will be propagated to the driver association when validation a rental car instance."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:702
+#, no-c-format
+msgid "@GroupSequenceProvider"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:704
+#, no-c-format
+msgid "The <classname>@javax.validation.GroupSequence</classname> annotation is a standardized Bean Validation annotation. As seen in the previous section it allows you to statically redefine the default group sequence for a class. Hibernate Validator also offers a custom, non standardized annotation - <classname>org.hibernate.validator.group.GroupSequenceProvider </classname>- which allows for dynamic redefinition of the default group sequence. Using the rental car scenario again, one c [...]
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:717
+#, no-c-format
+msgid "RentalCar with @GroupSequenceProvider"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:719
+#, no-c-format
+msgid ""
+      "@GroupSequenceProvider(RentalCarGroupSequenceProvider.class)\n"
+      "public class RentalCar extends Car {\n"
+      "    @AssertFalse(message = \"The car is currently rented out\", groups = RentalChecks.class)\n"
+      "    private boolean rented;\n"
+      "\n"
+      "    public RentalCar(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        super( manufacturer, licencePlate, seatCount );\n"
+      "    }\n"
+      "\n"
+      "    public boolean isRented() {\n"
+      "        return rented;\n"
+      "    }\n"
+      "\n"
+      "    public void setRented(boolean rented) {\n"
+      "        this.rented = rented;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:723
+#, no-c-format
+msgid "DefaultGroupSequenceProvider implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:725
+#, no-c-format
+msgid ""
+      "public class RentalCarGroupSequenceProvider implements DefaultGroupSequenceProvider<RentalCar> {\n"
+      "    public List<Class<?>> getValidationGroups(RentalCar car) {\n"
+      "        List<Class<?>> defaultGroupSequence = new ArrayList<Class<?>>();\n"
+      "        defaultGroupSequence.add( RentalCar.class );\n"
+      "\n"
+      "        if ( car != null && !car.isRented() ) {\n"
+      "            defaultGroupSequence.add( CarChecks.class );\n"
+      "        }\n"
+      "\n"
+      "        return defaultGroupSequence;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:732
+#, no-c-format
+msgid "Built-in constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:734
+#, no-c-format
+msgid "Hibernate Validator comprises a basic set of commonly used constraints. These are foremost the constraints defined by the Bean Validation specification (see <xref linkend=\"table-spec-constraints\"/>). Additionally, Hibernate Validator provides useful custom constraints (see <xref linkend=\"table-custom-constraints\"/> and <xref linkend=\"table-custom-country-constraints\"/>)."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:742 usingvalidator.xml:761
+#, no-c-format
+msgid "Bean Validation constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:744
+#, no-c-format
+msgid "shows purpose and supported data types of all constraints specified in the Bean Validation API. All these constraints apply to the field/property level, there are no class-level constraints defined in the Bean Validation specification. If you are using the Hibernate object-relational mapper, some of the constraints are taken into account when creating the DDL for your model (see column \"Hibernate metadata impact\")."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:753
+#, no-c-format
+msgid "Hibernate Validator allows some constraints to be applied to more data types than required by the Bean Validation specification (e.g. @Max can be applied to <classname>Strings</classname>). Relying on this feature can impact portability of your application between Bean Validation providers."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:774 usingvalidator.xml:1034 usingvalidator.xml:1232
+#, no-c-format
+msgid "Annotation"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:776 usingvalidator.xml:1036 usingvalidator.xml:1234
+#, no-c-format
+msgid "Supported data types"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:778 usingvalidator.xml:1038 usingvalidator.xml:1236
+#, no-c-format
+msgid "<entry>Use</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:780 usingvalidator.xml:1040 usingvalidator.xml:1240
+#, no-c-format
+msgid "Hibernate metadata impact"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:786
+#, no-c-format
+msgid "@AssertFalse"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:788 usingvalidator.xml:800
+#, no-c-format
+msgid "<classname>Boolean</classname>, <classname>boolean</classname>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:791
+#, no-c-format
+msgid "Checks that the annotated element is <constant>false</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:794 usingvalidator.xml:806 usingvalidator.xml:826 usingvalidator.xml:846 usingvalidator.xml:882 usingvalidator.xml:940 usingvalidator.xml:956 usingvalidator.xml:969 usingvalidator.xml:996 usingvalidator.xml:1056 usingvalidator.xml:1070 usingvalidator.xml:1107 usingvalidator.xml:1120 usingvalidator.xml:1133 usingvalidator.xml:1149 usingvalidator.xml:1166 usingvalidator.xml:1183 usingvalidator.xml:1201 usingvalidator.xml:1256 usingvalidator.xml:1270 usingvalidator.xml:1285
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:798
+#, no-c-format
+msgid "@AssertTrue"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:803
+#, no-c-format
+msgid "Checks that the annotated element is <constant>true</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:810
+#, no-c-format
+msgid "@DecimalMax"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:812 usingvalidator.xml:852
+#, no-c-format
+msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>String</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>Number</classname> and <classname>CharSequence</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:821
+#, no-c-format
+msgid "The annotated element must be a number whose value must be lower or equal to the specified maximum. The parameter value is the string representation of the max value according to the <classname>BigDecimal</classname> string representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:830
+#, no-c-format
+msgid "@DecimalMin"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:832
+#, no-c-format
+msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>String</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>Number </classname>and <classname>CharSequence</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:841
+#, no-c-format
+msgid "The annotated element must be a number whose value must be higher or equal to the specified minimum. The parameter value is the string representation of the min value according to the <classname>BigDecimal</classname> string representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:850
+#, no-c-format
+msgid "@Digits(integer=, fraction=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:861
+#, no-c-format
+msgid "Checks whether the annoted value is a number having up to <literal>integer</literal> digits and <literal>fraction</literal> fractional digits."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:865
+#, no-c-format
+msgid "Define column precision and scale."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:869
+#, no-c-format
+msgid "@Future"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:871 usingvalidator.xml:946
+#, no-c-format
+msgid "<classname>java.util.Date</classname>, <classname>java.util.Calendar</classname>; Additionally supported by HV, if the <ulink url=\"http://joda-time.sourceforge.net/\">Joda Time</ulink> date/time API is on the class path: any implementations of <classname>ReadablePartial</classname> and <classname>ReadableInstant</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:879
+#, no-c-format
+msgid "Checks whether the annotated date is in the future."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:886
+#, no-c-format
+msgid "@Max"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:888
+#, no-c-format
+msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of<classname>CharSequence</classname> (the numeric value represented by the character sequence is evaluated), any sub-type of <classname>Number</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:897
+#, no-c-format
+msgid "Checks whether the annotated value is less than or equal to the specified maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:900 usingvalidator.xml:918
+#, no-c-format
+msgid "Add a check constraint on the column."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:904
+#, no-c-format
+msgid "@Min"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:906
+#, no-c-format
+msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>CharSequence</classname> (the numeric value represented by the char sequence is evaluated), any sub-type of <classname>Number</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:915
+#, no-c-format
+msgid "Checks whether the annotated value is higher than or equal to the specified minimum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:922
+#, no-c-format
+msgid "@NotNull"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:924 usingvalidator.xml:935 usingvalidator.xml:1172
+#, no-c-format
+msgid "Any type"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:926
+#, no-c-format
+msgid "Checks that the annotated value is not <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:929
+#, no-c-format
+msgid "Column(s) are not null."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:933
+#, no-c-format
+msgid "@Null"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:937
+#, no-c-format
+msgid "Checks that the annotated value is <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:944
+#, no-c-format
+msgid "@Past"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:954
+#, no-c-format
+msgid "Checks whether the annotated date is in the past."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:960
+#, no-c-format
+msgid "@Pattern(regex=, flag=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:962
+#, no-c-format
+msgid "<classname>String</classname>. Additionally supported by HV: any sub-type of <classname>CharSequence</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:965
+#, no-c-format
+msgid "Checks if the annotated string matches the regular expression <parameter>regex</parameter> considering the given flag <parameter>match</parameter>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:973
+#, no-c-format
+msgid "@Size(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:975
+#, no-c-format
+msgid "<classname>String</classname>, <classname>Collection</classname>, <classname>Map</classname> and <classname>arrays</classname>. Additionally supported by HV: any sub-type of <classname>CharSequence</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:980
+#, no-c-format
+msgid "Checks if the annotated element's size is between min and max (inclusive)."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:983 usingvalidator.xml:1082
+#, no-c-format
+msgid "Column length will be set to max."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:987
+#, no-c-format
+msgid "@Valid"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:989
+#, no-c-format
+msgid "Any non-primitive type"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:991
+#, no-c-format
+msgid "Performs validation recursively on the associated object. If the object is a collection or an array, the elements are validated recursively. If the object is a map, the value elements are validated recursively."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1003
+#, no-c-format
+msgid "On top of the parameters indicated in <xref linkend=\"table-spec-constraints\"/> each constraint supports the parameters <parameter>message</parameter>, <parameter>groups</parameter> and <parameter>payload</parameter>. This is a requirement of the Bean Validation specification."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1012
+#, no-c-format
+msgid "Additional constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1014
+#, no-c-format
+msgid "In addition to the constraints defined by the Bean Validation API Hibernate Validator provides several useful custom constraints which are listed in <xref linkend=\"table-custom-constraints\"/>. With one exception also these constraints apply to the field/property level, only @ScriptAssert is a class-level constraint."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1021
+#, no-c-format
+msgid "Custom constraints"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1046
+#, no-c-format
+msgid "@CreditCardNumber"
+msgstr ""
+
+#. Tag: classname
+#: usingvalidator.xml:1048 usingvalidator.xml:1062 usingvalidator.xml:1076 usingvalidator.xml:1089 usingvalidator.xml:1113 usingvalidator.xml:1155 usingvalidator.xml:1189 usingvalidator.xml:1248 usingvalidator.xml:1262 usingvalidator.xml:1276
+#, no-c-format
+msgid "CharSequence"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1050
+#, no-c-format
+msgid "Checks that the annotated character sequence passes the Luhn checksum test. Note, this validation aims to check for user mistakes, not credit card validity! See also <ulink url=\"http://www.merriampark.com/anatomycc.htm\">Anatomy of Credit Card Numbers</ulink>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1060
+#, no-c-format
+msgid "@Email"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1064
+#, no-c-format
+msgid "Checks whether the specified character sequence is a valid email address. The optional parameters <parameter>regexp</parameter> and <parameter>flags</parameter> allow to specify an additional regular expression (including regular expression flags) which the email must match."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1074
+#, no-c-format
+msgid "@Length(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1078
+#, no-c-format
+msgid "Validates that the annotated character sequence is between <parameter>min</parameter> and <parameter>max</parameter> included."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1086
+#, no-c-format
+msgid "@ModCheck(modType=, multiplier=, startIndex=, endIndex=, checkDigitPosition=, ignoreNonDigitCharacters=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1091
+#, no-c-format
+msgid "Checks that the digits within the annotated character sequence pass the mod 10 or mod 11 checksum algorithm. <constant>modType</constant> is used to select the modulo type and the <constant>multiplier</constant> determines the algorithm specific multiplier (see also <ulink url=\"http://en.wikipedia.org/wiki/Luhn_algorithm\">Luhn algorithm</ulink>). <constant>startIndex</constant> and <constant>endIndex</constant> allow to only run the modulo algorithm on the specified sub-string.  [...]
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1111
+#, no-c-format
+msgid "@NotBlank"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1115
+#, no-c-format
+msgid "Checks that the annotated character sequence is not null and the trimmed length is greater than 0. The difference to @NotEmpty is that this constraint can only be applied on strings and that trailing whitespaces are ignored."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1124
+#, no-c-format
+msgid "@NotEmpty"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1126
+#, no-c-format
+msgid "<classname>CharSequence</classname>, <classname>Collection</classname>, <classname>Map</classname> and arrays"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1130
+#, no-c-format
+msgid "Checks whether the annotated element is not <constant>null</constant> nor empty."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1137
+#, no-c-format
+msgid "@Range(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1139
+#, no-c-format
+msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>CharSequence</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1146
+#, no-c-format
+msgid "Checks whether the annotated value lies between (inclusive) the specified minimum and maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1153
+#, no-c-format
+msgid "@SafeHtml(whitelistType=, additionalTags=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1157
+#, no-c-format
+msgid "Checks whether the annotated value contains potentially malicious fragments such as <code><script/></code>. In order to use this constraint, the <ulink url=\"http://jsoup.org/\">jsoup</ulink> library must be part of the class path. With the <parameter>whitelistType</parameter> attribute predefined whitelist types can be chosen. You can also specify additional html tags for the whitelist with the <parameter>additionalTags</parameter> attribute."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1170
+#, no-c-format
+msgid "@ScriptAssert(lang=, script=, alias=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1174
+#, no-c-format
+msgid "Checks whether the given script can successfully be evaluated against the annotated element. In order to use this constraint, an implementation of the Java Scripting API as defined by JSR 223 (\"Scripting for the Java<superscript>TM</superscript> Platform\") must part of the class path. The expressions to be evaluated can be written in any scripting or expression language, for which a JSR 223 compatible engine can be found in the class path."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1187
+#, no-c-format
+msgid "@URL(protocol=, host=, port=, regexp=, flags=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1191
+#, no-c-format
+msgid "Checks if the annotated character sequence is a valid URL according to RFC2396. If any of the optional parameters <parameter>protocol</parameter>, <parameter>host</parameter> or <parameter>port</parameter> are specified, the corresponding URL fragments must match the specified values. The optional parameters <parameter>regexp</parameter> and <parameter>flags</parameter> allow to specify an additional regular expression (including regular expression flags) which the URL must match."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1208
+#, no-c-format
+msgid "Country specific constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1210
+#, no-c-format
+msgid "Hibernate Validator offers also some country specific constraints, e.g. for the validation of social security numbers."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1212
+#, no-c-format
+msgid "If you have to implement a country specific constraint, consider making it a contribution to Hibernate Validator!"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1217
+#, no-c-format
+msgid "Custom country specific constraints"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1238
+#, no-c-format
+msgid "Country"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1246
+#, no-c-format
+msgid "@CNPJ"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1250
+#, no-c-format
+msgid "Checks that the annotated character sequence represents a Brazilian corporate tax payer registry number (Cadastro de Pessoa Juríeddica)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1254 usingvalidator.xml:1268 usingvalidator.xml:1283
+#, no-c-format
+msgid "Brazil"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1260
+#, no-c-format
+msgid "@CPF"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1264
+#, no-c-format
+msgid "Checks that the annotated character sequence represents a Brazilian individual taxpayer registry number (Cadastro de Pessoa Fídsica)."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1274
+#, no-c-format
+msgid "@TituloEleitoral"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1278
+#, no-c-format
+msgid "Checks that the annotated character sequence represents a Brazilian voter ID card number (<ulink url=\"http://ghiorzi.org/cgcancpf.htm\">Título Eleitoral</ulink>)."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1292
+#, no-c-format
+msgid "In some cases neither the Bean Validation constraints nor the custom constraints provided by Hibernate Validator will fulfill your requirements. In this case you can easily write your own constraint. We will discuss this in <xref linkend=\"validator-customconstraints\"/>."
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/pot/modules/xmlconfiguration.pot b/project/documentation/src/main/docbook/pot/modules/xmlconfiguration.pot
new file mode 100644
index 0000000..0ad0c9d
--- /dev/null
+++ b/project/documentation/src/main/docbook/pot/modules/xmlconfiguration.pot
@@ -0,0 +1,190 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xmlconfiguration.xml:24
+#, no-c-format
+msgid "XML configuration"
+msgstr ""
+
+#. Tag: filename
+#: xmlconfiguration.xml:27
+#, no-c-format
+msgid "<filename>validation.xml</filename>"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:29
+#, no-c-format
+msgid "The key to enable XML configuration for Hibernate Validator is the file <filename>validation.xml</filename>. If this file exists in the classpath its configuration will be applied when the <classname>ValidationFactory</classname> gets created. <xref linkend=\"image-validation-configuration\"/> shows a model view of the xsd <filename>valiation.xml</filename> has to adhere to."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:36
+#, no-c-format
+msgid "validation-configuration-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:51
+#, no-c-format
+msgid "shows the several configuration options of <filename>validation.xml</filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:55
+#, no-c-format
+msgid "<title>validation.xml</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:57
+#, no-c-format
+msgid ""
+      "<validation-config xmlns=\"http://jboss.org/xml/ns/javax/validation/configuration\"\n"
+      " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+      " xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/configuration\">\n"
+      "    <default-provider>org.hibernate.validator.HibernateValidator</default-provider>\n"
+      "    <message-interpolator>org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator</message-interpolator>\n"
+      "    <traversable-resolver>org.hibernate.validator.engine.resolver.DefaultTraversableResolver</traversable-resolver>\n"
+      "    <constraint-validator-factory>org.hibernate.validator.engine.ConstraintValidatorFactoryImpl</constraint-validator-factory>\n"
+      "    <constraint-mapping>/constraints-car.xml</constraint-mapping>\n"
+      "    <property name=\"prop1\">value1</property>\n"
+      "    <property name=\"prop2\">value2</property>\n"
+      "</validation-config>"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:61
+#, no-c-format
+msgid "There can only be one <filename>validation.xml</filename> in the classpath. If more than one is found an exception is thrown."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:65
+#, no-c-format
+msgid "All settings shown in the <filename>validation.xml</filename> are optional and in the case of <xref linkend=\"example-validation-xml\"/> show the defaults used within Hibernate Validator. The node <property>default-provider</property> allows to choose the Bean Validation provider. This is useful if there is more than one provider in the classpath. <property>message-interpolator</property>, <property>traversable-resolver</property> and <property>constraint-validator-factory</proper [...]
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:83
+#, no-c-format
+msgid "Via the <property>constraint-mapping</property> you can list an arbitrary number of additional XML files containing the actual constraint configuration. See <xref linkend=\"section-mapping-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:87
+#, no-c-format
+msgid "Last but not least, you can specify provider specific properties via the <property>property</property> nodes."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:92
+#, no-c-format
+msgid "Mapping constraints"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:94
+#, no-c-format
+msgid "Expressing constraints in XML is possible via files adhering to the xsd seen in <xref linkend=\"image-mapping-configuration\"/>. Note that these mapping files are only processed if listed via <property>constraint-mapping</property> in your <filename>validation.xml</filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:101
+#, no-c-format
+msgid "validation-mapping-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:116
+#, no-c-format
+msgid "shows how our classes Car and RentalCar from <xref linkend=\"example-car\"/> resp. <xref linkend=\"example-rental-car\"/> could be mapped in XML."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:121
+#, no-c-format
+msgid "constraints-car.xml"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:123
+#, no-c-format
+msgid ""
+      "<constraint-mappings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+      "                     xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd\"\n"
+      "                     xmlns=\"http://jboss.org/xml/ns/javax/validation/mapping\">\n"
+      "    <default-package>org.hibernate.validator.quickstart</default-package>\n"
+      "    <bean class=\"Car\" ignore-annotations=\"true\">\n"
+      "        <field name=\"manufacturer\">\n"
+      "            <constraint annotation=\"javax.validation.constraints.NotNull\"/>\n"
+      "        </field>\n"
+      "        <field name=\"licensePlate\">\n"
+      "            <constraint annotation=\"javax.validation.constraints.NotNull\"/>\n"
+      "        </field>\n"
+      "        <field name=\"seatCount\">\n"
+      "            <constraint annotation=\"javax.validation.constraints.Min\">\n"
+      "                <element name=\"value\">2</element>\n"
+      "            </constraint>\n"
+      "        </field>\n"
+      "        <field name=\"driver\">\n"
+      "            <valid/>\n"
+      "        </field>\n"
+      "        <getter name=\"passedVehicleInspection\" ignore-annotations=\"true\">\n"
+      "            <constraint annotation=\"javax.validation.constraints.AssertTrue\">\n"
+      "                <message>The car has to pass the vehicle inspection first</message>\n"
+      "                <groups>\n"
+      "                    <value>CarChecks</value>\n"
+      "                </groups>\n"
+      "                <element name=\"max\">10</element>\n"
+      "            </constraint>\n"
+      "        </getter>\n"
+      "    </bean>\n"
+      "    <bean class=\"RentalCar\" ignore-annotations=\"true\">\n"
+      "        <class ignore-annotations=\"true\">\n"
+      "            <group-sequence>\n"
+      "                <value>RentalCar</value>\n"
+      "                <value>CarChecks</value>\n"
+      "            </group-sequence>\n"
+      "        </class>\n"
+      "    </bean>\n"
+      "    <constraint-definition annotation=\"org.mycompany.CheckCase\">\n"
+      "        <validated-by include-existing-validators=\"false\">\n"
+      "            <value>org.mycompany.CheckCaseValidator</value>\n"
+      "        </validated-by>\n"
+      "    </constraint-definition>\n"
+      "</constraint-mappings>"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:126
+#, no-c-format
+msgid "The XML configuration is closely mirroring the programmatic API. For this reason it should suffice to just add some comments. <property>default-package</property> is used for all fields where a classname is expected. If the specified class is not fully qualified the configured default package will be used. Every mapping file can then have several <property>bean</property> nodes, each describing the constraints on the entity with the specified class name.<warning> <para>A given ent [...]
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:154
+#, no-c-format
+msgid "The class node also allows to reconfigure the default group sequence (see <xref linkend=\"section-default-group-class\"/>) via the <property>group-sequence</property> node."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:158
+#, no-c-format
+msgid "Last but not least, the list of <classname>ConstraintValidator</classname>s associated to a given constraint can be altered via the <property>constraint-definition</property> node. The <property>annotation</property> attribute represents the constraint annotation being altered. The <property>validated-by</property> elements represent the (ordered) list of <classname>ConstraintValidator</classname> implementations associated to the constraint. If <property>include-existing-validato [...]
+msgstr ""
+
diff --git a/project/documentation/src/main/docbook/zh-CN/master.po b/project/documentation/src/main/docbook/zh-CN/master.po
new file mode 100644
index 0000000..9f32bef
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/master.po
@@ -0,0 +1,65 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-02-11 14:56+0000\n"
+"PO-Revision-Date: 2010-08-14 14:38+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:25
+#, no-c-format
+msgid "Hibernate Validator"
+msgstr "Hibernate Validator"
+
+#. Tag: subtitle
+#: master.xml:26
+#, no-c-format
+msgid "JSR 303 Reference Implementation"
+msgstr "JSR 303 的参考实现"
+
+#. Tag: subtitle
+#: master.xml:27
+#, no-c-format
+msgid "Reference Guide"
+msgstr "使用指南"
+
+#. Tag: releaseinfo
+#: master.xml:28
+#, no-c-format
+msgid "&version;"
+msgstr ""
+
+#. Tag: holder
+#: master.xml:33
+#, no-c-format
+msgid "©rightHolder;"
+msgstr "©rightHolder;"
+
+#. Tag: author
+#: master.xml:36
+#, no-c-format
+msgid "<firstname>Hardy</firstname> <surname>Ferentschik</surname>"
+msgstr "<firstname>Hardy</firstname> <surname>Ferentschik</surname>"
+
+#. Tag: author
+#: master.xml:40
+#, no-c-format
+msgid "<firstname>Gunnar</firstname> <surname>Morling</surname>"
+msgstr "<firstname>Gunnar</firstname> <surname>Morling</surname>"
+
+#. Tag: othercredit
+#: master.xml:44
+#, fuzzy, no-c-format
+msgid ""
+"<firstname>Shaozhuang</firstname> <surname>Liu</surname> "
+"<email>stliu at hibernate.org</email>"
+msgstr "<firstname>Gunnar</firstname> <surname>Morling</surname>"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/annotationprocessor.po b/project/documentation/src/main/docbook/zh-CN/modules/annotationprocessor.po
new file mode 100644
index 0000000..60a5442
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/annotationprocessor.po
@@ -0,0 +1,841 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: 2010-08-24 00:50+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: annotationprocessor.xml:24
+#, fuzzy, no-c-format
+msgid "Annotation Processor"
+msgstr "使用标注处理器"
+
+#. Tag: para
+#: annotationprocessor.xml:26
+#, no-c-format
+msgid "Have you ever caught yourself by unintentionally doing things like"
+msgstr "你碰到过下面这些让人抓狂的情况么:"
+
+#. Tag: para
+#: annotationprocessor.xml:31
+#, no-c-format
+msgid ""
+"specifying constraint annotations at unsupported data types (e.g. by "
+"annotating a String with @Past)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:36
+#, no-c-format
+msgid ""
+"annotating the setter of a JavaBean property (instead of the getter method)"
+msgstr "对一个JavaBean的setter方法进行标注(而不是getter)"
+
+#. Tag: para
+#: annotationprocessor.xml:41
+#, no-c-format
+msgid ""
+"annotating static fields/methods with constraint annotations (which is not "
+"supported)?"
+msgstr "对一个静态的变量或者方法进行约束条件标注(这样是不支持滴)"
+
+#. Tag: para
+#: annotationprocessor.xml:46
+#, no-c-format
+msgid ""
+"Then the Hibernate Validator Annotation Processor is the right thing for "
+"you. It helps preventing such mistakes by plugging into the build process "
+"and raising compilation errors whenever constraint annotations are "
+"incorrectly used."
+msgstr ""
+"这样的话, 你就应该看看Hibernate Validator 的约束处理器了. 它会被插入到编译过"
+"程中, 然后如果发现如果哪个约束标注用错了的话, 则汇报编译错误."
+
+#. Tag: para
+#: annotationprocessor.xml:52
+#, no-c-format
+msgid ""
+"You can find the Hibernate Validator Annotation Processor as part of the "
+"distribution bundle on <ulink url=\"http://sourceforge.net/projects/"
+"hibernate/files/hibernate-validator\">Sourceforge</ulink> or in the JBoss "
+"Maven Repository (see <xref linkend=\"example-jboss-maven-url\"/>) under the "
+"GAV org.hibernate:hibernate-validator-annotation-processor."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:61
+#, no-c-format
+msgid "Prerequisites"
+msgstr "前提条件"
+
+#. Tag: para
+#: annotationprocessor.xml:63
+#, fuzzy, no-c-format
+msgid ""
+"The Hibernate Validator Annotation Processor is based on the \"Pluggable "
+"Annotation Processing API\" as defined by <ulink url=\"http://jcp.org/en/jsr/"
+"detail?id=269\">JSR 269</ulink> which is part of the Java Platform since "
+"Java 6."
+msgstr ""
+"Hibernate Validator的标注处理器是基于<ulink url=\"http://jcp.org/en/jsr/"
+"detail?id=269\">JSR 269</ulink>所定义的\"可插入式标注处理API\"的. 这个API从"
+"Java 6开始已经是Java 平台的一部分了, 所以请确保使用这个或者以后的版本."
+
+#. Tag: title
+#: annotationprocessor.xml:70
+#, no-c-format
+msgid "Features"
+msgstr "特性"
+
+#. Tag: para
+#: annotationprocessor.xml:72
+#, fuzzy, no-c-format
+msgid ""
+"As of Hibernate Validator &version; the Hibernate Validator Annotation "
+"Processor checks that:"
+msgstr "Hibernate Validator 4.1中的标注处理器可以检查:"
+
+#. Tag: para
+#: annotationprocessor.xml:77
+#, no-c-format
+msgid ""
+"constraint annotations are allowed for the type of the annotated element"
+msgstr "应用了约束标注的属性的类型是否被该约束所支持"
+
+#. Tag: para
+#: annotationprocessor.xml:82
+#, fuzzy, no-c-format
+msgid ""
+"only non-static fields or methods are annotated with constraint annotations"
+msgstr "只有非静态字段或者方法才能够应用约束条件标注."
+
+#. Tag: para
+#: annotationprocessor.xml:87
+#, fuzzy, no-c-format
+msgid "only non-primitive fields or methods are annotated with @Valid"
+msgstr "只有非原始类型的属性或字段才能够应用@Valid标注"
+
+#. Tag: para
+#: annotationprocessor.xml:92
+#, fuzzy, no-c-format
+msgid ""
+"only such methods are annotated with constraint annotations which are valid "
+"JavaBeans getter methods (optionally, see below)"
+msgstr ""
+"only such annotation types are annotated with constraint annotations which "
+"are constraint annotations themselves"
+
+#. Tag: para
+#: annotationprocessor.xml:98
+#, no-c-format
+msgid ""
+"only such annotation types are annotated with constraint annotations which "
+"are constraint annotations themselves"
+msgstr ""
+"only such annotation types are annotated with constraint annotations which "
+"are constraint annotations themselves"
+
+#. Tag: para
+#: annotationprocessor.xml:103
+#, no-c-format
+msgid ""
+"definition of dynamic default group sequence with @GroupSequenceProvider is "
+"valid"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:110
+#, no-c-format
+msgid "Options"
+msgstr "配置项"
+
+#. Tag: para
+#: annotationprocessor.xml:112
+#, no-c-format
+msgid ""
+"The behavior of the Hibernate Validator Annotation Processor can be "
+"controlled using the <ulink url=\"http://java.sun.com/javase/6/docs/"
+"technotes/tools/windows/javac.html#options\">processor options</ulink> "
+"listed in table<xref linkend=\"table_processor_options\"/>:"
+msgstr ""
+"Hibernate Validator标注处理器的行为可以通过<xref linkend="
+"\"table_processor_options\"/>中列出的<ulink url=\"http://java.sun.com/"
+"javase/6/docs/technotes/tools/windows/javac.html#options\">处理器配置项</"
+"ulink>加以控制."
+
+#. Tag: title
+#: annotationprocessor.xml:119
+#, no-c-format
+msgid "Hibernate Validator Annotation Processor options"
+msgstr "Hibernate Validator 标注处理器配置项"
+
+#. Tag: entry
+#: annotationprocessor.xml:124
+#, no-c-format
+msgid "Option"
+msgstr "配置项"
+
+#. Tag: entry
+#: annotationprocessor.xml:126
+#, no-c-format
+msgid "Explanation"
+msgstr "功能"
+
+#. Tag: varname
+#: annotationprocessor.xml:132
+#, no-c-format
+msgid "diagnosticKind"
+msgstr "diagnosticKind"
+
+#. Tag: entry
+#: annotationprocessor.xml:134
+#, no-c-format
+msgid ""
+"Controls how constraint problems are reported. Must be the string "
+"representation of one of the values from the enum <classname>javax.tools."
+"Diagnostic.Kind</classname>, e.g. <classname>WARNING</classname>. A value of "
+"<classname>ERROR</classname> will cause compilation to halt whenever the AP "
+"detects a constraint problem. Defaults to <classname>ERROR</classname>."
+msgstr ""
+"控制编译错误级别. 必须是枚举类型<classname>javax.tools.Diagnostic.Kind</"
+"classname>中的值(字符串形式), 例如<classname>WARNING</classname>. 如果是"
+"<classname>ERROR</classname>的话, 那么如果API检测到约束信息应用的错误的话, 会"
+"让编译过程终止, 默认是<classname>ERROR</classname>."
+
+#. Tag: varname
+#: annotationprocessor.xml:144
+#, no-c-format
+msgid "methodConstraintsSupported"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:146
+#, no-c-format
+msgid ""
+"Controls whether constraints are allowed at methods of any kind. Must be set "
+"to <varname>true</varname> when working with method level constraints as "
+"supported by Hibernate Validator. Can be set to <varname>false</varname> to "
+"allow constraints only at JavaBeans getter methods as defined by the Bean "
+"Validation API. Defaults to <varname>true</varname>."
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:155
+#, no-c-format
+msgid "verbose"
+msgstr "verbose"
+
+#. Tag: entry
+#: annotationprocessor.xml:157
+#, fuzzy, no-c-format
+msgid ""
+"Controls whether detailed processing information shall be displayed or not, "
+"useful for debugging purposes. Must be either <varname>true</varname> or "
+"<varname>false</varname>. Defaults to <varname>false</varname>."
+msgstr ""
+"控制是否显示详细的处理信息, 对debug有帮助. 它的值只能是<varname>true</"
+"varname>或<varname>false</varname>, 默认是<varname>false</varname>."
+
+#. Tag: title
+#: annotationprocessor.xml:168
+#, no-c-format
+msgid "Using the Annotation Processor"
+msgstr "使用标注处理器"
+
+#. Tag: para
+#: annotationprocessor.xml:170
+#, no-c-format
+msgid ""
+"This section shows in detail how to integrate the Hibernate Validator "
+"Annotation Processor into command line builds (javac, Ant, Maven) as well as "
+"IDE-based builds (Eclipse, IntelliJ IDEA, NetBeans)."
+msgstr ""
+"本小节详细介绍了如何把Hibernate Validator标注处理器与命令行编译(javac, Ant, "
+"Maven)以及IDE (Eclipse, IntelliJ IDEA, NetBeans)集成."
+
+#. Tag: title
+#: annotationprocessor.xml:176
+#, no-c-format
+msgid "Command line builds"
+msgstr "命令行编译"
+
+#. Tag: title
+#: annotationprocessor.xml:179
+#, no-c-format
+msgid "javac"
+msgstr "javac"
+
+#. Tag: para
+#: annotationprocessor.xml:181
+#, fuzzy, no-c-format
+msgid ""
+"When compiling on the command line using <ulink url=\"http://java.sun.com/"
+"javase/6/docs/technotes/guides/javac/index.html\">javac</ulink>, specify the "
+"JAR hibernate-validator-annotation-processor-&version;.jar using the "
+"\"processorpath\" option as shown in the following listing. The processor "
+"will be detected automatically by the compiler and invoked during "
+"compilation."
+msgstr ""
+"当使用命令行(<ulink url=\"http://java.sun.com/javase/6/docs/technotes/guides/"
+"javac/index.html\">javac</ulink>)编译的时候, 通过\"processorpath\"属性指定下"
+"列jar:"
+
+#. Tag: title
+#: annotationprocessor.xml:189
+#, no-c-format
+msgid "Using the annotation processor with javac"
+msgstr "在javac中使用标注处理器"
+
+#. Tag: programlisting
+#: annotationprocessor.xml:191
+#, fuzzy, no-c-format
+msgid ""
+"javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
+"   -cp /path/to/validation-api-&bvVersion;.jar \\\n"
+"   -processorpath /path/to/hibernate-validator-annotation-processor-"
+"&version;.jar"
+msgstr ""
+"javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
+"   -cp /path/to/validation-api-&bvVersion;.jar \\ \n"
+"   -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-"
+"validator-annotation-processor-&version;.jar"
+
+#. Tag: title
+#: annotationprocessor.xml:196
+#, no-c-format
+msgid "Apache Ant"
+msgstr "Apache Ant"
+
+#. Tag: para
+#: annotationprocessor.xml:198
+#, no-c-format
+msgid ""
+"Similar to directly working with javac, the annotation processor can be "
+"added as as compiler argument when invoking the <ulink url=\"http://ant."
+"apache.org/manual/CoreTasks/javac.html\">javac task</ulink> for <ulink url="
+"\"http://ant.apache.org/\">Apache Ant</ulink>:"
+msgstr ""
+"和直接使用javac差不多, 可以在<ulink url=\"http://ant.apache.org/\">Apache "
+"Ant</ulink>的<ulink url=\"http://ant.apache.org/manual/CoreTasks/javac.html"
+"\">javac task</ulink>中添加上面例子中的参数:"
+
+#. Tag: title
+#: annotationprocessor.xml:205
+#, no-c-format
+msgid "Using the annotation processor with Ant"
+msgstr "在Ant中使用标注处理器"
+
+#. Tag: programlisting
+#: annotationprocessor.xml:207
+#, fuzzy, no-c-format
+msgid ""
+"<javac srcdir=\"src/main\"\n"
+"       destdir=\"build/classes\"\n"
+"       classpath=\"/path/to/validation-api-&bvVersion;.jar\">\n"
+"       <compilerarg value=\"-processorpath\" />\n"
+"       <compilerarg value=\"/path/to/hibernate-validator-annotation-"
+"processor-&version;.jar\"/>\n"
+"</javac>"
+msgstr ""
+"<javac srcdir=\"src/main\"\n"
+"       destdir=\"build/classes\"\n"
+"       classpath=\"/path/to/validation-api-&bvVersion;.jar\">\n"
+"       <compilerarg value=\"-processorpath\" />\n"
+"       <compilerarg value=\"/path/to/validation-api-&bvVersion;.jar:/path/"
+"to/hibernate-validator-annotation-processor-&version;.jar\"/>\n"
+"</javac>"
+
+#. Tag: title
+#: annotationprocessor.xml:212
+#, no-c-format
+msgid "Maven"
+msgstr "Maven"
+
+#. Tag: para
+#: annotationprocessor.xml:214
+#, no-c-format
+msgid ""
+"There are several options for integrating the annotation processor with "
+"<ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>. Generally it "
+"is sufficient to add the Hibernate Validator Annotation Processor as "
+"dependency to your project:"
+msgstr ""
+"对于和<ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>集成来说我"
+"们有很多选择, 通常, 我们可以把Hibenrate Validator标注处理器作为依赖添加到你的"
+"项目当中:"
+
+#. Tag: title
+#: annotationprocessor.xml:220
+#, no-c-format
+msgid "Adding the HV Annotation Processor as dependency"
+msgstr "添加HV 标注处理器为依赖"
+
+#. Tag: programlisting
+#: annotationprocessor.xml:222
+#, no-c-format
+msgid ""
+"...\n"
+"<dependency>\n"
+"    <groupId>org.hibernate</groupId>\n"
+"    <artifactId>hibernate-validator-annotation-processor</"
+"artifactId>\n"
+"    <version>&version;</version>\n"
+"    <scope>compile</scope>\n"
+"</dependency>\n"
+"..."
+msgstr ""
+"...\n"
+"<dependency>\n"
+"    <groupId>org.hibernate</groupId>\n"
+"    <artifactId>hibernate-validator-annotation-processor</"
+"artifactId>\n"
+"    <version>&version;</version>\n"
+"    <scope>compile</scope>\n"
+"</dependency>\n"
+"..."
+
+#. Tag: para
+#: annotationprocessor.xml:225
+#, no-c-format
+msgid ""
+"The processor will then be executed automatically by the compiler. This "
+"basically works, but comes with the disadavantage that in some cases "
+"messages from the annotation processor are not displayed (see <ulink url="
+"\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
+msgstr ""
+"这样, 这个处理器就能够自动的被编译器所调用. 虽然基本上能工作,但是还是有一些缺"
+"点, 在某些情况下, 标注处理器的输出信息可能不能够被显示出来. (请参考<ulink "
+"url=\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
+
+#. Tag: para
+#: annotationprocessor.xml:231
+#, no-c-format
+msgid ""
+"Another option is using the <ulink url=\"http://code.google.com/p/maven-"
+"annotation-plugin/\">Maven Annotation Plugin</ulink>. At the time of this "
+"writing the plugin is not yet available in any of the well-known "
+"repositories. Therefore you have to add the project's own repository to your "
+"settings.xml or pom.xml:"
+msgstr ""
+"另外的一个选择是使用<ulink url=\"http://code.google.com/p/maven-annotation-"
+"plugin/\">Maven Annotation Plugin</ulink>. 不过在此文档撰写的时候, 这个插件还"
+"没有被上传到任何一个广泛被使用的仓库中. 所以, 你需要自己把这个插件自己的仓库"
+"添加到你的settings.xml 或 pom.xml中:"
+
+#. Tag: title
+#: annotationprocessor.xml:239
+#, no-c-format
+msgid "Adding the Maven Annotation Plugin repository"
+msgstr "添加Maven Annotation Plugin的仓库"
+
+#. Tag: programlisting
+#: annotationprocessor.xml:241
+#, no-c-format
+msgid ""
+"...\n"
+"<pluginRepositories>\n"
+"    <pluginRepository>\n"
+"        <id>maven-annotation-plugin-repo</id>\n"
+"        <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/"
+"mavenrepo</url>\n"
+"    </pluginRepository>\n"
+"</pluginRepositories>\n"
+"..."
+msgstr ""
+"...\n"
+"<pluginRepositories>\n"
+"    <pluginRepository>\n"
+"        <id>maven-annotation-plugin-repo</id>\n"
+"        <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/"
+"mavenrepo</url>\n"
+"    </pluginRepository>\n"
+"</pluginRepositories>\n"
+"..."
+
+#. Tag: para
+#: annotationprocessor.xml:244
+#, no-c-format
+msgid ""
+"Now disable the standard annotation processing performed by the compiler "
+"plugin and configure the annotation plugin by specifying an execution and "
+"adding the Hibernate Validator Annotation Processor as plugin dependency "
+"(that way the AP is not visible on the project's actual classpath):"
+msgstr ""
+"现在, 禁用compiler插件所调用的标准的标注处理过程, 然后再通过定义一个execution"
+"来配置annotation plugin的运行, 还需要把Hibernate Validator标注处理器作为该插"
+"件的依赖添加进去(这样, 此标注处理器就不会被当成你的项目的依赖而出现在类路径中"
+"了):"
+
+#. Tag: title
+#: annotationprocessor.xml:251
+#, no-c-format
+msgid "Configuring the Maven Annotation Plugin"
+msgstr "配置Maven Annotation Plugin"
+
+#. Tag: programlisting
+#: annotationprocessor.xml:253
+#, no-c-format
+msgid ""
+"...\n"
+"<plugin>\n"
+"    <artifactId>maven-compiler-plugin</artifactId>\n"
+"    <configuration>\n"
+"        <source>1.6</source>\n"
+"        <target>1.6</target>\n"
+"        <compilerArgument>-proc:none</compilerArgument>\n"
+"    </configuration>\n"
+"</plugin>\n"
+"<plugin>\n"
+"    <groupId>org.bsc.maven</groupId>\n"
+"    <artifactId>maven-processor-plugin</artifactId>\n"
+"    <version>1.3.4</version>\n"
+"    <executions>\n"
+"        <execution>\n"
+"            <id>process</id>\n"
+"            <goals>\n"
+"                <goal>process</goal>\n"
+"            </goals>\n"
+"            <phase>process-sources</phase>\n"
+"        </execution>\n"
+"    </executions>\n"
+"    <dependencies>\n"
+"        <dependency>\n"
+"            <groupId>org.hibernate</groupId>\n"
+"            <artifactId>hibernate-validator-annotation-processor</"
+"artifactId>\n"
+"            <version>&version;</version>\n"
+"            <scope>compile</scope>\n"
+"        </dependency>\n"
+"    </dependencies>\n"
+"</plugin>\n"
+"..."
+msgstr ""
+"...\n"
+"<plugin>\n"
+"    <artifactId>maven-compiler-plugin</artifactId>\n"
+"    <configuration>\n"
+"        <source>1.6</source>\n"
+"        <target>1.6</target>\n"
+"        <compilerArgument>-proc:none</compilerArgument>\n"
+"    </configuration>\n"
+"</plugin>\n"
+"<plugin>\n"
+"    <groupId>org.bsc.maven</groupId>\n"
+"    <artifactId>maven-processor-plugin</artifactId>\n"
+"    <version>1.3.4</version>\n"
+"    <executions>\n"
+"        <execution>\n"
+"            <id>process</id>\n"
+"            <goals>\n"
+"                <goal>process</goal>\n"
+"            </goals>\n"
+"            <phase>process-sources</phase>\n"
+"        </execution>\n"
+"    </executions>\n"
+"    <dependencies>\n"
+"        <dependency>\n"
+"            <groupId>org.hibernate</groupId>\n"
+"            <artifactId>hibernate-validator-annotation-processor</"
+"artifactId>\n"
+"            <version>&version;</version>\n"
+"            <scope>compile</scope>\n"
+"        </dependency>\n"
+"    </dependencies>\n"
+"</plugin>\n"
+"..."
+
+#. Tag: title
+#: annotationprocessor.xml:259
+#, no-c-format
+msgid "IDE builds"
+msgstr "IDE集成"
+
+#. Tag: title
+#: annotationprocessor.xml:262
+#, no-c-format
+msgid "Eclipse"
+msgstr "Eclipse"
+
+#. Tag: para
+#: annotationprocessor.xml:264
+#, no-c-format
+msgid ""
+"Do the following to use the annotation processor within the <ulink url="
+"\"http://www.eclipse.org/\">Eclipse</ulink> IDE:"
+msgstr ""
+"请参考以下步骤来在<ulink url=\"http://www.eclipse.org/\">Eclipse</ulink>中使"
+"用标注处理器:"
+
+#. Tag: para
+#: annotationprocessor.xml:269 annotationprocessor.xml:361
+#, no-c-format
+msgid "Right-click your project, choose \"Properties\""
+msgstr "右键点击你的项目, 然后选择\"属性\""
+
+#. Tag: para
+#: annotationprocessor.xml:273
+#, no-c-format
+msgid ""
+"Go to \"Java Compiler\" and make sure, that \"Compiler compliance level\" is "
+"set to \"1.6\". Otherwise the processor won't be activated"
+msgstr ""
+"在\"Java Compiler\"页面确认\"编译级别\"设置的是\"1.6\". 否则的话是无法使用标"
+"注处理器的."
+
+#. Tag: para
+#: annotationprocessor.xml:279
+#, no-c-format
+msgid ""
+"Go to \"Java Compiler - Annotation Processing\" and choose \"Enable "
+"annotation processing\""
+msgstr ""
+"到\"Java Compiler\"下面的\"Annotation Processing\" 页面, 然后选择\"启用标注处"
+"理\"(译注: 我的电脑是英文版的, 所以真的不知道中文版的eclipse上, 这些翻译成了"
+"什么:("
+
+#. Tag: para
+#: annotationprocessor.xml:284
+#, fuzzy, no-c-format
+msgid ""
+"Go to \"Java Compiler - Annotation Processing - Factory Path\" and add the "
+"JAR hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+"到\"Java Compiler - Annotation Processing - Factory Path\"页面, 然后添加下面"
+"的jar文件:"
+
+#. Tag: para
+#: annotationprocessor.xml:290
+#, no-c-format
+msgid "Confirm the workspace rebuild"
+msgstr "确认工作空间重新编译"
+
+#. Tag: para
+#: annotationprocessor.xml:294
+#, no-c-format
+msgid ""
+"You now should see any annotation problems as regular error markers within "
+"the editor and in the \"Problem\" view:"
+msgstr ""
+"现在你应该能够看到所有的标注错误都在编辑窗口中显示出了错误标记,也都显示在了"
+"\"问题\"视图:"
+
+#. Tag: title
+#: annotationprocessor.xml:306
+#, no-c-format
+msgid "IntelliJ IDEA"
+msgstr "IntelliJ IDEA"
+
+#. Tag: para
+#: annotationprocessor.xml:308
+#, no-c-format
+msgid ""
+"The following steps must be followed to use the annotation processor within "
+"<ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ IDEA</ulink> (version "
+"9 and above):"
+msgstr ""
+"请参考以下步骤来在<ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ "
+"IDEA</ulink> (9.0及以上):中使用标注处理器:"
+
+#. Tag: para
+#: annotationprocessor.xml:314
+#, no-c-format
+msgid "Go to \"File\", then \"Settings\","
+msgstr "选择 \"File\", 然后 \"Settings\","
+
+#. Tag: para
+#: annotationprocessor.xml:318
+#, no-c-format
+msgid "Expand the node \"Compiler\", then \"Annotation Processors\""
+msgstr "展开\"Compiler\"节点, 然后点击\"Annotation Processors\""
+
+#. Tag: para
+#: annotationprocessor.xml:323
+#, fuzzy, no-c-format
+msgid ""
+"Choose \"Enable annotation processing\" and enter the following as "
+"\"Processor path\": /path/to/hibernate-validator-annotation-processor-"
+"&version;.jar"
+msgstr ""
+"选中 \"Enable annotation processing\" 并且输入下面的内容作为\"Processor path"
+"\": /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-"
+"annotation-processor-&version;.jar"
+
+#. Tag: para
+#: annotationprocessor.xml:329
+#, no-c-format
+msgid ""
+"Add the processor's fully qualified name <classname>org.hibernate.validator."
+"ap.ConstraintValidationProcessor</classname> to the \"Annotation Processors"
+"\" list"
+msgstr ""
+"添加处理器的全路径名称<classname>org.hibernate.validator.ap."
+"ConstraintValidationProcessor</classname>到\"Annotation Processors\"列表"
+
+#. Tag: para
+#: annotationprocessor.xml:335
+#, no-c-format
+msgid "If applicable add you module to the \"Processed Modules\" list"
+msgstr "如果需要的话, 添加你的模块到\"Processed Modules\"列表"
+
+#. Tag: para
+#: annotationprocessor.xml:340
+#, no-c-format
+msgid ""
+"Rebuilding your project then should show any erronous constraint annotations:"
+msgstr "重新编译你的项目, 然后应该能看到关于约束标注的错误信息了:"
+
+#. Tag: title
+#: annotationprocessor.xml:352
+#, no-c-format
+msgid "NetBeans"
+msgstr "NetBeans"
+
+#. Tag: para
+#: annotationprocessor.xml:354
+#, no-c-format
+msgid ""
+"Starting with version 6.9, also the <ulink url=\"http://www.netbeans.org/"
+"\">NetBeans</ulink> IDE supports using annotation processors within the IDE "
+"build. To do so, do the following:"
+msgstr ""
+"从6.9这个版本开始, <ulink url=\"http://www.netbeans.org/\">NetBeans</ulink>也"
+"支持标注处理了. 可以通过下面的步骤来启用它:"
+
+#. Tag: para
+#: annotationprocessor.xml:365
+#, fuzzy, no-c-format
+msgid ""
+"Go to \"Libraries\", tab \"Processor\", and add the JAR hibernate-validator-"
+"annotation-processor-&version;.jar"
+msgstr "hibernate-validator-annotation-processor-&version;.jar"
+
+#. Tag: para
+#: annotationprocessor.xml:370
+#, no-c-format
+msgid ""
+"Go to \"Build - Compiling\", select \"Enable Annotation Processing\" and "
+"\"Enable Annotation Processing in Editor\". Add the annotation processor by "
+"specifying its fully qualified name <classname>org.hibernate.validator.ap."
+"ConstraintValidationProcessor</classname>"
+msgstr ""
+"到\"Build - Compiling\"页面选中\"Enable Annotation Processing\" 和 \"Enable "
+"Annotation Processing in Editor\", 并且指定标注处理器的全路径名称"
+"<classname>org.hibernate.validator.ap.ConstraintValidationProcessor</"
+"classname>."
+
+#. Tag: para
+#: annotationprocessor.xml:377
+#, no-c-format
+msgid ""
+"Any constraint annotation problems will then be marked directly within the "
+"editor:"
+msgstr "所有的约束标注问题应该都会在编辑器里面直接被标记出来了:"
+
+#. Tag: title
+#: annotationprocessor.xml:391
+#, no-c-format
+msgid "Known issues"
+msgstr "已知问题"
+
+#. Tag: para
+#: annotationprocessor.xml:393
+#, no-c-format
+msgid "The following known issues exist as of May 2010:"
+msgstr "以下是截止到2010年五月我们发现(但尚未解决)的问题:"
+
+#. Tag: para
+#: annotationprocessor.xml:397
+#, no-c-format
+msgid ""
+"<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/"
+"HV-308\">HV-308</ulink>: Additional validators registered for a constraint "
+"<ulink url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/"
+"html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation "
+"processor."
+msgstr ""
+"<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/"
+"HV-308\">HV-308</ulink>: Additional validators registered for a constraint "
+"<ulink url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/"
+"html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation "
+"processor."
+
+#. Tag: para
+#: annotationprocessor.xml:405
+#, no-c-format
+msgid ""
+"Sometimes custom constraints can't be <ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV-293\">properly evaluated</ulink> "
+"when using the processor within Eclipse. Cleaning the project can help in "
+"these situations. This seems to be an issue with the Eclipse JSR 269 API "
+"implementation, but further investigation is required here."
+msgstr ""
+"有时候, 在eclipse里面自定义的约束条件不能够被<ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV-293\">正确的检查</ulink>. 清理这个"
+"项目可能会有帮助. 这可能是因为Eclipse中对 JSR 269 API的实现有问题, 但是还需要"
+"进一步的研究."
+
+#. Tag: para
+#: annotationprocessor.xml:414
+#, no-c-format
+msgid ""
+"When using the processor within Eclipse, the check of dynamic default group "
+"sequence definitions doesn't work. After further investigation, it seems to "
+"be an issue with the Eclipse JSR 269 API implementation."
+msgstr ""
+
+#~ msgid "validation-api-&bvVersion;.jar"
+#~ msgstr "validation-api-&bvVersion;.jar"
+
+#, fuzzy
+#~ msgid "hibernate-validator-&version;.jar"
+#~ msgstr "hibernate-validator-annotation-processor-&version;.jar"
+
+#~ msgid ""
+#~ "The following listing shows an example. The processor will be detected "
+#~ "automatically by the compiler and invoked during compilation."
+#~ msgstr ""
+#~ "下面显示了一个具体的示例. 这样, 标注处理器就会自动被编译器检测到并且调用."
+
+#, fuzzy
+#~ msgid "Go to \"Libraries\", tab \"Processor\", and add the following JARs:"
+#~ msgstr "选择\"Libraries\"的\"Processor\"选项卡, 然后添加下面两个jar文件:"
+
+#~ msgid "Annotation Processor (EXPERIMENTAL)"
+#~ msgstr "标注处理器(实验)"
+
+#~ msgid ""
+#~ "annotating Strings with @Min to specify a minimum length (instead of "
+#~ "using @Size)"
+#~ msgstr "把@Min赋给一个String来指定其的最小长度(而不是使用@Size)"
+
+#~ msgid ""
+#~ "A first version of the Hibernate Validator Annotation Processor is part "
+#~ "of Hibernate Validator since release 4.1. It is currently still under "
+#~ "development and should therefore be considered as an experimental "
+#~ "feature. Some <link linkend=\"section-known-issues\">known issues</link> "
+#~ "can be found at the end of this chapter. In case any problems arise when "
+#~ "using the processor feel free to ask for help at the <ulink url=\"https://"
+#~ "forum.hibernate.org/viewforum.php?f=9\">forum</ulink> or create an issue "
+#~ "within<ulink url=\"http://opensource.atlassian.com/projects/hibernate/"
+#~ "browse/HV/component/10356\"> JIRA</ulink>."
+#~ msgstr ""
+#~ "Hibernate Validator 4.1 包含了标注处理器的第一个版本. 它当前正处于开发阶"
+#~ "段, 所以应该被看作是实验性质的功能. 在本章的结尾列出了一些<link linkend="
+#~ "\"section-known-issues\">已知的缺陷</link>. 如果在使用这个功能的时候碰到任"
+#~ "何问题, 请在我们的<ulink url=\"https://forum.hibernate.org/viewforum.php?"
+#~ "f=9\">论坛</ulink>寻求帮助或者请在<ulink url=\"http://opensource."
+#~ "atlassian.com/projects/hibernate/browse/HV/component/10356\"> JIRA</ulink>"
+#~ "中创建一个缺陷报告."
+
+#~ msgid "JavaBean getter methods are annotated in case of property validation"
+#~ msgstr "如果是使用属性模式的话, 那么需要定义在JavaBean的getter上"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/bootstrapping.po b/project/documentation/src/main/docbook/zh-CN/modules/bootstrapping.po
new file mode 100644
index 0000000..740adcb
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/bootstrapping.po
@@ -0,0 +1,819 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: 2010-08-23 21:26+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: bootstrapping.xml:24
+#, no-c-format
+msgid "Bootstrapping"
+msgstr "Bootstrapping"
+
+#. Tag: para
+#: bootstrapping.xml:26
+#, no-c-format
+msgid ""
+"We already seen in <xref linkend=\"section-validator-instance\"/> the "
+"easiest way to create a <classname>Validator</classname> instance - "
+"<methodname>Validation.buildDefaultValidatorFactory</methodname>. In this "
+"chapter we have a look at the other methods in <classname>javax.validation."
+"Validation</classname> and how they allow to configure several aspects of "
+"Bean Validation at bootstrapping time."
+msgstr ""
+"在<xref linkend=\"section-validator-instance\"/>中我们说道过, 最简单的创建一"
+"个<classname>Validator</classname>实例的方法是通过<methodname>Validation."
+"buildDefaultValidatorFactory</methodname>. 在本章中我们会继续介绍"
+"<classname>javax.validation.Validation</classname>中的其他方法, 以及如何通过"
+"这些方法在Bean Validation初始化的时候对其进行配置的."
+
+#. Tag: para
+#: bootstrapping.xml:33
+#, fuzzy, no-c-format
+msgid ""
+"The different bootstrapping options allow, amongst other things, to "
+"bootstrap any Bean Validation implementation on the classpath. Generally, an "
+"available provider is discovered by the <ulink url=\"http://docs.oracle.com/"
+"javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider\">Java "
+"Service Provider</ulink> mechanism. A Bean Validation implementation "
+"includes the file <filename>javax.validation.spi.ValidationProvider</"
+"filename> in <filename>META-INF/services</filename>. This file contains the "
+"fully qualified classname of the <classname>ValidationProvider</classname> "
+"of the implementation. In the case of Hibernate Validator this is "
+"<classname>org.hibernate.validator.HibernateValidator</classname>."
+msgstr ""
+"The different bootstrapping options allow, amongst other things, to "
+"bootstrap any Bean Validation implementation on the classpath. 通常, 一个服务"
+"的提供者是能够被<ulink url=\"http://java.sun.com/j2se/1.3/docs/guide/jar/jar."
+"html#Service%20Provider\">Java Service Provider</ulink>发现的. 对于Bean "
+"Validation的实现(服务提供者)来说, 他们的<filename>META-INF/services</"
+"filename>目录下需要包含一个名为<filename>javax.validation.spi."
+"ValidationProvider</filename>的文件. 此文件中包含了一个"
+"<classname>ValidationProvider</classname>接口的实现类的全路径名称, 具体到"
+"Hibernate Validator来说, 就是<classname>org.hibernate.validator."
+"HibernateValidator</classname>."
+
+#. Tag: para
+#: bootstrapping.xml:46
+#, no-c-format
+msgid ""
+"If there are more than one Bean Validation implementation providers in the "
+"classpath and <methodname>Validation.buildDefaultValidatorFactory()</"
+"methodname> is used, there is no guarantee which provider will be chosen. To "
+"enforce the provider <methodname>Validation.byProvider()</methodname> should "
+"be used."
+msgstr ""
+"如果当前类路径下存在多个Bean Validation的实现, 那么<methodname>Validation."
+"buildDefaultValidatorFactory()</methodname>并不能保证具体那个实现会被使用. 如"
+"果想指定某一个的话, 请使用<methodname>Validation.byProvider()</methodname>."
+
+#. Tag: title
+#: bootstrapping.xml:55
+#, no-c-format
+msgid ""
+"<classname>Configuration</classname> and <classname>ValidatorFactory</"
+"classname>"
+msgstr ""
+"<classname>Configuration</classname> 和 <classname>ValidatorFactory</"
+"classname>"
+
+#. Tag: para
+#: bootstrapping.xml:58
+#, no-c-format
+msgid ""
+"There are three different methods in the Validation class to create a "
+"Validator instance. The easiest in shown in <xref linkend=\"example-build-"
+"default-validator-factory\"/>."
+msgstr ""
+"Validation类提供了三种方法来创建一个Validator的实例, <xref linkend=\"example-"
+"build-default-validator-factory\"/>中显示的是最简单的方法."
+
+#. Tag: title
+#: bootstrapping.xml:63
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr "Validation.buildDefaultValidatorFactory()"
+
+#. Tag: programlisting
+#: bootstrapping.xml:65
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:68
+#, no-c-format
+msgid ""
+"You can also use the method <methodname>Validation.byDefaultProvider()</"
+"methodname> which will allow you to configure several aspects of the created "
+"Validator instance:"
+msgstr ""
+"你也可以通过<methodname>Validation.byDefaultProvider()</methodname>现获取一个"
+"Configuration对象, 这样可以对要创建的Validator进行配置."
+
+#. Tag: title
+#: bootstrapping.xml:73
+#, no-c-format
+msgid "Validation.byDefaultProvider()"
+msgstr "Validation.byDefaultProvider()"
+
+#. Tag: programlisting
+#: bootstrapping.xml:75
+#, no-c-format
+msgid ""
+"Configuration<?> config = Validation.byDefaultProvider().configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"Configuration<?> config = Validation.byDefaultProvider().configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:78
+#, no-c-format
+msgid ""
+"We will learn more about <classname>MessageInterpolator</classname>, "
+"<classname>TraversableResolver</classname> and "
+"<classname>ConstraintValidatorFactory</classname> in the following sections."
+msgstr ""
+"<classname>MessageInterpolator</classname>, <classname>TraversableResolver</"
+"classname> 和 <classname>ConstraintValidatorFactory</classname>会在后面详细介"
+"绍."
+
+#. Tag: para
+#: bootstrapping.xml:83
+#, no-c-format
+msgid ""
+"Last but not least you can ask for a Configuration object of a specific Bean "
+"Validation provider. This is useful if you have more than one Bean "
+"Validation provider in your classpath. In this situation you can make an "
+"explicit choice about which implementation to use. In the case of Hibernate "
+"Validator the <classname>Validator</classname> creation looks like:"
+msgstr ""
+"最后, 你可以指定使用哪个Bean Validation的实现. 如果类路径下存在多个Bean "
+"Validation的实现的话,这样就很有必要了. 例如, 如果你想使用Hibernate Validator"
+"来作为内部实现来创建<classname>Validator</classname>的话:"
+
+#. Tag: title
+#: bootstrapping.xml:91
+#, no-c-format
+msgid "Validation.byProvider( HibernateValidator.class )"
+msgstr "Validation.byProvider( HibernateValidator.class )"
+
+#. Tag: programlisting
+#: bootstrapping.xml:93
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:97
+#, no-c-format
+msgid ""
+"The generated <classname>Validator</classname> instance is thread safe and "
+"can be cached."
+msgstr ""
+"创建出来的<classname>Validator</classname>实例是线程安全的, 所以你可以把它缓"
+"存起来."
+
+#. Tag: classname
+#: bootstrapping.xml:103
+#, no-c-format
+msgid "ValidationProviderResolver"
+msgstr "ValidationProviderResolver"
+
+#. Tag: para
+#: bootstrapping.xml:105
+#, no-c-format
+msgid ""
+"In the case that the Java Service Provider mechanism does not work in your "
+"environment or you have a special classloader setup, you are able to provide "
+"a custom <classname>ValidationProviderResolver</classname>. An example in an "
+"OSGi environment you could plug your custom provider resolver like seen in "
+"<xref linkend=\"example-provider-resolver\"/>."
+msgstr ""
+"如果 Java Service Provider机制在你的环境中不能够正常工作, 或者你有特别的"
+"classloader设置的话, 你也可以提供一个自定义的"
+"<classname>ValidationProviderResolver</classname>.<xref linkend=\"example-"
+"provider-resolver\"/>显示了如何在OSGi环境中插入自定义的provider resolver."
+
+#. Tag: title
+#: bootstrapping.xml:112
+#, no-c-format
+msgid "Providing a custom ValidationProviderResolver"
+msgstr "使用自定义的ValidationProviderResolver"
+
+#. Tag: programlisting
+#: bootstrapping.xml:114
+#, no-c-format
+msgid ""
+"Configuration<?> config = Validation.byDefaultProvider()\n"
+"    .providerResolver( new OSGiServiceDiscoverer() )\n"
+"    .configure();\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"Configuration<?> config = Validation.byDefaultProvider()\n"
+"    .providerResolver( new OSGiServiceDiscoverer() )\n"
+"    .configure();\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:117
+#, no-c-format
+msgid ""
+"Your <classname>OSGiServiceDiscoverer</classname> must in this case "
+"implement the interface <classname>ValidationProviderResolver</classname>:"
+msgstr ""
+"在这种情况下, 你的<classname>OSGiServiceDiscoverer</classname>类需要实现"
+"<classname>ValidationProviderResolver</classname>接口:"
+
+#. Tag: title
+#: bootstrapping.xml:122
+#, no-c-format
+msgid "ValidationProviderResolver interface"
+msgstr "ValidationProviderResolver接口"
+
+#. Tag: programlisting
+#: bootstrapping.xml:124
+#, no-c-format
+msgid ""
+"public interface ValidationProviderResolver {\n"
+"    /**\n"
+"     * Returns a list of ValidationProviders available in the runtime "
+"environment.\n"
+"     *\n"
+"     * @return list of validation providers.  \n"
+"     */\n"
+"    List<ValidationProvider<?>> getValidationProviders();\n"
+"}"
+msgstr ""
+"public interface ValidationProviderResolver {\n"
+"    /**\n"
+"     * Returns a list of ValidationProviders available in the runtime "
+"environment.\n"
+"     *\n"
+"     * @return list of validation providers.  \n"
+"     */\n"
+"    List<ValidationProvider<?>> getValidationProviders();\n"
+"}"
+
+#. Tag: classname
+#: bootstrapping.xml:129
+#, no-c-format
+msgid "MessageInterpolator"
+msgstr "MessageInterpolator"
+
+#. Tag: para
+#: bootstrapping.xml:131
+#, fuzzy, no-c-format
+msgid ""
+"already discussed the default message interpolation algorithm. If you have "
+"special requirements for your message interpolation you can provide a custom "
+"interpolator using <methodname>Configuration.messageInterpolator()</"
+"methodname>. This message interpolator will be shared by all validators "
+"generated by the <classname>ValidatorFactory</classname> created from this "
+"<classname>Configuration</classname>. <xref linkend=\"example-message-"
+"interpolator\"/> shows an interpolator (available in Hibernate Validator) "
+"which can interpolate the value being validated in the constraint message. "
+"To refer to this value in the constraint message you can use:"
+msgstr ""
+"已经讨轮过默认的错误消息解析机制. 如果这个默认的实现不能满足你的需求的话, 你"
+"还可以通过<methodname>Configuration.messageInterpolator()</methodname>方法来"
+"提供你自定义的消息解析器. 这样, 所有通过<classname>Configuration</classname>"
+"创建出来的<classname>ValidatorFactory</classname>生成的校验器都会使用此消息解"
+"析器(请参考 <xref linkend=\"example-message-interpolator\"/>)."
+
+#. Tag: para
+#: bootstrapping.xml:144
+#, no-c-format
+msgid ""
+"${validatedValue}: this will call <methodname>String.valueOf </methodname>on "
+"the validated value."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:149
+#, no-c-format
+msgid ""
+"${validatedValue:<format>}: provide your own format string which will "
+"be passed to <code>String.format</code> together with the validated value. "
+"Refer to the javadoc of <code>String.format</code> for more information "
+"about the format options."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:158
+#, no-c-format
+msgid "Providing a custom MessageInterpolator"
+msgstr "自定义的MessageInterpolator"
+
+#. Tag: programlisting
+#: bootstrapping.xml:160
+#, fuzzy, no-c-format
+msgid ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .messageInterpolator(new ValueFormatterMessageInterpolator(configuration."
+"getDefaultMessageInterpolator()))\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .messageInterpolator(new ContextualMessageInterpolator(configuration."
+"getDefaultMessageInterpolator()))\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:164
+#, no-c-format
+msgid ""
+"It is recommended that <classname>MessageInterpolator</classname> "
+"implementations delegate final interpolation to the Bean Validation default "
+"<classname>MessageInterpolator</classname> to ensure standard Bean "
+"Validation interpolation rules are followed. The default implementation is "
+"accessible through <methodname>Configuration.getDefaultMessageInterpolator()"
+"</methodname>."
+msgstr ""
+"It is recommended that <classname>MessageInterpolator</classname> "
+"implementations delegate final interpolation to the Bean Validation default "
+"<classname>MessageInterpolator</classname> to ensure standard Bean "
+"Validation interpolation rules are followed. The default implementation is "
+"accessible through <methodname>Configuration.getDefaultMessageInterpolator()"
+"</methodname>."
+
+#. Tag: title
+#: bootstrapping.xml:173
+#, no-c-format
+msgid "ResourceBundleLocator"
+msgstr "ResourceBundleLocator"
+
+#. Tag: para
+#: bootstrapping.xml:175
+#, no-c-format
+msgid ""
+"A common use case is the ability to specify your own resource bundles for "
+"message interpolation. The default <classname>MessageInterpolator</"
+"classname> implementation in Hibernate Validator is called "
+"<classname>ResourceBundleMessageInterpolator</classname> and per default "
+"loads resource bundles via <methodname>ResourceBundle.getBundle</"
+"methodname>. However, <classname>ResourceBundleMessageInterpolator</"
+"classname> also allows you to specify a custom implementation of "
+"<classname>ResourceBundleLocator</classname> allowing you to provide your "
+"own resource bundles. <xref linkend=\"example-resource-bundle-locator\"/> "
+"shows an example. In the example<methodname> HibernateValidatorConfiguration."
+"getDefaultResourceBundleLocator</methodname> is used to retrieve the default "
+"<classname>ResourceBundleLocator</classname> which then can be passed to the "
+"custom implementation in order implement delegation."
+msgstr ""
+"一个普遍的需求是你可能需要为错误消息解析指定你自己的resource bundles. "
+"<classname>ResourceBundleMessageInterpolator</classname>是Hibernate Validator"
+"中默认的<classname>MessageInterpolator</classname>的实现, 它默认情况下是通过"
+"<methodname>ResourceBundle.getBundle</methodname>来获取resource bundle的. 不"
+"过, <classname>ResourceBundleMessageInterpolator</classname>也支持你指定一个"
+"自定义的<classname>ResourceBundleLocator</classname>实现来提供你自己的"
+"resource bundle. <xref linkend=\"example-resource-bundle-locator\"/>提供了一"
+"个示例. 在这个例子中, 先通过<methodname> HibernateValidatorConfiguration."
+"getDefaultResourceBundleLocator</methodname>获取默认的"
+"<classname>ResourceBundleLocator</classname>实现, 然后再用你自定义的实现把默"
+"认的包装起来, 代理模式."
+
+#. Tag: title
+#: bootstrapping.xml:194
+#, no-c-format
+msgid "Providing a custom ResourceBundleLocator"
+msgstr "自定义的ResourceBundleLocator"
+
+#. Tag: programlisting
+#: bootstrapping.xml:196
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration configure = Validation.byProvider"
+"(HibernateValidator.class).configure();\n"
+"\n"
+"ResourceBundleLocator defaultResourceBundleLocator = configure."
+"getDefaultResourceBundleLocator(); \n"
+"ResourceBundleLocator myResourceBundleLocator = new "
+"MyCustomResourceBundleLocator(defaultResourceBundleLocator);\n"
+"\n"
+"configure.messageInterpolator(new ResourceBundleMessageInterpolator"
+"(myResourceBundleLocator));"
+msgstr ""
+"HibernateValidatorConfiguration configure = Validation.byProvider"
+"(HibernateValidator.class).configure();\n"
+"\n"
+"ResourceBundleLocator defaultResourceBundleLocator = configure."
+"getDefaultResourceBundleLocator(); \n"
+"ResourceBundleLocator myResourceBundleLocator = new "
+"MyCustomResourceBundleLocator(defaultResourceBundleLocator);\n"
+"\n"
+"configure.messageInterpolator(new ResourceBundleMessageInterpolator"
+"(myResourceBundleLocator));"
+
+#. Tag: para
+#: bootstrapping.xml:199
+#, no-c-format
+msgid ""
+"Hibernate Validator provides the following implementation of "
+"<classname>ResourceBundleLocator</classname> - "
+"<classname>PlatformResourceBundleLocator</classname> (the default) and "
+"<classname>AggregateResourceBundleLocator</classname>. The latter can be "
+"used to specify a list of resource bundle names which will get loaded and "
+"merged into a single resource bundle. Refer to the JavaDoc documentation for "
+"more information."
+msgstr ""
+"Hibernate Validator提供了两个<classname>ResourceBundleLocator</classname>的实"
+"现 - <classname>PlatformResourceBundleLocator</classname> (默认) 和 "
+"<classname>AggregateResourceBundleLocator</classname>. 后者可以定义一系列的"
+"resource bundle, 然后它会读取这些文件, 并且把它们组合成一个. 更多信息请参考此"
+"类的javadoc 文档."
+
+#. Tag: classname
+#: bootstrapping.xml:210
+#, no-c-format
+msgid "TraversableResolver"
+msgstr "TraversableResolver"
+
+#. Tag: para
+#: bootstrapping.xml:212
+#, no-c-format
+msgid ""
+"The usage of the <classname>TraversableResolver</classname> has so far not "
+"been discussed. The idea is that in some cases, the state of a property "
+"should not be accessed. The most obvious example for that is a lazy loaded "
+"property or association of a Java Persistence provider. Validating this lazy "
+"property or association would mean that its state would have to be accessed "
+"triggering a load from the database. Bean Validation controls which property "
+"can and cannot be accessed via the <classname>TraversableResolver</"
+"classname> interface (see <xref linkend=\"example-traversable-resolver\"/>). "
+"In the example HibernateValidatorConfiguration."
+msgstr ""
+"到目前位置我们还没有讨论过<classname>TraversableResolver</classname>接口, 它"
+"的设计目的是在某些情况下, 我们可能不应该去获取一个属性的状态. 最典型的情况就"
+"是一个延迟加载的属性或者与JPA中涉及到关联关系的时候. 当验证这两种情况的属性的"
+"时候, 很可能会触发一次对数据库的查询.Bean Validation正是通过"
+"<classname>TraversableResolver</classname>接口来控制能否访问某一个属性的 "
+"(<xref linkend=\"example-traversable-resolver\"/>)."
+
+#. Tag: title
+#: bootstrapping.xml:224
+#, no-c-format
+msgid "TraversableResolver interface"
+msgstr "TraversableResolver接口"
+
+#. Tag: programlisting
+#: bootstrapping.xml:226
+#, no-c-format
+msgid ""
+"/**\n"
+" * Contract determining if a property can be accessed by the Bean Validation "
+"provider\n"
+" * This contract is called for each property that is being either validated "
+"or cascaded.\n"
+" *\n"
+" * A traversable resolver implementation must be thread-safe.\n"
+" *\n"
+" */\n"
+"public interface TraversableResolver {\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to reach the "
+"property state\n"
+"     *\n"
+"     * @param traversableObject object hosting <code>"
+"traversableProperty</code> or null  \n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        <code>traversableObject</code>\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either <code>FIELD</code> or <"
+"code>METHOD</code>.\n"
+"     *\n"
+"     * @return <code>true</code> if the Bean Validation provider "
+"is allowed to\n"
+"     *         reach the property state, <code>false</code> "
+"otherwise.\n"
+"     */\n"
+"     boolean isReachable(Object traversableObject,\n"
+"                         Path.Node traversableProperty,\n"
+"                         Class<?> rootBeanType,\n"
+"                         Path pathToTraversableObject,\n"
+"                         ElementType elementType);\n"
+"\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to cascade "
+"validation on\n"
+"     * the bean instance returned by the property value\n"
+"     * marked as <code>@Valid</code>.\n"
+"     * Note that this method is called only if isReachable returns true for "
+"the same set of\n"
+"     * arguments and if the property is marked as <code>@Valid</"
+"code>\n"
+"     *\n"
+"     * @param traversableObject object hosting <code>"
+"traversableProperty</code> or null\n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        <code>traversableObject</code>\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either <code>FIELD</code> or <"
+"code>METHOD</code>.\n"
+"     *\n"
+"     * @return <code>true</code> if the Bean Validation provider "
+"is allowed to\n"
+"     *         cascade validation, <code>false</code> "
+"otherwise.\n"
+"     */\n"
+"     boolean isCascadable(Object traversableObject,\n"
+"                          Path.Node traversableProperty,\n"
+"                          Class<?> rootBeanType,\n"
+"                          Path pathToTraversableObject,\n"
+"                          ElementType elementType);\n"
+"}"
+msgstr ""
+"/**\n"
+" * Contract determining if a property can be accessed by the Bean Validation "
+"provider\n"
+" * This contract is called for each property that is being either validated "
+"or cascaded.\n"
+" *\n"
+" * A traversable resolver implementation must be thread-safe.\n"
+" *\n"
+" */\n"
+"public interface TraversableResolver {\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to reach the "
+"property state\n"
+"     *\n"
+"     * @param traversableObject object hosting <code>"
+"traversableProperty</code> or null  \n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        <code>traversableObject</code>\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either <code>FIELD</code> or <"
+"code>METHOD</code>.\n"
+"     *\n"
+"     * @return <code>true</code> if the Bean Validation provider "
+"is allowed to\n"
+"     *         reach the property state, <code>false</code> "
+"otherwise.\n"
+"     */\n"
+"     boolean isReachable(Object traversableObject,\n"
+"                         Path.Node traversableProperty,\n"
+"                         Class<?> rootBeanType,\n"
+"                         Path pathToTraversableObject,\n"
+"                         ElementType elementType);\n"
+"\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to cascade "
+"validation on\n"
+"     * the bean instance returned by the property value\n"
+"     * marked as <code>@Valid</code>.\n"
+"     * Note that this method is called only if isReachable returns true for "
+"the same set of\n"
+"     * arguments and if the property is marked as <code>@Valid</"
+"code>\n"
+"     *\n"
+"     * @param traversableObject object hosting <code>"
+"traversableProperty</code> or null\n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        <code>traversableObject</code>\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either <code>FIELD</code> or <"
+"code>METHOD</code>.\n"
+"     *\n"
+"     * @return <code>true</code> if the Bean Validation provider "
+"is allowed to\n"
+"     *         cascade validation, <code>false</code> "
+"otherwise.\n"
+"     */\n"
+"     boolean isCascadable(Object traversableObject,\n"
+"                          Path.Node traversableProperty,\n"
+"                          Class<?> rootBeanType,\n"
+"                          Path pathToTraversableObject,\n"
+"                          ElementType elementType);\n"
+"}"
+
+#. Tag: para
+#: bootstrapping.xml:229
+#, fuzzy, no-c-format
+msgid ""
+"Hibernate Validator provides two <classname>TraversableResolver</classname>s "
+"out of the box which will be enabled automatically depending on your "
+"environment. The first is the <classname>DefaultTraversableResolver</"
+"classname> which will always return true for <methodname>isReachable()</"
+"methodname> and <methodname>isTraversable()</methodname>. The second is the "
+"<classname>JPATraversableResolver</classname> which gets enabled when "
+"Hibernate Validator gets used in combination with JPA 2. In case you have to "
+"provide your own resolver you can do so again using the "
+"<classname>Configuration</classname> object as seen in <xref linkend="
+"\"example-traversable-resolver-config\"/>."
+msgstr ""
+"Hibernate Validator包含了两个<classname>TraversableResolver</classname>接口的"
+"实现, 并且会根据你的环境来决定自动判断使用哪个实现. 首先是"
+"<classname>DefaultTraversableResolver</classname>, 它的"
+"<methodname>isReachable()</methodname>和<methodname>isTraversable()</"
+"methodname>总是返回true. 而另外一个, <classname>JPATraversableResolver</"
+"classname>, 会在把Hibernate Validator 和JPA2一起使用的时候被启用. 如果你想提"
+"供自己的实现, 可以参照<xref linkend=\"example-traversable-resolver-config\"/"
+">."
+
+#. Tag: title
+#: bootstrapping.xml:242
+#, no-c-format
+msgid "Providing a custom TraversableResolver"
+msgstr "自定义的TraversableResolver"
+
+#. Tag: programlisting
+#: bootstrapping.xml:244
+#, no-c-format
+msgid ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .traversableResolver(new MyTraversableResolver())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .traversableResolver(new MyTraversableResolver())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: classname
+#: bootstrapping.xml:249
+#, no-c-format
+msgid "ConstraintValidatorFactory"
+msgstr "ConstraintValidatorFactory"
+
+#. Tag: para
+#: bootstrapping.xml:251
+#, no-c-format
+msgid ""
+"Last but not least, there is one more configuration option to discuss, the "
+"<classname>ConstraintValidatorFactory</classname>. The default "
+"<classname>ConstraintValidatorFactory</classname> provided by Hibernate "
+"Validator requires a public no-arg constructor to instantiate "
+"<classname>ConstraintValidator</classname> instances (see <xref linkend="
+"\"section-constraint-validator\"/>). Using a custom "
+"<classname>ConstraintValidatorFactory</classname> offers for example the "
+"possibility to use dependency injection in constraint implementations. The "
+"configuration of the custom factory is once more via the "
+"<classname>Configuration</classname> (<xref linkend=\"example-constraint-"
+"validator-factory\"/>)."
+msgstr ""
+"最后, 还有个配置项得提一下, 那就是<classname>ConstraintValidatorFactory</"
+"classname>类. Hibernate Validator中默认的"
+"<classname>ConstraintValidatorFactory</classname>需要一个无参的构造方法来初始"
+"化<classname>ConstraintValidator</classname>的实例(参考<xref linkend="
+"\"section-constraint-validator\"/>). 对于自定义的"
+"<classname>ConstraintValidatorFactory</classname>实现来说, 例如, 你可以让其支"
+"持对约束条件的依赖注入等功能. 配置使用这个自定义的"
+"<classname>ConstraintValidatorFactory</classname>的方法还是老样子(<xref "
+"linkend=\"example-constraint-validator-factory\"/>)."
+
+#. Tag: title
+#: bootstrapping.xml:264
+#, no-c-format
+msgid "Providing a custom ConstraintValidatorFactory"
+msgstr "自定义的ConstraintValidatorFactory"
+
+#. Tag: programlisting
+#: bootstrapping.xml:266
+#, no-c-format
+msgid ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .constraintValidatorFactory(new IOCConstraintValidatorFactory())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"Configuration<?> configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .constraintValidatorFactory(new IOCConstraintValidatorFactory())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: bootstrapping.xml:269
+#, no-c-format
+msgid "The interface you have to implement is:"
+msgstr "你需要实现此接口:"
+
+#. Tag: title
+#: bootstrapping.xml:272
+#, no-c-format
+msgid "ConstraintValidatorFactory interface"
+msgstr "ConstraintValidatorFactory接口"
+
+#. Tag: programlisting
+#: bootstrapping.xml:274
+#, no-c-format
+msgid ""
+"public interface ConstraintValidatorFactory {\n"
+"    /**\n"
+"     * @param key The class of the constraint validator to instantiate.\n"
+"     *\n"
+"     * @return A constraint validator instance of the specified class.\n"
+"     */\n"
+"     <T extends ConstraintValidator<?,?>> T getInstance(Class<"
+"T> key);\n"
+"}"
+msgstr ""
+"public interface ConstraintValidatorFactory {\n"
+"    /**\n"
+"     * @param key The class of the constraint validator to instantiate.\n"
+"     *\n"
+"     * @return A constraint validator instance of the specified class.\n"
+"     */\n"
+"     <T extends ConstraintValidator<?,?>> T getInstance(Class<"
+"T> key);\n"
+"}"
+
+#. Tag: para
+#: bootstrapping.xml:278
+#, no-c-format
+msgid ""
+"Any constraint implementation relying on "
+"<classname>ConstraintValidatorFactory</classname> behaviors specific to an "
+"implementation (dependency injection, no no-arg constructor and so on) are "
+"not considered portable."
+msgstr ""
+"如果一个约束条件的实现需要依赖<classname>ConstraintValidatorFactory</"
+"classname>的某个特定的行为(例如依赖注入或者没有无参的构造方法等) 都可能导致不"
+"可移植."
+
+#. Tag: para
+#: bootstrapping.xml:285
+#, no-c-format
+msgid ""
+"ConstraintValidatorFactory should not cache instances as the state of each "
+"instance can be altered in the initialize method."
+msgstr ""
+"ConstraintValidatorFactory不应该缓存其创建的实例, 因为每个实例都可能在其的初"
+"始化方法中被修改."
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/customconstraints.po b/project/documentation/src/main/docbook/zh-CN/modules/customconstraints.po
new file mode 100644
index 0000000..6320ac1
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/customconstraints.po
@@ -0,0 +1,1199 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: 2010-08-21 02:16+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customconstraints.xml:24
+#, no-c-format
+msgid "Creating custom constraints"
+msgstr "创建自己的约束规则"
+
+#. Tag: para
+#: customconstraints.xml:26
+#, no-c-format
+msgid ""
+"Though the Bean Validation API defines a whole set of standard constraint "
+"annotations one can easily think of situations in which these standard "
+"annotations won't suffice. For these cases you are able to create custom "
+"constraints tailored to your specific validation requirements in a simple "
+"manner."
+msgstr ""
+"尽管Bean Validation API定义了一大堆标准的约束条件, 但是肯定还是有这些约束不能"
+"满足我们需求的时候, 在这种情况下, 你可以根据你的特定的校验需求来创建自己的约"
+"束条件."
+
+#. Tag: title
+#: customconstraints.xml:33
+#, no-c-format
+msgid "Creating a simple constraint"
+msgstr "创建一个简单的约束条件"
+
+#. Tag: para
+#: customconstraints.xml:35
+#, no-c-format
+msgid "To create a custom constraint, the following three steps are required:"
+msgstr "按照以下三个步骤来创建一个自定义的约束条件"
+
+#. Tag: para
+#: customconstraints.xml:40
+#, no-c-format
+msgid "Create a constraint annotation"
+msgstr "创建约束标注"
+
+#. Tag: para
+#: customconstraints.xml:44
+#, no-c-format
+msgid "Implement a validator"
+msgstr "实现一个验证器"
+
+#. Tag: para
+#: customconstraints.xml:48
+#, no-c-format
+msgid "Define a default error message"
+msgstr "定义默认的验证错误信息"
+
+#. Tag: title
+#: customconstraints.xml:53
+#, no-c-format
+msgid "The constraint annotation"
+msgstr "约束标注"
+
+#. Tag: para
+#: customconstraints.xml:55
+#, no-c-format
+msgid ""
+"Let's write a constraint annotation, that can be used to express that a "
+"given string shall either be upper case or lower case. We'll apply it later "
+"on to the <property>licensePlate</property> field of the <classname>Car</"
+"classname> class from <xref linkend=\"validator-gettingstarted\"/> to "
+"ensure, that the field is always an upper-case string."
+msgstr ""
+"让我们来创建一个新的用来判断一个给定字符串是否全是大写或者小写字符的约束标"
+"注. 我们将稍后把它用在<xref linkend=\"validator-gettingstarted\"/>中的类"
+"<classname>Car</classname>的<property>licensePlate</property>字段上来确保这个"
+"字段的内容一直都是大写字母."
+
+#. Tag: para
+#: customconstraints.xml:62
+#, no-c-format
+msgid ""
+"First we need a way to express the two case modes. We might use "
+"<classname>String</classname> constants, but a better way to go is to use a "
+"Java 5 enum for that purpose:"
+msgstr ""
+"首先,我们需要一种方法来表示这两种模式( 译注: 大写或小写), 我们可以使用"
+"<classname>String</classname>常量, 但是在Java 5中, 枚举类型是个更好的选择:"
+
+#. Tag: title
+#: customconstraints.xml:67
+#, no-c-format
+msgid "Enum <classname>CaseMode</classname> to express upper vs. lower case"
+msgstr "枚举类型<classname>CaseMode</classname>, 来表示大写或小写模式."
+
+#. Tag: programlisting
+#: customconstraints.xml:70
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"public enum CaseMode {\n"
+"    UPPER, \n"
+"    LOWER;\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"public enum CaseMode {\n"
+"    UPPER, \n"
+"    LOWER;\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:73
+#, no-c-format
+msgid ""
+"Now we can define the actual constraint annotation. If you've never designed "
+"an annotation before, this may look a bit scary, but actually it's not that "
+"hard:"
+msgstr ""
+"现在我们可以来定义真正的约束标注了. 如果你以前没有创建过标注(annotation)的话,"
+"那么这个可能看起来有点吓人, 可是其实没有那么难的 :)"
+
+#. Tag: title
+#: customconstraints.xml:78
+#, no-c-format
+msgid "Defining CheckCase constraint annotation"
+msgstr "定义一个CheckCase的约束标注"
+
+#. Tag: programlisting
+#: customconstraints.xml:80
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = CheckCaseValidator.class)\n"
+"@Documented\n"
+"public @interface CheckCase {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints.checkcase}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"    \n"
+"    CaseMode value();\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = CheckCaseValidator.class)\n"
+"@Documented\n"
+"public @interface CheckCase {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints.checkcase}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"    \n"
+"    CaseMode value();\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:83
+#, no-c-format
+msgid ""
+"An annotation type is defined using the <code>@interface</code> keyword. All "
+"attributes of an annotation type are declared in a method-like manner. The "
+"specification of the Bean Validation API demands, that any constraint "
+"annotation defines"
+msgstr ""
+"一个标注(annotation) 是通过<code>@interface</code>关键字来定义的. 这个标注中"
+"的属性是声明成类似方法的样式的. 根据Bean Validation API 规范的要求"
+
+#. Tag: para
+#: customconstraints.xml:90
+#, no-c-format
+msgid ""
+"an attribute <property>message</property> that returns the default key for "
+"creating error messages in case the constraint is violated"
+msgstr ""
+"<property>message</property>属性, 这个属性被用来定义默认得消息模版, 当这个约"
+"束条件被验证失败的时候,通过此属性来输出错误信息."
+
+#. Tag: para
+#: customconstraints.xml:96
+#, no-c-format
+msgid ""
+"an attribute <property>groups</property> that allows the specification of "
+"validation groups, to which this constraint belongs (see <xref linkend="
+"\"validator-usingvalidator-validationgroups\"/>). This must default to an "
+"empty array of type <classname>Class<?></classname>."
+msgstr ""
+"<property>groups</property> 属性, 用于指定这个约束条件属于哪(些)个校验组(请参"
+"考<xref linkend=\"validator-usingvalidator-validationgroups\"/>). 这个的默认"
+"值必须是<classname>Class<?></classname>类型到空到数组."
+
+#. Tag: para
+#: customconstraints.xml:104
+#, no-c-format
+msgid ""
+"an attribute <classname>payload</classname> that can be used by clients of "
+"the Bean Validation API to assign custom payload objects to a constraint. "
+"This attribute is not used by the API itself."
+msgstr ""
+"<classname>payload</classname> 属性, Bean Validation API 的使用者可以通过此属"
+"性来给约束条件指定严重级别. 这个属性并不被API自身所使用."
+
+#. Tag: para
+#: customconstraints.xml:108
+#, no-c-format
+msgid "An example for a custom payload could be the definition of a severity."
+msgstr "通过payload属性来指定默认错误严重级别的示例"
+
+#. Tag: programlisting
+#: customconstraints.xml:111
+#, no-c-format
+msgid ""
+"public class Severity {\n"
+"    public static class Info extends Payload {};\n"
+"    public static class Error extends Payload {};\n"
+"}\n"
+"\n"
+"public class ContactDetails {\n"
+"    @NotNull(message=\"Name is mandatory\", payload=Severity.Error.class)\n"
+"    private String name;\n"
+"\n"
+"    @NotNull(message=\"Phone number not specified, but not mandatory\", "
+"payload=Severity.Info.class)\n"
+"    private String phoneNumber;\n"
+"\n"
+"    // ...\n"
+"}"
+msgstr ""
+"public class Severity {\n"
+"    public static class Info extends Payload {};\n"
+"    public static class Error extends Payload {};\n"
+"}\n"
+"\n"
+"public class ContactDetails {\n"
+"    @NotNull(message=\"Name is mandatory\", payload=Severity.Error.class)\n"
+"    private String name;\n"
+"\n"
+"    @NotNull(message=\"Phone number not specified, but not mandatory\", "
+"payload=Severity.Info.class)\n"
+"    private String phoneNumber;\n"
+"\n"
+"    // ...\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:113
+#, no-c-format
+msgid ""
+"Now a client can after the validation of a <classname>ContactDetails</"
+"classname> instance access the severity of a constraint using "
+"<methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</"
+"methodname> and adjust its behaviour depending on the severity."
+msgstr ""
+"这样, 在校验完一个<classname>ContactDetails</classname> 的示例之后, 你就可以"
+"通过调用<methodname>ConstraintViolation.getConstraintDescriptor().getPayload"
+"()</methodname>来得到之前指定到错误级别了,并且可以根据这个信息来决定接下来到"
+"行为."
+
+#. Tag: para
+#: customconstraints.xml:122
+#, no-c-format
+msgid ""
+"Besides those three mandatory attributes (<property>message</property>, "
+"<property>groups</property> and <property>payload</property>) we add another "
+"one allowing for the required case mode to be specified. The name "
+"<property>value</property> is a special one, which can be omitted upon using "
+"the annotation, if it is the only attribute specified, as e.g. in "
+"<code>@CheckCase(CaseMode.UPPER)</code>."
+msgstr ""
+"除了这三个强制性要求的属性(<property>message</property>, <property>groups</"
+"property> 和 <property>payload</property>) 之外, 我们还添加了一个属性用来指定"
+"所要求到字符串模式. 此属性的名称<property>value</property>在annotation的定义"
+"中比较特殊, 如果只有这个属性被赋值了的话, 那么, 在使用此annotation到时候可以"
+"忽略此属性名称, 即<code>@CheckCase(CaseMode.UPPER)</code>."
+
+#. Tag: para
+#: customconstraints.xml:130
+#, no-c-format
+msgid ""
+"In addition we annotate the annotation type with a couple of so-called meta "
+"annotations:"
+msgstr ""
+"另外, 我们还给这个annotation标注了一些(所谓的) 元标注( 译注: 或\"元模型信息"
+"\"?, \"meta annotatioins\"): "
+
+#. Tag: para
+#: customconstraints.xml:135
+#, no-c-format
+msgid ""
+"<code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>: Says, that "
+"methods, fields and annotation declarations may be annotated with @CheckCase "
+"(but not type declarations e.g.)"
+msgstr ""
+"<code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>: 表示@CheckCase 可以"
+"被用在方法, 字段或者annotation声明上."
+
+#. Tag: para
+#: customconstraints.xml:141
+#, no-c-format
+msgid ""
+"<code>@Retention(RUNTIME)</code>: Specifies, that annotations of this type "
+"will be available at runtime by the means of reflection"
+msgstr ""
+"<code>@Retention(RUNTIME)</code>: 表示这个标注信息是在运行期通过反射被读取的."
+
+#. Tag: para
+#: customconstraints.xml:147
+#, no-c-format
+msgid ""
+"<code>@Constraint(validatedBy = CheckCaseValidator.class)</code>: Specifies "
+"the validator to be used to validate elements annotated with @CheckCase"
+msgstr ""
+"<code>@Constraint(validatedBy = CheckCaseValidator.class)</code>: 指明使用那"
+"个校验器(类) 去校验使用了此标注的元素."
+
+#. Tag: para
+#: customconstraints.xml:153
+#, no-c-format
+msgid ""
+"<code>@Documented</code>: Says, that the use of <code>@CheckCase</code> will "
+"be contained in the JavaDoc of elements annotated with it"
+msgstr ""
+"<code>@Documented</code>: 表示在对使用了<code>@CheckCase</code>的类进行"
+"javadoc操作到时候, 这个标注会被添加到javadoc当中."
+
+#. Tag: para
+#: customconstraints.xml:160
+#, no-c-format
+msgid ""
+"Hibernate Validator provides support for the validation of method parameters "
+"using constraint annotations (see <xref linkend=\"validator-customoptions-"
+"methodvalidation\"/>)."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:164
+#, no-c-format
+msgid ""
+"In order to use a custom constraint for parameter validation the "
+"<classname>ElementType.PARAMETER</classname> must be specified within the "
+"<classname>@Target</classname> annotation. This is already the case for all "
+"constraints defined by the Bean Validation API and also the custom "
+"constraints provided by Hibernate Validator."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:173
+#, no-c-format
+msgid "The constraint validator"
+msgstr "约束校验器"
+
+#. Tag: para
+#: customconstraints.xml:176
+#, fuzzy, no-c-format
+msgid ""
+"Next, we need to implement a constraint validator, that's able to validate "
+"elements with a <classname>@CheckCase</classname> annotation. To do so, we "
+"implement the interface <classname>ConstraintValidator</classname> as shown "
+"below:"
+msgstr ""
+"接下来, 我们需要实现一个约束验证器, 它是被用来校验应用了"
+"<classname>@CheckCase</classname>标注到元素到. 如下面例子所示, 这个验证器需要"
+"实现ConstraintValidator接口."
+
+#. Tag: title
+#: customconstraints.xml:182
+#, no-c-format
+msgid ""
+"Implementing a constraint validator for the constraint <classname>CheckCase</"
+"classname>"
+msgstr "约束条件<classname>CheckCase</classname>的验证器"
+
+#. Tag: programlisting
+#: customconstraints.xml:185
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator<CheckCase, "
+"String> {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"\n"
+"        if (caseMode == CaseMode.UPPER)\n"
+"            return object.equals(object.toUpperCase());\n"
+"        else\n"
+"            return object.equals(object.toLowerCase());\n"
+"    }\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator<CheckCase, "
+"String> {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"\n"
+"        if (caseMode == CaseMode.UPPER)\n"
+"            return object.equals(object.toUpperCase());\n"
+"        else\n"
+"            return object.equals(object.toLowerCase());\n"
+"    }\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:188
+#, no-c-format
+msgid ""
+"The <classname>ConstraintValidator</classname> interface defines two type "
+"parameters, which we set in our implementation. The first one specifies the "
+"annotation type to be validated (in our example <classname>CheckCase</"
+"classname>), the second one the type of elements, which the validator can "
+"handle (here <classname>String</classname>)."
+msgstr ""
+"<classname>ConstraintValidator</classname>定义了两个泛型参数, 第一个是这个校"
+"验器所服务到标注类型(在我们的例子中即<classname>CheckCase</classname>), 第二"
+"个这个校验器所支持到被校验元素到类型 (即<classname>String</classname>)."
+
+#. Tag: para
+#: customconstraints.xml:195
+#, no-c-format
+msgid ""
+"In case a constraint annotation is allowed at elements of different types, a "
+"<classname>ConstraintValidator</classname> for each allowed type has to be "
+"implemented and registered at the constraint annotation as shown above."
+msgstr ""
+"如果一个约束标注支持多种类型到被校验元素的话, 那么需要为每个所支持的类型定义"
+"一个<classname>ConstraintValidator</classname>,并且注册到约束标注中."
+
+#. Tag: para
+#: customconstraints.xml:200
+#, no-c-format
+msgid ""
+"The implementation of the validator is straightforward. The "
+"<methodname>initialize()</methodname> method gives us access to the "
+"attribute values of the annotation to be validated. In the example we store "
+"the <classname>CaseMode</classname> in a field of the validator for further "
+"usage."
+msgstr ""
+"这个验证器的实现就很平常了, <methodname>initialize()</methodname> 方法传进来"
+"一个所要验证的标注类型的实例, 在本例中, 我们通过此实例来获取其value属性的值,"
+"并将其保存为<classname>CaseMode</classname>类型的成员变量供下一步使用."
+
+#. Tag: para
+#: customconstraints.xml:206
+#, no-c-format
+msgid ""
+"In the <methodname>isValid()</methodname> method we implement the logic, "
+"that determines, whether a <classname>String</classname> is valid according "
+"to a given <classname>@CheckCase</classname> annotation or not. This "
+"decision depends on the case mode retrieved in <classname>initialize()</"
+"classname>. As the Bean Validation specification recommends, we consider "
+"<code>null</code> values as being valid. If <code>null</code> is not a valid "
+"value for an element, it should be annotated with <code>@NotNull</code> "
+"explicitly."
+msgstr ""
+"<methodname>isValid()</methodname>是实现真正的校验逻辑的地方, 判断一个给定的"
+"<classname>String</classname>对于<classname>@CheckCase</classname>这个约束条"
+"件来说是否是合法的, 同时这还要取决于在<classname>initialize()</classname>中获"
+"得的大小写模式. 根据Bean Validation中所推荐的做法, 我们认为<code>null</code>"
+"是合法的值. 如果<code>null</code>对于这个元素来说是不合法的话,那么它应该使用"
+"<code>@NotNull</code>来标注."
+
+#. Tag: title
+#: customconstraints.xml:216
+#, no-c-format
+msgid "The ConstraintValidatorContext"
+msgstr "ConstraintValidatorContext"
+
+#. Tag: para
+#: customconstraints.xml:218
+#, no-c-format
+msgid ""
+"relies on the default error message generation by just returning "
+"<constant>true</constant> or <constant>false</constant> from the "
+"<methodname>isValid</methodname> call. Using the passed "
+"<classname>ConstraintValidatorContext</classname> object it is possible to "
+"either add additional error messages or completely disable the default error "
+"message generation and solely define custom error messages. The "
+"<classname>ConstraintValidatorContext</classname> API is modeled as fluent "
+"interface and is best demonstrated with an example:"
+msgstr ""
+"中的<methodname>isValid</methodname>使用了约束条件中定义的错误消息模板, 然后"
+"返回一个<constant>true</constant> 或者 <constant>false</constant>. 通过使用传"
+"入的<classname>ConstraintValidatorContext</classname>对象, 我们还可以给约束条"
+"件中定义的错误信息模板来添加额外的信息或者完全创建一个新的错误信息模板. "
+
+#. Tag: title
+#: customconstraints.xml:230
+#, no-c-format
+msgid "Use of ConstraintValidatorContext to define custom error messages"
+msgstr "使用ConstraintValidatorContext来自定义错误信息"
+
+#. Tag: programlisting
+#: customconstraints.xml:233
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator<CheckCase, "
+"String> {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"        \n"
+"        boolean isValid;\n"
+"        if (caseMode == CaseMode.UPPER) {\n"
+"            isValid = object.equals(object.toUpperCase());\n"
+"        }\n"
+"        else {\n"
+"            isValid = object.equals(object.toLowerCase());\n"
+"        }\n"
+"        \n"
+"        if(!isValid) {\n"
+"            constraintContext.disableDefaultConstraintViolation();\n"
+"            constraintContext.buildConstraintViolationWithTemplate( \"{com."
+"mycompany.constraints.CheckCase.message}\"  ).addConstraintViolation();\n"
+"        }\n"
+"        return result;\n"
+"    }\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator<CheckCase, "
+"String> {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"        \n"
+"        boolean isValid;\n"
+"        if (caseMode == CaseMode.UPPER) {\n"
+"            isValid = object.equals(object.toUpperCase());\n"
+"        }\n"
+"        else {\n"
+"            isValid = object.equals(object.toLowerCase());\n"
+"        }\n"
+"        \n"
+"        if(!isValid) {\n"
+"            constraintContext.disableDefaultConstraintViolation();\n"
+"            constraintContext.buildConstraintViolationWithTemplate( \"{com."
+"mycompany.constraints.CheckCase.message}\"  ).addConstraintViolation();\n"
+"        }\n"
+"        return result;\n"
+"    }\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:236
+#, no-c-format
+msgid ""
+"shows how you can disable the default error message generation and add a "
+"custom error message using a specified message template. In this example the "
+"use of the <classname>ConstraintValidatorContext</classname> results in the "
+"same error message as the default error message generation."
+msgstr ""
+"演示了如果创建一个新的错误信息模板来替换掉约束条件中定义的默认的. 在本例中, "
+"实际上通过调用<classname>ConstraintValidatorContext</classname>达到了一个使用"
+"默认消息模板的效果."
+
+#. Tag: para
+#: customconstraints.xml:242
+#, no-c-format
+msgid ""
+"It is important to end each new constraint violation with "
+"<methodname>addConstraintViolation</methodname>. Only after that the new "
+"constraint violation will be created."
+msgstr ""
+"在创建新的constraint violation的时候一定要记得调用"
+"<methodname>addConstraintViolation</methodname>, 只有这样, 这个新的"
+"constraint violation才会被真正的创建."
+
+#. Tag: para
+#: customconstraints.xml:247
+#, no-c-format
+msgid ""
+"In case you are implementing a <classname>ConstraintValidator</classname> a "
+"class level constraint it is also possible to adjust set the property path "
+"for the created constraint violations. This is important for the case where "
+"you validate multiple properties of the class or even traverse the object "
+"graph. A custom property path creation could look like <xref linkend="
+"\"example-custom-error\"/>."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:256
+#, no-c-format
+msgid ""
+"Adding new <classname>ConstraintViolation</classname> with custom property "
+"path"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:259
+#, no-c-format
+msgid ""
+"public boolean isValid(Group group, ConstraintValidatorContext "
+"constraintValidatorContext) {\n"
+"    boolean isValid = false;\n"
+"    ...\n"
+"\n"
+"    if(!isValid) {\n"
+"        constraintValidatorContext\n"
+"            .buildConstraintViolationWithTemplate( \"{my.custom."
+"template}\" )\n"
+"            .addNode( \"myProperty\" ).addConstraintViolation();\n"
+"    }\n"
+"    return isValid;\n"
+"}"
+msgstr ""
+"public boolean isValid(Group group, ConstraintValidatorContext "
+"constraintValidatorContext) {\n"
+"    boolean isValid = false;\n"
+"    ...\n"
+"\n"
+"    if(!isValid) {\n"
+"        constraintValidatorContext\n"
+"            .buildConstraintViolationWithTemplate( \"{my.custom."
+"template}\" )\n"
+"            .addNode( \"myProperty\" ).addConstraintViolation();\n"
+"    }\n"
+"    return isValid;\n"
+"}"
+
+#. Tag: title
+#: customconstraints.xml:265
+#, no-c-format
+msgid "The error message"
+msgstr "校验错误信息"
+
+#. Tag: para
+#: customconstraints.xml:267
+#, no-c-format
+msgid ""
+"Finally we need to specify the error message, that shall be used, in case a "
+"<classname>@CheckCase</classname> constraint is violated. To do so, we add "
+"the following to our custom <filename>ValidationMessages.properties</"
+"filename> (see also <xref linkend=\"section-message-interpolation\"/>)"
+msgstr ""
+"最后, 我们还需要指定如果<classname>@CheckCase</classname>这个约束条件验证的时"
+"候,没有通过的话的校验错误信息. 我们可以添加下面的内容到我们项目自定义的"
+"<filename>ValidationMessages.properties</filename> (参考 <xref linkend="
+"\"section-message-interpolation\"/>)文件中."
+
+#. Tag: title
+#: customconstraints.xml:274
+#, no-c-format
+msgid ""
+"Defining a custom error message for the <classname>CheckCase</classname> "
+"constraint"
+msgstr "为<classname>CheckCase</classname>约束定义一个错误信息"
+
+#. Tag: programlisting
+#: customconstraints.xml:277
+#, no-c-format
+msgid "com.mycompany.constraints.CheckCase.message=Case mode must be {value}."
+msgstr "com.mycompany.constraints.CheckCase.message=Case mode must be {value}."
+
+#. Tag: para
+#: customconstraints.xml:280
+#, no-c-format
+msgid ""
+"If a validation error occurs, the validation runtime will use the default "
+"value, that we specified for the message attribute of the "
+"<classname>@CheckCase</classname> annotation to look up the error message in "
+"this file."
+msgstr ""
+"如果发现校验错误了的话, 你所使用的Bean Validation的实现会用我们定义在"
+"<classname>@CheckCase</classname>中message属性上的值作为键到这个文件中去查找"
+"对应的错误信息."
+
+#. Tag: title
+#: customconstraints.xml:287
+#, no-c-format
+msgid "Using the constraint"
+msgstr "应用约束条件"
+
+#. Tag: para
+#: customconstraints.xml:289
+#, no-c-format
+msgid ""
+"Now that our first custom constraint is completed, we can use it in the "
+"<classname>Car</classname> class from the <xref linkend=\"validator-"
+"gettingstarted\"/> chapter to specify that the <property>licensePlate</"
+"property> field shall only contain upper-case strings:"
+msgstr ""
+"现在我们已经有了一个自定义的约束条件了, 我们可以把它用在<xref linkend="
+"\"validator-gettingstarted\"/>中的<classname>Car</classname>类上, 来校验此类"
+"的<property>licensePlate</property>属性的值是否全都是大写字母."
+
+#. Tag: title
+#: customconstraints.xml:296
+#, no-c-format
+msgid "Applying the <classname>CheckCase</classname> constraint"
+msgstr "应用<classname>CheckCase</classname>约束条件"
+
+#. Tag: programlisting
+#: customconstraints.xml:299
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    @CheckCase(CaseMode.UPPER)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    @CheckCase(CaseMode.UPPER)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:302
+#, no-c-format
+msgid ""
+"Finally let's demonstrate in a little test that the <classname>@CheckCase</"
+"classname> constraint is properly validated:"
+msgstr ""
+"最后,让我们用一个简单的测试来检测<classname>@CheckCase</classname>约束已经被"
+"正确的校验了:"
+
+#. Tag: title
+#: customconstraints.xml:307
+#, no-c-format
+msgid "Testcase demonstrating the <classname>CheckCase</classname> validation"
+msgstr "演示<classname>CheckCase</classname>的验证过程"
+
+#. Tag: programlisting
+#: customconstraints.xml:310
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void testLicensePlateNotUpperCase() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"dd-ab-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\n"
+"            \"Case mode must be UPPER.\", \n"
+"            constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void testLicensePlateNotUpperCase() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"dd-ab-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\n"
+"            \"Case mode must be UPPER.\", \n"
+"            constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+
+#. Tag: title
+#: customconstraints.xml:316
+#, no-c-format
+msgid "Constraint composition"
+msgstr "约束条件组合"
+
+#. Tag: para
+#: customconstraints.xml:318
+#, no-c-format
+msgid ""
+"Looking at the <property>licensePlate</property> field of the "
+"<classname>Car</classname> class in <xref linkend=\"example-car-with-"
+"checkcase\"/>, we see three constraint annotations already. In complexer "
+"scenarios, where even more constraints could be applied to one element, this "
+"might become a bit confusing easily. Furthermore, if we had a "
+"<property>licensePlate</property> field in another class, we would have to "
+"copy all constraint declarations to the other class as well, violating the "
+"DRY principle."
+msgstr ""
+"在<xref linkend=\"example-car-with-checkcase\"/>中我们可以看到, 类"
+"<classname>Car</classname>的<property>licensePlate</property>属性上定义了三个"
+"约束条件. 在某些复杂的场景中, 可能还会有更多的约束条件被定义到同一个元素上"
+"面, 这可能会让代码看起来有些复杂, 另外, 如果在另外的类里面还有一个"
+"<property>licensePlate</property>属性, 我们可能还要把这些约束条件再拷贝到这个"
+"属性上, 但是这样做又违反了 DRY 原则."
+
+#. Tag: para
+#: customconstraints.xml:327
+#, no-c-format
+msgid ""
+"This problem can be tackled using compound constraints. In the following we "
+"create a new constraint annotation <classname>@ValidLicensePlate</"
+"classname>, that comprises the constraints <classname>@NotNull</classname>, "
+"<classname>@Size</classname> and <classname>@CheckCase</classname>:"
+msgstr ""
+"这个问题可以通过使用组合约束条件来解决. 接下来让我们来创建一个新的约束标注"
+"<classname>@ValidLicensePlate</classname>, 它组合了<classname>@NotNull</"
+"classname>, <classname>@Size</classname> 和 <classname>@CheckCase</"
+"classname>:"
+
+#. Tag: title
+#: customconstraints.xml:334
+#, no-c-format
+msgid ""
+"Creating a composing constraint <classname>ValidLicensePlate</classname>"
+msgstr "创建一个约束条件组合<classname>ValidLicensePlate</classname>"
+
+#. Tag: programlisting
+#: customconstraints.xml:337
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@NotNull\n"
+"@Size(min = 2, max = 14)\n"
+"@CheckCase(CaseMode.UPPER)\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = {})\n"
+"@Documented\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints."
+"validlicenseplate}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@NotNull\n"
+"@Size(min = 2, max = 14)\n"
+"@CheckCase(CaseMode.UPPER)\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = {})\n"
+"@Documented\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints."
+"validlicenseplate}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:340
+#, no-c-format
+msgid ""
+"To do so, we just have to annotate the constraint declaration with its "
+"comprising constraints (btw. that's exactly why we allowed annotation types "
+"as target for the <classname>@CheckCase</classname> annotation). As no "
+"additional validation is required for the <classname>@ValidLicensePlate</"
+"classname> annotation itself, we don't declare a validator within the "
+"<classname>@Constraint </classname>meta annotation."
+msgstr ""
+"我们只需要把要组合的约束标注在这个新的类型上加以声明 (注: 这正是我们为什么把"
+"annotation types作为了<classname>@CheckCase</classname>的一个target). 因为这"
+"个组合不需要额外的校验器, 所以不需要声明validator属性."
+
+#. Tag: para
+#: customconstraints.xml:348
+#, no-c-format
+msgid ""
+"Using the new compound constraint at the <property>licensePlate</property> "
+"field now is fully equivalent to the previous version, where we declared the "
+"three constraints directly at the field itself:"
+msgstr ""
+"现在, 在<property>licensePlate</property>属性上使用这个新定义的\"约束条件"
+"\" (其实是个组合) 和之前在其上声明那三个约束条件是一样的效果了."
+
+#. Tag: title
+#: customconstraints.xml:354
+#, no-c-format
+msgid ""
+"Application of composing constraint <classname>ValidLicensePlate</classname>"
+msgstr "使用<classname>ValidLicensePlate</classname>组合约束"
+
+#. Tag: programlisting
+#: customconstraints.xml:357
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @ValidLicensePlate\n"
+"    private String licensePlate;\n"
+"\n"
+"    //...\n"
+"\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @ValidLicensePlate\n"
+"    private String licensePlate;\n"
+"\n"
+"    //...\n"
+"\n"
+"}"
+
+#. Tag: para
+#: customconstraints.xml:360
+#, no-c-format
+msgid ""
+"The set of <classname>ConstraintViolations</classname> retrieved when "
+"validating a <classname>Car</classname> instance will contain an entry for "
+"each violated composing constraint of the <classname>@ValidLicensePlate</"
+"classname> constraint. If you rather prefer a single "
+"<classname>ConstraintViolation</classname> in case any of the composing "
+"constraints is violated, the <classname>@ReportAsSingleViolation</classname> "
+"meta constraint can be used as follows:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:370
+#, no-c-format
+msgid "Usage of <classname>@ReportAsSingleViolation</classname>"
+msgstr "<classname>@ReportAsSingleViolation</classname>的用法"
+
+#. Tag: programlisting
+#: customconstraints.xml:372
+#, no-c-format
+msgid ""
+"//...\n"
+"@ReportAsSingleViolation\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints."
+"validlicenseplate}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"\n"
+"}"
+msgstr ""
+"//...\n"
+"@ReportAsSingleViolation\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints."
+"validlicenseplate}\";\n"
+"\n"
+"    Class<?>[] groups() default {};\n"
+"\n"
+"    Class<? extends Payload>[] payload() default {};\n"
+"\n"
+"}"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/customoptions.po b/project/documentation/src/main/docbook/zh-CN/modules/customoptions.po
new file mode 100644
index 0000000..c68ce92
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/customoptions.po
@@ -0,0 +1,1111 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: 2011-02-11 14:56+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: zh-CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customoptions.xml:24
+#, no-c-format
+msgid "Hibernate Validator Specifics"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:26
+#, no-c-format
+msgid ""
+"In the following sections we are having a closer look at some of the "
+"Hibernate Validator specific features (features which are not part of the "
+"Bean Validation specification). This includes the fail fast mode, the "
+"programmatic constraint configuration API and boolean composition of "
+"composing constraints."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:33
+#, no-c-format
+msgid ""
+"The features described in the following sections are not portable between "
+"Bean Validation providers/implementations."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:38
+#, no-c-format
+msgid "Public API"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:40
+#, no-c-format
+msgid ""
+"Let's start, however, with a look at the public API of Hibernate Validator. "
+"<xref linkend=\"validator-public-api\"/> lists all packages belonging to "
+"this API and describes their purpose."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:44
+#, no-c-format
+msgid ""
+"Any packages not listed in that table are internal packages of Hibernate "
+"Validator and are not intended to be accessed by clients. The contents of "
+"these internal packages can change from release to release without notice, "
+"thus possibly breaking any client code relying on it."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:51
+#, no-c-format
+msgid ""
+"In the following table, when a package is public its not necessarily true "
+"for its nested packages."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:56
+#, no-c-format
+msgid "Hibernate Validator public API"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:61
+#, no-c-format
+msgid "Packages"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:63
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: package
+#: customoptions.xml:69
+#, no-c-format
+msgid "org.hibernate.validator"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:71
+#, no-c-format
+msgid ""
+"This package contains the classes used by the Bean Validation bootstrap "
+"mechanism (eg. validation provider, configuration class). For more details "
+"see <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:78
+#, no-c-format
+msgid ""
+"<package>org.hibernate.validator.cfg</package>, <package>org.hibernate."
+"validator.cfg.context</package>, <package>org.hibernate.validator.cfg.defs</"
+"package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:82
+#, no-c-format
+msgid ""
+"With Hibernate Validator you can define constraints via a fluent API. These "
+"packages contain all classes needed to use this feature. In the package "
+"<package>org.hibernate.validator.cfg</package> you will find the "
+"<classname>ConstraintMapping</classname> class and in package <package>org."
+"hibernate.validator.cfg.defs</package> all constraint definitions. For more "
+"details see <xref linkend=\"programmaticapi\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:93
+#, no-c-format
+msgid ""
+"<package>org.hibernate.validator.constraints</package>, <package>org."
+"hibernate.validator.constraints.br</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:96
+#, no-c-format
+msgid ""
+"In addition to Bean Validation constraints, Hibernate Validator provides "
+"some useful custom constraints. These packages contain all custom annotation "
+"classes. For more details see <xref linkend=\"validator-defineconstraints-hv-"
+"constraints\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:103
+#, no-c-format
+msgid ""
+"<package>org.hibernate.validator.group</package>, <package>org.hibernate."
+"validator.spi.group</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:106
+#, no-c-format
+msgid ""
+"With Hibernate Validator you can define dynamic default group sequences in "
+"function of the validated object state. These packages contain all classes "
+"needed to use this feature (<classname>GroupSequenceProvider</classname> "
+"annotation and <classname>DefaultGroupSequenceProvider</classname> "
+"contract). For more details see <xref linkend=\"section-default-group-class"
+"\"/>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:116
+#, no-c-format
+msgid ""
+"<package>org.hibernate.validator.messageinterpolation</package>, "
+"<package>org.hibernate.validator.resourceloading</package>, <package>org."
+"hibernate.validator.spi.resourceloading</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:120
+#, no-c-format
+msgid ""
+"These packages contain the classes related to constraint message "
+"interpolation. The first package contains two implementations of "
+"<classname>MessageInterpolator</classname>. The first one, "
+"<classname>ValueFormatterMessageInterpolator</classname> allows to "
+"interpolate the validated value into the constraint message, see <xref "
+"linkend=\"section-message-interpolator\"/>. The second implementation named "
+"<classname>ResourceBundleMessageInterpolator</classname> is the "
+"implementation used by default by Hibernate Validator. This implementation "
+"relies on a <classname>ResourceBundleLocator</classname>, see <xref linkend="
+"\"section-resource-bundle-locator\"/>. Hibernate Validator provides "
+"different <classname>ResourceBundleLocator</classname> implementations "
+"located in the package <package>org.hibernate.validator.resourceloading</"
+"package>."
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:139
+#, no-c-format
+msgid ""
+"<package>org.hibernate.validator.method</package>, <package>org.hibernate."
+"validator.method.metadata</package>"
+msgstr ""
+
+#. Tag: entry
+#: customoptions.xml:142
+#, no-c-format
+msgid ""
+"Hibernate Validator provides support for method-level constraints based on "
+"appendix C of the Bean Validation specification. The first package contains "
+"the <classname>MethodValidator</classname> interface allowing you to "
+"validate method return values and parameters. The second package contains "
+"meta data for constraints hosted on parameters and methods which can be "
+"retrieved via the <classname>MethodValidator</classname>."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:156
+#, no-c-format
+msgid ""
+"The public packages of Hibernate Validator fall into two categories: while "
+"the actual API parts are intended to be <emphasis>invoked</emphasis> or "
+"<emphasis>used</emphasis> by clients (e.g. the API for programmatic "
+"constraint declaration or the custom constraints), the SPI (service provider "
+"interface) packages contain interfaces which are intended to be "
+"<emphasis>implemented</emphasis> by clients (e.g. "
+"<classname>ResourceBundleLocator</classname>)."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:167
+#, no-c-format
+msgid "Fail fast mode"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:169
+#, no-c-format
+msgid ""
+"First off, the fail fast mode. Hibernate Validator allows to return from the "
+"current validation as soon as the first constraint violation occurs. This is "
+"called the <emphasis>fail fast mode</emphasis> and can be useful for "
+"validation of large object graphs where one is only interested whether there "
+"is a constraint violation or not. <xref linkend=\"example-fail-fast-property"
+"\"/>, <xref linkend=\"example-fail-fast-configuration\"/> and <xref linkend="
+"\"example-fail-fast-factory\"/> show multiple ways to enable the fail fast "
+"mode."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:180
+#, no-c-format
+msgid "Enabling <option>failFast</option> via a property"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:182
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration configuration = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"ValidatorFactory factory = configuration.addProperty( \"hibernate.validator."
+"fail_fast\", \"true\" ).buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"// do some actual fail fast validation\n"
+"..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:186
+#, no-c-format
+msgid ""
+"Enabling <option>failFast</option> at the <classname>Configuration</"
+"classname> level"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:189
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration configuration = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"ValidatorFactory factory = configuration.failFast( true )."
+"buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"// do some actual fail fast validation\n"
+"..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:193
+#, no-c-format
+msgid ""
+"Enabling <option>failFast</option> at the <classname>ValidatorFactory</"
+"classname> level"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:196
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration configuration = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"ValidatorFactory factory = configuration.buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"// do some non fail fast validation\n"
+"...\n"
+"\n"
+"validator = factory.unwrap( HibernateValidatorFactory.class )\n"
+"            .usingContext()\n"
+"            .failFast( true )\n"
+"            .getValidator();\n"
+"\n"
+"// do fail fast validation\n"
+"..."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:201
+#, no-c-format
+msgid "Method validation"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:203
+#, no-c-format
+msgid ""
+"The Bean Validation API allows to specify constraints for fields, properties "
+"and types. Hibernate Validator goes one step further and allows to place "
+"contraint annotations also on method parameters and method return values, "
+"thus enabling a programming style known as \"Programming by Contract\"."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:209
+#, no-c-format
+msgid ""
+"More specifically this means that Bean Validation constraints can be used to "
+"specify"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:214
+#, no-c-format
+msgid ""
+"the preconditions that must be met before a method invocation (by annotating "
+"method parameters with constraints) and"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:219
+#, no-c-format
+msgid ""
+"the postconditions that are guaranteed after a method invocation (by "
+"annotating methods)"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:224
+#, no-c-format
+msgid ""
+"This approach has several advantages over traditional ways of parameter and "
+"return value checking:"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:229
+#, no-c-format
+msgid ""
+"The checks don't have to be performed manually (e.g. by throwing "
+"<classname>IllegalArgumentExceptions</classname> or similar), resulting in "
+"less code to write and maintain."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:235
+#, no-c-format
+msgid ""
+"A method's pre- and postconditions don't have to be expressed again in the "
+"method's JavaDoc, since the constraint annotations will automatically be "
+"included in the generated JavaDoc. This avoids redundancy and reduces the "
+"chance of inconsistencies between implementation and documentation."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:244
+#, no-c-format
+msgid ""
+"Method validation was also considered to be included in the Bean Validation "
+"API as defined by JSR 303, but it didn't become part of the 1.0 version. A "
+"basic draft is outlined in appendix C of the specification, and the "
+"implementation in Hibernate Validator is largely influenced by this draft. "
+"The feature is considered again for inclusion in BV 1.1."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:253
+#, no-c-format
+msgid "Defining method-level constraints"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:255
+#, no-c-format
+msgid "demonstrates the definition of method-level constraints."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:258
+#, no-c-format
+msgid "Using method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:260
+#, no-c-format
+msgid ""
+"public class RentalStation {\n"
+"\n"
+"    @NotNull \n"
+"    public Car rentCar(@NotNull Customer customer, @NotNull @Future Date "
+"startDate, @Min(1) int durationInDays) { \n"
+"        //...\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:263
+#, no-c-format
+msgid ""
+"Here the following pre- and postconditions for the <methodname>rentCar()</"
+"methodname> method are declared:"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:268
+#, no-c-format
+msgid "The renting customer may not be null"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:272
+#, no-c-format
+msgid "The rental's start date must not be null and must be in the future"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:277
+#, no-c-format
+msgid "The rental duration must be at least one day"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:281
+#, no-c-format
+msgid "The returned <classname>Car</classname> instance may not be null"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:286
+#, no-c-format
+msgid ""
+"Using the <classname>@Valid</classname> annotation it's also possible to "
+"define that a cascaded validation of parameter or return value objects shall "
+"be performed. An example can be found in <xref lang=\"\" linkend=\"example-"
+"cascaded-method-constraints\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:292
+#, no-c-format
+msgid "Cascaded validation of method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:294
+#, no-c-format
+msgid ""
+"public class RentalStation {\n"
+"\n"
+"    @Valid\n"
+"    public Set<Rental> getRentalsByCustomer(@Valid Customer customer) "
+"{ \n"
+"        //...\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:297
+#, no-c-format
+msgid ""
+"Here all the constraints declared at the <classname>Customer</classname> "
+"type will be evaluated when validating the method parameter and all "
+"constraints declared at the returned <classname>Rental</classname> objects "
+"will be evaluated when validating the method's return value."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:304
+#, no-c-format
+msgid "Using method constraints in type hierarchies"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:306
+#, no-c-format
+msgid ""
+"Special care must be taken when defining parameter constraints in "
+"inheritance hierarchies."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:309
+#, no-c-format
+msgid ""
+"When a method is overridden in sub-types method parameter constraints can "
+"only be declared at the base type. The reason for this restriction is that "
+"the preconditions to be fulfilled by a type's client must not be "
+"strengthened in sub-types (which may not even be known to the base type's "
+"client). Note that also if the base method doesn't declare any parameter "
+"constraints at all, no parameter constraints may be added in overriding "
+"methods."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:317
+#, no-c-format
+msgid ""
+"The same restriction applies to interface methods: no parameter constraints "
+"may be defined at the implementing method (or the same method declared in "
+"sub-interfaces)."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:321
+#, no-c-format
+msgid ""
+"If a violation of this rule is detected by the validation engine, a "
+"<classname>javax.validation.ConstraintDeclarationException</classname> will "
+"be thrown. In <xref lang=\"\" linkend=\"example-illegal-method-constraints\"/"
+"> some examples for illegal parameter constraints declarations are shown."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:329
+#, no-c-format
+msgid "Illegal parameter constraint declarations"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:331
+#, no-c-format
+msgid ""
+"public class Car {\n"
+"\n"
+"    public void drive(Person driver) { ... }\n"
+"\n"
+"}\n"
+"\n"
+"public class RentalCar extends Car {\n"
+"\n"
+"    //not allowed, parameter constraint added in overriding method\n"
+"    public void drive(@NotNull Person driver) { ... }\n"
+"\n"
+"}\n"
+"\n"
+"public interface ICar {\n"
+"\n"
+"    void drive(Person driver);\n"
+"\n"
+"}\n"
+"\n"
+"public class CarImpl implements ICar {\n"
+"\n"
+"    //not allowed, parameter constraint added in implementation of interface "
+"method\n"
+"    public void drive(@NotNull Person driver) { ... }\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:334
+#, no-c-format
+msgid ""
+"This rule only applies to parameter constraints, return value constraints "
+"may be added in sub-types without any restrictions as it is alright to "
+"strengthen the postconditions guaranteed to a type's client."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:342
+#, no-c-format
+msgid "Evaluating method-level constraints"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:344
+#, no-c-format
+msgid ""
+"To validate method-level constraints Hibernate Validator provides the "
+"interface <classname>org.hibernate.validator.method.MethodValidator</"
+"classname>."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:348
+#, no-c-format
+msgid ""
+"As shown in <xref lang=\"\" linkend=\"example-methodvalidator\"/> this "
+"interface defines methods for the evaluation of parameter as well as return "
+"value constraints and for retrieving an extended type descriptor providing "
+"method constraint related meta data."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:354
+#, no-c-format
+msgid "The <classname>MethodValidator</classname> interface"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:356
+#, no-c-format
+msgid ""
+"public interface MethodValidator {\n"
+"\n"
+"    <T> Set<MethodConstraintViolation<T>> validateParameter"
+"(T object, Method method, Object parameterValue, int parameterIndex, "
+"Class<?>... groups);\n"
+"    \n"
+"    <T> Set<MethodConstraintViolation<T>> "
+"validateAllParameters(T object, Method method, Object[] parameterValues, "
+"Class<?>... groups);\n"
+"    \n"
+"    <T> Set<MethodConstraintViolation<T>> "
+"validateReturnValue(T object, Method method, Object returnValue, Class<?"
+">... groups);\n"
+" \n"
+"    TypeDescriptor getConstraintsForType(Class<?> clazz);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:359
+#, no-c-format
+msgid ""
+"To retrieve a method validator get hold of an instance of HV's "
+"<classname>javax.validation.Validator</classname> implementation and unwrap "
+"it to <classname>MethodValidator</classname> as shown in <xref lang=\"\" "
+"linkend=\"example-retrieving-methodvalidator\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:365
+#, no-c-format
+msgid "Retrieving a <classname>MethodValidator</classname> instance"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:368
+#, no-c-format
+msgid ""
+"MethodValidator methodValidator = Validation.byProvider( HibernateValidator."
+"class )\n"
+"    .configure()\n"
+"    .buildValidatorFactory()\n"
+"    .getValidator()\n"
+"    .unwrap( MethodValidator.class );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:371
+#, no-c-format
+msgid ""
+"The validation methods defined on <classname>MethodValidator</classname> "
+"each return a <classname>Set<MethodConstraintViolation></classname>. "
+"The type <classname>MethodConstraintViolation</classname> (see <xref lang="
+"\"\" linkend=\"example-methodconstraintviolation\"/>) extends "
+"<classname>javax.validation.ConstraintViolation</classname> and provides "
+"additional method level validation specific information such as the method "
+"and index of the parameter which caused the constraint violation."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:382
+#, no-c-format
+msgid "The <classname>MethodConstraintViolation</classname> type"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:385
+#, no-c-format
+msgid ""
+"public interface MethodConstraintViolation<T> extends "
+"ConstraintViolation<T> {\n"
+"    \n"
+"    public static enum Kind { PARAMETER, RETURN_VALUE }\n"
+"\n"
+"    Method getMethod();\n"
+"\n"
+"    Integer getParameterIndex();\n"
+"\n"
+"    String getParameterName();\n"
+"\n"
+"    Kind getKind();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:389
+#, no-c-format
+msgid ""
+"The method <methodname>getParameterName()</methodname> currently returns "
+"synthetic parameter identifiers such as \"arg0\", \"arg1\" etc. In a future "
+"version of Hibernate Validator support for specifying parameter identifiers "
+"might be added."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:395
+#, no-c-format
+msgid ""
+"Typically the validation of method-level constraints is not invoked manually "
+"but automatically upon method invocation by an integration layer using AOP "
+"(aspect-oriented programming) or similar method interception facilities such "
+"as the JDK's <classname>java.lang.reflect.Proxy</classname> API or CDI "
+"(\"JSR 299: Contexts and Dependency Injection for the Java<superscript>TM</"
+"superscript> EE platform\")."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:403
+#, no-c-format
+msgid ""
+"If a parameter or return value constraint can't be validated sucessfully "
+"such an integration layer typically will throw a "
+"<classname>MethodConstraintViolationException</classname> which similar to "
+"<classname>javax.validation.ConstraintViolationException</classname> "
+"contains a set with the occurred constraint violations."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:410
+#, no-c-format
+msgid ""
+"If you are using CDI you might be interested in the <ulink url=\"http://"
+"seamframework.org/Seam3/ValidationModule\">Seam Validation</ulink> project. "
+"This Seam module provides an interceptor which integrates the method "
+"validation functionality with CDI."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:418
+#, no-c-format
+msgid "Retrieving method-level constraint meta data"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:420
+#, no-c-format
+msgid ""
+"As outlined in <xref lang=\"\" linkend=\"validator-metadata-api\"/> the Bean "
+"Validation API provides rich capabilities for retrieving constraint related "
+"meta data. Hibernate Validator extends this API and allows to retrieve "
+"constraint meta data also for method-level constraints."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:426
+#, no-c-format
+msgid ""
+"shows how to use this extended API to retrieve constraint meta data for the "
+"<methodname>rentCar()</methodname> method from the <classname>RentalStation</"
+"classname> type."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:432
+#, no-c-format
+msgid "Retrieving meta data for method-level constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:434
+#, no-c-format
+msgid ""
+"TypeDescriptor typeDescriptor = methodValidator.getConstraintsForType"
+"(RentalStation.class)\n"
+"\n"
+"//retrieve a descriptor for the rentCar() method\n"
+"MethodDescriptor rentCarMethod = typeDescriptor.getConstraintsForMethod"
+"(\"rentCar\", Customer.class, Date.class, int.class);\n"
+"assertEquals(rentCarMethod.getMethodName(), \"rentCar\");\n"
+"assertTrue(rentCarMethod.hasConstraints());\n"
+"assertFalse(rentCarMethod.isCascaded());\n"
+"\n"
+"//retrieve constraints from the return value\n"
+"Set<ConstraintDescriptor<?>> returnValueConstraints = "
+"rentCarMethod.findConstraints().getConstraintDescriptors();\n"
+"assertEquals(returnValueConstraints.size(), 1);\n"
+"assertEquals(returnValueConstraints.iterator().next().getAnnotation()."
+"annotationType(), NotNull.class);\n"
+"\n"
+"List<ParameterDescriptor> allParameters = rentCarMethod."
+"getParameterDescriptors();\n"
+"assertEquals(allParameters.size(), 3);\n"
+"\n"
+"//retrieve a descriptor for the startDate parameter\n"
+"ParameterDescriptor startDateParameter = allParameters.get(1);\n"
+"assertEquals(startDateParameter.getIndex(), 1);\n"
+"assertFalse(startDateParameter.isCascaded());\n"
+"assertEquals(startDateParameter.findConstraints().getConstraintDescriptors()."
+"size(), 2);"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:437
+#, no-c-format
+msgid ""
+"Refer to the <ulink url=\"http://docs.jboss.org/hibernate/validator/4.2/api/"
+"index.html?org/hibernate/validator/method/metadata/package-summary.html"
+"\">JavaDoc</ulink> of the package <classname>org.hibernate.validator.method."
+"metadata</classname> for more details on the extended meta data API."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:446 customoptions.xml:462
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:448
+#, no-c-format
+msgid ""
+"Another addition to the Bean Validation specification is the ability to "
+"configure constraints via a fluent API. This API can be used exclusively or "
+"in combination with annotations and xml. If used in combination programmatic "
+"constraints are additive to constraints configured via the standard "
+"configuration capabilities."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:454
+#, no-c-format
+msgid ""
+"The API is centered around the <classname>ConstraintMapping</classname> "
+"class which can be found in the package<package> org.hibernate.validator."
+"cfg</package>. Starting with the instantiation of a new "
+"<classname>ConstraintMapping</classname>, constraints can be defined in a "
+"fluent manner as shown in <xref lang=\"\" linkend=\"example-constraint-"
+"mapping\"/>."
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:464
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"manufacturer\", FIELD )\n"
+"        .constraint( new NotNullDef() )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( new NotNullDef() )\n"
+"        .constraint( new SizeDef().min( 2 ).max( 14 ) )\n"
+"    .property( \"seatCount\", FIELD )\n"
+"        .constraint( new MinDef()value ( 2 ) )\n"
+".type( RentalCar.class )\n"
+"    .property( \"rentalStation\", METHOD )\n"
+"        .constraint( new NotNullDef() );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:467
+#, no-c-format
+msgid ""
+"As you can see constraints can be configured on multiple classes and "
+"properties using method chaining. The constraint definition classes "
+"<classname>NotNullDef</classname>, <classname>SizeDef</classname> and "
+"<classname>MinDef</classname> are helper classes which allow to configure "
+"constraint parameters in a type-safe fashion. Definition classes exist for "
+"all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</"
+"classname> package."
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:475
+#, no-c-format
+msgid ""
+"For custom constraints you can either create your own definition classes "
+"extending <classname>ConstraintDef</classname> or you can use "
+"<classname>GenericConstraintDef</classname> as seen in <xref linkend="
+"\"example-generic-constraint-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:481
+#, no-c-format
+msgid ""
+"Programmatic constraint definition using <methodname>createGeneric()</"
+"methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:484
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( new GenericConstraintDef<CheckCase.class>"
+"( CheckCase.class ).param( \"value\", CaseMode.UPPER ) );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:487
+#, no-c-format
+msgid ""
+"Not only standard class- and property-level constraints but also method "
+"constraints can be configured using the API. As shown in <xref lang=\"\" "
+"linkend=\"example-method-constraint-mapping\"/> methods are identified by "
+"their name and their parameters (if there are any). Having selected a "
+"method, constraints can be placed on the method's parameters and/or return "
+"value."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:495
+#, no-c-format
+msgid "Programmatic definition of method constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:497
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .method( \"drive\", String.class, Integer.class )\n"
+"        .parameter( 0 )\n"
+"            .constraint( new NotNullDef() )\n"
+"            .constraint( new MinDef().value ( 1 ) )\n"
+"        .parameter( 1 )\n"
+"            .constraint( new NotNullDef() )\n"
+"        .returnValue()\n"
+"            .constraint( new NotNullDef() )\n"
+"    .method( \"check\" )\n"
+"        .returnValue()\n"
+"            .constraint( new NotNullDef() );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:500
+#, no-c-format
+msgid ""
+"Using the API it's also possible to mark properties, method parameters and "
+"method return values as cascading (equivalent to annotating them with "
+"<classname>@Valid</classname>). An example can be found in <xref lang=\"\" "
+"linkend=\"example-cascading-constraints\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:506
+#, no-c-format
+msgid "Marking constraints for cascaded validation"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:508
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"manufacturer\", FIELD )\n"
+"        .valid()\n"
+"    .property( \"licensePlate\", METHOD )\n"
+"        .valid()\n"
+"    .method( \"drive\", String.class, Integer.class )\n"
+"        .parameter( 0 )\n"
+"            .valid()\n"
+"        .parameter( 1 )\n"
+"            .valid()\n"
+"        .returnValue()\n"
+"            .valid()\n"
+".type( RentalCar.class )\n"
+"    .property( \"rentalStation\", METHOD )\n"
+"        .valid();"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:511
+#, no-c-format
+msgid ""
+"Last but not least you can configure the default group sequence or the "
+"default group sequence provider of a type as shown in <xref lang=\"\" "
+"linkend=\"example-sequences\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:514
+#, no-c-format
+msgid ""
+"Configuration of default group sequence and default group sequence provider"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:517
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .defaultGroupSequence( Car.class, CarChecks.class )\n"
+".type( RentalCar.class )\n"
+"    .defaultGroupSequenceProvider( RentalCarGroupSequenceProvider.class );"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:520
+#, no-c-format
+msgid ""
+"Once a <classname>ConstraintMapping</classname> is set up it has to be "
+"passed to the configuration. Since the programmatic API is not part of the "
+"official Bean Validation specification you need to get hold of a "
+"<classname>HibernateValidatorConfiguration</classname> instance as shown in "
+"<xref linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:527
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:529
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"// configure mapping instance\n"
+"\n"
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.addMapping( mapping );\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:534
+#, no-c-format
+msgid "Boolean composition for constraint composition"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:536
+#, no-c-format
+msgid ""
+"As per Bean Validation specification the constraints of a composed "
+"constraint (see <xref linkend=\"section-constraint-composition\"/>) are all "
+"combined via a logical <emphasis>AND</emphasis>. This means all of the "
+"composing constraints need to return <constant>true</constant> in order for "
+"an overall successful validation. Hibernate Validator offers an extension to "
+"this logical <emphasis>AND</emphasis> combination which allows you to "
+"compose constraints via a logical <emphasis>OR</emphasis> or <emphasis>NOT</"
+"emphasis>. To do so you have to use the <classname>ConstraintComposition</"
+"classname> annotation and the enum <classname>CompositionType</classname> "
+"with its values <emphasis>AND</emphasis>, <emphasis>OR</emphasis> and "
+"<emphasis>ALL_FALSE</emphasis>. <xref linkend=\"example-boolean-constraint-"
+"composition\"/> shows how to build a composing constraint where only one of "
+"the constraints has to be successful in order to pass the validation. Either "
+"the validated string is all lowercased or it is between two and three "
+"characters long."
+msgstr ""
+
+#. Tag: title
+#: customoptions.xml:554
+#, no-c-format
+msgid "OR composition of constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: customoptions.xml:556
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">@ConstraintComposition(OR)</emphasis>\n"
+"@Pattern(regexp = \"[a-z]\")\n"
+"@Size(min = 2, max = 3)\n"
+"@ReportAsSingleViolation\n"
+"@Target({ METHOD, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = { })\n"
+"public @interface PatternOrSize {\n"
+"   public abstract String message() default \"{PatternOrSize.message}\";\n"
+"   public abstract Class<?>[] groups() default { };\n"
+"   public abstract Class<? extends Payload>[] payload() default { };\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customoptions.xml:560
+#, no-c-format
+msgid ""
+"Using <emphasis>ALL_FALSE</emphasis> as composition type implicitly enforces "
+"that only a single violation will get reported in case validation of the "
+"constraint composition fails."
+msgstr ""
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/furtherreading.po b/project/documentation/src/main/docbook/zh-CN/modules/furtherreading.po
new file mode 100644
index 0000000..54c4b08
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/furtherreading.po
@@ -0,0 +1,77 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: 2010-08-14 14:25+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: furtherreading.xml:24
+#, no-c-format
+msgid "Further reading"
+msgstr "进一步阅读"
+
+#. Tag: para
+#: furtherreading.xml:26
+#, no-c-format
+msgid "Last but not least, a few pointers to further information."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:28
+#, fuzzy, no-c-format
+msgid ""
+"A great source for examples is the Bean Validation TCK which is available "
+"for anonymous access on <ulink url=\"https://github.com/beanvalidation/"
+"beanvalidation-tck\">GitHub</ulink>. In particular the TCK's <ulink url="
+"\"https://github.com/beanvalidation/beanvalidation-tck/tree/master/src/main/"
+"java/org/hibernate/jsr303/tck/tests\">tests</ulink> might be of interest. "
+"<ulink url=\"http://jcp.org/en/jsr/detail?id=303\">The JSR 303</ulink> "
+"specification itself is also a great way to deepen your understanding of "
+"Bean Validation resp. Hibernate Validator."
+msgstr ""
+"最后,还有一些东东可供进一步参考. Bean Validation TCK 是一份非常好的示例,你可"
+"以从Hibernate <ulink url=\"http://anonsvn.jboss.org/repos/hibernate/"
+"validator/trunk\">SVN repository</ulink>匿名访问得到. 或者, 你也可以通过"
+"<ulink url=\"http://fisheye.jboss.org/browse/Hibernate/beanvalidation/trunk/"
+"validation-tck/src/main/java/org/hibernate/jsr303/tck/tests\">Hibernate's "
+"fisheye</ulink>来查看我们的测试用例代码. 另外阅读<ulink url=\"http://jcp.org/"
+"en/jsr/detail?id=303\">The JSR 303</ulink>规范也是很好的方法来加深你对Bean "
+"Validation 和 Hibernate Validator的理解."
+
+#. Tag: para
+#: furtherreading.xml:37
+#, no-c-format
+msgid ""
+"If you have any further questions to Hibernate Validator or want to share "
+"some of your use cases have a look at the <ulink url=\"http://community."
+"jboss.org/en/hibernate/validator\">Hibernate Validator Wiki</ulink> and the "
+"<ulink url=\"https://forum.hibernate.org/viewforum.php?f=9\">Hibernate "
+"Validator Forum</ulink>."
+msgstr ""
+"如果你还有什么关于Hibernate Validator的问题或者想和我们分享你的使用经验,请使"
+"用<ulink url=\"http://community.jboss.org/en/hibernate/validator\">Hibernate "
+"Validator Wiki</ulink>或者去<ulink url=\"https://forum.hibernate.org/"
+"viewforum.php?f=9\">Hibernate Validator Forum</ulink>发帖子(译注:但是不要灌"
+"水:-D)."
+
+#. Tag: para
+#: furtherreading.xml:44
+#, no-c-format
+msgid ""
+"In case you would like to report a bug use <ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV\">Hibernate's Jira</ulink> "
+"instance. Feedback is always welcome!"
+msgstr ""
+"如果你发现了Hibernate Validator的bug,请在<ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV\">Hibernate's Jira</ulink>中报告, "
+"我们非常欢迎您的反馈!"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/gettingstarted.po b/project/documentation/src/main/docbook/zh-CN/modules/gettingstarted.po
new file mode 100644
index 0000000..bb02f31
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/gettingstarted.po
@@ -0,0 +1,636 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: 2010-07-07 03:33+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: gettingstarted.xml:24
+#, no-c-format
+msgid "Getting started"
+msgstr "开始入门"
+
+#. Tag: para
+#: gettingstarted.xml:26
+#, no-c-format
+msgid ""
+"This chapter will show you how to get started with Hibernate Validator, the "
+"reference implementation (RI) of Bean Validation. For the following "
+"quickstart you need:"
+msgstr ""
+"本章将会告诉你如何使用Hibernate Validator, 在开始之前,你需要准备好下面的环境:"
+
+#. Tag: para
+#: gettingstarted.xml:32
+#, fuzzy, no-c-format
+msgid "A JDK >= 6"
+msgstr "A JDK >= 5"
+
+#. Tag: ulink
+#: gettingstarted.xml:36
+#, no-c-format
+msgid "Apache Maven"
+msgstr "Apache Maven"
+
+#. Tag: para
+#: gettingstarted.xml:40
+#, no-c-format
+msgid "An Internet connection (Maven has to download all required libraries)"
+msgstr "网络连接 ( Maven需要通过互联网下载所需的类库)"
+
+#. Tag: para
+#: gettingstarted.xml:45
+#, fuzzy, no-c-format
+msgid ""
+"A properly configured remote repository. Add the following to your "
+"<filename>settings.xml</filename>: <example id=\"example-jboss-maven-url\"> "
+"<title>Configuring the JBoss Maven repository</title> <programlisting><"
+"repositories>\n"
+"    <repository>\n"
+"        <id>jboss-public-repository-group</id>\n"
+"        <url>https://repository.jboss.org/nexus/content/groups/public-"
+"jboss</url>\n"
+"        <releases>\n"
+"          <enabled>true</enabled>\n"
+"        </releases>\n"
+"        <snapshots>\n"
+"          <enabled>true</enabled>\n"
+"        </snapshots>\n"
+"     </repository>\n"
+"</repositories>        </programlisting> </example>More information "
+"about <filename>settings.xml</filename> can be found in the <ulink url="
+"\"http://maven.apache.org/ref/2.0.8/maven-settings/settings.html\">Maven "
+"Local Settings Model</ulink>."
+msgstr ""
+"配置远端maven仓库. 添加下面的内容到你的<filename>settings.xml</filename>中:"
+"<example> <title>Configuring the JBoss Maven repository in "
+"<filename>settings.xml</filename></title> <programlisting><"
+"repositories>\n"
+"    <repository>\n"
+"        <id>jboss</id>\n"
+"        <url>http://repository.jboss.com/maven2</url>\n"
+"        <releases>\n"
+"            <enabled>true</enabled>\n"
+"        </releases>\n"
+"        <snapshots>\n"
+"            <enabled>false</enabled>\n"
+"        </snapshots>\n"
+"    </repository>\n"
+"</repositories></programlisting> </example>更多关于<filename>settings."
+"xml</filename> 的信息请参考<ulink url=\"http://maven.apache.org/ref/2.0.8/"
+"maven-settings/settings.html\">Maven Local Settings Model</ulink>."
+
+#. Tag: title
+#: gettingstarted.xml:58
+#, no-c-format
+msgid "Project set up"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:60
+#, no-c-format
+msgid ""
+"In order to use Hibernate Validator within an existing Maven project, simply "
+"add the following dependency to your <filename>pom.xml</filename>:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:63
+#, no-c-format
+msgid "Maven dependency of Hibernate Validator"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:65
+#, no-c-format
+msgid ""
+"<dependency>\n"
+"    <groupId>org.hibernate</groupId>\n"
+"    <artifactId>hibernate-validator</artifactId>\n"
+"    <version>&version;</version>\n"
+"</dependency>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:68
+#, fuzzy, no-c-format
+msgid ""
+"Alternatively, you can start by creating a sample project using Hibernate "
+"Validator's Quickstart Maven archetype as follows:"
+msgstr "使用Maven archetype插件来创建一个新的Maven 项目"
+
+#. Tag: title
+#: gettingstarted.xml:72
+#, no-c-format
+msgid ""
+"Using Maven's archetype plugin to create a sample project using Hibernate "
+"Validator"
+msgstr "使用Maven archetype 插件来创建一个简单的基于Hibernate Validator的项目"
+
+#. Tag: programlisting
+#: gettingstarted.xml:75
+#, fuzzy, no-c-format
+msgid ""
+"mvn archetype:generate -DarchetypeGroupId=org.hibernate \\\n"
+"                       -DarchetypeArtifactId=hibernate-validator-quickstart-"
+"archetype \\\n"
+"                       -DarchetypeVersion=&version; \\\n"
+"                       -DarchetypeRepository=http://repository.jboss.org/"
+"nexus/content/groups/public-jboss/ \\\n"
+"                       -DgroupId=com.mycompany \\\n"
+"                       -DartifactId=hv-quickstart"
+msgstr ""
+"mvn archetype:create -DarchetypeGroupId=org.hibernate \\\n"
+"                     -DarchetypeArtifactId=hibernate-validator-quickstart-"
+"archetype \\\n"
+"                     -DarchetypeVersion=&version; \\\n"
+"                     -DgroupId=com.mycompany \n"
+"                     -DartifactId=hv-quickstart"
+
+#. Tag: para
+#: gettingstarted.xml:78
+#, no-c-format
+msgid ""
+"Maven will create your project in the directory hv-quickstart. Change into "
+"this directory and run:"
+msgstr "Maven 将会把你的项目创建在hv-quickstart目录中. 进入这个目录并且执行:"
+
+#. Tag: programlisting
+#: gettingstarted.xml:81
+#, no-c-format
+msgid "mvn test"
+msgstr "mvn test"
+
+#. Tag: para
+#: gettingstarted.xml:81
+#, fuzzy, no-c-format
+msgid ""
+"Maven will compile the example code and run the implemented unit tests. "
+"Let's have a look at the actual code in the next section."
+msgstr ""
+"这样, Maven会编译示例代码并且运行单元测试, 接下来,让我们看看生成的代码."
+
+#. Tag: para
+#: gettingstarted.xml:86
+#, no-c-format
+msgid ""
+"For the purposes of logging, Hibernate Validator uses the JBoss Logging API. "
+"This is an abstraction layer which supports several known logging solutions "
+"(e.g. log4j or the logging framework provided by the JDK) as implementation. "
+"Just add your preferred logging library to the classpath and all log "
+"requests from Hibernate Validator will automatically be delegated to that "
+"logging provider."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:93
+#, no-c-format
+msgid ""
+"Alternatively, you can explicitely specify a provider using the system "
+"property <varname>org.jboss.logging.provider</varname>. Supported values "
+"currently are <varname>jboss</varname>, <varname>jdk</varname>, "
+"<varname>log4j</varname> and <varname>slf4j</varname>."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:101
+#, no-c-format
+msgid "Applying constraints"
+msgstr "添加约束"
+
+#. Tag: para
+#: gettingstarted.xml:103
+#, no-c-format
+msgid ""
+"Open the project in the IDE of your choice and have a look at the class "
+"<classname>Car</classname>:"
+msgstr "在你喜欢的IDE中打开这个项目中的<classname>Car</classname>类:"
+
+#. Tag: title
+#: gettingstarted.xml:107
+#, no-c-format
+msgid "Class Car annotated with constraints"
+msgstr "带约束性标注(annotated with constraints)的Car 类"
+
+#. Tag: programlisting
+#: gettingstarted.xml:109
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+
+#. Tag: para
+#: gettingstarted.xml:112
+#, no-c-format
+msgid ""
+"<classname>@NotNull</classname>, <classname>@Size</classname> and "
+"<classname>@Min</classname> are so-called constraint annotations, that we "
+"use to declare constraints, which shall be applied to the fields of a "
+"<classname>Car</classname> instance:"
+msgstr ""
+"<classname>@NotNull</classname>, <classname>@Size</classname> and "
+"<classname>@Min</classname>就是上面所属的约束性标注( constraint "
+"annotations), 我们就是使用它们来声明约束, 例如在<classname>Car</classname>的"
+"字段中我们可以看到:"
+
+#. Tag: para
+#: gettingstarted.xml:119
+#, no-c-format
+msgid "<property>manufacturer</property> shall never be null"
+msgstr "<property>manufacturer</property>永远不能为null"
+
+#. Tag: para
+#: gettingstarted.xml:123
+#, no-c-format
+msgid ""
+"<property>licensePlate</property> shall never be null and must be between 2 "
+"and 14 characters long"
+msgstr ""
+"<property>licensePlate</property>永远不能为null,并且它的值字符串的长度要在2到"
+"14之间"
+
+#. Tag: para
+#: gettingstarted.xml:128
+#, no-c-format
+msgid "<property>seatCount</property> shall be at least 2."
+msgstr "<property>seatCount</property>的值要不能小于2"
+
+#. Tag: title
+#: gettingstarted.xml:134
+#, no-c-format
+msgid "Validating constraints"
+msgstr "校验约束"
+
+#. Tag: para
+#: gettingstarted.xml:136
+#, no-c-format
+msgid ""
+"To perform a validation of these constraints, we use a <classname>Validator</"
+"classname> instance. Let's have a look at the <classname>CarTest</classname> "
+"class:"
+msgstr ""
+"我们需要使用<classname>Validator</classname>来对上面的那些约束进行校验. 让我"
+"们来看看<classname>CarTest</classname>这个类:"
+
+#. Tag: title
+#: gettingstarted.xml:141
+#, no-c-format
+msgid "Class CarTest showing validation examples"
+msgstr "在CarTest中使用校验"
+
+#. Tag: programlisting
+#: gettingstarted.xml:143
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void manufacturerIsNull() {\n"
+"        Car car = new Car(null, \"DD-AB-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"may not be null\", constraintViolations.iterator()."
+"next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void licensePlateTooShort() {\n"
+"        Car car = new Car(\"Morris\", \"D\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations = \n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"size must be between 2 and 14\", constraintViolations."
+"iterator().next().getMessage());\n"
+"    }\n"
+"    \n"
+"    @Test\n"
+"    public void seatCountTooLow() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 1);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"must be greater than or equal to 2\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 2);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void manufacturerIsNull() {\n"
+"        Car car = new Car(null, \"DD-AB-123\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"may not be null\", constraintViolations.iterator()."
+"next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void licensePlateTooShort() {\n"
+"        Car car = new Car(\"Morris\", \"D\", 4);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations = \n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"size must be between 2 and 14\", constraintViolations."
+"iterator().next().getMessage());\n"
+"    }\n"
+"    \n"
+"    @Test\n"
+"    public void seatCountTooLow() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 1);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"must be greater than or equal to 2\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 2);\n"
+"\n"
+"        Set<ConstraintViolation<Car>> constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: gettingstarted.xml:146
+#, no-c-format
+msgid ""
+"In the <methodname>setUp()</methodname> method we get a "
+"<classname>Validator</classname> instance from the "
+"<classname>ValidatorFactory</classname>. A <classname>Validator</classname> "
+"instance is thread-safe and may be reused multiple times. For this reason we "
+"store it as field of our test class. We can use the <classname>Validator</"
+"classname> now to validate the different car instances in the test methods."
+msgstr ""
+"在<methodname>setUp()</methodname>方法中,我们通过"
+"<classname>ValidatorFactory</classname>得到了一个<classname>Validator</"
+"classname>的实例. <classname>Validator</classname>是线程安全的,并且可以重复使"
+"用, 所以我们把它保存成一个类变量. 现在我们可以在test方法中使用这个validator的"
+"实例来校验不同的car实例了."
+
+#. Tag: para
+#: gettingstarted.xml:154
+#, no-c-format
+msgid ""
+"The <methodname>validate()</methodname> method returns a set of "
+"<classname>ConstraintViolation</classname> instances, which we can iterate "
+"in order to see which validation errors occurred. The first three test "
+"methods show some expected constraint violations:"
+msgstr ""
+"<methodname>validate()</methodname>方法会返回一个set的"
+"<classname>ConstraintViolation</classname>的实例的集合, 我们可以通过遍历它来"
+"查看有哪些验证错误. 前面三个测试用例显示了一些预期的校验约束:"
+
+#. Tag: para
+#: gettingstarted.xml:161
+#, no-c-format
+msgid ""
+"The <classname>@NotNull</classname> constraint on manufacturer is violated "
+"in <methodname>manufacturerIsNull()</methodname>"
+msgstr ""
+"在<methodname>manufacturerIsNull()</methodname>中可以看到manufacturer违反了"
+"<classname>@NotNull</classname>约束"
+
+#. Tag: para
+#: gettingstarted.xml:166
+#, no-c-format
+msgid ""
+"The <classname>@Size</classname> constraint on licensePlate is violated in "
+"<methodname>licensePlateTooShort()</methodname>"
+msgstr ""
+"<methodname>licensePlateTooShort()</methodname>中的licensePlate违反了"
+"<classname>@Size</classname>约束"
+
+#. Tag: para
+#: gettingstarted.xml:171
+#, no-c-format
+msgid ""
+"The <classname>@Min</classname> constraint on seatCount is violated in "
+"<methodname>seatCountTooLow()</methodname>"
+msgstr ""
+"而<methodname>seatCountTooLow()</methodname>中则导致seatCount违反了"
+"<classname>@Min</classname>约束"
+
+#. Tag: para
+#: gettingstarted.xml:176
+#, no-c-format
+msgid ""
+"If the object validates successfully, <methodname>validate()</methodname> "
+"returns an empty set."
+msgstr ""
+" 如果一个对象没有校验出问题的话,那么<methodname>validate()</methodname> 会返"
+"回一个空的set对象."
+
+#. Tag: para
+#: gettingstarted.xml:179
+#, no-c-format
+msgid ""
+"Note that we only use classes from the package <package>javax.validation</"
+"package> from the Bean Validation API. As we don't reference any classes of "
+"the RI directly, it would be no problem to switch to another implementation "
+"of the API, should that need arise."
+msgstr ""
+"注意,我们只使用了Bean Validation API中的package <package>javax.validation</"
+"package>中的类, 并没有直接调用参考实现中的任何类,所以, 没有任何问题如果切换到"
+"其他的实现."
+
+#. Tag: title
+#: gettingstarted.xml:187
+#, no-c-format
+msgid "Where to go next?"
+msgstr "更进一步"
+
+#. Tag: para
+#: gettingstarted.xml:189
+#, fuzzy, no-c-format
+msgid ""
+"That concludes our 5 minute tour through the world of Hibernate Validator. "
+"Continue exploring the code examples or look at further examples referenced "
+"in <xref linkend=\"validator-further-reading\"/>. To deepen your "
+"understanding of Hibernate Validator just continue reading <xref linkend="
+"\"validator-usingvalidator\"/>. In case your application has specific "
+"validation requirements have a look at <xref linkend=\"validator-"
+"customconstraints\"/>."
+msgstr ""
+"在本章中, 您了解了一个基于Hibernate Validator的简单例子. 更多的示例请参考 "
+"<xref linkend=\"chapter-further-reading\"/>. 如果想进一步了解Hibenate "
+"Validator, 请继续阅读<xref linkend=\"validator-usingvalidator\"/>.  如果您的"
+"应用程序有特殊的校验需求,请参考 <xref linkend=\"validator-customconstraints"
+"\"/>."
+
+#, fuzzy
+#~ msgid ""
+#~ "Hibernate Validator uses JAXB for XML parsing. JAXB is part of the Java "
+#~ "Class Library since Java 6 which means that if you run Hibernate "
+#~ "Validator with Java 5 you will have to add additional JAXB dependencies. "
+#~ "Using Maven you have to add the following dependencies:"
+#~ "<programlisting><dependency>\n"
+#~ "    <groupId>javax.xml.bind</groupId>\n"
+#~ "    <artifactId>jaxb-api</artifactId>\n"
+#~ "    <version>2.2</version>\n"
+#~ "</dependency>\n"
+#~ "<dependency>\n"
+#~ "    <groupId>com.sun.xml.bind</groupId>\n"
+#~ "    <artifactId>jaxb-impl</artifactId>\n"
+#~ "    <version>2.1.12</version>\n"
+#~ "</dependency>\n"
+#~ "</programlisting> if you are using the SourceForge package you find the "
+#~ "necessary libraries in the <filename>lib/jdk5</filename> directory. In "
+#~ "case you are not using the XML configuration you can also disable it "
+#~ "explicitly by calling <methodname>Configuration.ignoreXmlConfiguration()</"
+#~ "methodname> during <classname>ValidationFactory</classname> creation. In "
+#~ "this case the JAXB dependencies are not needed."
+#~ msgstr ""
+#~ "Hibernate Validator 使用JAXB 来解析XML. JAXB 已经被集成进Java 6了, 所以,如"
+#~ "果你要在Java 5上使用Hibernate Validator的话, 那么,还需要添加额外的JAXB的依"
+#~ "赖. 如果你使用Maven的话,你可以把下面的内容添加到pom当中:"
+#~ "<programlisting><dependency>\n"
+#~ "    <groupId>javax.xml.bind</groupId>\n"
+#~ "    <artifactId>jaxb-api</artifactId>\n"
+#~ "    <version>2.2</version>\n"
+#~ "</dependency>\n"
+#~ "<dependency>\n"
+#~ "    <groupId>com.sun.xml.bind</groupId>\n"
+#~ "    <artifactId>jaxb-impl</artifactId>\n"
+#~ "    <version>2.1.12</version>\n"
+#~ "</dependency>\n"
+#~ "</programlisting>"
+
+#~ msgid "Setting up a new Maven project"
+#~ msgstr "第一个Maven项目"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/integration.po b/project/documentation/src/main/docbook/zh-CN/modules/integration.po
new file mode 100644
index 0000000..cf4923a
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/integration.po
@@ -0,0 +1,535 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: 2010-08-23 00:37+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: integration.xml:24
+#, no-c-format
+msgid "Integration with other frameworks"
+msgstr "与其他框架集成"
+
+#. Tag: para
+#: integration.xml:26
+#, no-c-format
+msgid ""
+"Hibernate Validator is intended to be used to implement multi-layered data "
+"validation, where constraints are expressed in a single place (the annotated "
+"domain model) and checked in various different layers of the application."
+msgstr ""
+"Hibernate Validator 的设计初衷是在一个分层的应用程序中, 约束信息只需要被定义"
+"一次( 通过在领域模型上标注), 然后在不同的层中进行数据校验."
+
+#. Tag: title
+#: integration.xml:32
+#, no-c-format
+msgid "OSGi"
+msgstr "OSGi"
+
+#. Tag: para
+#: integration.xml:34
+#, fuzzy, no-c-format
+msgid ""
+"The Hibernate Validator jar file is conform to the OSGi specification and "
+"can be used within any OSGi container. The following lists represent the "
+"packages imported and exported by Hibernate Validator. The classes within "
+"the exported packages are considered part of Hibernate Validator public API."
+msgstr ""
+"Hibernate Validator 的jar文件符合OSGi的规范,所以能够被用在任何OSGi的容器当"
+"中. 以下的包是Hibernate Validator 暴露出来的API:<package>org.hibernate."
+"validator</package>, <package>org.hibernate.validator.constraints</package>, "
+"<package>org.hibernate.validator.messageinterpolation</package> and "
+"<package>org.hibernate.validator.resourceloading</package>."
+
+#. Tag: para
+#: integration.xml:40
+#, no-c-format
+msgid ""
+"The Java Service Provider mechanism used by Bean Validation to automatically "
+"discover validation providers doesn't work in an OSGi environment. To solve "
+"this, you have to provide a custom <classname>ValidationProviderResolver</"
+"classname>. See"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:47
+#, no-c-format
+msgid "Exported packages"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:49
+#, no-c-format
+msgid "org.hibernate.validator"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:52
+#, no-c-format
+msgid "org.hibernate.validator.constraints"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:55
+#, no-c-format
+msgid "org.hibernate.validator.cfg"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:58
+#, no-c-format
+msgid "org.hibernate.validator.cfg.context"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:61
+#, no-c-format
+msgid "org.hibernate.validator.cfg.defs"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:64
+#, no-c-format
+msgid "org.hibernate.validator.group"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:67
+#, no-c-format
+msgid "org.hibernate.validator.messageinterpolation"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:70
+#, no-c-format
+msgid "org.hibernate.validator.method"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:73
+#, no-c-format
+msgid "org.hibernate.validator.method.metadata"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:76
+#, no-c-format
+msgid "org.hibernate.validator.resourceloading"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:81
+#, no-c-format
+msgid "Imported packages"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:83
+#, no-c-format
+msgid "<package>javax.persistence.*</package>, [2.0.0,3.0.0), optional"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:86
+#, no-c-format
+msgid "<package>javax.validation.*</package>, [1.0.0,2.0.0)"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:89
+#, no-c-format
+msgid "javax.xml.*"
+msgstr ""
+
+#. Tag: package
+#: integration.xml:92
+#, no-c-format
+msgid "org.xml.sax.*"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:95
+#, no-c-format
+msgid "<package>org.slf4j.*</package>, [1.5.6,2.0.0)"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:98
+#, no-c-format
+msgid "<package>org.joda.time.*</package>, [1.6.0,2.0.0), optional"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:101
+#, no-c-format
+msgid "<package>org.jsoup.*</package>, [1.5.2,2.0.0), optional"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:107
+#, no-c-format
+msgid "Database schema-level validation"
+msgstr "与数据库集成校验"
+
+#. Tag: para
+#: integration.xml:109
+#, no-c-format
+msgid ""
+"Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will translate "
+"the constraints you have defined for your entities into mapping metadata. "
+"For example, if a property of your entity is annotated <literal>@NotNull</"
+"literal>, its columns will be declared as <literal>not null</literal> in the "
+"DDL schema generated by Hibernate."
+msgstr ""
+"Hibernate Annotations (即 Hibernate 3.5.x) 会自动的把你定已在实体模型上的约束"
+"信息添加到其映射信息中. 例如, 假设你的一个实体类的属性上有<literal>@NotNull</"
+"literal>的约束的话, 那么Hibernate在生成创建此实体对应的表的DDL的时候, 会自动"
+"的给那个属性对应的字段添加上<literal>not null</literal>."
+
+#. Tag: para
+#: integration.xml:115
+#, no-c-format
+msgid ""
+"If, for some reason, the feature needs to be disabled, set "
+"<literal>hibernate.validator.apply_to_ddl</literal> to <literal>false</"
+"literal>. See also <xref linkend=\"table-builtin-constraints\"/>."
+msgstr ""
+"如果因为某种原因, 你不想使用这个特性, 那么可以将<literal>hibernate.validator."
+"apply_to_ddl</literal>属性设置为<literal>false</literal>. 请参考<xref "
+"linkend=\"table-builtin-constraints\"/>."
+
+#. Tag: para
+#: integration.xml:120
+#, no-c-format
+msgid ""
+"You can also limit the DDL constraint generation to a subset of the defined "
+"constraints by setting the property <property>org.hibernate.validator.group."
+"ddl</property>. The property specifies the comma-separated, fully specified "
+"class names of the groups a constraint has to be part of in order to be "
+"considered for DDL schema generation."
+msgstr ""
+"你也可以限制这个DDL约束自动生成的特性只应用到一部分实体类. 只需要设置"
+"<property>org.hibernate.validator.group.ddl</property>属性, 这个属性的值是你"
+"想要应用此特性的实体类的全路径名称, 每个以逗号分隔."
+
+#. Tag: title
+#: integration.xml:129
+#, no-c-format
+msgid "ORM integration"
+msgstr "ORM集成"
+
+#. Tag: para
+#: integration.xml:131
+#, no-c-format
+msgid ""
+"Hibernate Validator integrates with both Hibernate and all pure Java "
+"Persistence providers."
+msgstr ""
+"Hibernate Validator不仅能够和Hibernate集成工作, 还能够和任何JPA的实现很好的一"
+"起工作."
+
+#. Tag: para
+#: integration.xml:135
+#, no-c-format
+msgid ""
+"When lazy loaded associations are supposed to be validated it is recommended "
+"to place the constraint on the getter of the association. Hibernate replaces "
+"lazy loaded associations with proxy instances which get initialized/loaded "
+"when requested via the getter. If, in such a case, the constraint is placed "
+"on field level the actual proxy instance is used which will lead to "
+"validation errors."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:144
+#, no-c-format
+msgid "Hibernate event-based validation"
+msgstr "基于Hibernate事件模型的校验"
+
+#. Tag: para
+#: integration.xml:146
+#, no-c-format
+msgid ""
+"Hibernate Validator has a built-in Hibernate event listener - <ulink url="
+"\"http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/"
+"java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java"
+"\"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</"
+"classname></ulink> - which is part of Hibernate Annotations (as of Hibernate "
+"3.5.x). Whenever a <literal>PreInsertEvent</literal>, "
+"<literal>PreUpdateEvent</literal> or <classname>PreDeleteEvent</classname> "
+"occurs, the listener will verify all constraints of the entity instance and "
+"throw an exception if any constraint is violated. Per default objects will "
+"be checked before any inserts or updates are made by Hibernate. Pre deletion "
+"events will per default not trigger a validation. You can configure the "
+"groups to be validated per event type using the properties <property>javax."
+"persistence.validation.group.pre-persist</property>, <property>javax."
+"persistence.validation.group.pre-update</property> and <property>javax."
+"persistence.validation.group.pre-remove</property>. The values of these "
+"properties are the comma-separated, fully specified class names of the "
+"groups to validate. <xref linkend=\"example-beanvalidationeventlistener-"
+"config\"/> shows the default values for these properties. In this case they "
+"could also be omitted."
+msgstr ""
+"Hibernate Annotations (即 Hibernate 3.5.x) 中包含了一个的Hibernate 事件监听器"
+"(译注: 请阅读Hibernate Core文档了解Hibernate的事件模型) - <ulink url="
+"\"http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/"
+"java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java"
+"\"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</"
+"classname></ulink> - 来为Hibernate Validator服务. 当一个"
+"<literal>PreInsertEvent</literal>, <literal>PreUpdateEvent</literal> 或 "
+"<classname>PreDeleteEvent</classname>事件发生的时候, 这个监听器就可以对该事件"
+"所涉及到的实体对象进行校验, 如果校验不通过的话, 则抛出异常. 默认情况下, "
+"Hibernate在对每个对象进行保存或者修改操作的时候,都会对其进行校验, 而删除操作"
+"则不会. 你可以通过<property>javax.persistence.validation.group.pre-persist</"
+"property>, <property>javax.persistence.validation.group.pre-update</"
+"property> 和 <property>javax.persistence.validation.group.pre-remove</"
+"property>属性来定义对应事件发生的时候, 具体要校验哪(些)个校验组, 这个属性的值"
+"是要应用的校验组类的全路径, 使用逗号分隔. <xref linkend=\"example-"
+"beanvalidationeventlistener-config\"/>显示了这几个属性在Hibernate内部定义的默"
+"认值, 所以, 你不需要在你的应用中再重复定义了."
+
+#. Tag: para
+#: integration.xml:167
+#, no-c-format
+msgid ""
+"On constraint violation, the event will raise a runtime "
+"<classname>ConstraintViolationException</classname> which contains a set of "
+"<literal>ConstraintViolation</literal>s describing each failure."
+msgstr ""
+"如果发生了违反约束条件的情况, 该监听器会抛出一个运行时的"
+"<classname>ConstraintViolationException</classname>异常, 此异常包含了一系列的"
+"<literal>ConstraintViolation</literal>对象用于描述每个违反了约束条件的情况."
+
+#. Tag: para
+#: integration.xml:172
+#, no-c-format
+msgid ""
+"If Hibernate Validator is present in the classpath, Hibernate Annotations "
+"(or Hibernate EntityManager) will use it transparently. To avoid validation "
+"even though Hibernate Validator is in the classpath set <property>javax."
+"persistence.validation.mode</property> to <constant>none</constant>."
+msgstr ""
+"如果类路径上有Hibernate Validator, 则Hibernate Annotations (或 Hibernate "
+"EntityManager)会自动调用它, 如果你想避免这种情况, 可以设置<property>javax."
+"persistence.validation.mode</property>属性为<constant>none</constant>."
+
+#. Tag: para
+#: integration.xml:179
+#, no-c-format
+msgid ""
+"If the beans are not annotated with validation annotations, there is no "
+"runtime performance cost."
+msgstr "如果实体模型上没有定义约束条件, 则不会有任何性能损耗."
+
+#. Tag: para
+#: integration.xml:183
+#, no-c-format
+msgid ""
+"In case you need to manually set the event listeners for Hibernate Core, use "
+"the following configuration in <literal>hibernate.cfg.xml</literal>:"
+msgstr ""
+"如果你想在Hibernate Core中使用上面提到的事件监听器, 则可以在"
+"<literal>hibernate.cfg.xml</literal>中定义如下的配置信息:"
+
+#. Tag: title
+#: integration.xml:188
+#, no-c-format
+msgid ""
+"Manual configuration of <classname>BeanValidationEvenListener</classname>"
+msgstr "自定义<classname>BeanValidationEvenListener</classname>"
+
+#. Tag: programlisting
+#: integration.xml:191
+#, no-c-format
+msgid ""
+"<hibernate-configuration>\n"
+"    <session-factory>\n"
+"       ...\n"
+"       <property name=\"javax.persistence.validation.group.pre-persist"
+"\">javax.validation.groups.Default</property>\n"
+"       <property name=\"javax.persistence.validation.group.pre-update"
+"\">javax.validation.groups.Default</property>\n"
+"       <property name=\"javax.persistence.validation.group.pre-remove"
+"\"></property>\n"
+"       ...\n"
+"       <event type=\"pre-update\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"       <event type=\"pre-insert\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"       <event type=\"pre-delete\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"    </session-factory>\n"
+"</hibernate-configuration>"
+msgstr ""
+"<hibernate-configuration>\n"
+"    <session-factory>\n"
+"       ...\n"
+"       <property name=\"javax.persistence.validation.group.pre-persist"
+"\">javax.validation.groups.Default</property>\n"
+"       <property name=\"javax.persistence.validation.group.pre-update"
+"\">javax.validation.groups.Default</property>\n"
+"       <property name=\"javax.persistence.validation.group.pre-remove"
+"\"></property>\n"
+"       ...\n"
+"       <event type=\"pre-update\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"       <event type=\"pre-insert\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"       <event type=\"pre-delete\">\n"
+"         <listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/>\n"
+"       </event>\n"
+"    </session-factory>\n"
+"</hibernate-configuration>"
+
+#. Tag: title
+#: integration.xml:196
+#, no-c-format
+msgid "<title>JPA</title>"
+msgstr "<title>JPA</title>"
+
+#. Tag: para
+#: integration.xml:198
+#, fuzzy, no-c-format
+msgid ""
+"If you are using JPA 2 and Hibernate Validator is in the classpath the JPA2 "
+"specification requires that Bean Validation gets enabled. The properties "
+"<property>javax.persistence.validation.group.pre-persist</property>, "
+"<property>javax.persistence.validation.group.pre-update</property> and "
+"<property>javax.persistence.validation.group.pre-remove</property> as "
+"described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/"
+"> can in this case be configured in <filename>persistence.xml</filename>. "
+"<filename>persistence.xml</filename> also defines a node validation-mode "
+"which can be set to <constant>AUTO</constant>, <constant>CALLBACK</"
+"constant>, <constant>NONE</constant>. The default is <constant>AUTO</"
+"constant>."
+msgstr ""
+"如果你是把Hibernate Validator和JPA2一起使用, 那么<xref linkend=\"validator-"
+"checkconstraints-orm-hibernateevent\"/>中所说的<property>javax.persistence."
+"validation.group.pre-persist</property>, <property>javax.persistence."
+"validation.group.pre-update</property> 和 <property>javax.persistence."
+"validation.group.pre-remove</property>需要定义在<filename>persistence.xml</"
+"filename>中. 并且, <filename>persistence.xml</filename>中还包含了一个"
+"validation-mode的节点可以被设置成<constant>AUTO</constant>, "
+"<constant>CALLBACK</constant>, <constant>NONE</constant>, 默认值是"
+"<constant>AUTO</constant>."
+
+#. Tag: para
+#: integration.xml:212
+#, no-c-format
+msgid ""
+"In a JPA 1 you will have to create and register Hibernate Validator "
+"yourself. In case you are using Hibernate EntityManager you can add a "
+"customized version of the <classname>BeanValidationEventListener</classname> "
+"described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/"
+"> to your project and register it manually."
+msgstr ""
+"对于JPA1来讲, 你需要自己创建和注册Hibernate Validator. 如果你是使用Hibernate "
+"EntityManager, 那么你可以把<xref linkend=\"validator-checkconstraints-orm-"
+"hibernateevent\"/>中列出来的<classname>BeanValidationEventListener</"
+"classname>类添加到你的项目中, 然后再手工注册它."
+
+#. Tag: title
+#: integration.xml:222
+#, no-c-format
+msgid "Presentation layer validation"
+msgstr "展示层校验"
+
+#. Tag: para
+#: integration.xml:224
+#, no-c-format
+msgid ""
+"When working with JSF2 or <productname>JBoss Seam</productname> and "
+"Hibernate Validator (Bean Validation) is present in the runtime environment "
+"validation is triggered for every field in the application. <xref linkend="
+"\"example-jsf2\"/> shows an example of the f:validateBean tag in a JSF page. "
+"For more information refer to the Seam documentation or the JSF 2 "
+"specification."
+msgstr ""
+"如果你正在使用JSF2或者<productname>JBoss Seam</productname>,并且Hibernate "
+"Validator (Bean Validation) 在类路径上的话, 那么界面上的字段可以被自动校验. "
+"<xref linkend=\"example-jsf2\"/>显示了一个在JSF页面上使用f:validateBean标签的"
+"实例. 更多的信息请参考Seam的文档或者JSF2规范."
+
+#. Tag: title
+#: integration.xml:232
+#, no-c-format
+msgid "Usage of Bean Validation within JSF2"
+msgstr "在JSF2中使用Bean Validation"
+
+#. Tag: programlisting
+#: integration.xml:234
+#, no-c-format
+msgid ""
+"<h:form>\n"
+"  <emphasis role=\"bold\"><f:validateBean></emphasis>\n"
+"    <h:inputText value=”#{model.property}” />\n"
+"    <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:"
+"selectOneRadio>\n"
+"    <!-- other input components here -->\n"
+"  <emphasis role=\"bold\"></f:validateBean></emphasis>\n"
+"</h:form>"
+msgstr ""
+"<h:form>\n"
+"  <emphasis role=\"bold\"><f:validateBean></emphasis>\n"
+"    <h:inputText value=”#{model.property}” />\n"
+"    <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:"
+"selectOneRadio>\n"
+"    <!-- other input components here -->\n"
+"  <emphasis role=\"bold\"></f:validateBean></emphasis>\n"
+"</h:form>"
+
+#. Tag: para
+#: integration.xml:238
+#, no-c-format
+msgid ""
+"The integration between JSF 2 and Bean Validation is described in the \"Bean "
+"Validation Integration\" chapter of <ulink url=\"http://jcp.org/en/jsr/"
+"detail?id=314\">JSR-314</ulink>. It is interesting to know that JSF 2 "
+"implements a custom MessageInterpolator to ensure ensure proper "
+"localization. To encourage the use of the Bean Validation message facility, "
+"JSF 2 will per default only display the generated Bean Validation message. "
+"This can, however, be configured via the application resource bundle by "
+"providing the following configuration (<parameter>{0}</parameter> is "
+"replaced with the Bean Validation message and <parameter>{1}</parameter> is "
+"replaced with the JSF component label):"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:250
+#, no-c-format
+msgid "javax.faces.validator.BeanValidator.MESSAGE={1}: {0}"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:252
+#, no-c-format
+msgid "The default is:"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:254
+#, no-c-format
+msgid "javax.faces.validator.BeanValidator.MESSAGE={0}"
+msgstr ""
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/metadataapi.po b/project/documentation/src/main/docbook/zh-CN/modules/metadataapi.po
new file mode 100644
index 0000000..2c25f7a
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/metadataapi.po
@@ -0,0 +1,194 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: 2011-01-12 15:42+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: zh-CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: metadataapi.xml:24
+#, no-c-format
+msgid "Metadata API"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:26
+#, no-c-format
+msgid ""
+"The Bean Validation specification provides not only a validation engine, but "
+"also a metadata repository for all defined constraints. The following "
+"paragraphs are discussing this API. All the introduced classes can be found "
+"in the <package>javax.validation.metadata</package> package."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:33
+#, no-c-format
+msgid "BeanDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:35
+#, no-c-format
+msgid ""
+"The entry into the metadata API is via <code>Validator."
+"getConstraintsForClass</code> which returns an instance of the <ulink url="
+"\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/"
+"metadata/BeanDescriptor.html\"><classname>BeanDescriptor</classname></ulink> "
+"interface. Using this bean descriptor you can determine whether the "
+"specified class hosts any constraints at all via <code>beanDescriptor."
+"isBeanConstrained</code>."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:42
+#, no-c-format
+msgid ""
+"If a constraint declaration hosted by the requested class is invalid, a "
+"<classname>ValidationException</classname> is thrown."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:47
+#, no-c-format
+msgid ""
+"You can then call <code>beanDescriptor.getConstraintDescriptors</code> to "
+"get a set of <classname>ConstraintDescriptor</classname>s representing all "
+"class level constraints."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:52
+#, no-c-format
+msgid ""
+"If you are interested in property level constraints, you can call "
+"<code>beanDescriptor.getConstraintsForProperty</code> or "
+"<code>beanDescriptor.getConstrainedProperties</code> to get a single resp. "
+"set of <classname>PropertyDescriptor</classname>s (see <xref linkend="
+"\"section-property-descriptor\"/>)."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:60
+#, no-c-format
+msgid "PropertyDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:62
+#, no-c-format
+msgid ""
+"The <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/"
+"javax/validation/metadata/PropertyDescriptor.html"
+"\"><classname>PropertyDescriptor</classname></ulink> interface extends the "
+"<classname>ElementDescriptor</classname> interface and represents "
+"constraints on properties of a class. The constraint can be declared on the "
+"attribute itself or on the getter of the attribute - provided Java Bean "
+"naming conventions are respected. A <classname>PropertyDescriptor</"
+"classname> adds <code>isCascaded</code> (returning <constant>true</constant> "
+"if the property is marked with <classname>@Valid</classname>) and "
+"<code>getPropertyName</code> to the <classname>ElementDescriptor</classname> "
+"functionality."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:75
+#, no-c-format
+msgid "ElementDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:77
+#, no-c-format
+msgid ""
+"The <ulink url=\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/"
+"javax/validation/metadata/ElementDescriptor.html"
+"\"><classname>ElementDiscriptor</classname></ulink> interface is the common "
+"base class for <classname>BeanDescriptor</classname> and "
+"<classname>PropertyDescriptor</classname>. Next to the <code>hasConstraints "
+"</code>and <code>getConstraintDescriptors</code> methods it also offers "
+"access to the <classname>ConstraintFinder</classname> API which allows you "
+"to query the metadata API in a more fine grained way. For example you can "
+"restrict your search to constraints described on fields or on getters or a "
+"given set of groups. Given an <classname>ElementDescriptor</classname> "
+"instance you just call <code>findConstraints</code> to retrieve a "
+"<classname>ConstraintFinder</classname> instance."
+msgstr ""
+
+#. Tag: title
+#: metadataapi.xml:92
+#, no-c-format
+msgid "Usage of ConstraintFinder"
+msgstr ""
+
+#. Tag: programlisting
+#: metadataapi.xml:94
+#, no-c-format
+msgid ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"BeanDescriptor beanDescriptor = validator.getConstraintsForClass(Person."
+"class);\n"
+"PropertyDescriptor propertyDescriptor = beanDescriptor."
+"getConstraintsForProperty(\"name\");\n"
+"Set<ConstraintDescriptor<?>> constraints = propertyDescriptor."
+"findConstraints()\n"
+"                                           .declaredOn(ElementType.METHOD)\n"
+"                                           .unorderedAndMatchingGroups"
+"(Default.class)\n"
+"                                           .lookingAt(Scope.LOCAL_ELEMENT)\n"
+"                                           .getConstraintDescriptors();"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:97
+#, no-c-format
+msgid ""
+"shows an example on how to use the <classname>ConstraintFinder</classname> "
+"API. Interesting are especially the restrictions "
+"<code>unorderedAndMatchingGroups</code> and <code>lookingAt(<ulink url="
+"\"http://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/"
+"metadata/Scope.html\">Scope.LOCAL_ELEMENT</ulink>)</code>. The former allows "
+"to only return <classname>ConstraintDescriptors</classname> matching a "
+"specified set of groups wheras the latter allows to distinguish between "
+"constraint directly specified on the element (<constant>Scope.LOCAL_ELEMENT</"
+"constant>) or constraints belonging to the element but hosted anywhere in "
+"the class hierarchy (<constant>Scope.HIERARCHY</constant>)."
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:108
+#, no-c-format
+msgid ""
+"Order is not respected by unorderedAndMatchingGroups, but group inheritance "
+"and inheritance via sequence are."
+msgstr ""
+
+#. Tag: classname
+#: metadataapi.xml:114
+#, no-c-format
+msgid "ConstraintDescriptor"
+msgstr ""
+
+#. Tag: para
+#: metadataapi.xml:116
+#, no-c-format
+msgid ""
+"Last but not least, the <ulink url=\"http://docs.jboss.org/hibernate/stable/"
+"beanvalidation/api/javax/validation/metadata/ConstraintDescriptor.html"
+"\"><classname>ConstraintDescriptor</classname></ulink> interface describes a "
+"single constraint together with its composing constraints. Via an instance "
+"of this interface you get access to the constraint annotation and its "
+"parameters, as well as the groups the constraint is supposed to be applied "
+"on. It also also you to access the pass-through constraint payload (see "
+"<xref linkend=\"example-defining-custom-constraint\"/>)."
+msgstr ""
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/preface.po b/project/documentation/src/main/docbook/zh-CN/modules/preface.po
new file mode 100644
index 0000000..998ebf7
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/preface.po
@@ -0,0 +1,69 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-01-12 15:42+0000\n"
+"PO-Revision-Date: 2010-07-06 23:46+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: preface.xml:24
+#, no-c-format
+msgid "Preface"
+msgstr "序言"
+
+#. Tag: para
+#: preface.xml:26
+#, no-c-format
+msgid ""
+"Validating data is a common task that occurs throughout any application, "
+"from the presentation layer to the persistence layer. Often the same "
+"validation logic is implemented in each layer, proving time consuming and "
+"error-prone. To avoid duplication of these validations in each layer, "
+"developers often bundle validation logic directly into the domain model, "
+"cluttering domain classes with validation code which is really metadata "
+"about the class itself."
+msgstr ""
+"数据校验是任何一个应用程序都会用到的功能,无论是显示层还是持久层. 通常,相同的"
+"校验逻辑会分散在各个层中, 这样,不仅浪费了时间还会导致错误的发生(译注: 重复代"
+"码). 为了避免重复, 开发人员经常会把这些校验逻辑直接写在领域模型里面, 但是这样"
+"又把领域模型代码和校验代码混杂在了一起, 而这些校验逻辑更应该是描述领域模型的"
+"元数据."
+
+#. Tag: para
+#: preface.xml:45
+#, no-c-format
+msgid ""
+"JSR 303 - Bean Validation - defines a metadata model and API for entity "
+"validation. The default metadata source is annotations, with the ability to "
+"override and extend the meta-data through the use of XML. The API is not "
+"tied to a specific application tier or programming model. It is specifically "
+"not tied to either the web tier or the persistence tier, and is available "
+"for both server-side application programming, as well as rich client Swing "
+"application developers."
+msgstr ""
+"JSR 303 - Bean Validation - 为实体验证定义了元数据模型和API. 默认的元数据模型"
+"是通过Annotations来描述的,但是也可以使用XML来重载或者扩展. Bean Validation "
+"API 并不局限于应用程序的某一层或者哪种编程模型, 例如,如图所示, Bean "
+"Validation 可以被用在任何一层, 或者是像类似Swing的富客户端程序中."
+
+#. Tag: para
+#: preface.xml:64
+#, no-c-format
+msgid ""
+"Hibernate Validator is the reference implementation of this JSR. The "
+"implementation itself as well as the Bean Validation API and TCK are all "
+"provided and distributed under the <ulink url=\"http://www.apache.org/"
+"licenses/LICENSE-2.0\">Apache Software License 2.0</ulink>."
+msgstr ""
+
+#~ msgid "Hibernate Validator is the reference implementation of this JSR."
+#~ msgstr "Hibernate Validator 是这个JSR的参考实现."
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/programmaticapi.po b/project/documentation/src/main/docbook/zh-CN/modules/programmaticapi.po
new file mode 100644
index 0000000..44d5a80
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/programmaticapi.po
@@ -0,0 +1,220 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-01-12 15:42+0000\n"
+"PO-Revision-Date: 2010-08-23 23:32+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: programmaticapi.xml:24 programmaticapi.xml:47
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr "编程方式应用约束条件"
+
+#. Tag: para
+#: programmaticapi.xml:27
+#, no-c-format
+msgid ""
+"Use of the features described in the following sections is not portable "
+"between Bean Validation providers/implementations."
+msgstr "下面的特性是不可移植的."
+
+#. Tag: para
+#: programmaticapi.xml:31
+#, no-c-format
+msgid ""
+"Hibernate Validator allows to configure constraints not only via annotations "
+"and xml, but also via a programmatic API. This API can be used exclusively "
+"or in combination with annotations and xml. If used in combination "
+"programmatic constraints are additive to otherwise configured constraints."
+msgstr ""
+"Hibernate Validator不仅支持通过标注(annotation) 和xml的方式来给实体定义约束条"
+"件, 你也可以通过编程的方式来实现. 这套API即可以覆盖另外两种方式定义的约束条"
+"件, 也可以和它们结合在一起使用, 如果是后者的话, 那么它所定义的约束条件会被附"
+"加到另外两种方式所定义的约束后面."
+
+#. Tag: para
+#: programmaticapi.xml:37
+#, no-c-format
+msgid ""
+"The programmatic API is centered around the <classname>ConstraintMapping</"
+"classname> class which can be found together with its supporting classes in "
+"the <package>org.hibernate.validator.cfg</package> package. "
+"<classname>ConstraintMapping</classname> is the entry point to a fluent API "
+"allowing the definition of constraints. <xref lang=\"\" linkend=\"example-"
+"constraint-mapping\"/> shows how the API can be used."
+msgstr ""
+"这套API是以<package>org.hibernate.validator.cfg</package>下面的"
+"<classname>ConstraintMapping</classname>为中心点, 此包中还包含一些关联的类. "
+"<classname>ConstraintMapping</classname>是实现此功能的入口点. <xref lang="
+"\"\" linkend=\"example-constraint-mapping\"/>介绍了如何使用此API."
+
+#. Tag: programlisting
+#: programmaticapi.xml:49
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"manufacturer\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"        .constraint( SizeDef.class )\n"
+"            .min( 2 )\n"
+"            .max( 14 )\n"
+"    .property( \"seatCount\", FIELD )\n"
+"        .constraint( MinDef.class )\n"
+"            .value ( 2 )\n"
+".type( RentalCar.class )\n"
+"    .property( \"rentalStation\", METHOD)\n"
+"        .constraint( NotNullDef.class );"
+msgstr ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"manufacturer\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"        .constraint( SizeDef.class )\n"
+"            .min( 2 )\n"
+"            .max( 14 )\n"
+"    .property( \"seatCount\", FIELD )\n"
+"        .constraint( MinDef.class )\n"
+"            .value ( 2 )\n"
+".type( RentalCar.class )\n"
+"    .property( \"rentalStation\", METHOD)\n"
+"        .constraint( NotNullDef.class );"
+
+#. Tag: para
+#: programmaticapi.xml:52
+#, fuzzy, no-c-format
+msgid ""
+"As you can see you can configure constraints on multiple classes and "
+"properties using method chaining. The constraint definition classes "
+"<classname>NotNullDef</classname>, <classname>SizeDef</classname> and "
+"<classname>MinDef</classname> are helper classes which allow to configure "
+"constraint parameters in a type-safe fashion. Definition classes exists for "
+"all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</"
+"classname> package. For a custom constraint you can either create your own "
+"definition class extending <classname>ConstraintDef</classname> or you can "
+"use the <classname>genericConstraint</classname> method as seen in <xref "
+"linkend=\"example-generic-constraint-mapping\"/>."
+msgstr ""
+"正如你所看到的, 通过链式API的设计, 你可以给多个实体和属性设置约束条件. 上面所"
+"用到的<classname>NotNullDef</classname>, <classname>SizeDef</classname> 等 "
+"<classname>MinDef</classname> 只是每个约束条件定义(annotation)所对应的约束定"
+"义类, 这样的设计是为了类型安全. <classname>org.hibernate.validator.cfg.defs</"
+"classname>下包含有每个内置的约束条件对应的约束定义类. 对于自定义的约束条件来"
+"说, 你可以通过继承<classname>ConstraintDef</classname>来创建你自己的约束定义"
+"类, 或者你可以使用<classname>GenericConstraintDef</classname>, 请参考<xref "
+"linkend=\"example-generic-constraint-mapping\"/>."
+
+#. Tag: title
+#: programmaticapi.xml:65
+#, no-c-format
+msgid ""
+"Programmatic constraint definition using <classname>GenericConstraintDef</"
+"classname>"
+msgstr "通过<classname>GenericConstraintDef</classname>实现约束定义类"
+
+#. Tag: programlisting
+#: programmaticapi.xml:68
+#, fuzzy, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .genericConstraint( CheckCase.class )\n"
+"            .param( \"value\", CaseMode.UPPER );"
+msgstr ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( GenericConstraintDef.class )\n"
+"            .constraintType( CheckCase.class )\n"
+"            .param( \"value\", CaseMode.UPPER );"
+
+#. Tag: para
+#: programmaticapi.xml:71
+#, no-c-format
+msgid ""
+"Last but not least, you can also define cascading constraints as well as the "
+"default group sequence of an entity."
+msgstr ""
+"最后, 你也可是通过API的方式来实现对一个实体重定义默认组序列和级联约束条件定"
+"义."
+
+#. Tag: title
+#: programmaticapi.xml:75
+#, no-c-format
+msgid "Cascading constraints and group redefinition"
+msgstr "级联约束和默认组序列定义"
+
+#. Tag: programlisting
+#: programmaticapi.xml:77
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .valid( \"driver\", FIELD )\n"
+".type( RentalCar.class)\n"
+"    .defaultGroupSequence( RentalCar.class, CarChecks.class );"
+msgstr ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .valid( \"driver\", FIELD )\n"
+".type( RentalCar.class)\n"
+"    .defaultGroupSequence( RentalCar.class, CarChecks.class );"
+
+#. Tag: para
+#: programmaticapi.xml:80
+#, no-c-format
+msgid ""
+"Once you have your <classname>ConstraintMapping</classname> you will have to "
+"pass it to the configuration. Since the programmatic configuration is not "
+"part of the official Bean Validation specification you will have to get hold "
+"of the Hibernate Validator specific configuration instance. See <xref "
+"linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+"一旦你创建(和配置)好了<classname>ConstraintMapping</classname>, 你需要把它传"
+"递进configuration, 从而创建validator. 因为这个编程方式定义约束的特性不是Bean "
+"Validation规范的一部分, 所以你只能通过获取内部的Hibernate Validator的"
+"configuration对象来实现. 请参考<xref linkend=\"example-hibernate-specific-"
+"config\"/>."
+
+#. Tag: title
+#: programmaticapi.xml:87
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr "创建Hibernate Validator特有的属性"
+
+#. Tag: programlisting
+#: programmaticapi.xml:89
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"// configure mapping instance\n"
+"\n"
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.addMapping( mapping );\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"// configure mapping instance\n"
+"\n"
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.addMapping( mapping );\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/usingvalidator.po b/project/documentation/src/main/docbook/zh-CN/modules/usingvalidator.po
new file mode 100644
index 0000000..506c367
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/usingvalidator.po
@@ -0,0 +1,2985 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2012-05-09 09:42+0000\n"
+"PO-Revision-Date: 2010-08-19 22:28+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: usingvalidator.xml:24
+#, no-c-format
+msgid "Validation step by step"
+msgstr "Validation step by step"
+
+#. Tag: para
+#: usingvalidator.xml:26
+#, no-c-format
+msgid ""
+"In this chapter we will see in more detail how to use Hibernate Validator to "
+"validate constraints for a given entity model. We will also learn which "
+"default constraints the Bean Validation specification provides and which "
+"additional constraints are only provided by Hibernate Validator. Let's start "
+"with how to add constraints to an entity."
+msgstr ""
+"在本章中,我们会详细的介绍如何使用Hibernate Validator 来对一个给定的实体模型进"
+"行验证. 还会介绍Bean Validation规范提供了哪些默认的约束条件和Hibernate "
+"Validator提供了哪些额外的. 让我们先从如何给一个实体添加约束开始."
+
+#. Tag: title
+#: usingvalidator.xml:33
+#, no-c-format
+msgid "Defining constraints"
+msgstr "定义约束"
+
+#. Tag: para
+#: usingvalidator.xml:35
+#, no-c-format
+msgid ""
+"Constraints in Bean Validation are expressed via Java annotations. In this "
+"section we show how to annotate an object model with these annotations. We "
+"have to differentiate between three different type of constraint annotations "
+"- field-, property-, and class-level annotations."
+msgstr ""
+"Bean Validation 的约束是通过Java 注解(annotations)来标注的. 在本节中,我们会介"
+"绍如何使用这些注解(annotations)来标注一个实体模型.  并且,我们会区分三种不通的"
+"注解(annotations) 类型."
+
+#. Tag: para
+#: usingvalidator.xml:42
+#, no-c-format
+msgid ""
+"Not all constraints can be placed on all of these levels. In fact, none of "
+"the default constraints defined by Bean Validation can be placed at class "
+"level. The <classname>java.lang.annotation.Target</classname> annotation in "
+"the constraint annotation itself determines on which elements a constraint "
+"can be placed. See <xref linkend=\"validator-customconstraints\"/> for more "
+"information."
+msgstr ""
+"不是所有的约束都能够被用在所有的类结构上. 事实上, 没有任何定义在Bean "
+"Validation规范中的约束可以被用在class上. 约束定义中的<classname>java.lang."
+"annotation.Target</classname>属性定义了这个约束能够被使用在哪个层次结构上. 详"
+"细信息请参考<xref linkend=\"validator-customconstraints\"/>."
+
+#. Tag: title
+#: usingvalidator.xml:51
+#, no-c-format
+msgid "Field-level constraints"
+msgstr "字段级(field level) 约束"
+
+#. Tag: para
+#: usingvalidator.xml:53
+#, no-c-format
+msgid ""
+"Constraints can be expressed by annotating a field of a class. <xref linkend="
+"\"example-field-level\"/> shows a field level configuration example:"
+msgstr ""
+"约束条件能够被标注在类的字段上面, 请参考示例<xref linkend=\"example-field-"
+"level\"/>"
+
+#. Tag: title
+#: usingvalidator.xml:58
+#, no-c-format
+msgid "Field level constraint"
+msgstr "字段级(field level) 约束"
+
+#. Tag: programlisting
+#: usingvalidator.xml:60
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @AssertTrue\n"
+"    private boolean isRegistered;\n"
+"\n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @AssertTrue\n"
+"    private boolean isRegistered;\n"
+"\n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:63
+#, no-c-format
+msgid ""
+"When using field level constraints field access strategy is used to access "
+"the value to be validated. This means the bean validation provider directly "
+"accesses the instance variable and does not invoke the property accessor "
+"method also if such a method exists."
+msgstr ""
+"当约束被定义在字段上的时候, 这个字段的值是通过字段访问策略来获取并验证的. 也"
+"就是说Bean Validation的实现者会直接访问这个实例变量而不会调用属性的访问器"
+"(getter) 即使这个方法存在."
+
+#. Tag: para
+#: usingvalidator.xml:69
+#, no-c-format
+msgid "The access type (private, protected or public) does not matter."
+msgstr "这个字段的访问级别( private, protected 或者 public) 对此没有影响."
+
+#. Tag: para
+#: usingvalidator.xml:74
+#, no-c-format
+msgid "Static fields and properties cannot be validated."
+msgstr "静态字段或者属性是不会被校验的."
+
+#. Tag: para
+#: usingvalidator.xml:78
+#, no-c-format
+msgid ""
+"When validating byte code enhanced objects property level constraints should "
+"be used, because the byte code enhancing library won't be able to determine "
+"a field access via reflection."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:85
+#, no-c-format
+msgid "Property-level constraints"
+msgstr "属性级别约束"
+
+#. Tag: para
+#: usingvalidator.xml:87
+#, no-c-format
+msgid ""
+"If your model class adheres to the <ulink type=\"\" url=\"http://java.sun."
+"com/javase/technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink> "
+"standard, it is also possible to annotate the properties of a bean class "
+"instead of its fields. <xref linkend=\"example-property-level\"/> uses the "
+"same entity as in <xref linkend=\"example-field-level\"/>, however, property "
+"level constraints are used."
+msgstr ""
+"如果你的模型遵循<ulink type=\"\" url=\"http://java.sun.com/javase/"
+"technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink>规范的话, 你还可"
+"以把约束标注在属性上. <xref linkend=\"example-property-level\"/>和<xref "
+"linkend=\"example-field-level\"/>的唯一不同就是它的约束是定义在属性级别上的."
+
+#. Tag: para
+#: usingvalidator.xml:93
+#, no-c-format
+msgid "The property's getter method has to be annotated, not its setter."
+msgstr ""
+"如果要定义约束在属性级别上的话,那么只能定义在访问器(getter)上面,不能定义在修"
+"改器(setter)上."
+
+#. Tag: title
+#: usingvalidator.xml:98
+#, no-c-format
+msgid "Property level constraint"
+msgstr "属性级约束"
+
+#. Tag: programlisting
+#: usingvalidator.xml:100
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.AssertTrue;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    private String manufacturer;\n"
+"\n"
+"    private boolean isRegistered;\n"
+"      \n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"\n"
+"    @NotNull\n"
+"    public String getManufacturer() {\n"
+"        return manufacturer;\n"
+"    }\n"
+"\n"
+"    public void setManufacturer(String manufacturer) {\n"
+"        this.manufacturer = manufacturer;\n"
+"    }\n"
+"\n"
+"    @AssertTrue\n"
+"    public boolean isRegistered() {\n"
+"        return isRegistered;\n"
+"    }\n"
+"\n"
+"    public void setRegistered(boolean isRegistered) {\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.AssertTrue;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    private String manufacturer;\n"
+"\n"
+"    private boolean isRegistered;\n"
+"      \n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"\n"
+"    @NotNull\n"
+"    public String getManufacturer() {\n"
+"        return manufacturer;\n"
+"    }\n"
+"\n"
+"    public void setManufacturer(String manufacturer) {\n"
+"        this.manufacturer = manufacturer;\n"
+"    }\n"
+"\n"
+"    @AssertTrue\n"
+"    public boolean isRegistered() {\n"
+"        return isRegistered;\n"
+"    }\n"
+"\n"
+"    public void setRegistered(boolean isRegistered) {\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:103
+#, fuzzy, no-c-format
+msgid ""
+"When using property level constraints property access strategy is used to "
+"access the value to be validated. This means the bean validation provider "
+"accesses the state via the property accessor method. One advantage of "
+"annotating properties instead of fields is that the constraints become part "
+"of the constrained type's API that way and users are aware of the existing "
+"constraints without having to examine the type's implementation."
+msgstr ""
+"当约束被定义在属性上的时候, 这个属性的值是通过属性访问策略来获取并验证的. 也"
+"就是说Bean Validation的实现者会通过该属性的访问器来获取该属性的值并验证."
+
+#. Tag: para
+#: usingvalidator.xml:112
+#, fuzzy, no-c-format
+msgid ""
+"It is recommended to stick either to field <emphasis>or</emphasis> property "
+"annotations within one class. It is not recommended to annotate a field "
+"<emphasis>and</emphasis> the accompanying getter method as this would cause "
+"the field to be validated twice."
+msgstr ""
+"我们不推荐在一个类里面混合使用字段级约束和属性级约束!因为这样会导致字段被校验"
+"两次."
+
+#. Tag: title
+#: usingvalidator.xml:121
+#, no-c-format
+msgid "Class-level constraints"
+msgstr "类级别约束"
+
+#. Tag: para
+#: usingvalidator.xml:124
+#, fuzzy, no-c-format
+msgid ""
+"Last but not least, a constraint can also be placed on class level. When a "
+"constraint annotation is placed on this level the class instance itself "
+"passed to the <classname>ConstraintValidator</classname>. Class level "
+"constraints are useful if it is necessary to inspect more than a single "
+"property of the class to validate it or if a correlation between different "
+"state variables has to be evaluated. In <xref linkend=\"example-class-level"
+"\"/> we add the property <property>passengers</property> to the class "
+"<classname>Car</classname>. We also add the constraint "
+"<classname>PassengerCount</classname> on the class level. We will later see "
+"how we can actually create this custom constraint (see <xref linkend="
+"\"validator-customconstraints\"/>). For now it is enough to know that "
+"<classname>PassengerCount</classname> will ensure that there cannot be more "
+"passengers in a car than there are seats."
+msgstr ""
+"最后, 一个约束也能够被放在类级别上. 当一个约束被标注在一个类上的时候,这个类的"
+"实例对象被传递给<classname>ConstraintValidator</classname>. 当需要同时校验多"
+"个属性来验证一个对象或者一个属性在验证的时候需要另外的属性的信息的时候, 类级"
+"别的约束会很有用. 在<xref linkend=\"example-class-level\"/>中, 我们给类"
+"<classname>Car</classname>添加了一个<property>passengers</property>的属性. 并"
+"且我们还标注了一个<classname>PassengerCount</classname>约束在类级别上. 稍后会"
+"看到我们是如何创建这个自定义的约束的(<xref linkend=\"validator-"
+"customconstraints\"/>). 现在,我们可以知道,<classname>PassengerCount</"
+"classname>会保证这个车里乘客的数量不会超过它的座位数."
+
+#. Tag: title
+#: usingvalidator.xml:140
+#, no-c-format
+msgid "Class level constraint"
+msgstr "类级别约束"
+
+#. Tag: programlisting
+#: usingvalidator.xml:142
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@PassengerCount\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    private List<Person> passengers;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@PassengerCount\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    private List<Person> passengers;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:147
+#, no-c-format
+msgid "Constraint inheritance"
+msgstr "约束继承"
+
+#. Tag: para
+#: usingvalidator.xml:149
+#, no-c-format
+msgid ""
+"When validating an object that implements an interface or extends another "
+"class, all constraint annotations on the implemented interface and parent "
+"class apply in the same manner as the constraints specified on the validated "
+"object itself. To make things clearer let's have a look at the following "
+"example:"
+msgstr ""
+"如果要验证的对象继承于某个父类或者实现了某个接口,那么定义在父类或者接口中的约"
+"束会在验证这个对象的时候被自动加载,如同这些约束定义在这个对象所在的类中一样. "
+"让我们来看看下面的示例:"
+
+#. Tag: title
+#: usingvalidator.xml:156
+#, no-c-format
+msgid "Constraint inheritance using RentalCar"
+msgstr "约束继承"
+
+#. Tag: programlisting
+#: usingvalidator.xml:158
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class RentalCar extends Car {\n"
+"\n"
+"    private String rentalStation;\n"
+"    \n"
+"    public RentalCar(String manufacturer, String rentalStation) {\n"
+"        super(manufacturer);\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"    \n"
+"    @NotNull\n"
+"    public String getRentalStation() {\n"
+"        return rentalStation;\n"
+"    }\n"
+"\n"
+"    public void setRentalStation(String rentalStation) {\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class RentalCar extends Car {\n"
+"\n"
+"    private String rentalStation;\n"
+"    \n"
+"    public RentalCar(String manufacturer, String rentalStation) {\n"
+"        super(manufacturer);\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"    \n"
+"    @NotNull\n"
+"    public String getRentalStation() {\n"
+"        return rentalStation;\n"
+"    }\n"
+"\n"
+"    public void setRentalStation(String rentalStation) {\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:161
+#, no-c-format
+msgid ""
+"Our well-known class <classname>Car</classname> is now extended by "
+"<classname>RentalCar</classname> with the additional property "
+"<property>rentalStation</property>. If an instance of <classname>RentalCar</"
+"classname> is validated, not only the <classname>@NotNull</classname> "
+"constraint on <property>rentalStation</property> is validated, but also the "
+"constraint on <property>manufacturer</property> from the parent class."
+msgstr ""
+"我们有了一个新的<classname>RentalCar</classname>类继承自前面我们已经见到的"
+"<classname>Car</classname>, 这个子类中增加了一个<property>rentalStation</"
+"property>属性. 如果校验一个<classname>RentalCar</classname>的实例对象, 那么不"
+"仅会验证属性<property>rentalStation</property>上的 <classname>@NotNull</"
+"classname>约束是否合法,还会校验父类中的<property>manufacturer</property>属性."
+
+#. Tag: para
+#: usingvalidator.xml:169
+#, no-c-format
+msgid ""
+"The same would hold true, if <classname>Car</classname> were an interface "
+"implemented by <classname>RentalCar</classname>."
+msgstr "如果类<classname>Car</classname>是一个接口类型的话也是一样的效果."
+
+#. Tag: para
+#: usingvalidator.xml:172
+#, no-c-format
+msgid ""
+"Constraint annotations are aggregated if methods are overridden. If "
+"<classname>RentalCar</classname> would override the "
+"<methodname>getManufacturer()</methodname> method from <classname>Car</"
+"classname> any constraints annotated at the overriding method would be "
+"evaluated in addition to the <classname>@NotNull</classname> constraint from "
+"the super-class."
+msgstr ""
+"如果类<classname>RentalCar</classname> 重写了父类<classname>Car</classname>的"
+"<methodname>getManufacturer()</methodname>方法, 那么定义在父类的这个方法上的"
+"约束和子类这个方法上定义的约束都会被校验."
+
+#. Tag: title
+#: usingvalidator.xml:181
+#, no-c-format
+msgid "Object graphs"
+msgstr "对象图"
+
+#. Tag: para
+#: usingvalidator.xml:183
+#, no-c-format
+msgid ""
+"The Bean Validation API does not only allow to validate single class "
+"instances but also complete object graphs. To do so, just annotate a field "
+"or property representing a reference to another object with "
+"<classname>@Valid</classname>. If the parent object is validated, all "
+"referenced objects annotated with <classname>@Valid</classname> will be "
+"validated as well (as will be their children etc.). See <xref linkend="
+"\"example-car-with-driver\"/>."
+msgstr ""
+"Bean Validation API不仅能够用来校验单个的实例对象,还能够用来校验完整的对象图."
+"要使用这个功能,只需要在一个有关联关系的字段或者属性上标注<classname>@Valid</"
+"classname>. 这样,如果一个对象被校验,那么它的所有的标注了<classname>@Valid</"
+"classname>的关联对象都会被校验. 请看<xref linkend=\"example-car-with-driver"
+"\"/>."
+
+#. Tag: title
+#: usingvalidator.xml:192
+#, no-c-format
+msgid "Class Person"
+msgstr "Class Person"
+
+#. Tag: programlisting
+#: usingvalidator.xml:194
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Person {\n"
+"\n"
+"    @NotNull\n"
+"    private String name;\n"
+"    \n"
+"    public Person(String name) {\n"
+"        super();\n"
+"        this.name = name;\n"
+"    }\n"
+"\n"
+"    public String getName() {\n"
+"        return name;\n"
+"    }\n"
+"\n"
+"    public void setName(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Person {\n"
+"\n"
+"    @NotNull\n"
+"    private String name;\n"
+"    \n"
+"    public Person(String name) {\n"
+"        super();\n"
+"        this.name = name;\n"
+"    }\n"
+"\n"
+"    public String getName() {\n"
+"        return name;\n"
+"    }\n"
+"\n"
+"    public void setName(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:198
+#, no-c-format
+msgid "Adding a driver to the car"
+msgstr "Adding a driver to the car"
+
+#. Tag: programlisting
+#: usingvalidator.xml:200
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private Person driver;\n"
+"    \n"
+"    public Car(Person driver) {\n"
+"        this.driver = driver;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private Person driver;\n"
+"    \n"
+"    public Car(Person driver) {\n"
+"        this.driver = driver;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:203
+#, no-c-format
+msgid ""
+"If an instance of <classname>Car</classname> is validated, the referenced "
+"<classname>Person</classname> object will be validated as well, as the "
+"<property>driver</property> field is annotated with <classname>@Valid</"
+"classname>. Therefore the validation of a <classname>Car</classname> will "
+"fail if the <property>name</property> field of the referenced "
+"<classname>Person</classname> instance is <code>null</code>."
+msgstr ""
+"如果校验<classname>Car</classname>的实例对象的话,因为它的<property>driver</"
+"property>属性标注了<classname>@Valid</classname>, 那么关联的"
+"<classname>Person</classname>也会被校验. 所以,如果对象<classname>Person</"
+"classname>的<property>name</property>属性如果是<code>null</code>的话,那么校验"
+"会失败."
+
+#. Tag: para
+#: usingvalidator.xml:211
+#, no-c-format
+msgid ""
+"Object graph validation also works for collection-typed fields. That means "
+"any attributes that"
+msgstr "关联校验也适用于集合类型的字段, 也就是说,任何下列的类型:"
+
+#. Tag: para
+#: usingvalidator.xml:216
+#, no-c-format
+msgid "are arrays"
+msgstr "数组"
+
+#. Tag: para
+#: usingvalidator.xml:220
+#, no-c-format
+msgid ""
+"implement <classname>java.lang.Iterable</classname> (especially "
+"<classname>Collection</classname>, <classname>List</classname> and "
+"<classname>Set</classname>)"
+msgstr ""
+"实现了<classname>java.lang.Iterable</classname>接口( 例如"
+"<classname>Collection</classname>, <classname>List</classname> 和 "
+"<classname>Set</classname>)"
+
+#. Tag: para
+#: usingvalidator.xml:226
+#, no-c-format
+msgid "implement <classname>java.util.Map</classname>"
+msgstr "实现了<classname>java.util.Map</classname>接口"
+
+#. Tag: para
+#: usingvalidator.xml:230
+#, no-c-format
+msgid ""
+"can be annotated with <classname>@Valid</classname>, which will cause each "
+"contained element to be validated, when the parent object is validated."
+msgstr ""
+"如果标注了<classname>@Valid</classname>, 那么当主对象被校验的时候,这些集合对"
+"象中的元素都会被校验."
+
+#. Tag: title
+#: usingvalidator.xml:235
+#, no-c-format
+msgid "Car with a list of passengers"
+msgstr "Car with a list of passengers"
+
+#. Tag: programlisting
+#: usingvalidator.xml:237
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import java.util.ArrayList;\n"
+"import java.util.List;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private List<Person> passengers = new ArrayList<Person>();\n"
+"\n"
+"    public Car(List<Person> passengers) {\n"
+"        this.passengers = passengers;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import java.util.ArrayList;\n"
+"import java.util.List;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private List<Person> passengers = new ArrayList<Person>();\n"
+"\n"
+"    public Car(List<Person> passengers) {\n"
+"        this.passengers = passengers;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:240
+#, no-c-format
+msgid ""
+"If a <classname>Car</classname> instance is validated, a "
+"<classname>ConstraintValidation</classname> will be created, if any of the "
+"<classname>Person</classname> objects contained in the <property>passengers</"
+"property> list has a <code>null</code> name."
+msgstr ""
+"当校验一个<classname>Car</classname>的实例的时候,如果<property>passengers</"
+"property> list中包含的任何一个<classname>Person</classname>对象没有名字的话,"
+"都会导致校验失败(a <classname>ConstraintValidation</classname> will be "
+"created)."
+
+#. Tag: para
+#: usingvalidator.xml:244
+#, no-c-format
+msgid ""
+"<classname>null</classname> values are getting ignored when validating "
+"object graphs."
+msgstr "对象图校验的时候是会被忽略<classname>null</classname>值的."
+
+#. Tag: title
+#: usingvalidator.xml:251
+#, no-c-format
+msgid "Validating constraints"
+msgstr "校验约束"
+
+#. Tag: para
+#: usingvalidator.xml:253
+#, no-c-format
+msgid ""
+"The <classname>Validator</classname> interface is the main entry point to "
+"Bean Validation. In <xref linkend=\"section-validator-instance\"/> we will "
+"first show how to obtain an <classname>Validator</classname> instance. "
+"Afterwards we will learn how to use the different methods of the "
+"<classname>Validator</classname> interface."
+msgstr ""
+"<classname>Validator</classname> 是Bean Validation中最主要的接口, 我们会在"
+"<xref linkend=\"section-validator-instance\"/>中详细介绍如何获取一个"
+"<classname>Validator</classname>的实例, 现在先让我们来看看如何使用"
+"<classname>Validator</classname>接口中的各个方法. "
+
+#. Tag: title
+#: usingvalidator.xml:260
+#, no-c-format
+msgid "Obtaining a <classname>Validator</classname> instance"
+msgstr "获取一个<classname>Validator</classname>的实例"
+
+#. Tag: para
+#: usingvalidator.xml:262
+#, no-c-format
+msgid ""
+"The first step towards validating an entity instance is to get hold of a "
+"<classname>Validator</classname> instance. The road to this instance leads "
+"via the <classname>Validation</classname> class and a "
+"<classname>ValidatorFactory</classname>. The easiest way is to use the "
+"static <methodname>Validation.buildDefaultValidatorFactory()</methodname> "
+"method:"
+msgstr ""
+"对一个实体对象验证之前首先需要有个<classname>Validator</classname>对象, 而这"
+"个对象是需要通过<classname>Validation</classname> 类和 "
+"<classname>ValidatorFactory</classname>来创建的. 最简单的方法是调用"
+"<methodname>Validation.buildDefaultValidatorFactory()</methodname> 这个静态方"
+"法. "
+
+#. Tag: title
+#: usingvalidator.xml:271
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr "Validation.buildDefaultValidatorFactory()"
+
+#. Tag: programlisting
+#: usingvalidator.xml:273
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+
+#. Tag: para
+#: usingvalidator.xml:276
+#, no-c-format
+msgid ""
+"For other ways of obtaining a Validator instance see <xref linkend="
+"\"validator-bootstrapping\"/>. For now we just want to see how we can use "
+"the <classname>Validator</classname> instance to validate entity instances."
+msgstr ""
+"<xref linkend=\"validator-bootstrapping\"/>介绍了其他的获取Validator实例的方"
+"法. 现在我们的目标是学习如何使用<classname>Validator</classname> 来校验实体对"
+"象."
+
+#. Tag: title
+#: usingvalidator.xml:283
+#, no-c-format
+msgid "Validator methods"
+msgstr "Validator中的方法"
+
+#. Tag: para
+#: usingvalidator.xml:285
+#, no-c-format
+msgid ""
+"The <classname>Validator</classname> interface contains three methods that "
+"can be used to either validate entire entities or just a single properties "
+"of the entity."
+msgstr ""
+"<classname>Validator</classname>中有三个方法能够被用来校验整个实体对象或者实"
+"体对象中的属性."
+
+#. Tag: para
+#: usingvalidator.xml:289
+#, no-c-format
+msgid ""
+"All three methods return a <classname>Set<ConstraintViolation></"
+"classname>. The set is empty, if the validation succeeds. Otherwise a "
+"<classname>ConstraintViolation</classname> instance is added for each "
+"violated constraint."
+msgstr ""
+"这三个方法都会返回一个<classname>Set<ConstraintViolation></classname>对"
+"象, 如果整个验证过程没有发现问题的话,那么这个set是空的, 否则, 每个违反约束的"
+"地方都会被包装成一个<classname>ConstraintViolation</classname>的实例然后添加"
+"到set当中. "
+
+#. Tag: para
+#: usingvalidator.xml:295
+#, no-c-format
+msgid ""
+"All the validation methods have a var-args parameter which can be used to "
+"specify, which validation groups shall be considered when performing the "
+"validation. If the parameter is not specified the default validation group "
+"(<classname>javax.validation.groups.Default</classname>) will be used. We "
+"will go into more detail on the topic of validation groups in"
+msgstr ""
+"所有的校验方法都接收零个或多个用来定义此次校验是基于哪个校验组的参数. 如果没"
+"有给出这个参数的话, 那么此次校验将会基于默认的校验组 (<classname>javax."
+"validation.groups.Default</classname>). "
+
+#. Tag: methodname
+#: usingvalidator.xml:304
+#, no-c-format
+msgid "validate"
+msgstr "validate"
+
+#. Tag: para
+#: usingvalidator.xml:306
+#, no-c-format
+msgid ""
+"Use the <methodname>validate()</methodname> method to perform validation of "
+"all constraints of a given entity instance (see <xref linkend=\"example-"
+"validator-validate\"/> )."
+msgstr ""
+"使用<methodname>validate()</methodname>方法对一个给定的实体对象中定义的所有约"
+"束条件进行校验 (<xref linkend=\"example-validator-validate\"/> )."
+
+#. Tag: title
+#: usingvalidator.xml:311
+#, no-c-format
+msgid "Usage of <methodname>Validator.validate()</methodname>"
+msgstr "<methodname>Validator.validate()</methodname> 使用方法"
+
+#. Tag: programlisting
+#: usingvalidator.xml:314
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validate(car);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validate(car);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+
+#. Tag: methodname
+#: usingvalidator.xml:319
+#, no-c-format
+msgid "validateProperty"
+msgstr "validateProperty"
+
+#. Tag: para
+#: usingvalidator.xml:321
+#, no-c-format
+msgid ""
+"With help of the <methodname>validateProperty()</methodname> a single named "
+"property of a given object can be validated. The property name is the "
+"JavaBeans property name."
+msgstr ""
+"通过<methodname>validateProperty()</methodname>可以对一个给定实体对象的单个属"
+"性进行校验. 其中属性名称需要符合JavaBean规范中定义的属性名称."
+
+#. Tag: title
+#: usingvalidator.xml:326
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateProperty()</methodname>"
+msgstr "<methodname>Validator.validateProperty()</methodname>使用方法"
+
+#. Tag: programlisting
+#: usingvalidator.xml:329
+#, no-c-format
+msgid ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validateProperty(car, \"manufacturer\");\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validateProperty(car, \"manufacturer\");\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+
+#. Tag: para
+#: usingvalidator.xml:332
+#, no-c-format
+msgid ""
+"<methodname>Validator.validateProperty</methodname> is for example used in "
+"the integration of Bean Validation into JSF 2 (see <xref linkend=\"section-"
+"presentation-layer\"/>)."
+msgstr ""
+"例如, <methodname>Validator.validateProperty</methodname>可以被用在把Bean "
+"Validation集成进JSF 2中的时候使用 (请参考 <xref linkend=\"section-"
+"presentation-layer\"/>)."
+
+#. Tag: methodname
+#: usingvalidator.xml:338
+#, no-c-format
+msgid "validateValue"
+msgstr "validateValue"
+
+#. Tag: para
+#: usingvalidator.xml:340
+#, no-c-format
+msgid ""
+"Using the <methodname>validateValue() </methodname>method you can check, "
+"whether a single property of a given class can be validated successfully, if "
+"the property had the specified value:"
+msgstr ""
+"通过<methodname>validateValue() </methodname>方法,你能够校验如果把一个特定的"
+"值赋给一个类的某一个属性的话,是否会违反此类中定义的约束条件."
+
+#. Tag: title
+#: usingvalidator.xml:345
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateValue()</methodname>"
+msgstr "<methodname>Validator.validateValue()</methodname> 使用方法"
+
+#. Tag: programlisting
+#: usingvalidator.xml:348
+#, no-c-format
+msgid ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validateValue(Car.class, \"manufacturer\", null);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Set<ConstraintViolation<Car>> constraintViolations = validator."
+"validateValue(Car.class, \"manufacturer\", null);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+
+#. Tag: para
+#: usingvalidator.xml:352
+#, no-c-format
+msgid ""
+"<classname>@Valid</classname> is not honored by <methodname>validateProperty"
+"()</methodname> or <methodname>validateValue()</methodname>."
+msgstr ""
+"<methodname>validateProperty()</methodname> 和 <methodname>validateValue()</"
+"methodname> 会忽略被验证属性上定义的<classname>@Valid</classname>."
+
+#. Tag: title
+#: usingvalidator.xml:360
+#, no-c-format
+msgid "<classname>ConstraintViolation</classname> methods"
+msgstr "<classname>ConstraintViolation</classname> 中的方法"
+
+#. Tag: para
+#: usingvalidator.xml:362
+#, no-c-format
+msgid ""
+"Now it is time to have a closer look at what a "
+"<classname>ConstraintViolation</classname>. Using the different methods of "
+"<classname>ConstraintViolation</classname> a lot of useful information about "
+"the cause of the validation failure can be determined. <xref linkend=\"table-"
+"constraint-violation\"/> gives an overview of these methods:"
+msgstr ""
+"现在是时候看看究竟<classname>ConstraintViolation</classname>是什么了. "
+"<classname>ConstraintViolation</classname>中包含了很多方法能够帮你快速定位究"
+"竟是什么导致了校验失败.<xref linkend=\"table-constraint-violation\"/> 列出了"
+"这些方法:"
+
+#. Tag: title
+#: usingvalidator.xml:370
+#, no-c-format
+msgid "The various <classname>ConstraintViolation</classname> methods"
+msgstr "<classname>ConstraintViolation</classname> 中的方法"
+
+#. Tag: entry
+#: usingvalidator.xml:376
+#, no-c-format
+msgid "Method"
+msgstr "方法名"
+
+#. Tag: entry
+#: usingvalidator.xml:378
+#, no-c-format
+msgid "Usage"
+msgstr "作用"
+
+#. Tag: entry
+#: usingvalidator.xml:380
+#, no-c-format
+msgid "Example (referring to <xref linkend=\"example-validator-validate\"/>)"
+msgstr "示例 (请参考<xref linkend=\"example-validator-validate\"/>)"
+
+#. Tag: methodname
+#: usingvalidator.xml:387
+#, no-c-format
+msgid "getMessage()"
+msgstr "getMessage()"
+
+#. Tag: entry
+#: usingvalidator.xml:389
+#, no-c-format
+msgid "The interpolated error message."
+msgstr "获取(经过翻译的)校验错误信息"
+
+#. Tag: entry
+#: usingvalidator.xml:391
+#, no-c-format
+msgid "may not be null"
+msgstr "may not be null"
+
+#. Tag: methodname
+#: usingvalidator.xml:395
+#, no-c-format
+msgid "getMessageTemplate()"
+msgstr "getMessageTemplate()"
+
+#. Tag: entry
+#: usingvalidator.xml:397
+#, no-c-format
+msgid "The non-interpolated error message."
+msgstr "获取错误信息模版"
+
+#. Tag: entry
+#: usingvalidator.xml:399
+#, no-c-format
+msgid "{javax.validation.constraints.NotNull.message}"
+msgstr "{javax.validation.constraints.NotNull.message}"
+
+#. Tag: methodname
+#: usingvalidator.xml:403
+#, no-c-format
+msgid "getRootBean()"
+msgstr "getRootBean()"
+
+#. Tag: entry
+#: usingvalidator.xml:405
+#, no-c-format
+msgid "The root bean being validated."
+msgstr "获取被校验的根实体对象"
+
+#. Tag: entry
+#: usingvalidator.xml:407 usingvalidator.xml:425
+#, no-c-format
+msgid "<entry>car</entry>"
+msgstr "<entry>car</entry>"
+
+#. Tag: methodname
+#: usingvalidator.xml:411
+#, no-c-format
+msgid "getRootBeanClass()"
+msgstr "getRootBeanClass()"
+
+#. Tag: entry
+#: usingvalidator.xml:413
+#, no-c-format
+msgid "The class of the root bean being validated."
+msgstr "获取被校验的根实体类."
+
+#. Tag: entry
+#: usingvalidator.xml:415
+#, no-c-format
+msgid "Car.class"
+msgstr "Car.class"
+
+#. Tag: methodname
+#: usingvalidator.xml:419
+#, no-c-format
+msgid "getLeafBean()"
+msgstr "getLeafBean()"
+
+#. Tag: entry
+#: usingvalidator.xml:421
+#, no-c-format
+msgid ""
+"If a bean constraint, the bean instance the constraint is applied on. If a "
+"property constraint, the bean instance hosting the property the constraint "
+"is applied on."
+msgstr ""
+"如果约束是添加在一个bean(实体对象)上的,那么则返回这个bean的实例, 如果是约束是"
+"定义在一个属性上的, 则返回这个属性所属的bean的实例对象. "
+
+#. Tag: methodname
+#: usingvalidator.xml:429
+#, no-c-format
+msgid "getPropertyPath()"
+msgstr "getPropertyPath()"
+
+#. Tag: entry
+#: usingvalidator.xml:431
+#, no-c-format
+msgid "The property path to the value from root bean."
+msgstr "从被验证的根对象到被验证的属性的路径."
+
+#. Tag: methodname
+#: usingvalidator.xml:437
+#, no-c-format
+msgid "getInvalidValue()"
+msgstr "getInvalidValue()"
+
+#. Tag: entry
+#: usingvalidator.xml:439
+#, no-c-format
+msgid "The value failing to pass the constraint."
+msgstr "倒是校验失败的值."
+
+#. Tag: entry
+#: usingvalidator.xml:441
+#, no-c-format
+msgid "passengers"
+msgstr "passengers"
+
+#. Tag: methodname
+#: usingvalidator.xml:445
+#, no-c-format
+msgid "getConstraintDescriptor()"
+msgstr "getConstraintDescriptor()"
+
+#. Tag: entry
+#: usingvalidator.xml:447
+#, no-c-format
+msgid "Constraint metadata reported to fail."
+msgstr "导致校验失败的约束定义."
+
+#. Tag: title
+#: usingvalidator.xml:457
+#, no-c-format
+msgid "Message interpolation"
+msgstr "验证失败提示信息解析"
+
+#. Tag: para
+#: usingvalidator.xml:459
+#, no-c-format
+msgid ""
+"As we will see in <xref linkend=\"validator-customconstraints\"/> each "
+"constraint definition must define a default message descriptor. This message "
+"can be overridden at declaration time using the <methodname>message</"
+"methodname> attribute of the constraint. You can see this in <xref linkend="
+"\"example-driver\"/>. This message descriptors get interpolated when a "
+"constraint validation fails using the configured "
+"<classname>MessageInterpolator</classname>. The interpolator will try to "
+"resolve any message parameters, meaning string literals enclosed in braces. "
+"In order to resolve these parameters Hibernate Validator's default "
+"<classname>MessageInterpolator</classname> first recursively resolves "
+"parameters against a custom <classname>ResourceBundle</classname> called "
+"<filename>ValidationMessages.properties</filename> at the root of the "
+"classpath (It is up to you to create this file). If no further replacements "
+"are possible against the custom bundle the default "
+"<classname>ResourceBundle</classname> under <filename>/org/hibernate/"
+"validator/ValidationMessages.properties</filename> gets evaluated. If a "
+"replacement occurs against the default bundle the algorithm looks again at "
+"the custom bundle (and so on). Once no further replacements against these "
+"two resource bundles are possible remaining parameters are getting resolved "
+"against the attributes of the constraint to be validated."
+msgstr ""
+"在<xref linkend=\"validator-customconstraints\"/>中,我们会看到,每个约束定义中"
+"都包含有一个用于提示验证结果的消息模版, 并且在声明一个约束条件的时候,你可以通"
+"过这个约束中的<methodname>message</methodname>属性来重写默认的消息模版, 可以"
+"参考<xref linkend=\"example-driver\"/>. 如果在校验的时候,这个约束条件没有通"
+"过,那么你配置的<classname>MessageInterpolator</classname>会被用来当成解析器来"
+"解析这个约束中定义的消息模版, 从而得到最终的验证失败提示信息. 这个解析器会尝"
+"试解析模版中的占位符( 大括号括起来的字符串 ). 其中, Hibernate Validator中默认"
+"的解析器 (<classname>MessageInterpolator</classname>) 会先在类路径下找名称为"
+"<filename>ValidationMessages.properties</filename>的"
+"<classname>ResourceBundle</classname>, 然后将占位符和这个文件中定义的resource"
+"进行匹配,如果匹配不成功的话,那么它会继续匹配Hibernate Validator自带的位于"
+"<filename>/org/hibernate/validator/ValidationMessages.properties</filename>的"
+"<classname>ResourceBundle</classname>, 依次类推,递归的匹配所有的占位符."
+
+#. Tag: para
+#: usingvalidator.xml:482
+#, no-c-format
+msgid ""
+"Since the braces { and } have special meaning in the messages they need to "
+"be escaped if they are used literally. The following The following rules "
+"apply:"
+msgstr ""
+"因为大括号{ 在这里是特殊字符,所以,你可以通过使用反斜线来对其进行转义, 例如:"
+
+#. Tag: para
+#: usingvalidator.xml:486
+#, no-c-format
+msgid "\\{ is considered as the literal {"
+msgstr "\\{ 被转义成 {"
+
+#. Tag: para
+#: usingvalidator.xml:490
+#, no-c-format
+msgid "\\} is considered as the literal }"
+msgstr "\\} 被转义成 }"
+
+#. Tag: para
+#: usingvalidator.xml:494
+#, no-c-format
+msgid "\\\\ is considered as the literal \\"
+msgstr "\\\\ 被转义成 \\"
+
+#. Tag: para
+#: usingvalidator.xml:498
+#, no-c-format
+msgid ""
+"If the default message interpolator does not fit your requirements it is "
+"possible to plug a custom <classname>MessageInterpolator</classname> when "
+"the <classname>ValidatorFactory</classname> gets created. This can be seen "
+"in <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+"如果默认的消息解析器不能够满足你的需求,那么你也可以在创建"
+"<classname>ValidatorFactory</classname>的时候, 将其替换为一个你自定义的"
+"<classname>MessageInterpolator</classname>, 具体请参考 <xref linkend="
+"\"validator-bootstrapping\"/>."
+
+#. Tag: title
+#: usingvalidator.xml:507
+#, no-c-format
+msgid "Validating groups"
+msgstr "校验组"
+
+#. Tag: para
+#: usingvalidator.xml:509
+#, no-c-format
+msgid ""
+"Groups allow you to restrict the set of constraints applied during "
+"validation. This makes for example wizard like validation possible where in "
+"each step only a specified subset of constraints get validated. The groups "
+"targeted are passed as var-args parameters to <methodname>validate</"
+"methodname>, <methodname>validateProperty</methodname> and "
+"<methodname>validateValue</methodname>. Let's have a look at an extended "
+"<classname>Car</classname> with <classname>Driver</classname> example. First "
+"we have the class <classname>Person</classname> (<xref linkend=\"example-"
+"person\"/>) which has a <classname>@NotNull </classname>constraint on "
+"<property>name</property>. Since no group is specified for this annotation "
+"its default group is <classname>javax.validation.groups.Default</classname>."
+msgstr ""
+"校验组能够让你在验证的时候选择应用哪些约束条件. 这样在某些情况下( 例如向导 ) "
+"就可以对每一步进行校验的时候, 选取对应这步的那些约束条件进行验证了. 校验组是"
+"通过可变参数传递给<methodname>validate</methodname>, "
+"<methodname>validateProperty</methodname> 和 <methodname>validateValue</"
+"methodname>的. 让我们来看个例子, 这个实例扩展了上面的<classname>Car</"
+"classname>类,又为其添加了一个新的<classname>Driver</classname>. 首先, 类"
+"<classname>Person</classname> (<xref linkend=\"example-person\"/>) 的"
+"<property>name</property>属性上定义了一个<classname>@NotNull </classname>的约"
+"束条件. 因为没有明确指定这个约束条件属于哪个组,所以它被归类到默认组 "
+"(<classname>javax.validation.groups.Default</classname>)."
+
+#. Tag: para
+#: usingvalidator.xml:524
+#, no-c-format
+msgid ""
+"When more than one group is requested, the order in which the groups are "
+"evaluated is not deterministic. If no group is specified the default group "
+"<classname>javax.validation.groups.Default</classname> is assumed."
+msgstr ""
+"如果某个约束条件属于多个组,那么各个组在校验时候的顺序是不可预知的. 如果一个约"
+"束条件没有被指明属于哪个组,那么它就会被归类到默认组(<classname>javax."
+"validation.groups.Default</classname>)."
+
+#. Tag: title
+#: usingvalidator.xml:531
+#, no-c-format
+msgid "Person"
+msgstr "Person"
+
+#. Tag: programlisting
+#: usingvalidator.xml:533
+#, no-c-format
+msgid ""
+"public class Person {\n"
+"    @NotNull\n"
+"    private String name;\n"
+"\n"
+"    public Person(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"    // getters and setters ...\n"
+"}"
+msgstr ""
+"public class Person {\n"
+"    @NotNull\n"
+"    private String name;\n"
+"\n"
+"    public Person(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"    // getters and setters ...\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:536
+#, no-c-format
+msgid ""
+"Next we have the class <classname>Driver</classname> (<xref linkend="
+"\"example-driver\"/>) extending <classname>Person</classname>. Here we are "
+"adding the properties <property>age</property> and "
+"<property>hasDrivingLicense</property>. In order to drive you must be at "
+"least 18 (<classname>@Min(18)</classname>) and you must have a driving "
+"license (<classname>@AssertTrue</classname>). Both constraints defined on "
+"these properties belong to the group <classname>DriverChecks</classname>. As "
+"you can see in <xref linkend=\"example-group-interfaces\"/> the group "
+"<classname>DriverChecks</classname> is just a simple tagging interface. "
+"Using interfaces makes the usage of groups type safe and allows for easy "
+"refactoring. It also means that groups can inherit from each other via class "
+"inheritance."
+msgstr ""
+"接下来, 我们让类<classname>Driver</classname> (<xref linkend=\"example-driver"
+"\"/>) 继承自类<classname>Person</classname>. 然后添加两个属性,分别是"
+"<property>age</property> 和 <property>hasDrivingLicense</property>. 对于一个"
+"司机来说, 要开车的话, 必须满足两个条件, 年满18周岁 (<classname>@Min(18)</"
+"classname>) 和你的有驾照(<classname>@AssertTrue</classname>). 这两个约束条件"
+"分别定义在那两个属性上, 并且把他们都归于<classname>DriverChecks</classname>"
+"组. 通过<xref linkend=\"example-group-interfaces\"/>, 你可以看到, "
+"\"<classname>DriverChecks</classname>组\" 就是一个简单的标记接口. 使用接口"
+"( 而不是字符串) 可以做到类型安全,并且接口比字符串更加对重构友好, 另外, 接口还"
+"意味着一个组可以继承别的组."
+
+#. Tag: title
+#: usingvalidator.xml:550
+#, no-c-format
+msgid "Driver"
+msgstr "Driver"
+
+#. Tag: programlisting
+#: usingvalidator.xml:552
+#, no-c-format
+msgid ""
+"public class Driver extends Person {\n"
+"    @Min(value = 18, message = \"You have to be 18 to drive a car\", groups "
+"= DriverChecks.class)\n"
+"    public int age;\n"
+"\n"
+"    @AssertTrue(message = \"You first have to pass the driving test\", "
+"groups = DriverChecks.class)\n"
+"    public boolean hasDrivingLicense;\n"
+"\n"
+"    public Driver(String name) {\n"
+"        super( name );\n"
+"    }\n"
+"\n"
+"    public void passedDrivingTest(boolean b) {\n"
+"        hasDrivingLicense = b;\n"
+"    }\n"
+"\n"
+"    public int getAge() {\n"
+"        return age;\n"
+"    }\n"
+"\n"
+"    public void setAge(int age) {\n"
+"        this.age = age;\n"
+"    }\n"
+"}"
+msgstr ""
+"public class Driver extends Person {\n"
+"    @Min(value = 18, message = \"You have to be 18 to drive a car\", groups "
+"= DriverChecks.class)\n"
+"    public int age;\n"
+"\n"
+"    @AssertTrue(message = \"You first have to pass the driving test\", "
+"groups = DriverChecks.class)\n"
+"    public boolean hasDrivingLicense;\n"
+"\n"
+"    public Driver(String name) {\n"
+"        super( name );\n"
+"    }\n"
+"\n"
+"    public void passedDrivingTest(boolean b) {\n"
+"        hasDrivingLicense = b;\n"
+"    }\n"
+"\n"
+"    public int getAge() {\n"
+"        return age;\n"
+"    }\n"
+"\n"
+"    public void setAge(int age) {\n"
+"        this.age = age;\n"
+"    }\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:556
+#, no-c-format
+msgid "Group interfaces"
+msgstr "Group interfaces"
+
+#. Tag: programlisting
+#: usingvalidator.xml:558
+#, no-c-format
+msgid ""
+"public interface DriverChecks {\n"
+"}\n"
+"\n"
+"public interface CarChecks {\n"
+"}"
+msgstr ""
+"public interface DriverChecks {\n"
+"}\n"
+"\n"
+"public interface CarChecks {\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:561
+#, no-c-format
+msgid ""
+"Last but not least we add the property <property>passedVehicleInspection</"
+"property> to the <classname>Car</classname> class (<xref linkend=\"example-"
+"car\"/>) indicating whether a car passed the road worthy tests."
+msgstr ""
+"最后, 我们给<classname>Car</classname> class (<xref linkend=\"example-car\"/"
+">) 添加一个<property>passedVehicleInspection</property>的属性,来表示这个车是"
+"否通过了上路检查."
+
+#. Tag: title
+#: usingvalidator.xml:567
+#, no-c-format
+msgid "<title>Car</title>"
+msgstr "<title>Car</title>"
+
+#. Tag: programlisting
+#: usingvalidator.xml:569
+#, no-c-format
+msgid ""
+"public class Car {\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"\n"
+"    @AssertTrue(message = \"The car has to pass the vehicle inspection first"
+"\", groups = CarChecks.class)\n"
+"    private boolean passedVehicleInspection;\n"
+"\n"
+"    @Valid\n"
+"    private Driver driver;\n"
+"\n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"}"
+msgstr ""
+"public class Car {\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"\n"
+"    @AssertTrue(message = \"The car has to pass the vehicle inspection first"
+"\", groups = CarChecks.class)\n"
+"    private boolean passedVehicleInspection;\n"
+"\n"
+"    @Valid\n"
+"    private Driver driver;\n"
+"\n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:572
+#, no-c-format
+msgid ""
+"Overall three different groups are used in our example. <property>Person."
+"name</property>, <property>Car.manufacturer</property>, <property>Car."
+"licensePlate</property> and <property>Car.seatCount</property> all belong to "
+"the <classname>Default</classname> group. <property>Driver.age</property> "
+"and <property>Driver.hasDrivingLicense</property> belong to "
+"<classname>DriverChecks</classname> and last but not least <property>Car."
+"passedVehicleInspection</property> belongs to the group "
+"<classname>CarChecks</classname>. <xref linkend=\"example-drive-away\"/> "
+"shows how passing different group combinations to the <methodname>Validator."
+"validate</methodname> method result in different validation results."
+msgstr ""
+"现在, 在我们的例子中有三个不同的校验组, <property>Person.name</property>, "
+"<property>Car.manufacturer</property>, <property>Car.licensePlate</property> "
+"和 <property>Car.seatCount</property>都属于默认(<classname>Default</"
+"classname>) 组, <property>Driver.age</property> 和 <property>Driver."
+"hasDrivingLicense</property> 从属于 <classname>DriverChecks</classname>组, 而"
+"<property>Car.passedVehicleInspection</property> 在<classname>CarChecks</"
+"classname>组中. <xref linkend=\"example-drive-away\"/>演示了如何让"
+"<methodname>Validator.validate</methodname>验证不同的组来得到不同的校验结果."
+
+#. Tag: title
+#: usingvalidator.xml:586
+#, no-c-format
+msgid "Drive away"
+msgstr "Drive away"
+
+#. Tag: programlisting
+#: usingvalidator.xml:588
+#, no-c-format
+msgid ""
+"public class GroupTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void driveAway() {\n"
+"        // create a car and check that everything is ok with it.\n"
+"        Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"        Set<ConstraintViolation<Car>> constraintViolations = "
+"validator.validate( car );\n"
+"        assertEquals( 0, constraintViolations.size() );\n"
+"\n"
+"        // but has it passed the vehicle inspection?\n"
+"        constraintViolations = validator.validate( car, CarChecks.class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals(\"The car has to pass the vehicle inspection first\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"\n"
+"        // let's go to the vehicle inspection\n"
+"        car.setPassedVehicleInspection( true );\n"
+"        assertEquals( 0, validator.validate( car ).size() );\n"
+"\n"
+"        // now let's add a driver. He is 18, but has not passed the driving "
+"test yet\n"
+"        Driver john = new Driver( \"John Doe\" );\n"
+"        john.setAge( 18 );\n"
+"        car.setDriver( john );\n"
+"        constraintViolations = validator.validate( car, DriverChecks."
+"class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals( \"You first have to pass the driving test\", "
+"constraintViolations.iterator().next().getMessage() );\n"
+"\n"
+"        // ok, John passes the test\n"
+"        john.passedDrivingTest( true );\n"
+"        assertEquals( 0, validator.validate( car, DriverChecks.class ).size"
+"() );\n"
+"\n"
+"        // just checking that everything is in order now\n"
+"        assertEquals( 0, validator.validate( car, Default.class, CarChecks."
+"class, DriverChecks.class ).size() );\n"
+"    }\n"
+"}"
+msgstr ""
+"public class GroupTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void driveAway() {\n"
+"        // create a car and check that everything is ok with it.\n"
+"        Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"        Set<ConstraintViolation<Car>> constraintViolations = "
+"validator.validate( car );\n"
+"        assertEquals( 0, constraintViolations.size() );\n"
+"\n"
+"        // but has it passed the vehicle inspection?\n"
+"        constraintViolations = validator.validate( car, CarChecks.class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals(\"The car has to pass the vehicle inspection first\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"\n"
+"        // let's go to the vehicle inspection\n"
+"        car.setPassedVehicleInspection( true );\n"
+"        assertEquals( 0, validator.validate( car ).size() );\n"
+"\n"
+"        // now let's add a driver. He is 18, but has not passed the driving "
+"test yet\n"
+"        Driver john = new Driver( \"John Doe\" );\n"
+"        john.setAge( 18 );\n"
+"        car.setDriver( john );\n"
+"        constraintViolations = validator.validate( car, DriverChecks."
+"class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals( \"You first have to pass the driving test\", "
+"constraintViolations.iterator().next().getMessage() );\n"
+"\n"
+"        // ok, John passes the test\n"
+"        john.passedDrivingTest( true );\n"
+"        assertEquals( 0, validator.validate( car, DriverChecks.class ).size"
+"() );\n"
+"\n"
+"        // just checking that everything is in order now\n"
+"        assertEquals( 0, validator.validate( car, Default.class, CarChecks."
+"class, DriverChecks.class ).size() );\n"
+"    }\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:591
+#, no-c-format
+msgid ""
+"First we create a car and validate it using no explicit group. There are no "
+"validation errors, even though the property "
+"<property>passedVehicleInspection</property> is per default <constant>false</"
+"constant>. However, the constraint defined on this property does not belong "
+"to the default group. Next we just validate the <classname>CarChecks</"
+"classname> group which will fail until we make sure that the car passes the "
+"vehicle inspection. When we then add a driver to the car and validate "
+"against <classname>DriverChecks</classname> we get again a constraint "
+"violation due to the fact that the driver has not yet passed the driving "
+"test. Only after setting <property>passedDrivingTest</property> to true the "
+"validation against <classname>DriverChecks</classname> will pass."
+msgstr ""
+"首先我们创建一辆汽车然后在没有明确指定使用哪个校验组的情况下校验它, 可以看到"
+"即使<property>passedVehicleInspection</property>的默认值是<constant>false</"
+"constant>也不会校验出错误来. 因为定义在这个属性上的约束条件并不属于默认的校验"
+"组, 接下来,我们来校验<classname>CarChecks</classname>这个组, 这样就会发现car"
+"违反了约束条件, 必须让这个车先通过检测. 接下来,我们给这个车增加一个司机, 然后"
+"在基于<classname>DriverChecks</classname>来校验, 会发现因为这个司机因为还没有"
+"通过驾照考试, 所以又一次得到了校验错误, 如果我们设置"
+"<property>passedDrivingTest</property>属性为<constant>true</constant>之后, "
+"<classname>DriverChecks</classname>组的校验就通过了."
+
+#. Tag: para
+#: usingvalidator.xml:604
+#, no-c-format
+msgid ""
+"Last but not least, we show that all constraints are passing by validating "
+"against all defined groups."
+msgstr ""
+"最后, 让我们再来校验所有的组中定义的约束条件,可以看到所有的约束条件都通过了验"
+"证."
+
+#. Tag: title
+#: usingvalidator.xml:608
+#, no-c-format
+msgid "Group sequences"
+msgstr "校验组序列"
+
+#. Tag: para
+#: usingvalidator.xml:610
+#, fuzzy, no-c-format
+msgid ""
+"By default, constraints are evaluated in no particular order, regardless of "
+"which groups they belong to. In some situations, however, it is useful to "
+"control the order constraints are evaluated. In our example from <xref "
+"linkend=\"validator-usingvalidator-validationgroups\"/> we could for example "
+"require that first all default car constraints are passing before we check "
+"the road worthiness of the car. Finally before we drive away we check the "
+"actual driver constraints. In order to implement such an order one would "
+"define a new interface and annotate it with <classname>@GroupSequence</"
+"classname> defining the order in which the groups have to be validated."
+msgstr ""
+"默认情况下, 如果一个实体类(或者属性)上定义了多个约束条件,那么在验证过程中,这"
+"些约束条件无序被校验的, 不管它们属于那个验证组. 但是在某些情况下, 控制这个顺"
+"序又是有必要的. 在<xref linkend=\"validator-usingvalidator-validationgroups"
+"\"/>中, 我们可以要求汽车先要通过检测, 没有问题了之后在进行上路测试, 最后, 在"
+"我们把车开走之前,还要让司机通过测试. 为了达到这个效果, 我们可以创建一个新的接"
+"口, 然后用<classname>@GroupSequence</classname>标注它, 在这个标注里面去定义要"
+"应用的验证组的顺序. "
+
+#. Tag: para
+#: usingvalidator.xml:622
+#, fuzzy, no-c-format
+msgid ""
+"If at least one constraint fails in a sequenced group none of the "
+"constraints of the following groups in the sequence get validated."
+msgstr ""
+"如果这个校验组序列中有一个约束条件没有通过验证的话, 那么此约束条件后面的都不"
+"会再继续被校验了. "
+
+#. Tag: title
+#: usingvalidator.xml:628
+#, no-c-format
+msgid "Interface with @GroupSequence"
+msgstr "标注了@GroupSequence的接口"
+
+#. Tag: programlisting
+#: usingvalidator.xml:630
+#, no-c-format
+msgid ""
+"@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})\n"
+"public interface OrderedChecks {\n"
+"}"
+msgstr ""
+"@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})\n"
+"public interface OrderedChecks {\n"
+"}"
+
+#. Tag: para
+#: usingvalidator.xml:634
+#, no-c-format
+msgid ""
+"Groups defining a sequence and groups composing a sequence must not be "
+"involved in a cyclic dependency either directly or indirectly, either "
+"through cascaded sequence definition or group inheritance. If a group "
+"containing such a circularity is evaluated, a "
+"<classname>GroupDefinitionException</classname> is raised."
+msgstr ""
+"一个校验组序列中包含的校验组和这个校验组序列不能造成直接或者间接的循环引用. "
+"包括校验组继承. 如果造成了循环引用的话, 会导致"
+"<classname>GroupDefinitionException</classname>异常."
+
+#. Tag: para
+#: usingvalidator.xml:638
+#, no-c-format
+msgid ""
+"The usage of the new sequence could then look like in <xref linkend="
+"\"example-group-sequence\"/>."
+msgstr "<xref linkend=\"example-group-sequence\"/>展示了校验组序列的用法."
+
+#. Tag: title
+#: usingvalidator.xml:643
+#, no-c-format
+msgid "Usage of a group sequence"
+msgstr "校验组序列的用法"
+
+#. Tag: programlisting
+#: usingvalidator.xml:645
+#, no-c-format
+msgid ""
+"@Test\n"
+"public void testOrderedChecks() {\n"
+"    Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"    car.setPassedVehicleInspection( true );\n"
+"\n"
+"    Driver john = new Driver( \"John Doe\" );\n"
+"    john.setAge( 18 );\n"
+"    john.passedDrivingTest( true );\n"
+"    car.setDriver( john );\n"
+"\n"
+"    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size"
+"() );\n"
+"}"
+msgstr ""
+"@Test\n"
+"public void testOrderedChecks() {\n"
+"    Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"    car.setPassedVehicleInspection( true );\n"
+"\n"
+"    Driver john = new Driver( \"John Doe\" );\n"
+"    john.setAge( 18 );\n"
+"    john.passedDrivingTest( true );\n"
+"    car.setDriver( john );\n"
+"\n"
+"    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size"
+"() );\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:650
+#, no-c-format
+msgid "Redefining the default group sequence of a class"
+msgstr "对一个类重定义其默认校验组"
+
+#. Tag: title
+#: usingvalidator.xml:653
+#, fuzzy, no-c-format
+msgid "@GroupSequence"
+msgstr "校验组序列"
+
+#. Tag: para
+#: usingvalidator.xml:655
+#, fuzzy, no-c-format
+msgid ""
+"The <classname>@GroupSequence</classname> annotation also fulfills a second "
+"purpose. It allows you to redefine what the <constant>Default</constant> "
+"group means for a given class. To redefine <classname>Default</classname> "
+"for a given class, add a <classname>@GroupSequence</classname> annotation to "
+"the class. The defined groups in the annotation express the sequence of "
+"groups that substitute <classname>Default</classname> for this class. <xref "
+"linkend=\"example-rental-car\"/> introduces a new class "
+"<classname>RentalCar</classname> with a redefined default group. With this "
+"definition you can evaluate the constraints belonging to "
+"<classname>RentalChecks</classname>, <classname>CarChecks</classname> and "
+"<classname>RentalCar</classname> by just requesting the <classname>Default</"
+"classname> group as seen in <xref linkend=\"example-testCarIsRented\"/>."
+msgstr ""
+"<classname>@GroupSequence</classname> annotation还有第二个用处, 通过把"
+"<classname>@GroupSequence</classname>标注于一个类, 你可以给这个类定义它的默认"
+"校验组(<classname>Default</classname>).  这样,定义在其中的校验组就表示对这个"
+"类进行默认组校验的时候要被应用的约束条件(和顺序). <xref linkend=\"example-"
+"rental-car\"/>中引入了一个新的类RentalCar, 它就被重定义了默认组. 这样, 在"
+"<xref linkend=\"example-testOrderedChecksWithRedefinedDefault\"/>中, "
+"RentalCar被校验的时候,实际上是被应用了三个校验组的约束条件."
+
+#. Tag: title
+#: usingvalidator.xml:671
+#, fuzzy, no-c-format
+msgid "RentalCar with @GroupSequence"
+msgstr "标注了@GroupSequence的接口"
+
+#. Tag: programlisting
+#: usingvalidator.xml:673
+#, fuzzy, no-c-format
+msgid ""
+"@GroupSequence({ RentalChecks.class, CarChecks.class, RentalCar.class })\n"
+"public class RentalCar extends Car {\n"
+"    @AssertFalse(message = \"The car is currently rented out\", groups = "
+"RentalChecks.class)\n"
+"    private boolean rented;\n"
+"\n"
+"    public RentalCar(String manufacturer, String licencePlate, int "
+"seatCount) {\n"
+"        super( manufacturer, licencePlate, seatCount );\n"
+"    }\n"
+"\n"
+"    public boolean isRented() {\n"
+"        return rented;\n"
+"    }\n"
+"\n"
+"    public void setRented(boolean rented) {\n"
+"        this.rented = rented;\n"
+"    }\n"
+"}"
+msgstr ""
+"@GroupSequence({ RentalCar.class, CarChecks.class })\n"
+"public class RentalCar extends Car {\n"
+"    public RentalCar(String manufacturer, String licencePlate, int "
+"seatCount) {\n"
+"        super( manufacturer, licencePlate, seatCount );\n"
+"    }\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:677
+#, fuzzy, no-c-format
+msgid "RentalCar with redefined default group"
+msgstr "标注了@GroupSequence的接口"
+
+#. Tag: programlisting
+#: usingvalidator.xml:679
+#, no-c-format
+msgid ""
+"/**\n"
+" * Validating the default group leads to validation on the default group "
+"sequence of {@code RentalCar}.\n"
+" */\n"
+"@Test\n"
+"public void carIsRented() {\n"
+"  RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+"  rentalCar.setPassedVehicleInspection( true );\n"
+"  rentalCar.setRented( true );\n"
+"\n"
+"  Set<ConstraintViolation<RentalCar>> constraintViolations = "
+"validator.validate( rentalCar );\n"
+"\n"
+"  assertEquals( 1, constraintViolations.size() );\n"
+"  assertEquals(\n"
+"    \"Wrong message\",\n"
+"    \"The car is currently rented out\",\n"
+"    constraintViolations.iterator().next().getMessage()\n"
+"  );\n"
+"\n"
+"  rentalCar.setRented( false );\n"
+"  constraintViolations = validator.validate( rentalCar );\n"
+"\n"
+"  assertEquals( 0, constraintViolations.size() );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:683
+#, fuzzy, no-c-format
+msgid ""
+"Due to the fact that there cannot be a cyclic dependency in the group and "
+"group sequence definitions one cannot just add <classname>Default</"
+"classname> to the sequence redefining <classname>Default</classname> for a "
+"class. Instead the class itself has to be added!"
+msgstr ""
+"因为不能在校验组和校验组序列中有循环依赖关系, 所以, 如果你想重定义一个类的默"
+"认组, 并且还想把<classname>Default</classname>组加入到这个重定义的序列当中的"
+"话, 则不能简单的加入<classname>Default</classname>, 而是需要把被重定义的类加"
+"入到其中."
+
+#. Tag: para
+#: usingvalidator.xml:691
+#, no-c-format
+msgid ""
+"The <classname>Default</classname> group sequence overriding is local to the "
+"class it is defined on and is not propagated to the associated objects. This "
+"means in particular that adding <classname>DriverChecks</classname> to the "
+"default group sequence of <classname>RentalCar</classname> would not have "
+"any effects. Only the group <classname>Default</classname> will be "
+"propagated to the driver association when validation a rental car instance."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:702
+#, fuzzy, no-c-format
+msgid "@GroupSequenceProvider"
+msgstr "校验组序列"
+
+#. Tag: para
+#: usingvalidator.xml:704
+#, no-c-format
+msgid ""
+"The <classname>@javax.validation.GroupSequence</classname> annotation is a "
+"standardized Bean Validation annotation. As seen in the previous section it "
+"allows you to statically redefine the default group sequence for a class. "
+"Hibernate Validator also offers a custom, non standardized annotation - "
+"<classname>org.hibernate.validator.group.GroupSequenceProvider </classname>- "
+"which allows for dynamic redefinition of the default group sequence. Using "
+"the rental car scenario again, one could dynamically add the "
+"<classname>CarChecks</classname> as seen in <xref linkend=\"example-rental-"
+"car-group-sequence-provider\"/> and <xref linkend=\"example-group-sequence-"
+"provider-implementation\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:717
+#, fuzzy, no-c-format
+msgid "RentalCar with @GroupSequenceProvider"
+msgstr "标注了@GroupSequence的接口"
+
+#. Tag: programlisting
+#: usingvalidator.xml:719
+#, fuzzy, no-c-format
+msgid ""
+"@GroupSequenceProvider(RentalCarGroupSequenceProvider.class)\n"
+"public class RentalCar extends Car {\n"
+"    @AssertFalse(message = \"The car is currently rented out\", groups = "
+"RentalChecks.class)\n"
+"    private boolean rented;\n"
+"\n"
+"    public RentalCar(String manufacturer, String licencePlate, int "
+"seatCount) {\n"
+"        super( manufacturer, licencePlate, seatCount );\n"
+"    }\n"
+"\n"
+"    public boolean isRented() {\n"
+"        return rented;\n"
+"    }\n"
+"\n"
+"    public void setRented(boolean rented) {\n"
+"        this.rented = rented;\n"
+"    }\n"
+"}"
+msgstr ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class RentalCar extends Car {\n"
+"\n"
+"    private String rentalStation;\n"
+"    \n"
+"    public RentalCar(String manufacturer, String rentalStation) {\n"
+"        super(manufacturer);\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"    \n"
+"    @NotNull\n"
+"    public String getRentalStation() {\n"
+"        return rentalStation;\n"
+"    }\n"
+"\n"
+"    public void setRentalStation(String rentalStation) {\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"}"
+
+#. Tag: title
+#: usingvalidator.xml:723
+#, no-c-format
+msgid "DefaultGroupSequenceProvider implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:725
+#, no-c-format
+msgid ""
+"public class RentalCarGroupSequenceProvider implements "
+"DefaultGroupSequenceProvider<RentalCar> {\n"
+"    public List<Class<?>> getValidationGroups(RentalCar car) {\n"
+"        List<Class<?>> defaultGroupSequence = new ArrayList<"
+"Class<?>>();\n"
+"        defaultGroupSequence.add( RentalCar.class );\n"
+"\n"
+"        if ( car != null && !car.isRented() ) {\n"
+"            defaultGroupSequence.add( CarChecks.class );\n"
+"        }\n"
+"\n"
+"        return defaultGroupSequence;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:732
+#, no-c-format
+msgid "Built-in constraints"
+msgstr "内置的约束条件"
+
+#. Tag: para
+#: usingvalidator.xml:734
+#, no-c-format
+msgid ""
+"Hibernate Validator comprises a basic set of commonly used constraints. "
+"These are foremost the constraints defined by the Bean Validation "
+"specification (see <xref linkend=\"table-spec-constraints\"/>). "
+"Additionally, Hibernate Validator provides useful custom constraints (see "
+"<xref linkend=\"table-custom-constraints\"/> and <xref linkend=\"table-"
+"custom-country-constraints\"/>)."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:742 usingvalidator.xml:761
+#, fuzzy, no-c-format
+msgid "Bean Validation constraints"
+msgstr "校验约束"
+
+#. Tag: para
+#: usingvalidator.xml:744
+#, no-c-format
+msgid ""
+"shows purpose and supported data types of all constraints specified in the "
+"Bean Validation API. All these constraints apply to the field/property "
+"level, there are no class-level constraints defined in the Bean Validation "
+"specification. If you are using the Hibernate object-relational mapper, some "
+"of the constraints are taken into account when creating the DDL for your "
+"model (see column \"Hibernate metadata impact\")."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:753
+#, no-c-format
+msgid ""
+"Hibernate Validator allows some constraints to be applied to more data types "
+"than required by the Bean Validation specification (e.g. @Max can be applied "
+"to <classname>Strings</classname>). Relying on this feature can impact "
+"portability of your application between Bean Validation providers."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:774 usingvalidator.xml:1034 usingvalidator.xml:1232
+#, no-c-format
+msgid "Annotation"
+msgstr "Annotation"
+
+#. Tag: entry
+#: usingvalidator.xml:776 usingvalidator.xml:1036 usingvalidator.xml:1234
+#, no-c-format
+msgid "Supported data types"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:778 usingvalidator.xml:1038 usingvalidator.xml:1236
+#, no-c-format
+msgid "<entry>Use</entry>"
+msgstr "<entry>作用</entry>"
+
+#. Tag: entry
+#: usingvalidator.xml:780 usingvalidator.xml:1040 usingvalidator.xml:1240
+#, fuzzy, no-c-format
+msgid "Hibernate metadata impact"
+msgstr "对Hibernate Core中的元数据的影响"
+
+#. Tag: entry
+#: usingvalidator.xml:786
+#, no-c-format
+msgid "@AssertFalse"
+msgstr "@AssertFalse"
+
+#. Tag: entry
+#: usingvalidator.xml:788 usingvalidator.xml:800
+#, no-c-format
+msgid "<classname>Boolean</classname>, <classname>boolean</classname>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:791
+#, fuzzy, no-c-format
+msgid "Checks that the annotated element is <constant>false</constant>."
+msgstr "检查被标注的值是否为<constant>false</constant>."
+
+#. Tag: entry
+#: usingvalidator.xml:794 usingvalidator.xml:806 usingvalidator.xml:826
+#: usingvalidator.xml:846 usingvalidator.xml:882 usingvalidator.xml:940
+#: usingvalidator.xml:956 usingvalidator.xml:969 usingvalidator.xml:996
+#: usingvalidator.xml:1056 usingvalidator.xml:1070 usingvalidator.xml:1107
+#: usingvalidator.xml:1120 usingvalidator.xml:1133 usingvalidator.xml:1149
+#: usingvalidator.xml:1166 usingvalidator.xml:1183 usingvalidator.xml:1201
+#: usingvalidator.xml:1256 usingvalidator.xml:1270 usingvalidator.xml:1285
+#, no-c-format
+msgid "none"
+msgstr "没有"
+
+#. Tag: entry
+#: usingvalidator.xml:798
+#, no-c-format
+msgid "@AssertTrue"
+msgstr "@AssertTrue"
+
+#. Tag: entry
+#: usingvalidator.xml:803
+#, fuzzy, no-c-format
+msgid "Checks that the annotated element is <constant>true</constant>."
+msgstr "检查被标注的值是否为<constant>true</constant>."
+
+#. Tag: entry
+#: usingvalidator.xml:810
+#, no-c-format
+msgid "@DecimalMax"
+msgstr "@DecimalMax"
+
+#. Tag: entry
+#: usingvalidator.xml:812 usingvalidator.xml:852
+#, fuzzy, no-c-format
+msgid ""
+"<classname>BigDecimal</classname>, <classname>BigInteger</classname>, "
+"<classname>String</classname>, <classname>byte</classname>, "
+"<classname>short</classname>, <classname>int</classname>, <classname>long</"
+"classname> and the respective wrappers of the primitive types. Additionally "
+"supported by HV: any sub-type of <classname>Number</classname> and "
+"<classname>CharSequence</classname>."
+msgstr ""
+"字段或属性. 支持类型包括<classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname>和其各自对应的包装器类型."
+
+#. Tag: entry
+#: usingvalidator.xml:821
+#, no-c-format
+msgid ""
+"The annotated element must be a number whose value must be lower or equal to "
+"the specified maximum. The parameter value is the string representation of "
+"the max value according to the <classname>BigDecimal</classname> string "
+"representation."
+msgstr ""
+"被标注的值必须不大于约束中指定的最大值. 这个约束的参数是一个通过"
+"<classname>BigDecimal</classname>定义的最大值的字符串表示."
+
+#. Tag: entry
+#: usingvalidator.xml:830
+#, no-c-format
+msgid "@DecimalMin"
+msgstr "@DecimalMin"
+
+#. Tag: entry
+#: usingvalidator.xml:832
+#, fuzzy, no-c-format
+msgid ""
+"<classname>BigDecimal</classname>, <classname>BigInteger</classname>, "
+"<classname>String</classname>, <classname>byte</classname>, "
+"<classname>short</classname>, <classname>int</classname>, <classname>long</"
+"classname> and the respective wrappers of the primitive types. Additionally "
+"supported by HV: any sub-type of <classname>Number </classname>and "
+"<classname>CharSequence</classname>."
+msgstr ""
+"字段或属性. 支持类型包括<classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname>和其各自对应的包装器类型."
+
+#. Tag: entry
+#: usingvalidator.xml:841
+#, no-c-format
+msgid ""
+"The annotated element must be a number whose value must be higher or equal "
+"to the specified minimum. The parameter value is the string representation "
+"of the min value according to the <classname>BigDecimal</classname> string "
+"representation."
+msgstr ""
+"被标注的值必须不小于约束中指定的最小值. 这个约束的参数是一个通过"
+"<classname>BigDecimal</classname>定义的最小值的字符串表示."
+
+#. Tag: entry
+#: usingvalidator.xml:850
+#, no-c-format
+msgid "@Digits(integer=, fraction=)"
+msgstr "@Digits(integer=, fraction=)"
+
+#. Tag: entry
+#: usingvalidator.xml:861
+#, fuzzy, no-c-format
+msgid ""
+"Checks whether the annoted value is a number having up to <literal>integer</"
+"literal> digits and <literal>fraction</literal> fractional digits."
+msgstr ""
+"检查此值是否是一个数字,并且这个数字的整数部分不超过<literal>integer</literal>"
+"定义的位数, 和小数部分不超过<literal>fraction</literal> 定义的位数."
+
+#. Tag: entry
+#: usingvalidator.xml:865
+#, no-c-format
+msgid "Define column precision and scale."
+msgstr "对应的数据库表字段会被设置精度(precision)和准度(scale)."
+
+#. Tag: entry
+#: usingvalidator.xml:869
+#, no-c-format
+msgid "@Future"
+msgstr "@Future"
+
+#. Tag: entry
+#: usingvalidator.xml:871 usingvalidator.xml:946
+#, no-c-format
+msgid ""
+"<classname>java.util.Date</classname>, <classname>java.util.Calendar</"
+"classname>; Additionally supported by HV, if the <ulink url=\"http://joda-"
+"time.sourceforge.net/\">Joda Time</ulink> date/time API is on the class "
+"path: any implementations of <classname>ReadablePartial</classname> and "
+"<classname>ReadableInstant</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:879
+#, no-c-format
+msgid "Checks whether the annotated date is in the future."
+msgstr "检查给定的日期是否比现在晚."
+
+#. Tag: entry
+#: usingvalidator.xml:886
+#, no-c-format
+msgid "@Max"
+msgstr "@Max"
+
+#. Tag: entry
+#: usingvalidator.xml:888
+#, fuzzy, no-c-format
+msgid ""
+"<classname>BigDecimal</classname>, <classname>BigInteger</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname> and the respective wrappers of the "
+"primitive types. Additionally supported by HV: any sub-type "
+"of<classname>CharSequence</classname> (the numeric value represented by the "
+"character sequence is evaluated), any sub-type of <classname>Number</"
+"classname>."
+msgstr ""
+"字段或属性. 支持类型包括<classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname>和其各自对应的包装器类型."
+
+#. Tag: entry
+#: usingvalidator.xml:897
+#, no-c-format
+msgid ""
+"Checks whether the annotated value is less than or equal to the specified "
+"maximum."
+msgstr "检查该值是否小于或等于约束条件中指定的最大值."
+
+#. Tag: entry
+#: usingvalidator.xml:900 usingvalidator.xml:918
+#, no-c-format
+msgid "Add a check constraint on the column."
+msgstr "会给对应的数据库表字段添加一个check的约束条件."
+
+#. Tag: entry
+#: usingvalidator.xml:904
+#, no-c-format
+msgid "@Min"
+msgstr "@Min"
+
+#. Tag: entry
+#: usingvalidator.xml:906
+#, fuzzy, no-c-format
+msgid ""
+"<classname>BigDecimal</classname>, <classname>BigInteger</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname> and the respective wrappers of the "
+"primitive types. Additionally supported by HV: any sub-type of "
+"<classname>CharSequence</classname> (the numeric value represented by the "
+"char sequence is evaluated), any sub-type of <classname>Number</classname>."
+msgstr ""
+"字段或属性. 支持类型包括<classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname>和其各自对应的包装器类型."
+
+#. Tag: entry
+#: usingvalidator.xml:915
+#, no-c-format
+msgid ""
+"Checks whether the annotated value is higher than or equal to the specified "
+"minimum."
+msgstr "检查该值是否大于或等于约束条件中规定的最小值."
+
+#. Tag: entry
+#: usingvalidator.xml:922
+#, no-c-format
+msgid "@NotNull"
+msgstr "@NotNull"
+
+#. Tag: entry
+#: usingvalidator.xml:924 usingvalidator.xml:935 usingvalidator.xml:1172
+#, fuzzy, no-c-format
+msgid "Any type"
+msgstr "类"
+
+#. Tag: entry
+#: usingvalidator.xml:926
+#, fuzzy, no-c-format
+msgid "Checks that the annotated value is not <constant>null.</constant>"
+msgstr "检查该值不为<constant>null.</constant>."
+
+#. Tag: entry
+#: usingvalidator.xml:929
+#, no-c-format
+msgid "Column(s) are not null."
+msgstr "对应的表字段不允许为null."
+
+#. Tag: entry
+#: usingvalidator.xml:933
+#, no-c-format
+msgid "@Null"
+msgstr "@Null"
+
+#. Tag: entry
+#: usingvalidator.xml:937
+#, fuzzy, no-c-format
+msgid "Checks that the annotated value is <constant>null.</constant>"
+msgstr "检查该值应该为null."
+
+#. Tag: entry
+#: usingvalidator.xml:944
+#, no-c-format
+msgid "@Past"
+msgstr "@Past"
+
+#. Tag: entry
+#: usingvalidator.xml:954
+#, no-c-format
+msgid "Checks whether the annotated date is in the past."
+msgstr "检查标注对象中的值表示的日期比当前早."
+
+#. Tag: entry
+#: usingvalidator.xml:960
+#, no-c-format
+msgid "@Pattern(regex=, flag=)"
+msgstr "@Pattern(regex=, flag=)"
+
+#. Tag: entry
+#: usingvalidator.xml:962
+#, no-c-format
+msgid ""
+"<classname>String</classname>. Additionally supported by HV: any sub-type of "
+"<classname>CharSequence</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:965
+#, no-c-format
+msgid ""
+"Checks if the annotated string matches the regular expression "
+"<parameter>regex</parameter> considering the given flag <parameter>match</"
+"parameter>."
+msgstr ""
+"检查该字符串是否能够在<parameter>match</parameter>指定的情况下被"
+"<parameter>regex</parameter>定义的正则表达式匹配."
+
+#. Tag: entry
+#: usingvalidator.xml:973
+#, no-c-format
+msgid "@Size(min=, max=)"
+msgstr "@Size(min=, max=)"
+
+#. Tag: entry
+#: usingvalidator.xml:975
+#, fuzzy, no-c-format
+msgid ""
+"<classname>String</classname>, <classname>Collection</classname>, "
+"<classname>Map</classname> and <classname>arrays</classname>. Additionally "
+"supported by HV: any sub-type of <classname>CharSequence</classname>."
+msgstr "字段或属性. 支持的类型包括String, Collection, Map 和数组."
+
+#. Tag: entry
+#: usingvalidator.xml:980
+#, fuzzy, no-c-format
+msgid ""
+"Checks if the annotated element's size is between min and max (inclusive)."
+msgstr "检查该值的size是否在[min, max)之间."
+
+#. Tag: entry
+#: usingvalidator.xml:983 usingvalidator.xml:1082
+#, no-c-format
+msgid "Column length will be set to max."
+msgstr "对应的数据库表字段的长度会被设置成约束中定义的最大值."
+
+#. Tag: entry
+#: usingvalidator.xml:987
+#, no-c-format
+msgid "@Valid"
+msgstr "@Valid"
+
+#. Tag: entry
+#: usingvalidator.xml:989
+#, no-c-format
+msgid "Any non-primitive type"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:991
+#, no-c-format
+msgid ""
+"Performs validation recursively on the associated object. If the object is a "
+"collection or an array, the elements are validated recursively. If the "
+"object is a map, the value elements are validated recursively."
+msgstr ""
+"递归的对关联对象进行校验, 如果关联对象是个集合或者数组, 那么对其中的元素进行"
+"递归校验,如果是一个map,则对其中的值部分进行校验."
+
+#. Tag: para
+#: usingvalidator.xml:1003
+#, fuzzy, no-c-format
+msgid ""
+"On top of the parameters indicated in <xref linkend=\"table-spec-constraints"
+"\"/> each constraint supports the parameters <parameter>message</parameter>, "
+"<parameter>groups</parameter> and <parameter>payload</parameter>. This is a "
+"requirement of the Bean Validation specification."
+msgstr ""
+"除了<xref linkend=\"table-builtin-constraints\"/>中列出的各个约束包含的参数"
+"外,所有的约束条件还都有<parameter>message</parameter>, <parameter>groups</"
+"parameter> 和 <parameter>payload</parameter>三个参数, 这个是Bean Validation "
+"规范规定的."
+
+#. Tag: title
+#: usingvalidator.xml:1012
+#, fuzzy, no-c-format
+msgid "Additional constraints"
+msgstr "内置的约束条件"
+
+#. Tag: para
+#: usingvalidator.xml:1014
+#, no-c-format
+msgid ""
+"In addition to the constraints defined by the Bean Validation API Hibernate "
+"Validator provides several useful custom constraints which are listed in "
+"<xref linkend=\"table-custom-constraints\"/>. With one exception also these "
+"constraints apply to the field/property level, only @ScriptAssert is a class-"
+"level constraint."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1021
+#, fuzzy, no-c-format
+msgid "Custom constraints"
+msgstr "内置的约束条件"
+
+#. Tag: entry
+#: usingvalidator.xml:1046
+#, no-c-format
+msgid "@CreditCardNumber"
+msgstr "@CreditCardNumber"
+
+#. Tag: classname
+#: usingvalidator.xml:1048 usingvalidator.xml:1062 usingvalidator.xml:1076
+#: usingvalidator.xml:1089 usingvalidator.xml:1113 usingvalidator.xml:1155
+#: usingvalidator.xml:1189 usingvalidator.xml:1248 usingvalidator.xml:1262
+#: usingvalidator.xml:1276
+#, fuzzy, no-c-format
+msgid "CharSequence"
+msgstr "校验组序列"
+
+#. Tag: entry
+#: usingvalidator.xml:1050
+#, fuzzy, no-c-format
+msgid ""
+"Checks that the annotated character sequence passes the Luhn checksum test. "
+"Note, this validation aims to check for user mistakes, not credit card "
+"validity! See also <ulink url=\"http://www.merriampark.com/anatomycc.htm"
+"\">Anatomy of Credit Card Numbers</ulink>."
+msgstr ""
+"检查被标注的字符串能否通过Luhn Checksum test. 注意, 这个约束条件是为了防止用"
+"户手误, 并不对信用卡有效性进行检测.  请参考<ulink url=\"http://www."
+"merriampark.com/anatomycc.htm\">Anatomy of Credit Card Numbers</ulink>."
+
+#. Tag: entry
+#: usingvalidator.xml:1060
+#, no-c-format
+msgid "@Email"
+msgstr "@Email"
+
+#. Tag: entry
+#: usingvalidator.xml:1064
+#, fuzzy, no-c-format
+msgid ""
+"Checks whether the specified character sequence is a valid email address. "
+"The optional parameters <parameter>regexp</parameter> and <parameter>flags</"
+"parameter> allow to specify an additional regular expression (including "
+"regular expression flags) which the email must match."
+msgstr ""
+"判断该值是否是一个有效的URL, 如果给出了约束中的<parameter>protocol</"
+"parameter>, <parameter>host</parameter> 或 <parameter>port</parameter> 参数的"
+"话,那个被校验的值需要和其匹配."
+
+#. Tag: entry
+#: usingvalidator.xml:1074
+#, no-c-format
+msgid "@Length(min=, max=)"
+msgstr "@Length(min=, max=)"
+
+#. Tag: entry
+#: usingvalidator.xml:1078
+#, fuzzy, no-c-format
+msgid ""
+"Validates that the annotated character sequence is between <parameter>min</"
+"parameter> and <parameter>max</parameter> included."
+msgstr ""
+"检查该字符串的长度是否在<parameter>min</parameter> 和 <parameter>max</"
+"parameter>规定的范围内."
+
+#. Tag: entry
+#: usingvalidator.xml:1086
+#, no-c-format
+msgid ""
+"@ModCheck(modType=, multiplier=, startIndex=, endIndex=, "
+"checkDigitPosition=, ignoreNonDigitCharacters=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1091
+#, no-c-format
+msgid ""
+"Checks that the digits within the annotated character sequence pass the mod "
+"10 or mod 11 checksum algorithm. <constant>modType</constant> is used to "
+"select the modulo type and the <constant>multiplier</constant> determines "
+"the algorithm specific multiplier (see also <ulink url=\"http://en.wikipedia."
+"org/wiki/Luhn_algorithm\">Luhn algorithm</ulink>). <constant>startIndex</"
+"constant> and <constant>endIndex</constant> allow to only run the modulo "
+"algorithm on the specified sub-string. <constant>checkDigitPosition</"
+"constant> allows to use an arbitrary digit within the character sequence to "
+"be the check digit. If not specified it is assumed that the check digit is "
+"part of the specified range. Last but not least, "
+"<constant>ignoreNonDigitCharacters</constant> allows to ignore non digit "
+"characters."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1111
+#, no-c-format
+msgid "@NotBlank"
+msgstr "@NotBlank"
+
+#. Tag: entry
+#: usingvalidator.xml:1115
+#, fuzzy, no-c-format
+msgid ""
+"Checks that the annotated character sequence is not null and the trimmed "
+"length is greater than 0. The difference to @NotEmpty is that this "
+"constraint can only be applied on strings and that trailing whitespaces are "
+"ignored."
+msgstr ""
+"检查该字符串不为null,并且不是空字符串. 本约束和下面的@NotEmpty的不同之处在于,"
+"本约束只能被用在字符串类型上,并且会忽略字符串尾部的空白字符."
+
+#. Tag: entry
+#: usingvalidator.xml:1124
+#, no-c-format
+msgid "@NotEmpty"
+msgstr "@NotEmpty"
+
+#. Tag: entry
+#: usingvalidator.xml:1126
+#, fuzzy, no-c-format
+msgid ""
+"<classname>CharSequence</classname>, <classname>Collection</classname>, "
+"<classname>Map</classname> and arrays"
+msgstr "字段或属性. 支持的类型包括String, Collection, Map 和数组."
+
+#. Tag: entry
+#: usingvalidator.xml:1130
+#, fuzzy, no-c-format
+msgid ""
+"Checks whether the annotated element is not <constant>null</constant> nor "
+"empty."
+msgstr "检查该值不为null同时也不为空."
+
+#. Tag: entry
+#: usingvalidator.xml:1137
+#, no-c-format
+msgid "@Range(min=, max=)"
+msgstr "@Range(min=, max=)"
+
+#. Tag: entry
+#: usingvalidator.xml:1139
+#, fuzzy, no-c-format
+msgid ""
+"<classname>BigDecimal</classname>, <classname>BigInteger</classname>, "
+"<classname>CharSequence</classname>, <classname>byte</classname>, "
+"<classname>short</classname>, <classname>int</classname>, <classname>long</"
+"classname> and the respective wrappers of the primitive types"
+msgstr ""
+"字段或属性. 支持类型包括<classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname>和其各自对应的包装器类型."
+
+#. Tag: entry
+#: usingvalidator.xml:1146
+#, fuzzy, no-c-format
+msgid ""
+"Checks whether the annotated value lies between (inclusive) the specified "
+"minimum and maximum."
+msgstr "检查该值是否在[min, max)之间"
+
+#. Tag: entry
+#: usingvalidator.xml:1153
+#, no-c-format
+msgid "@SafeHtml(whitelistType=, additionalTags=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1157
+#, no-c-format
+msgid ""
+"Checks whether the annotated value contains potentially malicious fragments "
+"such as <code><script/></code>. In order to use this constraint, the "
+"<ulink url=\"http://jsoup.org/\">jsoup</ulink> library must be part of the "
+"class path. With the <parameter>whitelistType</parameter> attribute "
+"predefined whitelist types can be chosen. You can also specify additional "
+"html tags for the whitelist with the <parameter>additionalTags</parameter> "
+"attribute."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1170
+#, no-c-format
+msgid "@ScriptAssert(lang=, script=, alias=)"
+msgstr "@ScriptAssert(lang=, script=, alias=)"
+
+#. Tag: entry
+#: usingvalidator.xml:1174
+#, fuzzy, no-c-format
+msgid ""
+"Checks whether the given script can successfully be evaluated against the "
+"annotated element. In order to use this constraint, an implementation of the "
+"Java Scripting API as defined by JSR 223 (\"Scripting for the "
+"Java<superscript>TM</superscript> Platform\") must part of the class path. "
+"The expressions to be evaluated can be written in any scripting or "
+"expression language, for which a JSR 223 compatible engine can be found in "
+"the class path."
+msgstr ""
+"要使用这个约束条件,必须先要保证Java Scripting API 即JSR 223 (\"Scripting for "
+"the Java<superscript>TM</superscript> Platform\")的实现在类路径当中. 如果使用"
+"的时Java 6的话,则不是问题, 如果是老版本的话, 那么需要把 JSR 223的实现添加进类"
+"路径. 这个约束条件中的表达式可以使用任何兼容JSR 223的脚本来编写. (更多信息请"
+"参考javadoc)"
+
+#. Tag: entry
+#: usingvalidator.xml:1187
+#, fuzzy, no-c-format
+msgid "@URL(protocol=, host=, port=, regexp=, flags=)"
+msgstr "@URL(protocol=, host=, port=)"
+
+#. Tag: entry
+#: usingvalidator.xml:1191
+#, fuzzy, no-c-format
+msgid ""
+"Checks if the annotated character sequence is a valid URL according to "
+"RFC2396. If any of the optional parameters <parameter>protocol</parameter>, "
+"<parameter>host</parameter> or <parameter>port</parameter> are specified, "
+"the corresponding URL fragments must match the specified values. The "
+"optional parameters <parameter>regexp</parameter> and <parameter>flags</"
+"parameter> allow to specify an additional regular expression (including "
+"regular expression flags) which the URL must match."
+msgstr ""
+"判断该值是否是一个有效的URL, 如果给出了约束中的<parameter>protocol</"
+"parameter>, <parameter>host</parameter> 或 <parameter>port</parameter> 参数的"
+"话,那个被校验的值需要和其匹配."
+
+#. Tag: title
+#: usingvalidator.xml:1208
+#, fuzzy, no-c-format
+msgid "Country specific constraints"
+msgstr "定义约束"
+
+#. Tag: para
+#: usingvalidator.xml:1210
+#, no-c-format
+msgid ""
+"Hibernate Validator offers also some country specific constraints, e.g. for "
+"the validation of social security numbers."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1212
+#, no-c-format
+msgid ""
+"If you have to implement a country specific constraint, consider making it a "
+"contribution to Hibernate Validator!"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:1217
+#, no-c-format
+msgid "Custom country specific constraints"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1238
+#, no-c-format
+msgid "Country"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1246
+#, no-c-format
+msgid "@CNPJ"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1250
+#, no-c-format
+msgid ""
+"Checks that the annotated character sequence represents a Brazilian "
+"corporate tax payer registry number (Cadastro de Pessoa Juríeddica)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1254 usingvalidator.xml:1268 usingvalidator.xml:1283
+#, no-c-format
+msgid "Brazil"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1260
+#, no-c-format
+msgid "@CPF"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1264
+#, no-c-format
+msgid ""
+"Checks that the annotated character sequence represents a Brazilian "
+"individual taxpayer registry number (Cadastro de Pessoa Fídsica)."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1274
+#, no-c-format
+msgid "@TituloEleitoral"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1278
+#, no-c-format
+msgid ""
+"Checks that the annotated character sequence represents a Brazilian voter ID "
+"card number (<ulink url=\"http://ghiorzi.org/cgcancpf.htm\">Título "
+"Eleitoral</ulink>)."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1292
+#, fuzzy, no-c-format
+msgid ""
+"In some cases neither the Bean Validation constraints nor the custom "
+"constraints provided by Hibernate Validator will fulfill your requirements. "
+"In this case you can easily write your own constraint. We will discuss this "
+"in <xref linkend=\"validator-customconstraints\"/>."
+msgstr ""
+"如果这些内置的约束不能满足你的需求的话, 那么你可以创建你自己的约束条件, 我们"
+"接下来会详细介绍, 请继续阅读"
+
+#~ msgid "testOrderedChecksWithRedefinedDefault"
+#~ msgstr "testOrderedChecksWithRedefinedDefault"
+
+#, fuzzy
+#~ msgid ""
+#~ "@Test\n"
+#~ "public void testOrderedChecksWithRedefinedDefault() {\n"
+#~ "    RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+#~ "    rentalCar.setPassedVehicleInspection( true );\n"
+#~ "\n"
+#~ "    Driver john = new Driver( \"John Doe\" );\n"
+#~ "    john.setAge( 18 );\n"
+#~ "    john.passedDrivingTest( true );\n"
+#~ "    rentalCar.setDriver( john );\n"
+#~ "\n"
+#~ "    assertEquals( 0, validator.validate( rentalCar, Default.class ).size"
+#~ "() );\n"
+#~ "}"
+#~ msgstr ""
+#~ "@Test\n"
+#~ "public void testOrderedChecksWithRedefinedDefault() {\n"
+#~ "    RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+#~ "    rentalCar.setPassedVehicleInspection( true );\n"
+#~ "\n"
+#~ "    Driver john = new Driver( \"John Doe\" );\n"
+#~ "    john.setAge( 18 );\n"
+#~ "    john.passedDrivingTest( true );\n"
+#~ "    rentalCar.setDriver( john );\n"
+#~ "\n"
+#~ "    assertEquals( 0, validator.validate( rentalCar, Default.class, "
+#~ "DriverChecks.class ).size() );\n"
+#~ "}"
+
+#, fuzzy
+#~ msgid "Checks whether the specified string is a valid email address."
+#~ msgstr "检查所给的字符串是否符合email地址的格式."
+
+#~ msgid ""
+#~ "The Bean Validation specification does not enforce that groups have to be "
+#~ "interfaces. Non interface classes could be used as well, but we recommend "
+#~ "to stick to interfaces."
+#~ msgstr ""
+#~ "Bean Validation并没有规定组必须是用接口来定义, 所以非接口的类也是被接收的,"
+#~ "但是我们推荐使用接口."
+
+#~ msgid ""
+#~ "Hibernate Validator implements all of the default constraints specified "
+#~ "in Bean Validation as well as some custom ones. <xref linkend=\"table-"
+#~ "builtin-constraints\"/> list all constraints available in Hibernate "
+#~ "Validator."
+#~ msgstr ""
+#~ "Hibernate Validator不仅实现了Bean Validation中规定的所有的默认约束条件, 还"
+#~ "有附加有一些自定义的. <xref linkend=\"table-builtin-constraints\"/>列出了"
+#~ "Hibernate Validator中已经提供的约束条件."
+
+#~ msgid "Part of Bean Validation Specification"
+#~ msgstr "属于Bean Validation 规范"
+
+#~ msgid "Apply on"
+#~ msgstr "应用位置"
+
+#~ msgid "<entry>yes</entry>"
+#~ msgstr "<entry>yes</entry>"
+
+#~ msgid "field/property"
+#~ msgstr "field/property"
+
+#~ msgid "<entry>no</entry>"
+#~ msgstr "<entry>no</entry>"
+
+#~ msgid "field/property. The supported type is <classname>String</classname>."
+#~ msgstr "字段或属性, 要求其类型为<classname>String</classname>."
+
+#~ msgid "field/property. Needs to be a string."
+#~ msgstr "字段或属性, 需要是String类型的."
+
+#~ msgid ""
+#~ "field/property. Supported types are String, Collection, Map and arrays."
+#~ msgstr "字段或属性. 支持的类型包括String, Collection, Map 和数组."
+
+#~ msgid "field/property. Any non-primitive types are supported."
+#~ msgstr "字段或属性. 支持所有的非原始类型."
+
+#~ msgid "RentalCar"
+#~ msgstr "RentalCar"
+
+#~ msgid ""
+#~ "field/property. Supported types are <classname>java.util.Date</classname> "
+#~ "and <classname>java.util.Calendar</classname>."
+#~ msgstr ""
+#~ "字段或属性, 支持类型是<classname>java.util.Date</classname> 和 "
+#~ "<classname>java.util.Calendar</classname>."
diff --git a/project/documentation/src/main/docbook/zh-CN/modules/xmlconfiguration.po b/project/documentation/src/main/docbook/zh-CN/modules/xmlconfiguration.po
new file mode 100644
index 0000000..98a598a
--- /dev/null
+++ b/project/documentation/src/main/docbook/zh-CN/modules/xmlconfiguration.po
@@ -0,0 +1,416 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2011-11-14 10:37+0000\n"
+"PO-Revision-Date: 2010-08-22 23:44+0830\n"
+"Last-Translator: Strong Liu <stliu at hibernate.org>\n"
+"Language-Team: none\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xmlconfiguration.xml:24
+#, no-c-format
+msgid "XML configuration"
+msgstr "XML configuration"
+
+#. Tag: filename
+#: xmlconfiguration.xml:27
+#, no-c-format
+msgid "<filename>validation.xml</filename>"
+msgstr "<filename>validation.xml</filename>"
+
+#. Tag: para
+#: xmlconfiguration.xml:29
+#, no-c-format
+msgid ""
+"The key to enable XML configuration for Hibernate Validator is the file "
+"<filename>validation.xml</filename>. If this file exists in the classpath "
+"its configuration will be applied when the <classname>ValidationFactory</"
+"classname> gets created. <xref linkend=\"image-validation-configuration\"/> "
+"shows a model view of the xsd <filename>valiation.xml</filename> has to "
+"adhere to."
+msgstr ""
+"我们可以使用<filename>validation.xml</filename>来对Hibernate Validator进行配"
+"置. <classname>ValidationFactory</classname>在初始化的时候会在类路径下寻找此"
+"文件,如果找到的话,就会应用其中定义的配置信息. <xref linkend=\"image-"
+"validation-configuration\"/>显示了<filename>valiation.xml</filename>的xsd模"
+"型."
+
+#. Tag: title
+#: xmlconfiguration.xml:36
+#, no-c-format
+msgid "validation-configuration-1.0.xsd"
+msgstr "validation-configuration-1.0.xsd"
+
+#. Tag: para
+#: xmlconfiguration.xml:51
+#, no-c-format
+msgid ""
+"shows the several configuration options of <filename>validation.xml</"
+"filename>."
+msgstr "列出了<filename>validation.xml</filename>中的一些常用的配置项."
+
+#. Tag: title
+#: xmlconfiguration.xml:55
+#, no-c-format
+msgid "<title>validation.xml</title>"
+msgstr "<title>validation.xml</title>"
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:57
+#, fuzzy, no-c-format
+msgid ""
+"<validation-config xmlns=\"http://jboss.org/xml/ns/javax/validation/"
+"configuration\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/configuration"
+"\">\n"
+"    <default-provider>org.hibernate.validator.HibernateValidator</"
+"default-provider>\n"
+"    <message-interpolator>org.hibernate.validator.messageinterpolation."
+"ResourceBundleMessageInterpolator</message-interpolator>\n"
+"    <traversable-resolver>org.hibernate.validator.engine.resolver."
+"DefaultTraversableResolver</traversable-resolver>\n"
+"    <constraint-validator-factory>org.hibernate.validator.engine."
+"ConstraintValidatorFactoryImpl</constraint-validator-factory>\n"
+"    <constraint-mapping>/constraints-car.xml</constraint-"
+"mapping>\n"
+"    <property name=\"prop1\">value1</property>\n"
+"    <property name=\"prop2\">value2</property>\n"
+"</validation-config>"
+msgstr ""
+"<validation-config xmlns=\"http://jboss.org/xml/ns/javax/validation/"
+"configuration\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/configuration"
+"\">\n"
+"    <default-provider>org.hibernate.validator.HibernateValidator</"
+"default-provider>\n"
+"    <message-interpolator>org.hibernate.validator.engine."
+"ResourceBundleMessageInterpolator</message-interpolator>\n"
+"    <traversable-resolver>org.hibernate.validator.engine.resolver."
+"DefaultTraversableResolver</traversable-resolver>\n"
+"    <constraint-validator-factory>org.hibernate.validator.engine."
+"ConstraintValidatorFactoryImpl</constraint-validator-factory>\n"
+"    <constraint-mapping>/constraints-car.xml</constraint-"
+"mapping>\n"
+"    <property name=\"prop1\">value1</property>\n"
+"    <property name=\"prop2\">value2</property>\n"
+"</validation-config>"
+
+#. Tag: para
+#: xmlconfiguration.xml:61
+#, no-c-format
+msgid ""
+"There can only be one <filename>validation.xml</filename> in the classpath. "
+"If more than one is found an exception is thrown."
+msgstr ""
+"类路径下面只能有一个<filename>validation.xml</filename>, 如果超过一个的话,会"
+"抛出异常."
+
+#. Tag: para
+#: xmlconfiguration.xml:65
+#, no-c-format
+msgid ""
+"All settings shown in the <filename>validation.xml</filename> are optional "
+"and in the case of <xref linkend=\"example-validation-xml\"/> show the "
+"defaults used within Hibernate Validator. The node <property>default-"
+"provider</property> allows to choose the Bean Validation provider. This is "
+"useful if there is more than one provider in the classpath. "
+"<property>message-interpolator</property>, <property>traversable-resolver</"
+"property> and <property>constraint-validator-factory</property> allow to "
+"customize the <classname>javax.validation.MessageInterpolator</classname>, "
+"<classname>javax.validation.TraversableResolver</classname> resp. "
+"<classname>javax.validation.ConstraintValidatorFactory</classname>. The same "
+"configuration options are also available programmatically through the "
+"<classname>javax.validation.Configuration</classname>. In fact XML "
+"configuration will be overridden by values explicitly specified via the API. "
+"It is even possible to ignore the XML configuration completely via "
+"<methodname> Configuration.ignoreXmlConfiguration()</methodname>. See also "
+"<xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+"<filename>validation.xml</filename>中所有的配置信息都是可选的, <xref linkend="
+"\"example-validation-xml\"/>中就是列出了Hibernate Validator中的默认值. 如果类"
+"路径当中存在有多个Bean Validation的实现的话, 那么可以通过<property>default-"
+"provider</property>节点指定使用那个Bean Validation的实现. <property>message-"
+"interpolator</property>, <property>traversable-resolver</property> 和 "
+"<property>constraint-validator-factory</property>可以用来指定自定义的"
+"<classname>javax.validation.MessageInterpolator</classname>, "
+"<classname>javax.validation.TraversableResolver</classname>和"
+"<classname>javax.validation.ConstraintValidatorFactory</classname>. 同样的, "
+"这些配置信息也可以通过编程的方式调用<classname>javax.validation."
+"Configuration</classname>来实现. 另外, 你可以通过API的方式来重写xml中的配置信"
+"息, 也可以通过调用<methodname> Configuration.ignoreXmlConfiguration()</"
+"methodname>来完全的忽略掉xml的配置信息. 请参考<xref linkend=\"validator-"
+"bootstrapping\"/>."
+
+#. Tag: para
+#: xmlconfiguration.xml:83
+#, no-c-format
+msgid ""
+"Via the <property>constraint-mapping</property> you can list an arbitrary "
+"number of additional XML files containing the actual constraint "
+"configuration. See <xref linkend=\"section-mapping-constraints\"/>."
+msgstr ""
+"你可以增加若干个<property>constraint-mapping</property>节点,在每个里面列出一"
+"个额外的xml文件用来定义约束规则, 具体请参考<xref linkend=\"section-mapping-"
+"constraints\"/>."
+
+#. Tag: para
+#: xmlconfiguration.xml:87
+#, fuzzy, no-c-format
+msgid ""
+"Last but not least, you can specify provider specific properties via the "
+"<property>property</property> nodes."
+msgstr ""
+"最后, 你可以通过<property>property</property>来定义各个Bean Validation 实现专"
+"属的属性. Hibernate Validator当前并没有使用任何特定的属性."
+
+#. Tag: title
+#: xmlconfiguration.xml:92
+#, no-c-format
+msgid "Mapping constraints"
+msgstr "映射约束"
+
+#. Tag: para
+#: xmlconfiguration.xml:94
+#, no-c-format
+msgid ""
+"Expressing constraints in XML is possible via files adhering to the xsd seen "
+"in <xref linkend=\"image-mapping-configuration\"/>. Note that these mapping "
+"files are only processed if listed via <property>constraint-mapping</"
+"property> in your <filename>validation.xml</filename>."
+msgstr ""
+"我们也可以通过xml来定义约束条件, 只需要这个xml符合<xref linkend=\"image-"
+"mapping-configuration\"/>中所定义的规范. 需要注意的是, 你必须把xml定义的约束"
+"列在<filename>validation.xml</filename>的<property>constraint-mapping</"
+"property>节点中才能得到处理."
+
+#. Tag: title
+#: xmlconfiguration.xml:101
+#, no-c-format
+msgid "validation-mapping-1.0.xsd"
+msgstr "validation-mapping-1.0.xsd"
+
+#. Tag: para
+#: xmlconfiguration.xml:116
+#, no-c-format
+msgid ""
+"shows how our classes Car and RentalCar from <xref linkend=\"example-car\"/> "
+"resp. <xref linkend=\"example-rental-car\"/> could be mapped in XML."
+msgstr ""
+"显示了如何通过xml定义的方式来给<xref linkend=\"example-car\"/>中的类Car 以及"
+"<xref linkend=\"example-rental-car\"/> 中的RentalCar定义约束条件."
+
+#. Tag: title
+#: xmlconfiguration.xml:121
+#, no-c-format
+msgid "constraints-car.xml"
+msgstr "constraints-car.xml"
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:123
+#, fuzzy, no-c-format
+msgid ""
+"<constraint-mappings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance"
+"\"\n"
+"                     xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/"
+"validation/mapping validation-mapping-1.0.xsd\"\n"
+"                     xmlns=\"http://jboss.org/xml/ns/javax/validation/mapping"
+"\">\n"
+"    <default-package>org.hibernate.validator.quickstart</default-"
+"package>\n"
+"    <bean class=\"Car\" ignore-annotations=\"true\">\n"
+"        <field name=\"manufacturer\">\n"
+"            <constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/>\n"
+"        </field>\n"
+"        <field name=\"licensePlate\">\n"
+"            <constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/>\n"
+"        </field>\n"
+"        <field name=\"seatCount\">\n"
+"            <constraint annotation=\"javax.validation.constraints.Min"
+"\">\n"
+"                <element name=\"value\">2</element>\n"
+"            </constraint>\n"
+"        </field>\n"
+"        <field name=\"driver\">\n"
+"            <valid/>\n"
+"        </field>\n"
+"        <getter name=\"passedVehicleInspection\" ignore-annotations=\"true"
+"\">\n"
+"            <constraint annotation=\"javax.validation.constraints."
+"AssertTrue\">\n"
+"                <message>The car has to pass the vehicle inspection "
+"first</message>\n"
+"                <groups>\n"
+"                    <value>CarChecks</value>\n"
+"                </groups>\n"
+"                <element name=\"max\">10</element>\n"
+"            </constraint>\n"
+"        </getter>\n"
+"    </bean>\n"
+"    <bean class=\"RentalCar\" ignore-annotations=\"true\">\n"
+"        <class ignore-annotations=\"true\">\n"
+"            <group-sequence>\n"
+"                <value>RentalCar</value>\n"
+"                <value>CarChecks</value>\n"
+"            </group-sequence>\n"
+"        </class>\n"
+"    </bean>\n"
+"    <constraint-definition annotation=\"org.mycompany.CheckCase\">\n"
+"        <validated-by include-existing-validators=\"false\">\n"
+"            <value>org.mycompany.CheckCaseValidator</value>\n"
+"        </validated-by>\n"
+"    </constraint-definition>\n"
+"</constraint-mappings>"
+msgstr ""
+"<constraint-mappings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance"
+"\"\n"
+"                     xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/"
+"validation/mapping validation-mapping-1.0.xsd\"\n"
+"                     xmlns=\"http://jboss.org/xml/ns/javax/validation/mapping"
+"\">\n"
+"    <default-package>org.hibernate.validator.quickstart</default-"
+"package>\n"
+"    <bean class=\"Car\" ignore-annotations=\"true\">\n"
+"        <field name=\"manufacturer\">\n"
+"            <constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/>\n"
+"        </field>\n"
+"        <field name=\"licensePlate\">\n"
+"            <constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/>\n"
+"        </field>\n"
+"        <field name=\"seatCount\">\n"
+"            <constraint annotation=\"javax.validation.constraints.Min"
+"\">\n"
+"                <element name=\"value\">2</element>\n"
+"            </constraint>\n"
+"        </field>\n"
+"        <field name=\"driver\">\n"
+"            <valid/>\n"
+"        </field>\n"
+"        <getter name=\"passedVehicleInspection\" ignore-annotations=\"true"
+"\">\n"
+"            <constraint annotation=\"javax.validation.constraints."
+"AssertTrue\">\n"
+"                <message>The car has to pass the vehicle inspection "
+"first</message>\n"
+"                <groups>\n"
+"                    <value>CarChecks</value>\n"
+"                </groups>\n"
+"                <element name=\"max\">10</element>\n"
+"            </constraint>\n"
+"        </getter>\n"
+"    </bean>\n"
+"    <bean class=\"RentalCar\" ignore-annotations=\"true\">\n"
+"        <class ignore-annotations=\"true\">\n"
+"            <group-sequence>\n"
+"                <value>RentalCar</value>\n"
+"                <value>CarChecks</value>\n"
+"            </group-sequence>\n"
+"        </class>\n"
+"    </bean>\n"
+"    <constraint-definition annotation=\"org.mycompany.CheckCase\" include-"
+"existing-validator=\"false\">\n"
+"        <validated-by include-existing-validators=\"false\">\n"
+"            <value>org.mycompany.CheckCaseValidator</value>\n"
+"        </validated-by>\n"
+"    </constraint-definition>\n"
+"</constraint-mappings>"
+
+#. Tag: para
+#: xmlconfiguration.xml:126
+#, no-c-format
+msgid ""
+"The XML configuration is closely mirroring the programmatic API. For this "
+"reason it should suffice to just add some comments. <property>default-"
+"package</property> is used for all fields where a classname is expected. If "
+"the specified class is not fully qualified the configured default package "
+"will be used. Every mapping file can then have several <property>bean</"
+"property> nodes, each describing the constraints on the entity with the "
+"specified class name.<warning> <para>A given entity can only be configured "
+"once across all configuration files. If the same class is configured more "
+"than once an exception is thrown.</para> </warning>Settings <property>ignore-"
+"annotations</property> to true means that constraint annotations placed on "
+"the configured bean are ignored. The default for this value is "
+"<constant>true</constant>. ignore-annotations is also available for the "
+"nodes <property>class</property>, <property>fields</property> and "
+"<property>getter</property>. If not explicitly specified on these levels the "
+"configured <property>bean</property> value applies. Otherwise do the nodes "
+"<property>class</property>, <property>fields</property> and "
+"<property>getter</property> determine on which level the constraints are "
+"placed (see <xref linkend=\"validator-usingvalidator-annotate\"/>). The "
+"<property>constraint</property> node is then used to add a constraint on the "
+"corresponding level. Each constraint definition must define the class via "
+"the annotation attribute. The constraint attributes required by the Bean "
+"Validation specification (<property>message</property>, <property>groups</"
+"property> and <property>payload</property>) have dedicated nodes. All other "
+"constraint specific attributes are configured using the the "
+"<property>element</property> node."
+msgstr ""
+"这个xml的定义基本上和通过编程方式差不多, 所以只需要简单的解释. 其中"
+"<property>default-package</property>属性用来定义一个默认的包路径, 如果下面指"
+"定的class不是全限定名称的话,会自动加上这个默认的包路径. 每个xml文件都可以包含"
+"任意多个<property>bean</property>节点, 每个对应一个要添加约束条件的实体类."
+"<warning> <para>每个实体类只能在所有的xml映射文件中被定义一次, 否则会抛出异"
+"常.</para> </warning> 通过添加<property>ignore-annotations</property> 属性并"
+"将其设置为<constant>true</constant>可以忽略在对应<property>bean</property>上"
+"添加的约束标注信息, 这个属性的默认值就是<constant>true</constant>. "
+"<property>ignore-annotations</property> 属性还可以定义在<property>class</"
+"property>, <property>fields</property> 和 <property>getter</property>属性上, "
+"如果没有明确指定的话, 那么默认级别是<property>bean</property> (可参考 <xref "
+"linkend=\"validator-usingvalidator-annotate\"/>).  <property>constraint</"
+"property> 节点用于添加一个约束条件到其父节点对应的元素上, 并且它需要通过"
+"<property>annotation</property>属性来指定需要使用哪个约束条件. 对于每个约束条"
+"件中所需要的属性, 其中, 由Bean Validation 规范规定的属性(<property>message</"
+"property>, <property>groups</property> 和 <property>payload</property>) 可以"
+"通过同名的子节点来定义, 而每个约束条件中自定义的属性, 则需要使用"
+"<property>element</property>节点来定义."
+
+#. Tag: para
+#: xmlconfiguration.xml:154
+#, no-c-format
+msgid ""
+"The class node also allows to reconfigure the default group sequence (see "
+"<xref linkend=\"section-default-group-class\"/>) via the <property>group-"
+"sequence</property> node."
+msgstr ""
+"<property>class</property>节点同样支持通过<property>group-sequence</property>"
+"节点来对一个类的默认校验组进行重定义(请参考 <xref linkend=\"section-default-"
+"group-class\"/>) ."
+
+#. Tag: para
+#: xmlconfiguration.xml:158
+#, no-c-format
+msgid ""
+"Last but not least, the list of <classname>ConstraintValidator</classname>s "
+"associated to a given constraint can be altered via the <property>constraint-"
+"definition</property> node. The <property>annotation</property> attribute "
+"represents the constraint annotation being altered. The <property>validated-"
+"by</property> elements represent the (ordered) list of "
+"<classname>ConstraintValidator</classname> implementations associated to the "
+"constraint. If <property>include-existing-validator</property> is set to "
+"<constant>false</constant>, validators defined on the constraint annotation "
+"are ignored. If set to <constant>true</constant>, the list of "
+"ConstraintValidators described in XML are concatenated to the list of "
+"validators described on the annotation."
+msgstr ""
+"最后, 你还可以通过<property>constraint-definition</property>节点来对一个指定"
+"的约束条件上绑定的校验器(<classname>ConstraintValidator</classname>)进行修"
+"改. 此节点上的<property>annotation</property>对应要修改的约束条件, 而"
+"<property>validated-by</property>子节点中(按顺序)列出要关联到此约束条件上的校"
+"验器( <classname>ConstraintValidator</classname>的实现类), 而"
+"<property>include-existing-validator</property>属性如果是<constant>false</"
+"constant>的话,那么默认定义在此约束条件上的校验器将被忽略, 如果为"
+"<constant>true</constant>, 那么在xml中定义的校验器会被添加在约束条件上默认定"
+"义的校验器的后面."
diff --git a/project/engine/pom.xml b/project/engine/pom.xml
new file mode 100644
index 0000000..b5dbf5e
--- /dev/null
+++ b/project/engine/pom.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator</artifactId>
+
+    <name>Hibernate Validator Engine</name>
+    <description>Hibernate's Bean Validation (JSR-303) reference implementation.</description>
+
+    <distributionManagement>
+        <site>
+            <id>site</id>
+            <url>http://validator.hibernate.org</url>
+        </site>
+    </distributionManagement>
+
+    <dependencies>
+        <!--
+        Compile time dependencies
+        -->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.logging</groupId>
+            <artifactId>jboss-logging</artifactId>
+        </dependency>
+
+        <!--
+        Optional dependencies
+        -->
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <!--
+        Test dependencies
+        -->
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-entitymanager</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+        <jdbc.driver>org.h2.Driver</jdbc.driver>
+        <jdbc.url>jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1</jdbc.url>
+        <jdbc.user>sa</jdbc.user>
+        <jdbc.pass />
+        <jdbc.isolation />
+    </properties>
+
+    <build>
+        <defaultGoal>test</defaultGoal>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/xsd</directory>
+                <targetPath>META-INF</targetPath>
+            </resource>
+        </resources>
+        <testResources>
+            <testResource>
+                <filtering>true</filtering>
+                <directory>src/test/resources</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/*.xml</include>
+                </includes>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jaxb2-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>xjc</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <packageName>org.hibernate.validator.internal.xml</packageName>
+                    <extension>true</extension>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>2.2.5</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>2.1.13</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.bsc.maven</groupId>
+                <artifactId>maven-processor-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <archive>
+                                <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                                <manifestEntries>
+                                    <Specification-Title>Bean Validation</Specification-Title>
+                                    <Specification-Version>1.0</Specification-Version>
+                                </manifestEntries>
+                            </archive>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>test-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>testing</classifier>
+                            <classesDirectory>${project.build.testOutputDirectory}</classesDirectory>
+                            <includes>
+                                <include>org/hibernate/validator/testutil/**</include>
+                            </includes>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>
+                            javax.persistence.*;version="[2.0.0,3.0.0)";resolution:=optional,
+                            javax.validation.*;version="[1.0.0,2.0.0)",
+                            javax.xml.*;version="0",
+                            org.xml.sax.*;version="0",
+                            org.jboss.logging.*;version="[3.1.0,4.0.0)",
+                            org.joda.time.*;version="[1.6.0,2.0.0)";resolution:=optional,
+                            org.jsoup.*;version="[1.5.2,2.0.0)";resolution:=optional
+                        </Import-Package>
+                        <Export-Package>
+                            org.hibernate.validator;version="${project.version}",
+                            org.hibernate.validator.cfg.*;version="${project.version}",
+                            org.hibernate.validator.constraints.*;version="${project.version}",
+                            org.hibernate.validator.group;version="${project.version}",
+                            org.hibernate.validator.messageinterpolation;version="${project.version}",
+                            org.hibernate.validator.method.*;version="${project.version}",
+                            org.hibernate.validator.resourceloading;version="${project.version}",
+                            org.hibernate.validator.spi.*;version="${project.version}"
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${basedir}/src/test/suite/unit-tests.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <links>
+                        <link>http://docs.oracle.com/javase/6/docs/api</link>
+                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api/</link>
+                    </links>
+                    <packagesheader>Hibernate Validator Packages</packagesheader>
+                    <doctitle>Hibernate Validator ${project.version}</doctitle>
+                    <windowtitle>Hibernate Validator ${project.version}</windowtitle>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.jboss.maven.plugins</groupId>
+                <artifactId>maven-injection-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>bytecode</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <bytecodeInjections>
+                        <bytecodeInjection>
+                            <expression>${project.version}</expression>
+                            <targetMembers>
+                                <methodBodyReturn>
+                                    <className>org.hibernate.validator.internal.util.Version</className>
+                                    <methodName>getVersionString</methodName>
+                                </methodBodyReturn>
+                            </targetMembers>
+                        </bytecodeInjection>
+                    </bytecodeInjections>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/project/engine/src/main/java/org/hibernate/validator/HibernateValidator.java b/project/engine/src/main/java/org/hibernate/validator/HibernateValidator.java
new file mode 100644
index 0000000..c136ca8
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/HibernateValidator.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator;
+
+import javax.validation.Configuration;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.BootstrapState;
+import javax.validation.spi.ConfigurationState;
+import javax.validation.spi.ValidationProvider;
+
+import org.hibernate.validator.internal.engine.ConfigurationImpl;
+import org.hibernate.validator.internal.engine.ValidatorFactoryImpl;
+
+/**
+ * Default implementation of {@code ValidationProvider} within Hibernate Validator.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class HibernateValidator implements ValidationProvider<HibernateValidatorConfiguration> {
+
+	public HibernateValidatorConfiguration createSpecializedConfiguration(BootstrapState state) {
+		return HibernateValidatorConfiguration.class.cast( new ConfigurationImpl( this ) );
+	}
+
+	public Configuration<?> createGenericConfiguration(BootstrapState state) {
+		return new ConfigurationImpl( state );
+	}
+
+	public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState) {
+		return new ValidatorFactoryImpl( configurationState );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java
new file mode 100644
index 0000000..27b3343
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorConfiguration.java
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator;
+
+import javax.validation.Configuration;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.resourceloading.ResourceBundleLocator;
+
+/**
+ * Uniquely identifies Hibernate Validator in the Bean Validation bootstrap
+ * strategy. Also contains Hibernate Validator specific configurations.
+ *
+ * @author Emmanuel Bernard
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ */
+public interface HibernateValidatorConfiguration extends Configuration<HibernateValidatorConfiguration> {
+	/**
+	 * Property corresponding to the {@link #failFast} method.
+	 * Accepts {@code true} or {@code false}. Defaults to {@code false}.
+	 */
+	final static String FAIL_FAST = "hibernate.validator.fail_fast";
+
+	/**
+	 * <p>
+	 * Returns the {@link ResourceBundleLocator} used by the
+	 * {@link Configuration#getDefaultMessageInterpolator() default message
+	 * interpolator} to load user-provided resource bundles. In conformance with
+	 * the specification this default locator retrieves the bundle
+	 * "ValidationMessages".
+	 * </p>
+	 * <p>
+	 * This locator can be used as delegate for custom locators when setting a
+	 * customized {@link org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator}:
+	 * </p>
+	 * <p/>
+	 * <pre>
+	 * {@code
+	 * 	HibernateValidatorConfiguration configure =
+	 *    Validation.byProvider(HibernateValidator.class).configure();
+	 *
+	 *  ResourceBundleLocator defaultResourceBundleLocator =
+	 *    configure.getDefaultBundleLocator();
+	 *  ResourceBundleLocator myResourceBundleLocator =
+	 *    new MyResourceBundleLocator(defaultResourceBundleLocator);
+	 *
+	 *  configure.messageInterpolator(
+	 *    new ResourceBundleMessageInterpolator(myResourceBundleLocator));
+	 * }
+	 * </pre>
+	 * <p>
+	 * <b>Deprecation note:</b> The return type of this method will change to
+	 * {@link org.hibernate.validator.spi.resourceloading.ResourceBundleLocator} in a future release.
+	 * The return value of this method should be assigned to a variable of this type.
+	 * </p>
+	 *
+	 * @return The default {@link ResourceBundleLocator}. Never null.
+	 */
+	@SuppressWarnings("deprecation")
+	ResourceBundleLocator getDefaultResourceBundleLocator();
+
+	/**
+	 * Creates a new constraint mapping which can be used to programmatically configure the constraints for given types. After
+	 * the mapping has been set up, it must be added to this configuration via {@link #addMapping(ConstraintMapping)}.
+	 *
+	 * @return A new constraint mapping.
+	 */
+	ConstraintMapping createConstraintMapping();
+
+	/**
+	 * Adds the specified {@link ConstraintMapping} instance to the configuration. Constraints configured in {@code mapping}
+	 * will be added to the constraints configured via annotations and/or xml.
+	 *
+	 * @param mapping {@code ConstraintMapping} instance containing programmatic configured constraints
+	 *
+	 * @return {@code this} following the chaining method pattern
+	 *
+	 * @throws IllegalArgumentException if {@code mapping} is {@code null}
+	 */
+	HibernateValidatorConfiguration addMapping(ConstraintMapping mapping);
+
+	/**
+	 * En- or disables the fail fast mode. When fail fast is enabled the validation
+	 * will stop on the first constraint violation detected.
+	 *
+	 * @param failFast {@code true} to enable fail fast, {@code false} otherwise.
+	 *
+	 * @return {@code this} following the chaining method pattern
+	 */
+	HibernateValidatorConfiguration failFast(boolean failFast);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorContext.java b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorContext.java
new file mode 100644
index 0000000..1bebde1
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorContext.java
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator;
+
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidatorContext;
+
+/**
+ * Represents a Hibernate Validator specific context that is used to create
+ * {@link javax.validation.Validator} instances. Adds additional configuration options to those
+ * provided by {@link ValidatorContext}.
+ *
+ * @author Emmanuel Bernard
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface HibernateValidatorContext extends ValidatorContext {
+
+	HibernateValidatorContext messageInterpolator(MessageInterpolator messageInterpolator);
+
+	HibernateValidatorContext traversableResolver(TraversableResolver traversableResolver);
+
+	HibernateValidatorContext constraintValidatorFactory(ConstraintValidatorFactory factory);
+
+	/**
+	 * En- or disables the fail fast mode. When fail fast is enabled the validation
+	 * will stop on the first constraint violation detected.
+	 *
+	 * @param failFast {@code true} to enable fail fast, {@code false} otherwise.
+	 *
+	 * @return {@code this} following the chaining method pattern
+	 */
+	HibernateValidatorContext failFast(boolean failFast);
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorFactory.java b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorFactory.java
new file mode 100644
index 0000000..f951288
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/HibernateValidatorFactory.java
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator;
+
+import javax.validation.ValidatorFactory;
+
+/**
+ * Provides Hibernate Validator extensions to {@link ValidatorFactory}.
+ *
+ * @author Emmanuel Bernard
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface HibernateValidatorFactory extends ValidatorFactory {
+
+	/**
+	 * Returns a context for validator configuration via options from the
+	 * Bean Validation API as well as specific ones from Hibernate Validator.
+	 *
+	 * @return A context for validator configuration.
+	 */
+	HibernateValidatorContext usingContext();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
new file mode 100644
index 0000000..c1e1053
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+import javax.validation.Payload;
+
+/**
+ * Base class for all constraint definition types. Each sub type represents a
+ * single constraint annotation type and allows to add this constraint to a bean
+ * class in a programmatic type-safe way with help of the
+ * {@link ConstraintMapping} API.
+ *
+ * @param <C> The type of a concrete sub type. Following to the
+ * "self referencing generic type" pattern each sub type has to be
+ * parametrized with itself.
+ * @param <A> The constraint annotation type represented by a concrete sub type.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public abstract class ConstraintDef<C extends ConstraintDef<C, A>, A extends Annotation> {
+
+	// Note on visibility of members: These members are intentionally made
+	// protected and published by a sub-class for internal use. There aren't
+	// public getters as they would pollute the fluent definition API.
+
+	/**
+	 * The constraint annotation type of this definition.
+	 */
+	protected final Class<A> constraintType;
+
+	/**
+	 * A map with the annotation parameters of this definition. Keys are
+	 * property names of this definition's annotation type, values are
+	 * annotation parameter values of the appropriate types.
+	 */
+	protected final Map<String, Object> parameters;
+
+	protected ConstraintDef(Class<A> constraintType) {
+		this.constraintType = constraintType;
+		this.parameters = new HashMap<String, Object>();
+	}
+
+	protected ConstraintDef(ConstraintDef<?, A> original) {
+		this.constraintType = original.constraintType;
+		this.parameters = original.parameters;
+	}
+
+	@SuppressWarnings("unchecked")
+	private C getThis() {
+		return (C) this;
+	}
+
+	protected C addParameter(String key, Object value) {
+		parameters.put( key, value );
+		return getThis();
+	}
+
+	public C message(String message) {
+		addParameter( "message", message );
+		return getThis();
+	}
+
+	public C groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return getThis();
+	}
+
+	public C payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return getThis();
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( this.getClass().getName() );
+		sb.append( ", constraintType=" ).append( constraintType );
+		sb.append( ", parameters=" ).append( parameters );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java b/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
new file mode 100644
index 0000000..382bdcf
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.context.TypeConstraintMappingContext;
+import org.hibernate.validator.internal.cfg.context.ConstraintMappingContext;
+import org.hibernate.validator.internal.cfg.context.TypeConstraintMappingContextImpl;
+import org.hibernate.validator.internal.util.Contracts;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Top level class for constraints configured via the programmatic API. This
+ * class is not intended to be inherited by clients. It will be converted into
+ * an interface in a future release.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ConstraintMapping {
+
+	/**
+	 * Not intended for public use.
+	 *
+	 * @deprecated Will be removed in a future release.
+	 */
+	@Deprecated
+	protected ConstraintMappingContext context;
+
+	/**
+	 * @deprecated This class will be converted into an interface in a future
+	 *             release. Use
+	 *             {@link HibernateValidatorConfiguration#createConstraintMapping()}
+	 *             instead to create new constraint mappings.
+	 */
+	@Deprecated
+	public ConstraintMapping() {
+		context = new ConstraintMappingContext();
+	}
+
+	/**
+	 * @deprecated This class will be converted into an interface in a future
+	 *             release. Use
+	 *             {@link HibernateValidatorConfiguration#createConstraintMapping()}
+	 *             instead to create new constraint mappings.
+	 */
+	@Deprecated
+	protected ConstraintMapping(ConstraintMapping original) {
+		this.context = original.context;
+	}
+
+	/**
+	 * Starts defining constraints on the specified bean class.
+	 *
+	 * @param <C> The type to be configured.
+	 * @param beanClass The bean class on which to define constraints. All constraints defined after calling this method
+	 * are added to the bean of the type {@code beanClass} until the next call of {@code type}.
+	 *
+	 * @return Instance allowing for defining constraints on the specified class.
+	 */
+	public final <C> TypeConstraintMappingContext<C> type(Class<C> beanClass) {
+		Contracts.assertNotNull( beanClass, MESSAGES.beanTypeMustNotBeNull() );
+		return new TypeConstraintMappingContextImpl<C>( beanClass, context );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/GenericConstraintDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/GenericConstraintDef.java
new file mode 100644
index 0000000..31df496
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/GenericConstraintDef.java
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * A {@link ConstraintDef} class which can be used to configure any constraint
+ * type. For this purpose the class defines a generic method
+ * {@link GenericConstraintDef#param(String, Object)} which allows to add
+ * arbitrary constraint parameters.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class GenericConstraintDef<A extends Annotation> extends ConstraintDef<GenericConstraintDef<A>, A> {
+
+	public GenericConstraintDef(Class<A> constraintType) {
+		super( constraintType );
+	}
+
+	public GenericConstraintDef<A> param(String key, Object value) {
+		addParameter( key, value );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/AnnotationProcessingOptions.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/AnnotationProcessingOptions.java
new file mode 100644
index 0000000..cedfee0
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/AnnotationProcessingOptions.java
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to configure how existing annotation should be
+ * treated.
+ *
+ * @author Hardy Ferentschik
+ */
+public interface AnnotationProcessingOptions<C extends AnnotationProcessingOptions<C>> {
+	/**
+	 * Specifies that annotations specified on the configured type or property should be ignored.
+	 *
+	 * @return Returns itself for method chaining.
+	 */
+	C ignoreAnnotations();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/Cascadable.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/Cascadable.java
new file mode 100644
index 0000000..6173d2c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/Cascadable.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to mark the underlying
+ * element as to be validated in a cascaded way.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface Cascadable<C extends Cascadable<C>> {
+	/**
+	 * Marks the current element (property, parameter etc.) as cascadable.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 */
+	C valid();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/Constrainable.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/Constrainable.java
new file mode 100644
index 0000000..3e31c1d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/Constrainable.java
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * Facet of a constraint mapping creational context which allows to place
+ * constraints on the underlying element.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface Constrainable<C extends Constrainable<C>> {
+	/**
+	 * Adds a new constraint.
+	 *
+	 * @param definition The constraint to add.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 */
+	C constraint(ConstraintDef<?, ?> definition);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodConstraintMappingContext.java
new file mode 100644
index 0000000..f446eb7
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodConstraintMappingContext.java
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Constraint mapping creational context representing a method. Allows to
+ * navigate to the method's parameters and return value.
+ *
+ * @author Gunnar Morling
+ */
+public interface MethodConstraintMappingContext extends ParameterTarget, ReturnValueTarget {
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodTarget.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodTarget.java
new file mode 100644
index 0000000..6a3cbc4
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/MethodTarget.java
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to the select the bean
+ * method to which the next operations shall apply.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface MethodTarget {
+	/**
+	 * Selects a method to which the next operations shall apply.
+	 * <p>
+	 * Until this method is called constraints apply on class level. After calling this method constraints
+	 * apply to the specified method.
+	 * </p>
+	 *
+	 * @param name The method name.
+	 * @param parameterTypes The method parameter types.
+	 *
+	 * @return A creational context representing the selected method.
+	 */
+	MethodConstraintMappingContext method(String name, Class<?>... parameterTypes);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterConstraintMappingContext.java
new file mode 100644
index 0000000..ed76544
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterConstraintMappingContext.java
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Constraint mapping creational context representing a method parameter. Allows
+ * to place constraints on the parameter, mark the parameter as cascadable and to
+ * navigate to other constraint targets.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface ParameterConstraintMappingContext
+		extends TypeTarget, ParameterTarget, ReturnValueTarget, MethodTarget, Constrainable<ParameterConstraintMappingContext>, Cascadable<ParameterConstraintMappingContext> {
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterTarget.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterTarget.java
new file mode 100644
index 0000000..6089efd
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ParameterTarget.java
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to the select a method
+ * parameter to which the next operations shall apply.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface ParameterTarget {
+	/**
+	 * Changes the parameter for which added constraints apply.
+	 *
+	 * @param index The parameter index.
+	 *
+	 * @return A creational context representing the selected parameter.
+	 */
+	ParameterConstraintMappingContext parameter(int index);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyConstraintMappingContext.java
new file mode 100644
index 0000000..6fa54f2
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyConstraintMappingContext.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Constraint mapping creational context representing a property of a bean. Allows
+ * to place constraints on the property, mark the property as cascadable and to
+ * navigate to other constraint targets.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface PropertyConstraintMappingContext extends Constrainable<PropertyConstraintMappingContext>,
+		TypeTarget,
+		PropertyTarget,
+		MethodTarget,
+		Cascadable<PropertyConstraintMappingContext>,
+		AnnotationProcessingOptions<PropertyConstraintMappingContext> {
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyTarget.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyTarget.java
new file mode 100644
index 0000000..1a00f1e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/PropertyTarget.java
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+import java.lang.annotation.ElementType;
+
+/**
+ * Facet of a constraint mapping creational context which allows to the select the bean
+ * property to which the next operations shall apply.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface PropertyTarget {
+	/**
+	 * Selects a property to which the next operations shall apply.
+	 * <p>
+	 * Until this method is called constraints apply on class level. After calling this method constraints
+	 * apply on the specified property with the given access type.
+	 * </p>
+	 *
+	 * @param property The property on which to apply the following constraints (Java Bean notation).
+	 * @param type The access type (field/property).
+	 *
+	 * @return A creational context representing the selected property.
+	 */
+	PropertyConstraintMappingContext property(String property, ElementType type);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueConstraintMappingContext.java
new file mode 100644
index 0000000..94e5f87
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueConstraintMappingContext.java
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Constraint mapping creational context representing a method return value. Allows
+ * to place constraints on the return value, mark it as cascadable and to
+ * navigate to other constraint targets.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface ReturnValueConstraintMappingContext
+		extends TypeTarget, ParameterTarget, MethodTarget, Constrainable<ReturnValueConstraintMappingContext>, Cascadable<ReturnValueConstraintMappingContext> {
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueTarget.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueTarget.java
new file mode 100644
index 0000000..0da4480
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/ReturnValueTarget.java
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to the select the current method's
+ * return value as target for the next operations.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface ReturnValueTarget {
+	/**
+	 * Selects the current method's return value as the target for the next operations.
+	 *
+	 * @return A creational context representing the current method's return value.
+	 */
+	ReturnValueConstraintMappingContext returnValue();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeConstraintMappingContext.java
new file mode 100644
index 0000000..8e46039
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeConstraintMappingContext.java
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+/**
+ * Constraint mapping creational context representing a type. Allows place
+ * class-level constraints on that type, define its default group sequence (and provider)
+ * and to navigate to other constraint targets.
+ *
+ * @param <C> The type represented by this creational context.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface TypeConstraintMappingContext<C> extends Constrainable<TypeConstraintMappingContext<C>>,
+		TypeTarget,
+		PropertyTarget,
+		MethodTarget,
+		AnnotationProcessingOptions<TypeConstraintMappingContext<C>> {
+
+	/**
+	 * Defines that all annotations for this type should be ignored.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 */
+	TypeConstraintMappingContext<C> ignoreAllAnnotations();
+
+	/**
+	 * Defines the default group sequence for current type.
+	 *
+	 * @param defaultGroupSequence the default group sequence.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 */
+	TypeConstraintMappingContext<C> defaultGroupSequence(Class<?>... defaultGroupSequence);
+
+	/**
+	 * Defines the default group sequence provider for the current type.
+	 *
+	 * @param defaultGroupSequenceProviderClass The default group sequence provider class.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 *
+	 * @deprecated Will be removed in a future release. Use {@link #defaultGroupSequenceProviderClass(Class)} instead.
+	 */
+	@Deprecated
+	<T extends DefaultGroupSequenceProvider<? super C>> TypeConstraintMappingContext<C> defaultGroupSequenceProvider(
+			Class<T> defaultGroupSequenceProviderClass);
+
+	/**
+	 * Defines the default group sequence provider for the current type.
+	 *
+	 * @param defaultGroupSequenceProviderClass The default group sequence provider class.
+	 *
+	 * @return The current creational context following the method chaining pattern.
+	 */
+	TypeConstraintMappingContext<C> defaultGroupSequenceProviderClass(
+			Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeTarget.java b/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeTarget.java
new file mode 100644
index 0000000..5615e4e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/TypeTarget.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.context;
+
+/**
+ * Facet of a constraint mapping creational context which allows to the select the bean
+ * type to which the next operations shall apply.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public interface TypeTarget {
+	/**
+	 * Selects the type to which the next operations shall apply.
+	 *
+	 * @param <C> The type to select.
+	 * @param type The type to select.
+	 *
+	 * @return A creational context representing the selected type.
+	 */
+	<C> TypeConstraintMappingContext<C> type(Class<C> type);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/context/package.html b/project/engine/src/main/java/org/hibernate/validator/cfg/context/package.html
new file mode 100644
index 0000000..25e9056
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/context/package.html
@@ -0,0 +1,27 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Contains facet and creational context interfaces forming the API
+for programmatic constraint definition.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
new file mode 100644
index 0000000..a2d5695
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.AssertFalse;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class AssertFalseDef extends ConstraintDef<AssertFalseDef, AssertFalse> {
+
+	public AssertFalseDef() {
+		super( AssertFalse.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
new file mode 100644
index 0000000..089c440
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.AssertTrue;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class AssertTrueDef extends ConstraintDef<AssertTrueDef, AssertTrue> {
+
+	public AssertTrueDef() {
+		super( AssertTrue.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
new file mode 100644
index 0000000..c7dcf2d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.CreditCardNumber;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CreditCardNumberDef extends ConstraintDef<CreditCardNumberDef, CreditCardNumber> {
+
+	public CreditCardNumberDef() {
+		super( CreditCardNumber.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
new file mode 100644
index 0000000..7f6c722
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.DecimalMax;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMaxDef extends ConstraintDef<DecimalMaxDef, DecimalMax> {
+
+	public DecimalMaxDef() {
+		super( DecimalMax.class );
+	}
+
+	public DecimalMaxDef value(String max) {
+		addParameter( "value", max );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
new file mode 100644
index 0000000..0a6219d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.DecimalMin;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinDef extends ConstraintDef<DecimalMinDef, DecimalMin> {
+
+	public DecimalMinDef() {
+		super( DecimalMin.class );
+	}
+
+	public DecimalMinDef value(String min) {
+		addParameter( "value", min );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
new file mode 100644
index 0000000..2b7345a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Digits;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DigitsDef extends ConstraintDef<DigitsDef, Digits> {
+
+	public DigitsDef() {
+		super( Digits.class );
+	}
+
+	public DigitsDef integer(int integer) {
+		addParameter( "integer", integer );
+		return this;
+	}
+
+	public DigitsDef fraction(int fraction) {
+		addParameter( "fraction", fraction );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
new file mode 100644
index 0000000..89c5a69
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.Email;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class EmailDef extends ConstraintDef<EmailDef, Email> {
+
+	public EmailDef() {
+		super( Email.class );
+	}
+
+	public EmailDef regexp(String regexp) {
+		addParameter( "regexp", regexp );
+		return this;
+	}
+
+	public EmailDef flags(Pattern.Flag... flags) {
+		addParameter( "flags", flags );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
new file mode 100644
index 0000000..53df19e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Future;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class FutureDef extends ConstraintDef<FutureDef, Future> {
+
+	public FutureDef() {
+		super( Future.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
new file mode 100644
index 0000000..707ad19
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.Length;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LengthDef extends ConstraintDef<LengthDef, Length> {
+
+	public LengthDef() {
+		super( Length.class );
+	}
+
+	public LengthDef min(int min) {
+		addParameter( "min", min );
+		return this;
+	}
+
+	public LengthDef max(int max) {
+		addParameter( "max", max );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
new file mode 100644
index 0000000..1140a0b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Max;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MaxDef extends ConstraintDef<MaxDef, Max> {
+
+	public MaxDef() {
+		super( Max.class );
+	}
+
+	public MaxDef value(long max) {
+		addParameter( "value", max );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
new file mode 100644
index 0000000..fbe643b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Min;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MinDef extends ConstraintDef<MinDef, Min> {
+
+	public MinDef() {
+		super( Min.class );
+	}
+
+	public MinDef value(long min) {
+		addParameter( "value", min );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
new file mode 100644
index 0000000..3c06f10
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.NotBlank;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotBlankDef extends ConstraintDef<NotBlankDef, NotBlank> {
+	public NotBlankDef() {
+		super( NotBlank.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
new file mode 100644
index 0000000..1f0fe92
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotEmptyDef extends ConstraintDef<NotEmptyDef, NotEmpty> {
+
+	public NotEmptyDef() {
+		super( NotEmpty.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
new file mode 100644
index 0000000..5090dd4
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotNullDef extends ConstraintDef<NotNullDef, NotNull> {
+
+	public NotNullDef() {
+		super( NotNull.class );
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
new file mode 100644
index 0000000..08e5289
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Null;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NullDef extends ConstraintDef<NullDef, Null> {
+
+	public NullDef() {
+		super( Null.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
new file mode 100644
index 0000000..38490c3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Past;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PastDef extends ConstraintDef<PastDef, Past> {
+
+	public PastDef() {
+		super( Past.class );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
new file mode 100644
index 0000000..e02e7c7
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PatternDef extends ConstraintDef<PatternDef, Pattern> {
+
+	public PatternDef() {
+		super( Pattern.class );
+	}
+
+	public PatternDef flags(Pattern.Flag[] flags) {
+		addParameter( "flags", flags );
+		return this;
+	}
+
+	public PatternDef regexp(String regexp) {
+		addParameter( "regexp", regexp );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
new file mode 100644
index 0000000..d7d6ee8
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class RangeDef extends ConstraintDef<RangeDef, Range> {
+
+	public RangeDef() {
+		super( Range.class );
+	}
+
+	public RangeDef min(long min) {
+		addParameter( "min", min );
+		return this;
+	}
+
+	public RangeDef max(long max) {
+		addParameter( "max", max );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
new file mode 100644
index 0000000..4d6706b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.ScriptAssert;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ScriptAssertDef extends ConstraintDef<ScriptAssertDef, ScriptAssert> {
+
+	public ScriptAssertDef() {
+		super( ScriptAssert.class );
+	}
+
+	public ScriptAssertDef lang(String lang) {
+		addParameter( "lang", lang );
+		return this;
+	}
+
+	public ScriptAssertDef script(String script) {
+		addParameter( "script", script );
+		return this;
+	}
+
+	public ScriptAssertDef alias(String alias) {
+		addParameter( "alias", alias );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
new file mode 100644
index 0000000..87d5d00
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SizeDef extends ConstraintDef<SizeDef, Size> {
+
+	public SizeDef() {
+		super( Size.class );
+	}
+
+	public SizeDef min(int min) {
+		addParameter( "min", min );
+		return this;
+	}
+
+	public SizeDef max(int max) {
+		addParameter( "max", max );
+		return this;
+	}
+}
+
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
new file mode 100644
index 0000000..62ef4e4
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
@@ -0,0 +1,56 @@
+/* JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.constraints.URL;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class URLDef extends ConstraintDef<URLDef, URL> {
+
+	public URLDef() {
+		super( URL.class );
+	}
+
+	public URLDef protocol(String protocol) {
+		addParameter( "protocol", protocol );
+		return this;
+	}
+
+	public URLDef host(String host) {
+		addParameter( "host", host );
+		return this;
+	}
+
+	public URLDef port(int port) {
+		addParameter( "port", port );
+		return this;
+	}
+
+	public URLDef regexp(String regexp) {
+		addParameter( "regexp", regexp );
+		return this;
+	}
+
+	public URLDef flags(Pattern.Flag... flags) {
+		addParameter( "flags", flags );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/defs/package.html b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/package.html
new file mode 100644
index 0000000..d4ddb0e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/defs/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Constraint definition classes for programmatic constraint
+definition API.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/cfg/package.html b/project/engine/src/main/java/org/hibernate/validator/cfg/package.html
new file mode 100644
index 0000000..6f75e76
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/cfg/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Entry point for the programmatic constraint definition API.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/CompositionType.java b/project/engine/src/main/java/org/hibernate/validator/constraints/CompositionType.java
new file mode 100644
index 0000000..72bed16
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/CompositionType.java
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// $Id:$
+package org.hibernate.validator.constraints;
+
+/**
+ * The Enum {@code CompositionType} which is used as argument to the annotation {@code ConstraintComposition}.
+ */
+public enum CompositionType {
+	/**
+	 * Used to indicate the disjunction of all constraints it is applied to.
+	 */
+	OR,
+
+	/**
+	 * Used to indicate the conjunction of all the constraints it is applied to.
+	 */
+	AND,
+
+	/**
+	 * ALL_FALSE is a generalisation of the usual NOT operator, which is applied to
+	 * a list of conditions rather than just one element.
+	 * When the annotation it is used on is composed of a single constraint annotation, then it is equivalent to NOT.
+	 */
+	ALL_FALSE
+}
+
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/ConstraintComposition.java b/project/engine/src/main/java/org/hibernate/validator/constraints/ConstraintComposition.java
new file mode 100644
index 0000000..a8d846e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/ConstraintComposition.java
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.AND;
+
+/**
+ * Boolean operator that is applied to all constraints of a composing constraint annotation.
+ * <p/>
+ * A composed constraint annotation can define a boolean combination of the constraints composing it,
+ * by using {@code @ConstraintComposition}.
+ *
+ * @author Dag Hovland
+ * @author Federico Mancini
+ */
+ at Documented
+ at Target({ ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+public @interface ConstraintComposition {
+	/**
+	 * The value of this element specifies the boolean operator,
+	 * namely disjunction (OR), negation of the conjunction (ALL_FALSE),
+	 * or, the default, simple conjunction (AND).
+	 */
+	CompositionType value() default AND;
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java b/project/engine/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java
new file mode 100644
index 0000000..2c2bd1e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/CreditCardNumber.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The annotated element has to represent a valid
+ * credit card number. This is the Luhn algorithm implementation
+ * which aims to check for user mistake, not credit card validity!
+ *
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ReportAsSingleViolation
+ at ModCheck(modType = ModCheck.ModType.MOD10, multiplier = 2)
+public @interface CreditCardNumber {
+	String message() default "{org.hibernate.validator.constraints.CreditCardNumber.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * Defines several {@code @CreditCardNumber} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		CreditCardNumber[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/Email.java b/project/engine/src/main/java/org/hibernate/validator/constraints/Email.java
new file mode 100644
index 0000000..a6eb3d1
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/Email.java
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.OverridesAttribute;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The string has to be a well-formed email address.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ReportAsSingleViolation
+ at Pattern(regexp = "")
+public @interface Email {
+	String message() default "{org.hibernate.validator.constraints.Email.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * @return an additional regular expression the annotated string must match. The default is any string ('.*')
+	 */
+	@OverridesAttribute(constraint = Pattern.class, name = "regexp") String regexp() default ".*";
+
+	/**
+	 * @return used in combination with {@link #regexp()} in order to specify a regular expression option
+	 */
+	@OverridesAttribute(constraint = Pattern.class, name = "flags") Pattern.Flag[] flags() default { };
+
+	/**
+	 * Defines several {@code @Email} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		Email[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/Length.java b/project/engine/src/main/java/org/hibernate/validator/constraints/Length.java
new file mode 100644
index 0000000..7c6fb11
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/Length.java
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validate that the string is between min and max included.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface Length {
+	int min() default 0;
+
+	int max() default Integer.MAX_VALUE;
+
+	String message() default "{org.hibernate.validator.constraints.Length.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * Defines several {@code @Length} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		Length[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/ModCheck.java b/project/engine/src/main/java/org/hibernate/validator/constraints/ModCheck.java
new file mode 100644
index 0000000..9ae3aaf
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/ModCheck.java
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Modulo check constraint.
+ * <p>
+ * Allows to validate that a series of digits pass the mod 10 or mod 11 checksum algorithm.
+ * </p>
+ * <p>
+ * The supported type is {@code CharSequence}. {@code null} is considered valid.
+ * </p>
+ *
+ * @author George Gastaldi
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface ModCheck {
+	String message() default "{org.hibernate.validator.constraints.ModCheck.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * @return The modulus algorithm to be used
+	 */
+	ModType modType();
+
+	/**
+	 * @return The multiplier to be used by the chosen mod algorithm
+	 */
+	int multiplier();
+
+	/**
+	 * @return the start index (inclusive) for calculating the checksum. If not specified 0 is assumed.
+	 */
+	int startIndex() default 0;
+
+	/**
+	 * @return the end index (exclusive) for calculating the checksum. If not specified the whole value is considered
+	 */
+	int endIndex() default Integer.MAX_VALUE;
+
+	/**
+	 * @return The position of the check digit in input. Per default it is assumes that the check digit is part of the
+	 *         specified range. If set, the digit at the specified position is used as check digit. If set it the following holds
+	 *         true: {@code checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex}.
+	 */
+	int checkDigitPosition() default -1;
+
+	/**
+	 * @return Returns {@code true} if non digit characters should be ignored, {@code false} if a non digit character
+	 *         results in a validation error. {@code startIndex} and {@code endIndex} are always only referring to digit
+	 *         characters.
+	 */
+	boolean ignoreNonDigitCharacters() default true;
+
+	/**
+	 * Defines several {@code @ModCheck} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		ModCheck[] value();
+	}
+
+	public enum ModType {
+		/**
+		 * Represents a MOD10 algorithm (Also known as Luhn algorithm)
+		 */
+		MOD10,
+		/**
+		 * Represents a MOD11 algorithm
+		 */
+		MOD11
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/NotBlank.java b/project/engine/src/main/java/org/hibernate/validator/constraints/NotBlank.java
new file mode 100644
index 0000000..b90b33c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/NotBlank.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.NotNull;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validate that the annotated string is not {@code null} or empty.
+ * The difference to {@code NotEmpty} is that trailing whitespaces are getting ignored.
+ *
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ReportAsSingleViolation
+ at NotNull
+public @interface NotBlank {
+	String message() default "{org.hibernate.validator.constraints.NotBlank.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * Defines several {@code @NotBlank} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		NotBlank[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/NotEmpty.java b/project/engine/src/main/java/org/hibernate/validator/constraints/NotEmpty.java
new file mode 100644
index 0000000..d70199c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/NotEmpty.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Asserts that the annotated string, collection, map or array is not {@code null} or empty.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ReportAsSingleViolation
+ at NotNull
+ at Size(min = 1)
+public @interface NotEmpty {
+	String message() default "{org.hibernate.validator.constraints.NotEmpty.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * Defines several {@code @NotEmpty} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		NotEmpty[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/Range.java b/project/engine/src/main/java/org/hibernate/validator/constraints/Range.java
new file mode 100644
index 0000000..aa8b69f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/Range.java
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.OverridesAttribute;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The annotated element has to be in the appropriate range. Apply on numeric values or string
+ * representation of the numeric value.
+ *
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at Min(0)
+ at Max(Long.MAX_VALUE)
+ at ReportAsSingleViolation
+public @interface Range {
+	@OverridesAttribute(constraint = Min.class, name = "value") long min() default 0;
+
+	@OverridesAttribute(constraint = Max.class, name = "value") long max() default Long.MAX_VALUE;
+
+	String message() default "{org.hibernate.validator.constraints.Range.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * Defines several {@code @Range} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		Range[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/SafeHtml.java b/project/engine/src/main/java/org/hibernate/validator/constraints/SafeHtml.java
new file mode 100644
index 0000000..3dfdda3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/SafeHtml.java
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.SafeHtml.WhiteListType.RELAXED;
+
+/**
+ * Validate a rich text value provided by the user to ensure that it contains no malicious code, such as embedded
+ * <script> elements.
+ *
+ * @author George Gastaldi
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface SafeHtml {
+
+	String message() default "{org.hibernate.validator.constraints.SafeHtml.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * @return The built-in whitelist type which will be applied to the rich text value
+	 */
+	WhiteListType whitelistType() default RELAXED;
+
+	/**
+	 * @return Additional whitelist tags which are allowed on top of the tags specified by the
+	 *         {@link #whitelistType()}.
+	 */
+	String[] additionalTags() default { };
+
+	/**
+	 * Defines several {@code @SafeHtml} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		SafeHtml[] value();
+	}
+
+	/**
+	 * Defines default whitelist implementations
+	 */
+	public enum WhiteListType {
+		/**
+		 * This whitelist allows only text nodes: all HTML will be stripped.
+		 */
+		NONE,
+
+		/**
+		 * This whitelist allows only simple text formatting: <code>b, em, i, strong, u</code>. All other HTML (tags and
+		 * attributes) will be removed.
+		 */
+		SIMPLE_TEXT,
+
+		/**
+		 * This whitelist allows a fuller range of text nodes:
+		 * <code>a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, strike, strong, sub, sup, u, ul</code>
+		 * , and appropriate attributes.
+		 * <p/>
+		 * Links (<code>a</code> elements) can point to <code>http, https, ftp, mailto</code>, and have an enforced
+		 * <code>rel=nofollow</code> attribute.
+		 * <p/>
+		 * Does not allow images.
+		 */
+		BASIC,
+
+		/**
+		 * This whitelist allows the same text tags as {@link WhiteListType#BASIC}, and also allows <code>img</code>
+		 * tags,
+		 * with
+		 * appropriate attributes, with <code>src</code> pointing to <code>http</code> or <code>https</code>.
+		 */
+		BASIC_WITH_IMAGES,
+
+		/**
+		 * This whitelist allows a full range of text and structural body HTML:
+		 * <code>a, b, blockquote, br, caption, cite, code, col, colgroup, dd, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li,
+		 * ol, p, pre, q, small, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul</code>
+		 * <p/>
+		 * Links do not have an enforced <code>rel=nofollow</code> attribute, but you can add that if desired.
+		 */
+		RELAXED
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java b/project/engine/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java
new file mode 100644
index 0000000..72e3e76
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/ScriptAssert.java
@@ -0,0 +1,129 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * <p>
+ * A class-level constraint, that evaluates a script expression against the
+ * annotated element. This constraint can be used to implement validation
+ * routines, that depend on multiple attributes of the annotated element.
+ * </p>
+ * <p>
+ * Script expressions can be written in any scripting or expression language,
+ * for which a <a href="http://jcp.org/en/jsr/detail?id=223">JSR 223</a>
+ * ("Scripting for the Java<sup>TM</sup> Platform") compatible engine can be
+ * found on the class path. The following listing shows an example using the
+ * JavaScript engine, which comes with the JDK:
+ * </p>
+ * <p/>
+ *
+ * <pre>
+ * {@code @ScriptAssert(lang = "javascript", script = "_this.startDate.before(_this.endDate)")
+ * public class CalendarEvent {
+ *
+ * 	private Date startDate;
+ *
+ * 	private Date endDate;
+ *
+ * 	//...
+ *
+ * }
+ * }
+ * </pre>
+ * <p>
+ * Using a real expression language in conjunction with a shorter object alias
+ * allows for very compact expressions:
+ * </p>
+ *
+ * <pre>
+ * {@code @ScriptAssert(lang = "jexl", script = "_.startDate > _.endDate", alias = "_")
+ * public class CalendarEvent {
+ *
+ * 	private Date startDate;
+ *
+ * 	private Date endDate;
+ *
+ * 	//...
+ *
+ * }
+ * }
+ * </pre>
+ * <p>
+ * Accepts any type.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+ at Target({ TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at Documented
+public @interface ScriptAssert {
+
+	String message() default "{org.hibernate.validator.constraints.ScriptAssert.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * @return The name of the script language used by this constraint as
+	 *         expected by the JSR 223 {@link javax.script.ScriptEngineManager}. A
+	 *         {@link javax.validation.ConstraintDeclarationException} will be thrown upon script
+	 *         evaluation, if no engine for the given language could be found.
+	 */
+	String lang();
+
+	/**
+	 * @return The script to be executed. The script must return
+	 *         <code>Boolean.TRUE</code>, if the annotated element could
+	 *         successfully be validated, otherwise <code>Boolean.FALSE</code>.
+	 *         Returning null or any type other than Boolean will cause a
+	 *         {@link javax.validation.ConstraintDeclarationException} upon validation. Any
+	 *         exception occurring during script evaluation will be wrapped into
+	 *         a ConstraintDeclarationException, too. Within the script, the
+	 *         validated object can be accessed from the {@link javax.script.ScriptContext
+	 *         script context} using the name specified in the
+	 *         <code>alias</code> attribute.
+	 */
+	String script();
+
+	/**
+	 * @return The name, under which the annotated element shall be registered
+	 *         within the script context. Defaults to "_this".
+	 */
+	String alias() default "_this";
+
+	/**
+	 * Defines several {@code @ScriptAssert} annotations on the same element.
+	 */
+	@Target({ TYPE })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		ScriptAssert[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/URL.java b/project/engine/src/main/java/org/hibernate/validator/constraints/URL.java
new file mode 100644
index 0000000..0c5f05d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/URL.java
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.OverridesAttribute;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validate that the string is a valid URL.
+ *
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ReportAsSingleViolation
+ at Pattern(regexp = "")
+/**
+ * {@code URL} is a field/method level constraint which can be applied on a string to assert that the string
+ * represents a valid URL. Per default the constraint verifies that the annotated value conforms to
+ * <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC2396</a>. Via the parameters {@code protocol}, {@code host}
+ * and {@code port} one can assert the corresponding parts of the parsed URL.
+ * <p>
+ * Due to the fact that RFC2396 is a very generic specification it often is not restrictive enough for a given usecase.
+ * In this case one can also specify the optional {@code regexp} and {@code flags} parameters. This way an additional
+ * Java regular expression can be specified which the string (URL) has to match.
+ * </p>
+ */
+public @interface URL {
+	String message() default "{org.hibernate.validator.constraints.URL.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+
+	/**
+	 * @return the protocol (scheme) the annotated string must match, eg ftp or http.
+	 *         Per default any protocol is allowed
+	 */
+	String protocol() default "";
+
+	/**
+	 * @return the host the annotated string must match, eg localhost. Per default any host is allowed
+	 */
+	String host() default "";
+
+	/**
+	 * @return the port the annotated string must match, eg 80. Per default any port is allowed
+	 */
+	int port() default -1;
+
+	/**
+	 * @return an additional regular expression the annotated URL must match. The default is any string ('.*')
+	 */
+	@OverridesAttribute(constraint = Pattern.class, name = "regexp") String regexp() default ".*";
+
+	/**
+	 * @return used in combination with {@link #regexp()} in order to specify a regular expression option
+	 */
+	@OverridesAttribute(constraint = Pattern.class, name = "flags") Pattern.Flag[] flags() default { };
+
+	/**
+	 * Defines several {@code @URL} annotations on the same element.
+	 */
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface List {
+		URL[] value();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/br/CNPJ.java b/project/engine/src/main/java/org/hibernate/validator/constraints/br/CNPJ.java
new file mode 100644
index 0000000..716806a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/br/CNPJ.java
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints.br;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.ModCheck.List;
+import org.hibernate.validator.constraints.ModCheck.ModType;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validates a CNPJ (Cadastro de Pessoa Jur\u00eddica - Brazilian corporate tax payer registry number).
+ *
+ * @author George Gastaldi
+ */
+ at Pattern(regexp = "([0-9]{2}[.]?[0-9]{3}[.]?[0-9]{3}[/]?[0-9]{4}[-]?[0-9]{2})")
+ at List({
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 12,
+				multiplier = 9,
+				endIndex = 12),
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 13,
+				multiplier = 9,
+				endIndex = 13)
+})
+ at ReportAsSingleViolation
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface CNPJ {
+	String message() default "{org.hibernate.validator.constraints.br.CNPJ.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/br/CPF.java b/project/engine/src/main/java/org/hibernate/validator/constraints/br/CPF.java
new file mode 100644
index 0000000..26b5841
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/br/CPF.java
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints.br;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.ModCheck.ModType;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validates a CPF (Cadastro de Pessoa F\u00edsica - Brazilian individual taxpayer registry number).
+ *
+ * @author George Gastaldi
+ */
+ at Pattern.List({
+		@Pattern(regexp = "([0-9]{3}[.]?[0-9]{3}[.]?[0-9]{3}-[0-9]{2})|([0-9]{11})"),
+		// 000.000.000-00 is not a valid CPF, but passes the mod check. Needs to be singled out via regexp
+		@Pattern(regexp = "^(?:(?!000\\.000\\.000-00).)*$"),
+		// same for 999.999.999-99
+		@Pattern(regexp = "^(?:(?!999\\.999\\.999-99).)*$")
+})
+ at ModCheck.List({
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 9,
+				multiplier = 10,
+				endIndex = 9),
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 10,
+				multiplier = 11,
+				endIndex = 10)
+})
+ at ReportAsSingleViolation
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface CPF {
+	String message() default "{org.hibernate.validator.constraints.br.CPF.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/br/TituloEleitoral.java b/project/engine/src/main/java/org/hibernate/validator/constraints/br/TituloEleitoral.java
new file mode 100644
index 0000000..9f7f6a5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/br/TituloEleitoral.java
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.constraints.br;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.ModCheck.List;
+import org.hibernate.validator.constraints.ModCheck.ModType;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Validates a <a href="http://ghiorzi.org/cgcancpf.htm">T\u00edtulo Eleitoral</a> (Brazilian Voter ID card number).
+ *
+ * @author George Gastaldi
+ */
+ at Pattern(regexp = "[0-9]{12}")
+ at List({
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 10,
+				multiplier = 9,
+				endIndex = 8),
+		@ModCheck(modType = ModType.MOD11,
+				checkDigitPosition = 11,
+				multiplier = 9,
+				startIndex = 8,
+				endIndex = 11)
+})
+ at ReportAsSingleViolation
+ at Documented
+ at Constraint(validatedBy = { })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+public @interface TituloEleitoral {
+	String message() default "{org.hibernate.validator.constraints.br.TituloEleitor.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/br/package.html b/project/engine/src/main/java/org/hibernate/validator/constraints/br/package.html
new file mode 100644
index 0000000..ae214da
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/br/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Hibernate Validator Brazilian constraints.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/constraints/package.html b/project/engine/src/main/java/org/hibernate/validator/constraints/package.html
new file mode 100644
index 0000000..9af5640
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/constraints/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Hibernate Validator specific constraints.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/group/DefaultGroupSequenceProvider.java b/project/engine/src/main/java/org/hibernate/validator/group/DefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..4e081b2
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/group/DefaultGroupSequenceProvider.java
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.group;
+
+import java.util.List;
+
+/**
+ * This class defines the dynamic group sequence provider contract.
+ * <p>
+ * In order to redefine dynamically the default group sequence for a type T, the {@link GroupSequenceProvider} annotation
+ * must be placed on T, specifying as its value a concrete implementation of {@code DefaultGroupSequenceProvider}, which
+ * must be parametrized with the type T.
+ * </p>
+ * <p>
+ * If during the validation process the {@code Default} group is validated for T, the actual validated instance
+ * is passed to the {@code DefaultGroupSequenceProvider} to determine the default group sequence.
+ * </p>
+ * <p>
+ * Note:
+ * <ul>
+ * <li>Implementations must provide a public default constructor.</li>
+ * <li>Implementations must be thread-safe.</li>
+ * </ul>
+ *
+ * @param <T> The type for which an implementation is defined.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ * @deprecated Will be removed in a future release. Use {@link org.hibernate.validator.spi.group.DefaultGroupSequenceProvider} instead.
+ */
+ at Deprecated
+public interface DefaultGroupSequenceProvider<T>
+		extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<T> {
+
+	/**
+	 * This method returns the default group sequence for the given instance.
+	 * <p>
+	 * The object parameter allows to dynamically compose the default group sequence in function of the validated value state.
+	 * </p>
+	 *
+	 * @param object the instance being validated. This value can be {@code null} in case this method was called as part of
+	 * {@linkplain javax.validation.Validator#validateValue(Class, String, Object, Class[]) Validator#validateValue}.
+	 *
+	 * @return a list of classes specifying the default group sequence. The same constraints to the redefined group list
+	 *         apply as for lists defined via {@code GroupSequence}. In particular the list has to contain the type T.
+	 */
+	List<Class<?>> getValidationGroups(T object);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/group/GroupSequenceProvider.java b/project/engine/src/main/java/org/hibernate/validator/group/GroupSequenceProvider.java
new file mode 100644
index 0000000..41643a9
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/group/GroupSequenceProvider.java
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.group;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The {@code GroupSequenceProvider} annotation defines the {@code DefaultGroupSequenceProvider}
+ * class responsible to return the list of classes defining the default group sequence for the annotated type.
+ * <p>
+ * Note:
+ * <ul>
+ * <li>It is not allowed to use {@code GroupSequenceProvider} and {@link javax.validation.GroupSequence} together on
+ * the same type.</li>
+ * <li>{@code GroupSequenceProvider} is a Hibernate Validator specific annotation and not portable.</li>
+ * </ul>
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ * @see javax.validation.GroupSequence
+ */
+ at Retention(RUNTIME)
+ at Target({ TYPE })
+public @interface GroupSequenceProvider {
+
+	/**
+	 * @return The default group sequence provider implementation.
+	 */
+	Class<? extends DefaultGroupSequenceProvider<?>> value();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/group/package.html b/project/engine/src/main/java/org/hibernate/validator/group/package.html
new file mode 100644
index 0000000..bcd6639
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/group/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>This package provides support for dynamic default group sequence
+definition.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConfiguredConstraint.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConfiguredConstraint.java
new file mode 100644
index 0000000..a5b6d7e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConfiguredConstraint.java
@@ -0,0 +1,127 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Represents a programmatically configured constraint and meta-data
+ * related to its location (bean type etc.).
+ *
+ * @author Gunnar Morling
+ */
+public class ConfiguredConstraint<A extends Annotation, L extends ConstraintLocation> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final ConstraintDefAccessor<A> constraint;
+	private final L location;
+
+	private ConfiguredConstraint(ConstraintDef<?, A> constraint, L location) {
+
+		this.constraint = new ConstraintDefAccessor<A>( constraint );
+		this.location = location;
+	}
+
+	public static <A extends Annotation> ConfiguredConstraint<A, BeanConstraintLocation> forType(ConstraintDef<?, A> constraint, Class<?> beanType) {
+		return new ConfiguredConstraint<A, BeanConstraintLocation>(
+				constraint, new BeanConstraintLocation( beanType )
+		);
+	}
+
+	public static <A extends Annotation> ConfiguredConstraint<A, BeanConstraintLocation> forProperty(ConstraintDef<?, A> constraint, Member member) {
+
+		return new ConfiguredConstraint<A, BeanConstraintLocation>(
+				constraint, new BeanConstraintLocation( member )
+		);
+	}
+
+	public static <A extends Annotation> ConfiguredConstraint<A, MethodConstraintLocation> forParameter(ConstraintDef<?, A> constraint, Method method, int parameterIndex) {
+		return new ConfiguredConstraint<A, MethodConstraintLocation>(
+				constraint, new MethodConstraintLocation( method, parameterIndex )
+		);
+	}
+
+	public static <A extends Annotation> ConfiguredConstraint<A, MethodConstraintLocation> forReturnValue(ConstraintDef<?, A> constraint, Method method) {
+		return new ConfiguredConstraint<A, MethodConstraintLocation>(
+				constraint, new MethodConstraintLocation( method )
+		);
+	}
+
+	public ConstraintDef<?, A> getConstraint() {
+		return constraint;
+	}
+
+	public L getLocation() {
+		return location;
+	}
+
+	public Class<A> getConstraintType() {
+		return constraint.getConstraintType();
+	}
+
+	public Map<String, Object> getParameters() {
+		return constraint.getParameters();
+	}
+
+	public A createAnnotationProxy() {
+
+		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( getConstraintType() );
+		for ( Map.Entry<String, Object> parameter : getParameters().entrySet() ) {
+			annotationDescriptor.setValue( parameter.getKey(), parameter.getValue() );
+		}
+
+		try {
+			return AnnotationFactory.create( annotationDescriptor );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getUnableToCreateAnnotationForConfiguredConstraintException( e.getMessage(), e );
+		}
+	}
+
+	/**
+	 * Provides access to the members of a {@link ConstraintDef}.
+	 */
+	private static class ConstraintDefAccessor<A extends Annotation>
+			extends ConstraintDef<ConstraintDefAccessor<A>, A> {
+
+		private ConstraintDefAccessor(ConstraintDef<?, A> original) {
+			super( original );
+		}
+
+		private Class<A> getConstraintType() {
+			return constraintType;
+		}
+
+		private Map<String, Object> getParameters() {
+			return parameters;
+		}
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContext.java
new file mode 100644
index 0000000..4f1138b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContext.java
@@ -0,0 +1,233 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Context which collects constraints, cascades etc. configured via the programmatic API.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+ at SuppressWarnings("deprecation")
+public class ConstraintMappingContext {
+	private final Map<Class<?>, Set<ConfiguredConstraint<?, BeanConstraintLocation>>> constraintConfig;
+	private final Map<Class<?>, Set<ConfiguredConstraint<?, MethodConstraintLocation>>> methodConstraintConfig;
+	private final Map<Class<?>, Set<BeanConstraintLocation>> cascadeConfig;
+	private final Map<Class<?>, Set<MethodConstraintLocation>> methodCascadeConfig;
+	private final Set<Class<?>> configuredClasses;
+	private final Map<Class<?>, List<Class<?>>> defaultGroupSequences;
+	private final Map<Class<?>, Class<? extends DefaultGroupSequenceProvider<?>>> deprecatedDefaultGroupSequenceProviders;
+	private final Map<Class<?>, Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<?>>> defaultGroupSequenceProviders;
+	private final AnnotationProcessingOptions annotationProcessingOptions;
+
+	public ConstraintMappingContext() {
+		this.constraintConfig = newHashMap();
+		this.methodConstraintConfig = newHashMap();
+		this.cascadeConfig = newHashMap();
+		this.methodCascadeConfig = newHashMap();
+		this.configuredClasses = newHashSet();
+		this.defaultGroupSequences = newHashMap();
+		this.deprecatedDefaultGroupSequenceProviders = newHashMap();
+		this.defaultGroupSequenceProviders = newHashMap();
+		this.annotationProcessingOptions = new AnnotationProcessingOptions();
+	}
+
+	/**
+	 * Returns the constraint mapping context from the given constraint mapping.
+	 *
+	 * @param mapping the programmatic constraint mapping
+	 *
+	 * @return returns the constraint mapping context from the given constraint mapping
+	 */
+	public static ConstraintMappingContext getFromMapping(ConstraintMapping mapping) {
+		return new ConstraintMappingContextAccessor( mapping ).getContext();
+	}
+
+	/**
+	 * Returns all constraint definitions registered with this mapping.
+	 *
+	 * @return A map with this mapping's constraint definitions. Each key in
+	 *         this map represents a bean type, for which the constraint
+	 *         definitions in the associated map value are configured.
+	 */
+	public final Map<Class<?>, Set<ConfiguredConstraint<?, BeanConstraintLocation>>> getConstraintConfig() {
+		return constraintConfig;
+	}
+
+	public Map<Class<?>, Set<ConfiguredConstraint<?, MethodConstraintLocation>>> getMethodConstraintConfig() {
+		return methodConstraintConfig;
+	}
+
+	public final Map<Class<?>, Set<BeanConstraintLocation>> getCascadeConfig() {
+		return cascadeConfig;
+	}
+
+	public final Map<Class<?>, Set<MethodConstraintLocation>> getMethodCascadeConfig() {
+		return methodCascadeConfig;
+	}
+
+	public final Collection<Class<?>> getConfiguredClasses() {
+		return configuredClasses;
+	}
+
+	public final List<Class<?>> getDefaultSequence(Class<?> beanType) {
+		return defaultGroupSequences.get( beanType );
+	}
+
+	public final AnnotationProcessingOptions getAnnotationProcessingOptions() {
+		return annotationProcessingOptions;
+	}
+
+	/**
+	 * Returns the class of the default group sequence provider defined
+	 * for the given bean type.
+	 *
+	 * @param beanType The bean type.
+	 *
+	 * @return The default group sequence provider defined class or {@code null} if none.
+	 */
+	public final <T> Class<? extends DefaultGroupSequenceProvider<? super T>> getDeprecatedDefaultGroupSequenceProvider(Class<T> beanType) {
+		@SuppressWarnings("unchecked")
+		Class<? extends DefaultGroupSequenceProvider<? super T>> providerClass = (Class<? extends DefaultGroupSequenceProvider<? super T>>) deprecatedDefaultGroupSequenceProviders
+				.get( beanType );
+		return providerClass;
+	}
+
+	/**
+	 * Returns the class of the default group sequence provider defined
+	 * for the given bean type.
+	 *
+	 * @param beanType The bean type.
+	 *
+	 * @return The default group sequence provider defined class or {@code null} if none.
+	 */
+	public final <T> Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super T>> getDefaultGroupSequenceProvider(Class<T> beanType) {
+		@SuppressWarnings("unchecked")
+		Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super T>> providerClass = (Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super T>>) defaultGroupSequenceProviders
+				.get( beanType );
+		return providerClass;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ConstraintMapping" );
+		sb.append( "{cascadeConfig=" ).append( cascadeConfig );
+		sb.append( ", methodCascadeConfig=" ).append( methodCascadeConfig );
+		sb.append( ", constraintConfig=" ).append( constraintConfig );
+		sb.append( ", configuredClasses=" ).append( configuredClasses );
+		sb.append( ", defaultGroupSequences=" ).append( defaultGroupSequences );
+		sb.append( '}' );
+		return sb.toString();
+	}
+
+	public final void addCascadeConfig(BeanConstraintLocation cascade) {
+		Class<?> beanClass = cascade.getBeanClass();
+		configuredClasses.add( beanClass );
+		if ( cascadeConfig.containsKey( beanClass ) ) {
+			cascadeConfig.get( beanClass ).add( cascade );
+		}
+		else {
+			Set<BeanConstraintLocation> cascadeList = newHashSet();
+			cascadeList.add( cascade );
+			cascadeConfig.put( beanClass, cascadeList );
+		}
+	}
+
+	public final void addMethodCascadeConfig(MethodConstraintLocation cascade) {
+		Class<?> beanClass = cascade.getBeanClass();
+		configuredClasses.add( beanClass );
+		if ( methodCascadeConfig.containsKey( beanClass ) ) {
+			methodCascadeConfig.get( beanClass ).add( cascade );
+		}
+		else {
+			Set<MethodConstraintLocation> cascadeList = newHashSet();
+			cascadeList.add( cascade );
+			methodCascadeConfig.put( beanClass, cascadeList );
+		}
+	}
+
+	public final void addDefaultGroupSequence(Class<?> beanClass, List<Class<?>> defaultGroupSequence) {
+		configuredClasses.add( beanClass );
+		defaultGroupSequences.put( beanClass, defaultGroupSequence );
+	}
+
+	public final <T> void addDeprecatedDefaultGroupSequenceProvider(Class<T> beanClass, Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass) {
+		configuredClasses.add( beanClass );
+		deprecatedDefaultGroupSequenceProviders.put( beanClass, defaultGroupSequenceProviderClass );
+	}
+
+	public final <T> void addDefaultGroupSequenceProvider(Class<T> beanClass, Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass) {
+		configuredClasses.add( beanClass );
+		defaultGroupSequenceProviders.put( beanClass, defaultGroupSequenceProviderClass );
+	}
+
+	public final void addConstraintConfig(ConfiguredConstraint<?, BeanConstraintLocation> constraint) {
+		Class<?> beanClass = constraint.getLocation().getBeanClass();
+		configuredClasses.add( beanClass );
+		if ( constraintConfig.containsKey( beanClass ) ) {
+			constraintConfig.get( beanClass ).add( constraint );
+		}
+		else {
+			Set<ConfiguredConstraint<?, BeanConstraintLocation>> definitionList = newHashSet();
+			definitionList.add( constraint );
+			constraintConfig.put( beanClass, definitionList );
+		}
+	}
+
+	public final void addMethodConstraintConfig(ConfiguredConstraint<?, MethodConstraintLocation> constraint) {
+		Class<?> beanClass = constraint.getLocation().getBeanClass();
+		configuredClasses.add( beanClass );
+		if ( methodConstraintConfig.containsKey( beanClass ) ) {
+			methodConstraintConfig.get( beanClass ).add( constraint );
+		}
+		else {
+			Set<ConfiguredConstraint<?, MethodConstraintLocation>> definitionList = newHashSet();
+			definitionList.add( constraint );
+			methodConstraintConfig.put( beanClass, definitionList );
+		}
+	}
+
+	/**
+	 * Provides access to the members of a {@link ConstraintMapping}.
+	 */
+	private static class ConstraintMappingContextAccessor extends ConstraintMapping {
+
+		private ConstraintMappingContextAccessor(ConstraintMapping original) {
+			super( original );
+		}
+
+		private ConstraintMappingContext getContext() {
+			return context;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContextImplBase.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContextImplBase.java
new file mode 100644
index 0000000..7611f26
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ConstraintMappingContextImplBase.java
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+
+import org.hibernate.validator.cfg.context.MethodConstraintMappingContext;
+import org.hibernate.validator.cfg.context.PropertyConstraintMappingContext;
+import org.hibernate.validator.cfg.context.TypeConstraintMappingContext;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Base class for implementations of constraint mapping creational context types.
+ *
+ * @author Gunnar Morling
+ */
+public abstract class ConstraintMappingContextImplBase {
+
+	private static final Log log = LoggerFactory.make();
+
+	protected final Class<?> beanClass;
+	protected final ConstraintMappingContext mapping;
+
+	public ConstraintMappingContextImplBase(Class<?> beanClass, ConstraintMappingContext mapping) {
+		this.beanClass = beanClass;
+		this.mapping = mapping;
+	}
+
+	public <C> TypeConstraintMappingContext<C> type(Class<C> type) {
+		Contracts.assertNotNull( beanClass, MESSAGES.beanTypeMustNotBeNull() );
+
+		return new TypeConstraintMappingContextImpl<C>( type, mapping );
+	}
+
+	public PropertyConstraintMappingContext property(String property, ElementType elementType) {
+		Contracts.assertNotNull( property, "The property name must not be null." );
+		Contracts.assertNotNull( elementType, "The element type must not be null." );
+		Contracts.assertNotEmpty( property, MESSAGES.propertyNameMustNotBeEmpty() );
+
+		Member member = ReflectionHelper.getMember(
+				beanClass, property, elementType
+		);
+
+		if ( member == null ) {
+			throw log.getUnableToFindPropertyWithAccessException( beanClass, property, elementType );
+		}
+
+		return new PropertyConstraintMappingContextImpl( beanClass, member, mapping );
+	}
+
+	public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes) {
+		Contracts.assertNotNull( name, MESSAGES.methodNameMustNotBeNull() );
+
+		Method method = ReflectionHelper.getDeclaredMethod( beanClass, name, parameterTypes );
+
+		if ( method == null ) {
+			StringBuilder sb = new StringBuilder();
+			for ( Class<?> oneParameterType : parameterTypes ) {
+				sb.append( oneParameterType.getName() ).append( ", " );
+			}
+
+			String parameterTypesAsString = sb.length() > 2 ? sb.substring( 0, sb.length() - 2 ) : sb.toString();
+
+			throw log.getUnableToFindMethodException( beanClass, name, parameterTypesAsString );
+		}
+
+		return new MethodConstraintMappingContextImpl( beanClass, method, mapping );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/MethodConstraintMappingContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/MethodConstraintMappingContextImpl.java
new file mode 100644
index 0000000..8e36bd5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/MethodConstraintMappingContextImpl.java
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.reflect.Method;
+
+import org.hibernate.validator.cfg.context.MethodConstraintMappingContext;
+import org.hibernate.validator.cfg.context.ParameterConstraintMappingContext;
+import org.hibernate.validator.cfg.context.ReturnValueConstraintMappingContext;
+
+/**
+ * A constraint mapping creational context which allows to select the parameter or
+ * return value to which the next operations shall apply.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public class MethodConstraintMappingContextImpl implements MethodConstraintMappingContext {
+
+	private final Class<?> beanClass;
+	private final Method method;
+	private final ConstraintMappingContext mapping;
+
+	public MethodConstraintMappingContextImpl(Class<?> beanClass, Method method, ConstraintMappingContext mapping) {
+
+		this.beanClass = beanClass;
+		this.method = method;
+		this.mapping = mapping;
+	}
+
+	public ParameterConstraintMappingContext parameter(int index) {
+		return new ParameterConstraintMappingContextImpl(
+				beanClass, method, index, mapping
+		);
+	}
+
+	public ReturnValueConstraintMappingContext returnValue() {
+		return new ReturnValueConstraintMappingContextImpl(
+				beanClass, method, mapping
+		);
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ParameterConstraintMappingContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ParameterConstraintMappingContextImpl.java
new file mode 100644
index 0000000..2892e6c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ParameterConstraintMappingContextImpl.java
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.reflect.Method;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.context.ParameterConstraintMappingContext;
+import org.hibernate.validator.cfg.context.ReturnValueConstraintMappingContext;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Constraint mapping creational context which allows to configure the constraints for one method parameter.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class ParameterConstraintMappingContextImpl
+		extends ConstraintMappingContextImplBase
+		implements ParameterConstraintMappingContext {
+
+	private static final Log log = LoggerFactory.make();
+	
+	private final Method method;
+	private final int parameterIndex;
+
+	public ParameterConstraintMappingContextImpl(Class<?> beanClass, Method method, int parameterIndex, ConstraintMappingContext mapping) {
+
+		super( beanClass, mapping );
+
+		if ( parameterIndex < 0 || parameterIndex >= method.getParameterTypes().length ) {
+			throw log.getInvalidMethodParameterIndexException( method.getName() );
+		}
+
+		this.method = method;
+		this.parameterIndex = parameterIndex;
+	}
+
+	public ParameterConstraintMappingContext constraint(ConstraintDef<?, ?> definition) {
+
+		mapping.addMethodConstraintConfig(
+				ConfiguredConstraint.forParameter(
+						definition, method, parameterIndex
+				)
+		);
+		return this;
+	}
+
+	/**
+	 * Marks the currently selected method parameter as cascadable.
+	 *
+	 * @return Returns itself for method chaining.
+	 */
+	public ParameterConstraintMappingContext valid() {
+		mapping.addMethodCascadeConfig(
+				new MethodConstraintLocation(
+						method, parameterIndex
+				)
+		);
+		return this;
+	}
+
+	/**
+	 * Changes the parameter for which added constraints apply.
+	 *
+	 * @param index The parameter index.
+	 *
+	 * @return Returns a new {@code ConstraintsForTypeMethodElement} instance allowing method chaining.
+	 */
+	public ParameterConstraintMappingContext parameter(int index) {
+		return new ParameterConstraintMappingContextImpl(
+				beanClass, method, index, mapping
+		);
+	}
+
+	/**
+	 * Defines constraints on the return value of the current method.
+	 *
+	 * @return Returns a new {@code ConstraintsForTypeMethodElement} instance allowing method chaining.
+	 */
+	public ReturnValueConstraintMappingContext returnValue() {
+		return new ReturnValueConstraintMappingContextImpl(
+				beanClass, method, mapping
+		);
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/PropertyConstraintMappingContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/PropertyConstraintMappingContextImpl.java
new file mode 100644
index 0000000..e670f52
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/PropertyConstraintMappingContextImpl.java
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.context.PropertyConstraintMappingContext;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+
+/**
+ * Constraint mapping creational context which allows to configure the constraints for one bean property.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class PropertyConstraintMappingContextImpl extends ConstraintMappingContextImplBase
+		implements PropertyConstraintMappingContext {
+
+	private final Member member;
+
+	public PropertyConstraintMappingContextImpl(Class<?> beanClass, Member member, ConstraintMappingContext mapping) {
+		super( beanClass, mapping );
+
+		this.member = member;
+	}
+
+	public PropertyConstraintMappingContext constraint(ConstraintDef<?, ?> definition) {
+		if ( member instanceof Field ) {
+			mapping.addConstraintConfig(
+					ConfiguredConstraint.forProperty(
+							definition, member
+					)
+			);
+		}
+		else {
+			mapping.addMethodConstraintConfig(
+					ConfiguredConstraint.forReturnValue(
+							definition, (Method) member
+					)
+			);
+		}
+		return this;
+	}
+
+	public PropertyConstraintMappingContext ignoreAnnotations() {
+		mapping.getAnnotationProcessingOptions().ignorePropertyLevelConstraintAnnotationsOnMember( member );
+		return this;
+	}
+
+	public PropertyConstraintMappingContext valid() {
+		if ( member instanceof Field ) {
+			mapping.addCascadeConfig( new BeanConstraintLocation( member ) );
+		}
+		else {
+			mapping.addMethodCascadeConfig( new MethodConstraintLocation( (Method) member ) );
+		}
+
+		return this;
+	}
+}
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ReturnValueConstraintMappingContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ReturnValueConstraintMappingContextImpl.java
new file mode 100644
index 0000000..dfd1b54
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/ReturnValueConstraintMappingContextImpl.java
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.lang.reflect.Method;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.context.ParameterConstraintMappingContext;
+import org.hibernate.validator.cfg.context.ReturnValueConstraintMappingContext;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+
+/**
+ * Constraint mapping creational context which allows to configure the constraints for one method return value.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class ReturnValueConstraintMappingContextImpl
+		extends ConstraintMappingContextImplBase
+		implements ReturnValueConstraintMappingContext {
+
+	private final Method method;
+
+	public ReturnValueConstraintMappingContextImpl(Class<?> beanClass, Method method, ConstraintMappingContext mapping) {
+
+		super( beanClass, mapping );
+
+		this.method = method;
+	}
+
+	public ReturnValueConstraintMappingContext constraint(ConstraintDef<?, ?> definition) {
+		mapping.addMethodConstraintConfig(
+				ConfiguredConstraint.forReturnValue(
+						definition, method
+				)
+		);
+		return this;
+	}
+
+	/**
+	 * Marks the current property as cascadable.
+	 *
+	 * @return Returns itself for method chaining.
+	 */
+	public ReturnValueConstraintMappingContext valid() {
+		mapping.addMethodCascadeConfig( new MethodConstraintLocation( method ) );
+		return this;
+	}
+
+	/**
+	 * Changes the parameter for which added constraints apply.
+	 *
+	 * @param index The parameter index.
+	 *
+	 * @return Returns a new {@code ConstraintsForTypeMethodElement} instance allowing method chaining.
+	 */
+	public ParameterConstraintMappingContext parameter(int index) {
+		return new ParameterConstraintMappingContextImpl(
+				beanClass, method, index, mapping
+		);
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/TypeConstraintMappingContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/TypeConstraintMappingContextImpl.java
new file mode 100644
index 0000000..4ba8ba6
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/TypeConstraintMappingContextImpl.java
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.cfg.context;
+
+import java.util.Arrays;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.context.TypeConstraintMappingContext;
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+/**
+ * Constraint mapping creational context which allows to configure the class-level constraints for one bean.
+ *
+ * @param <C> The type represented by this creational context.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+ at SuppressWarnings("deprecation")
+public final class TypeConstraintMappingContextImpl<C> extends ConstraintMappingContextImplBase
+		implements TypeConstraintMappingContext<C> {
+
+	public TypeConstraintMappingContextImpl(Class<?> beanClass, ConstraintMappingContext mapping) {
+		super( beanClass, mapping );
+		mapping.getAnnotationProcessingOptions().ignoreAnnotationConstraintForClass( beanClass, Boolean.FALSE );
+	}
+
+	public TypeConstraintMappingContext<C> constraint(ConstraintDef<?, ?> definition) {
+		mapping.addConstraintConfig( ConfiguredConstraint.forType( definition, beanClass ) );
+		return this;
+	}
+
+	public TypeConstraintMappingContext<C> ignoreAnnotations() {
+		mapping.getAnnotationProcessingOptions().ignoreClassLevelConstraintAnnotations( beanClass, Boolean.TRUE );
+		return this;
+	}
+
+	public TypeConstraintMappingContext<C> ignoreAllAnnotations() {
+		mapping.getAnnotationProcessingOptions().ignoreAnnotationConstraintForClass( beanClass, Boolean.TRUE );
+		return this;
+	}
+
+	public TypeConstraintMappingContext<C> defaultGroupSequence(Class<?>... defaultGroupSequence) {
+		mapping.addDefaultGroupSequence( beanClass, Arrays.asList( defaultGroupSequence ) );
+		return this;
+	}
+
+	public <T extends DefaultGroupSequenceProvider<? super C>> TypeConstraintMappingContext<C> defaultGroupSequenceProvider(Class<T> defaultGroupSequenceProviderClass) {
+		@SuppressWarnings("unchecked")
+		Class<C> clazz = (Class<C>) beanClass;
+		mapping.addDeprecatedDefaultGroupSequenceProvider( clazz, defaultGroupSequenceProviderClass );
+		return this;
+	}
+
+	public TypeConstraintMappingContext<C> defaultGroupSequenceProviderClass(Class<? extends org.hibernate.validator.spi.group.DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass) {
+		@SuppressWarnings("unchecked")
+		Class<C> clazz = (Class<C>) beanClass;
+		mapping.addDefaultGroupSequenceProvider( clazz, defaultGroupSequenceProviderClass );
+		return this;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/package.html
new file mode 100644
index 0000000..96de8ab
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/cfg/context/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Creational context implementations of the API for programmatic
+constraint definition.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertFalseValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertFalseValidator.java
new file mode 100644
index 0000000..c42221a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertFalseValidator.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.AssertFalse;
+
+/**
+ * Validates that the value passed is false
+ *
+ * @author Alaa Nassef
+ */
+public class AssertFalseValidator implements ConstraintValidator<AssertFalse, Boolean> {
+
+	public void initialize(AssertFalse constraintAnnotation) {
+	}
+
+	public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		return bool == null || !bool;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertTrueValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertTrueValidator.java
new file mode 100644
index 0000000..9c97997
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/AssertTrueValidator.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.AssertTrue;
+
+/**
+ * Validates that the value passed is true
+ *
+ * @author Alaa Nassef
+ */
+public class AssertTrueValidator implements ConstraintValidator<AssertTrue, Boolean> {
+
+	public void initialize(AssertTrue constraintAnnotation) {
+	}
+
+	public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		return bool == null || bool;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForCharSequence.java
new file mode 100644
index 0000000..ac39852
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForCharSequence.java
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.DecimalMax;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the character sequence (e.g. string) being validated represents a number, and has a value
+ * less than or equal to the maximum value specified.
+ *
+ * @author Alaa Nassef
+ */
+public class DecimalMaxValidatorForCharSequence implements ConstraintValidator<DecimalMax, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private BigDecimal maxValue;
+
+	public void initialize(DecimalMax maxValue) {
+		try {
+			this.maxValue = new BigDecimal( maxValue.value() );
+		}
+		catch ( NumberFormatException nfe ) {
+			throw log.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
+		}
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		try {
+			return new BigDecimal( value.toString() ).compareTo( maxValue ) != 1;
+		}
+		catch ( NumberFormatException nfe ) {
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForNumber.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForNumber.java
new file mode 100644
index 0000000..b856260
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMaxValidatorForNumber.java
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.DecimalMax;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the number being validated is less than or equal to the maximum
+ * value specified.
+ *
+ * @author Hardy Ferentschik
+ */
+public class DecimalMaxValidatorForNumber implements ConstraintValidator<DecimalMax, Number> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private BigDecimal maxValue;
+
+	public void initialize(DecimalMax maxValue) {
+		try {
+			this.maxValue = new BigDecimal( maxValue.value() );
+		}
+		catch ( NumberFormatException nfe ) {
+			throw log.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
+		}
+	}
+
+	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		if ( value instanceof BigDecimal ) {
+			return ( (BigDecimal) value ).compareTo( maxValue ) != 1;
+		}
+		else if ( value instanceof BigInteger ) {
+			return ( new BigDecimal( (BigInteger) value ) ).compareTo( maxValue ) != 1;
+		}
+		else if ( value instanceof Long ) {
+			return ( BigDecimal.valueOf( value.longValue() ).compareTo( maxValue ) ) != 1;
+		}
+		else {
+			return ( BigDecimal.valueOf( value.doubleValue() ).compareTo( maxValue ) ) != 1;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForCharSequence.java
new file mode 100644
index 0000000..fbdcf0b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForCharSequence.java
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.DecimalMin;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinValidatorForCharSequence implements ConstraintValidator<DecimalMin, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+	
+	private BigDecimal minValue;
+
+	public void initialize(DecimalMin minValue) {
+		try {
+			this.minValue = new BigDecimal( minValue.value() );
+		}
+		catch ( NumberFormatException nfe ) {
+			throw log.getInvalidBigDecimalFormatException( minValue.value(), nfe );
+		}
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		try {
+			return new BigDecimal( value.toString() ).compareTo( minValue ) != -1;
+		}
+		catch ( NumberFormatException nfe ) {
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForNumber.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForNumber.java
new file mode 100644
index 0000000..26e3678
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DecimalMinValidatorForNumber.java
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.DecimalMin;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the number being validated is less than or equal to the maximum
+ * value specified.
+ *
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinValidatorForNumber implements ConstraintValidator<DecimalMin, Number> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private BigDecimal minValue;
+
+	public void initialize(DecimalMin minValue) {
+		try {
+			this.minValue = new BigDecimal( minValue.value() );
+		}
+		catch ( NumberFormatException nfe ) {
+			throw log.getInvalidBigDecimalFormatException( minValue.value(), nfe );
+		}
+	}
+
+	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
+
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		if ( value instanceof BigDecimal ) {
+			return ( (BigDecimal) value ).compareTo( minValue ) != -1;
+		}
+		else if ( value instanceof BigInteger ) {
+			return ( new BigDecimal( (BigInteger) value ) ).compareTo( minValue ) != -1;
+		}
+		if ( value instanceof Long ) {
+			return ( BigDecimal.valueOf( value.longValue() ).compareTo( minValue ) ) != -1;
+		}
+		else {
+			return ( BigDecimal.valueOf( value.doubleValue() ).compareTo( minValue ) ) != -1;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForCharSequence.java
new file mode 100644
index 0000000..07bd982
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForCharSequence.java
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Digits;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Validates that the character sequence (e.g. string) being validated consists of digits,
+ * and matches the pattern defined in the constraint.
+ *
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class DigitsValidatorForCharSequence implements ConstraintValidator<Digits, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private int maxIntegerLength;
+	private int maxFractionLength;
+
+	public void initialize(Digits constraintAnnotation) {
+		this.maxIntegerLength = constraintAnnotation.integer();
+		this.maxFractionLength = constraintAnnotation.fraction();
+		validateParameters();
+	}
+
+	public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( charSequence == null ) {
+			return true;
+		}
+
+		BigDecimal bigNum = getBigDecimalValue( charSequence );
+		if ( bigNum == null ) {
+			return false;
+		}
+
+		int integerPartLength = bigNum.precision() - bigNum.scale();
+		int fractionPartLength = bigNum.scale() < 0 ? 0 : bigNum.scale();
+
+		return ( maxIntegerLength >= integerPartLength && maxFractionLength >= fractionPartLength );
+	}
+
+	private BigDecimal getBigDecimalValue(CharSequence charSequence) {
+		BigDecimal bd;
+		try {
+			bd = new BigDecimal( charSequence.toString() );
+		}
+		catch ( NumberFormatException nfe ) {
+			return null;
+		}
+		return bd;
+	}
+
+	private void validateParameters() {
+		if ( maxIntegerLength < 0 ) {
+			throw log.getInvalidLengthForIntegerPartException();
+		}
+		if ( maxFractionLength < 0 ) {
+			throw log.getInvalidLengthForFractionPartException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForNumber.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForNumber.java
new file mode 100644
index 0000000..867c9d8
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/DigitsValidatorForNumber.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Digits;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Validates that the <code>Number</code> being validates matches the pattern
+ * defined in the constraint.
+ *
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class DigitsValidatorForNumber implements ConstraintValidator<Digits, Number> {
+
+	private static final Log log = LoggerFactory.make();
+	
+	private int maxIntegerLength;
+	private int maxFractionLength;
+
+	public void initialize(Digits constraintAnnotation) {
+		this.maxIntegerLength = constraintAnnotation.integer();
+		this.maxFractionLength = constraintAnnotation.fraction();
+		validateParameters();
+	}
+
+	public boolean isValid(Number num, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( num == null ) {
+			return true;
+		}
+
+		BigDecimal bigNum;
+		if ( num instanceof BigDecimal ) {
+			bigNum = ( BigDecimal ) num;
+		}
+		else {
+			bigNum = new BigDecimal( num.toString() ).stripTrailingZeros();
+		}
+
+		int integerPartLength = bigNum.precision() - bigNum.scale();
+		int fractionPartLength = bigNum.scale() < 0 ? 0 : bigNum.scale();
+
+		return ( maxIntegerLength >= integerPartLength && maxFractionLength >= fractionPartLength );
+	}
+
+	private void validateParameters() {
+		if ( maxIntegerLength < 0 ) {
+			throw log.getInvalidLengthForIntegerPartException();
+		}
+		if ( maxFractionLength < 0 ) {
+			throw log.getInvalidLengthForFractionPartException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/EmailValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/EmailValidator.java
new file mode 100644
index 0000000..6a04c82
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/EmailValidator.java
@@ -0,0 +1,86 @@
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.net.IDN;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.Email;
+
+import static java.util.regex.Pattern.CASE_INSENSITIVE;
+
+/**
+ * Checks that a given character sequence (e.g. string) is a well-formed email address.
+ * <p>
+ * The specification of a valid email can be found in
+ * <a href="http://www.faqs.org/rfcs/rfc2822.html">RFC 2822</a>
+ * and one can come up with a regular expression matching <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html">
+ * all valid email addresses</a> as per specification. However, as this
+ * <a href="http://www.regular-expressions.info/email.html">article</a> discusses it is not necessarily practical to
+ * implement a 100% compliant email validator. This implementation is a trade-off trying to match most email while ignoring
+ * for example emails with double quotes or comments.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class EmailValidator implements ConstraintValidator<Email, CharSequence> {
+	private static String ATOM = "[a-z0-9!#$%&'*+/=?^_`{|}~-]";
+	private static String DOMAIN = ATOM + "+(\\." + ATOM + "+)*";
+	private static String IP_DOMAIN = "\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\]";
+
+	/**
+	 * Regular expression for the local part of an email address (everything before '@')
+	 */
+	private Pattern localPattern = java.util.regex.Pattern.compile(
+			ATOM + "+(\\." + ATOM + "+)*", CASE_INSENSITIVE
+	);
+
+	/**
+	 * Regular expression for the domain part of an email address (everything after '@')
+	 */
+	private Pattern domainPattern = java.util.regex.Pattern.compile(
+			DOMAIN + "|" + IP_DOMAIN, CASE_INSENSITIVE
+	);
+
+	public void initialize(Email annotation) {
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext context) {
+		if ( value == null || value.length() == 0 ) {
+			return true;
+		}
+
+		// split email at '@' and consider local and domain part separately
+		String[] emailParts = value.toString().split( "@" );
+		if ( emailParts.length != 2 ) {
+			return false;
+		}
+
+		// if we have a trailing dot in local or domain part we have an invalid email address.
+		// the regular expression match would take care of this, but IDN.toASCII drops trailing the trailing '.'
+		// (imo a bug in the implementation)
+		if ( emailParts[0].endsWith( "." ) || emailParts[1].endsWith( "." ) ) {
+			return false;
+		}
+
+		if ( !matchPart( emailParts[0], localPattern ) ) {
+			return false;
+		}
+
+		return matchPart( emailParts[1], domainPattern );
+	}
+
+	private boolean matchPart(String part, Pattern pattern) {
+		try {
+			part = IDN.toASCII( part );
+		}
+		catch ( IllegalArgumentException e ) {
+			// occurs when the label is too long (>63, even though it should probably be 64 - see http://www.rfc-editor.org/errata_search.php?rfc=3696,
+			// practically that should not be a problem)
+			return false;
+		}
+		Matcher matcher = pattern.matcher( part );
+		return matcher.matches();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForCalendar.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForCalendar.java
new file mode 100644
index 0000000..8743404
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForCalendar.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Calendar;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Future;
+
+/**
+ * Check that the <code>java.util.Calendar</code> passed to be validated is in
+ * the future.
+ *
+ * @author Alaa Nassef
+ */
+public class FutureValidatorForCalendar implements ConstraintValidator<Future, Calendar> {
+
+	public void initialize(Future constraintAnnotation) {
+	}
+
+	public boolean isValid(Calendar cal, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( cal == null ) {
+			return true;
+		}
+		return cal.after( Calendar.getInstance() );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForDate.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForDate.java
new file mode 100644
index 0000000..48a7508
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForDate.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Date;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Future;
+
+/**
+ * Check that the <code>java.util.Date</code> passed to be validated is in the
+ * future.
+ *
+ * @author Alaa Nassef
+ */
+public class FutureValidatorForDate implements ConstraintValidator<Future, Date> {
+
+	public void initialize(Future constraintAnnotation) {
+	}
+
+	public boolean isValid(Date date, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( date == null ) {
+			return true;
+		}
+		return date.after( new Date() );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadableInstant.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadableInstant.java
new file mode 100644
index 0000000..7c793ea
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadableInstant.java
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Future;
+
+import org.joda.time.ReadableInstant;
+
+/**
+ * Check if Joda Time type who implements
+ * {@code import org.joda.time.ReadableInstant}
+ * is in the future.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FutureValidatorForReadableInstant implements ConstraintValidator<Future, ReadableInstant> {
+
+	public void initialize(Future constraintAnnotation) {
+	}
+
+	public boolean isValid(ReadableInstant value, ConstraintValidatorContext context) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		return value.isAfter( null );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadablePartial.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadablePartial.java
new file mode 100644
index 0000000..67670c7
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/FutureValidatorForReadablePartial.java
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Future;
+
+import org.joda.time.ReadablePartial;
+
+/**
+ * Check if Joda Time type who implements
+ * {@code org.joda.time.ReadablePartial}
+ * is in the future.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FutureValidatorForReadablePartial implements ConstraintValidator<Future, ReadablePartial> {
+
+	public void initialize(Future constraintAnnotation) {
+	}
+
+	public boolean isValid(ReadablePartial value, ConstraintValidatorContext context) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		return value.toDateTime( null ).isAfterNow();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/LengthValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/LengthValidator.java
new file mode 100644
index 0000000..6201d8d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/LengthValidator.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the character sequence length is between min and max.
+ *
+ * @author Emmanuel Bernard
+ * @author Gavin King
+ */
+public class LengthValidator implements ConstraintValidator<Length, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private int min;
+	private int max;
+
+	public void initialize(Length parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		if ( value == null ) {
+			return true;
+		}
+		int length = value.length();
+		return length >= min && length <= max;
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMinCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForCharSequence.java
new file mode 100644
index 0000000..25d5858
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForCharSequence.java
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Max;
+
+/**
+ * Check that the character sequence (e.g. string) validated represents a number, and has a value
+ * less than or equal to the maximum value specified.
+ *
+ * @author Alaa Nassef
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class MaxValidatorForCharSequence implements ConstraintValidator<Max, CharSequence> {
+
+	private BigDecimal maxValue;
+
+	public void initialize(Max maxValue) {
+		this.maxValue = BigDecimal.valueOf( maxValue.value() );
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		try {
+			return new BigDecimal( value.toString() ).compareTo( maxValue ) != 1;
+		}
+		catch ( NumberFormatException nfe ) {
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForNumber.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForNumber.java
new file mode 100644
index 0000000..ed6c8ec
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MaxValidatorForNumber.java
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Max;
+
+/**
+ * Check that the number being validated is less than or equal to the maximum
+ * value specified.
+ *
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class MaxValidatorForNumber implements ConstraintValidator<Max, Number> {
+
+	private long maxValue;
+
+	public void initialize(Max maxValue) {
+		this.maxValue = maxValue.value();
+	}
+
+	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		if ( value instanceof BigDecimal ) {
+			return ( ( BigDecimal ) value ).compareTo( BigDecimal.valueOf( maxValue ) ) != 1;
+		}
+		else if ( value instanceof BigInteger ) {
+			return ( ( BigInteger ) value ).compareTo( BigInteger.valueOf( maxValue ) ) != 1;
+		}
+		else {
+			long longValue = value.longValue();
+			return longValue <= maxValue;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForCharSequence.java
new file mode 100644
index 0000000..a0cec21
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForCharSequence.java
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Min;
+
+/**
+ * Check that the character sequence (e.g. string) being validated represents a number, and has a value
+ * more than or equal to the minimum value specified.
+ *
+ * @author Alaa Nassef
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class MinValidatorForCharSequence implements ConstraintValidator<Min, CharSequence> {
+
+	private BigDecimal minValue;
+
+	public void initialize(Min minValue) {
+		this.minValue = BigDecimal.valueOf( minValue.value() );
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		try {
+			return new BigDecimal( value.toString() ).compareTo( minValue ) != -1;
+		}
+		catch ( NumberFormatException nfe ) {
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForNumber.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForNumber.java
new file mode 100644
index 0000000..94d0208
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/MinValidatorForNumber.java
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Min;
+
+/**
+ * Check that the number being validated is greater than or equal to the minimum
+ * value specified.
+ *
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class MinValidatorForNumber implements ConstraintValidator<Min, Number> {
+
+	private long minValue;
+
+	public void initialize(Min minValue) {
+		this.minValue = minValue.value();
+	}
+
+	public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+		if ( value instanceof BigDecimal ) {
+			return ( ( BigDecimal ) value ).compareTo( BigDecimal.valueOf( minValue ) ) != -1;
+		}
+		else if ( value instanceof BigInteger ) {
+			return ( ( BigInteger ) value ).compareTo( BigInteger.valueOf( minValue ) ) != -1;
+		}
+		else {
+			long longValue = value.longValue();
+			return longValue >= minValue;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ModCheckValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ModCheckValidator.java
new file mode 100644
index 0000000..06303ec
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ModCheckValidator.java
@@ -0,0 +1,172 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.ModCheck.ModType;
+import org.hibernate.validator.internal.util.ModUtil;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Mod check validator for MOD10 and MOD11 algorithms
+ *
+ * http://en.wikipedia.org/wiki/Luhn_algorithm
+ * http://en.wikipedia.org/wiki/Check_digit
+ *
+ * @author George Gastaldi
+ * @author Hardy Ferentschik
+ */
+public class ModCheckValidator implements ConstraintValidator<ModCheck, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private static final String NUMBERS_ONLY_REGEXP = "[^0-9]";
+	private static final int DEC_RADIX = 10;
+
+	/**
+	 * Multiplier used by the mod algorithms
+	 */
+	private int multiplier;
+
+	/**
+	 * The start index for the checksum calculation
+	 */
+	private int startIndex;
+
+	/**
+	 * The end index for the checksum calculation
+	 */
+	private int endIndex;
+
+	/**
+	 * The index of the checksum digit
+	 */
+	private int checkDigitIndex;
+
+	/**
+	 * The type of checksum algorithm
+	 */
+	private ModType modType;
+
+	private boolean ignoreNonDigitCharacters;
+
+	public void initialize(ModCheck constraintAnnotation) {
+		this.modType = constraintAnnotation.modType();
+		this.multiplier = constraintAnnotation.multiplier();
+		this.startIndex = constraintAnnotation.startIndex();
+		this.endIndex = constraintAnnotation.endIndex();
+		this.checkDigitIndex = constraintAnnotation.checkDigitPosition();
+		this.ignoreNonDigitCharacters = constraintAnnotation.ignoreNonDigitCharacters();
+
+		if ( this.startIndex < 0 ) {
+			throw log.getStartIndexCannotBeNegativeException( this.startIndex );
+		}
+
+		if ( this.endIndex < 0 ) {
+			throw log.getEndIndexCannotBeNegativeException( this.endIndex );
+		}
+
+		if ( this.startIndex > this.endIndex ) {
+			throw log.getInvalidRangeException( this.startIndex, this.endIndex );
+		}
+
+		if ( checkDigitIndex > 0 && startIndex <= checkDigitIndex && endIndex > checkDigitIndex ) {
+			throw log.getInvalidCheckDigitException( this.startIndex, this.endIndex );
+		}
+	}
+
+	public boolean isValid(final CharSequence value, final ConstraintValidatorContext context) {
+		if ( value == null ) {
+			return true;
+		}
+
+		String valueAsString = value.toString();
+		if ( ignoreNonDigitCharacters ) {
+			valueAsString = valueAsString.replaceAll( NUMBERS_ONLY_REGEXP, "" );
+		}
+
+		try {
+			valueAsString = extractVerificationString( valueAsString );
+		}
+		catch ( IndexOutOfBoundsException e ) {
+			return false;
+		}
+
+		List<Integer> digits;
+		try {
+			digits = extractDigits( valueAsString );
+		}
+		catch ( NumberFormatException e ) {
+			return false;
+		}
+
+		boolean isValid;
+
+		if ( modType.equals( ModType.MOD10 ) ) {
+			isValid = ModUtil.passesMod10Test( digits, multiplier );
+		}
+		else {
+			isValid = ModUtil.passesMod11Test( digits, multiplier );
+		}
+		return isValid;
+	}
+
+	private String extractVerificationString(String value) throws IndexOutOfBoundsException {
+		// the whole string should be verified (check digit is implicit)
+		if ( endIndex == Integer.MAX_VALUE ) {
+			return value;
+		}
+
+		String verificationString = value.substring( startIndex, endIndex );
+
+		// append the check digit of explicitly specified
+		if ( checkDigitIndex > 0 ) {
+			verificationString = verificationString + value.charAt( checkDigitIndex );
+		}
+
+		return verificationString;
+	}
+
+	/**
+	 * Parses the {@link String} value as a {@link List} of {@link Integer} objects
+	 *
+	 * @param value the input string to be parsed
+	 *
+	 * @return List of {@code Integer} objects.
+	 *
+	 * @throws NumberFormatException in case ant of the characters is not a digit
+	 */
+	private List<Integer> extractDigits(final String value) throws NumberFormatException {
+		List<Integer> digits = new ArrayList<Integer>( value.length() );
+		char[] chars = value.toCharArray();
+		for ( char c : chars ) {
+			if ( Character.isDigit( c ) ) {
+				digits.add( Character.digit( c, DEC_RADIX ) );
+			}
+			else {
+				throw log.getCharacterIsNotADigitException( c );
+			}
+		}
+		return digits;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotBlankValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotBlankValidator.java
new file mode 100644
index 0000000..1782e34
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotBlankValidator.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.NotBlank;
+
+/**
+ * Check that a character sequence's (e.g. string) trimmed length is not empty.
+ *
+ * @author Hardy Ferentschik
+ */
+public class NotBlankValidator implements ConstraintValidator<NotBlank, CharSequence> {
+
+	public void initialize(NotBlank annotation) {
+	}
+
+	/**
+	 * Checks that the trimmed string is not empty.
+	 *
+	 * @param charSequence The character sequence to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the string is <code>null</code> or the length of <code>charSequence</code> between the specified
+	 *         <code>min</code> and <code>max</code> values (inclusive), <code>false</code> otherwise.
+	 */
+	public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext) {
+		if ( charSequence == null ) {
+			return true;
+		}
+
+		return charSequence.toString().trim().length() > 0;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotNullValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotNullValidator.java
new file mode 100644
index 0000000..1741b8a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NotNullValidator.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.NotNull;
+
+/**
+ * Validate that the object is not <code>null</code>.
+ *
+ * @author Emmanuel Bernard
+ */
+public class NotNullValidator implements ConstraintValidator<NotNull, Object> {
+
+	public void initialize(NotNull parameters) {
+	}
+
+	public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
+		return object != null;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NullValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NullValidator.java
new file mode 100644
index 0000000..93c728b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/NullValidator.java
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Null;
+
+/**
+ * Validate that the object is <code>null</code>
+ *
+ * @author Alaa Nassef
+ */
+public class NullValidator implements ConstraintValidator<Null, Object> {
+
+	public void initialize(Null constraintAnnotation) {
+	}
+
+	public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
+		return object == null;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForCalendar.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForCalendar.java
new file mode 100644
index 0000000..bbdfb6b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForCalendar.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Calendar;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Past;
+
+/**
+ * Check that the <code>java.util.Calendar</code> passed to be validated is in the
+ * past.
+ *
+ * @author Alaa Nassef
+ */
+public class PastValidatorForCalendar implements ConstraintValidator<Past, Calendar> {
+
+	public void initialize(Past constraintAnnotation) {
+	}
+
+	public boolean isValid(Calendar cal, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( cal == null ) {
+			return true;
+		}
+		return cal.before( Calendar.getInstance() );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForDate.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForDate.java
new file mode 100644
index 0000000..1438488
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForDate.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Date;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Past;
+
+/**
+ * Check that the <code>java.util.Date</code> passed to be validated is in the
+ * past.
+ *
+ * @author Alaa Nassef
+ */
+public class PastValidatorForDate implements ConstraintValidator<Past, Date> {
+
+	public void initialize(Past constraintAnnotation) {
+	}
+
+	public boolean isValid(Date date, ConstraintValidatorContext constraintValidatorContext) {
+		//null values are valid
+		if ( date == null ) {
+			return true;
+		}
+		return date.before( new Date() );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadableInstant.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadableInstant.java
new file mode 100644
index 0000000..ce3ff9c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadableInstant.java
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Past;
+
+import org.joda.time.ReadableInstant;
+
+/**
+ * Check if Joda Time type who implements
+ * {@code org.joda.time.ReadableInstant}
+ * is in the past.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class PastValidatorForReadableInstant implements ConstraintValidator<Past, ReadableInstant> {
+
+	public void initialize(Past constraintAnnotation) {
+	}
+
+	public boolean isValid(ReadableInstant value, ConstraintValidatorContext context) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		return value.isBefore( null );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadablePartial.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadablePartial.java
new file mode 100644
index 0000000..f6f818e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PastValidatorForReadablePartial.java
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Past;
+
+import org.joda.time.ReadablePartial;
+
+/**
+ * Check if Joda Time type who implements
+ * {@code org.joda.time.ReadablePartial}
+ * is in the past.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class PastValidatorForReadablePartial implements ConstraintValidator<Past, ReadablePartial> {
+
+	public void initialize(Past constraintAnnotation) {
+	}
+
+	public boolean isValid(ReadablePartial value, ConstraintValidatorContext context) {
+		//null values are valid
+		if ( value == null ) {
+			return true;
+		}
+
+		return value.toDateTime( null ).isBeforeNow();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PatternValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PatternValidator.java
new file mode 100644
index 0000000..b7264ae
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/PatternValidator.java
@@ -0,0 +1,59 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.regex.Matcher;
+import java.util.regex.PatternSyntaxException;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PatternValidator implements ConstraintValidator<Pattern, CharSequence> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private java.util.regex.Pattern pattern;
+
+	public void initialize(Pattern parameters) {
+		Pattern.Flag flags[] = parameters.flags();
+		int intFlag = 0;
+		for ( Pattern.Flag flag : flags ) {
+			intFlag = intFlag | flag.getValue();
+		}
+
+		try {
+			pattern = java.util.regex.Pattern.compile( parameters.regexp(), intFlag );
+		}
+		catch ( PatternSyntaxException e ) {
+			throw log.getInvalidRegularExpressionException( e );
+		}
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		if ( value == null ) {
+			return true;
+		}
+		Matcher m = pattern.matcher( value );
+		return m.matches();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SafeHtmlValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SafeHtmlValidator.java
new file mode 100644
index 0000000..854eb57
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SafeHtmlValidator.java
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.jsoup.Jsoup;
+import org.jsoup.safety.Whitelist;
+
+import org.hibernate.validator.constraints.SafeHtml;
+
+/**
+ * Validate that the string does not contain malicious code.
+ *
+ * It uses <a href="http://www.jsoup.org">JSoup</a> as the underlying parser/sanitizer library.
+ *
+ * @author George Gastaldi
+ */
+public class SafeHtmlValidator implements ConstraintValidator<SafeHtml, CharSequence> {
+	private Whitelist whitelist;
+
+	public void initialize(SafeHtml constraintAnn) {
+		switch ( constraintAnn.whitelistType() ) {
+			case BASIC:
+				whitelist = Whitelist.basic();
+				break;
+			case BASIC_WITH_IMAGES:
+				whitelist = Whitelist.basicWithImages();
+				break;
+			case NONE:
+				whitelist = Whitelist.none();
+				break;
+			case RELAXED:
+				whitelist = Whitelist.relaxed();
+				break;
+			case SIMPLE_TEXT:
+				whitelist = Whitelist.simpleText();
+				break;
+		}
+		whitelist.addTags( constraintAnn.additionalTags() );
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext context) {
+		if ( value == null ) {
+			return true;
+		}
+		return Jsoup.isValid( value.toString(), whitelist );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ScriptAssertValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ScriptAssertValidator.java
new file mode 100644
index 0000000..f3a6904
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/ScriptAssertValidator.java
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.script.ScriptException;
+import javax.validation.ConstraintDeclarationException;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.internal.util.scriptengine.ScriptEvaluator;
+import org.hibernate.validator.internal.util.scriptengine.ScriptEvaluatorFactory;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Validator for the {@link ScriptAssert} constraint annotation.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ScriptAssertValidator implements ConstraintValidator<ScriptAssert, Object> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private String script;
+	private String languageName;
+	private String alias;
+
+	public void initialize(ScriptAssert constraintAnnotation) {
+		validateParameters( constraintAnnotation );
+
+		this.script = constraintAnnotation.script();
+		this.languageName = constraintAnnotation.lang();
+		this.alias = constraintAnnotation.alias();
+	}
+
+	public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {
+
+		Object evaluationResult;
+		ScriptEvaluator scriptEvaluator;
+
+		try {
+			ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
+			scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
+		}
+		catch ( ScriptException e ) {
+			throw new ConstraintDeclarationException( e );
+		}
+
+		try {
+			evaluationResult = scriptEvaluator.evaluate( script, value, alias );
+		}
+		catch ( ScriptException e ) {
+			throw log.getErrorDuringScriptExecutionException( script, e );
+		}
+
+		if ( evaluationResult == null ) {
+			throw log.getScriptMustReturnTrueOrFalseException( script );
+		}
+		if ( !( evaluationResult instanceof Boolean ) ) {
+			throw log.getScriptMustReturnTrueOrFalseException(
+					script,
+					evaluationResult,
+					evaluationResult.getClass().getCanonicalName()
+			);
+		}
+
+		return Boolean.TRUE.equals( evaluationResult );
+	}
+
+	private void validateParameters(ScriptAssert constraintAnnotation) {
+		Contracts.assertNotEmpty( constraintAnnotation.script(), MESSAGES.parameterMustNotBeEmpty( "script" ) );
+		Contracts.assertNotEmpty( constraintAnnotation.lang(), MESSAGES.parameterMustNotBeEmpty( "lang" ) );
+		Contracts.assertNotEmpty( constraintAnnotation.alias(), MESSAGES.parameterMustNotBeEmpty( "alias" ) );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArray.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArray.java
new file mode 100644
index 0000000..de1f188
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArray.java
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the length of an array is between <i>min</i> and <i>max</i>
+ *
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForArray implements ConstraintValidator<Size, Object[]> {
+	
+	private static final Log log = LoggerFactory.make();
+
+	private int min;
+	private int max;
+
+	public void initialize(Size parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(Object[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMinCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfBoolean.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfBoolean.java
new file mode 100644
index 0000000..7e57cea
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfBoolean.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfBoolean extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, boolean[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(boolean[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfByte.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfByte.java
new file mode 100644
index 0000000..eb9322b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfByte.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForArraysOfByte extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, byte[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(byte[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfChar.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfChar.java
new file mode 100644
index 0000000..1804e1d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfChar.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForArraysOfChar extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, char[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(char[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfDouble.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfDouble.java
new file mode 100644
index 0000000..3b06544
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfDouble.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfDouble extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, double[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(double[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfFloat.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfFloat.java
new file mode 100644
index 0000000..78d6af2
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfFloat.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfFloat extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, float[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(float[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfInt.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfInt.java
new file mode 100644
index 0000000..eec3977
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfInt.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfInt extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, int[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(int[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfLong.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfLong.java
new file mode 100644
index 0000000..903da87
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfLong.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfLong extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, long[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(long[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfPrimitives.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfPrimitives.java
new file mode 100644
index 0000000..9e7e3df
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfPrimitives.java
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the length of an array is between <i>min</i> and <i>max</i>
+ *
+ * @author Hardy Ferentschik
+ */
+public abstract class SizeValidatorForArraysOfPrimitives {
+	
+	private  static final Log log = LoggerFactory.make();
+
+	protected int min;
+	protected int max;
+
+	public void initialize(Size parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMinCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfShort.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfShort.java
new file mode 100644
index 0000000..b3dcc1d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForArraysOfShort.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+*/
+public class SizeValidatorForArraysOfShort extends SizeValidatorForArraysOfPrimitives
+		implements ConstraintValidator<Size, short[]> {
+
+	/**
+	 * Checks the number of entries in an array.
+	 *
+	 * @param array The array to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the array is <code>null</code> or the number of entries in
+	 *         <code>array</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(short[] array, ConstraintValidatorContext constraintValidatorContext) {
+		if ( array == null ) {
+			return true;
+		}
+		int length = Array.getLength( array );
+		return length >= min && length <= max;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCharSequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCharSequence.java
new file mode 100644
index 0000000..11c180d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCharSequence.java
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that the length of a character sequence is between min and max.
+ *
+ * @author Emmanuel Bernard
+ * @author Gavin King
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForCharSequence implements ConstraintValidator<Size, CharSequence> {
+	
+	private static final Log log = LoggerFactory.make();
+	
+	private int min;
+	private int max;
+
+	public void initialize(Size parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	/**
+	 * Checks the length of the specified character sequence (e.g. string).
+	 *
+	 * @param charSequence The character sequence to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the string is <code>null</code> or the length of <code>charSequence</code> between the specified
+	 *         <code>min</code> and <code>max</code> values (inclusive), <code>false</code> otherwise.
+	 */
+	public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext) {
+		if ( charSequence == null ) {
+			return true;
+		}
+		int length = charSequence.length();
+		return length >= min && length <= max;
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMinCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCollection.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCollection.java
new file mode 100644
index 0000000..2a1256c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForCollection.java
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Collection;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that a string's length is between min and max.
+ *
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForCollection implements ConstraintValidator<Size, Collection<?>> {
+	
+	private  static final Log log = LoggerFactory.make();
+	
+	private int min;
+	private int max;
+
+	public void initialize(Size parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	/**
+	 * Checks the number of entries in a map.
+	 *
+	 * @param collection The collection to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the collection is <code>null</code> or the number of entries in
+	 *         <code>collection</code> is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(Collection<?> collection, ConstraintValidatorContext constraintValidatorContext) {
+		if ( collection == null ) {
+			return true;
+		}
+		int length = collection.size();
+		return length >= min && length <= max;
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMinCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForMap.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForMap.java
new file mode 100644
index 0000000..de398d2
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/SizeValidatorForMap.java
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.util.Map;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Check that a string's length is between min and max.
+ *
+ * @author Hardy Ferentschik
+ */
+public class SizeValidatorForMap implements ConstraintValidator<Size, Map<?, ?>> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private int min;
+	private int max;
+
+	public void initialize(Size parameters) {
+		min = parameters.min();
+		max = parameters.max();
+		validateParameters();
+	}
+
+	/**
+	 * Checks the number of entries in a map.
+	 *
+	 * @param map The map to validate.
+	 * @param constraintValidatorContext context in which the constraint is evaluated.
+	 *
+	 * @return Returns <code>true</code> if the map is <code>null</code> or the number of entries in <code>map</code>
+	 *         is between the specified <code>min</code> and <code>max</code> values (inclusive),
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isValid(Map<?, ?> map, ConstraintValidatorContext constraintValidatorContext) {
+		if ( map == null ) {
+			return true;
+		}
+		int size = map.size();
+		return size >= min && size <= max;
+	}
+
+	private void validateParameters() {
+		if ( min < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < 0 ) {
+			throw log.getMaxCannotBeNegativeException();
+		}
+		if ( max < min ) {
+			throw log.getLengthCannotBeNegativeException();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/URLValidator.java b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/URLValidator.java
new file mode 100644
index 0000000..81c2f71
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/URLValidator.java
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.constraintvalidators;
+
+import java.net.MalformedURLException;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+import org.hibernate.validator.constraints.URL;
+
+/**
+ * Validate that the character sequence (e.g. string) is a valid URL.
+ *
+ * @author Hardy Ferentschik
+ */
+public class URLValidator implements ConstraintValidator<URL, CharSequence> {
+	private String protocol;
+	private String host;
+	private int port;
+
+	public void initialize(URL url) {
+		this.protocol = url.protocol();
+		this.host = url.host();
+		this.port = url.port();
+	}
+
+	public boolean isValid(CharSequence value, ConstraintValidatorContext constraintValidatorContext) {
+		if ( value == null || value.length() == 0 ) {
+			return true;
+		}
+
+		java.net.URL url;
+		try {
+			url = new java.net.URL( value.toString() );
+		}
+		catch ( MalformedURLException e ) {
+			return false;
+		}
+
+		if ( protocol != null && protocol.length() > 0 && !url.getProtocol().equals( protocol ) ) {
+			return false;
+		}
+
+		if ( host != null && host.length() > 0 && !url.getHost().equals( host ) ) {
+			return false;
+		}
+
+		if ( port != -1 && url.getPort() != port ) {
+			return false;
+		}
+
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/package.html
new file mode 100644
index 0000000..cfda056
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Implementations of the Bean Validation built-in as well as
+Hibernate Validator specific constraints.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConfigurationImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConfigurationImpl.java
new file mode 100644
index 0000000..69a165a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConfigurationImpl.java
@@ -0,0 +1,345 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.Set;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidationProviderResolver;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.BootstrapState;
+import javax.validation.spi.ConfigurationState;
+import javax.validation.spi.ValidationProvider;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver;
+import org.hibernate.validator.internal.util.CollectionHelper;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.Version;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.internal.xml.ValidationBootstrapParameters;
+import org.hibernate.validator.internal.xml.ValidationXmlParser;
+import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
+import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
+import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Hibernate specific {@code Configuration} implementation.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ConfigurationImpl implements HibernateValidatorConfiguration, ConfigurationState {
+
+	static {
+		Version.touch();
+	}
+
+	private static final Log log = LoggerFactory.make();
+
+	private final ResourceBundleLocator defaultResourceBundleLocator = new PlatformResourceBundleLocator(
+			ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES
+	);
+	private final MessageInterpolator defaultMessageInterpolator = new ResourceBundleMessageInterpolator(
+			defaultResourceBundleLocator
+	);
+	private final TraversableResolver defaultTraversableResolver = new DefaultTraversableResolver();
+	private final ConstraintValidatorFactory defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl();
+	private final ValidationProviderResolver providerResolver;
+
+	private ValidationBootstrapParameters validationBootstrapParameters;
+	private boolean ignoreXmlConfiguration = false;
+	private Set<InputStream> configurationStreams = CollectionHelper.newHashSet();
+	private Set<ConstraintMapping> programmaticMappings = CollectionHelper.newHashSet();
+	private boolean failFast;
+
+	public ConfigurationImpl(BootstrapState state) {
+		if ( state.getValidationProviderResolver() == null ) {
+			this.providerResolver = state.getDefaultValidationProviderResolver();
+		}
+		else {
+			this.providerResolver = state.getValidationProviderResolver();
+		}
+		validationBootstrapParameters = new ValidationBootstrapParameters();
+	}
+
+	public ConfigurationImpl(ValidationProvider<?> provider) {
+		if ( provider == null ) {
+			throw log.getInconsistentConfigurationException();
+		}
+		this.providerResolver = null;
+		validationBootstrapParameters = new ValidationBootstrapParameters();
+		validationBootstrapParameters.setProvider( provider );
+	}
+
+	public final HibernateValidatorConfiguration ignoreXmlConfiguration() {
+		ignoreXmlConfiguration = true;
+		return this;
+	}
+
+	public final ConfigurationImpl messageInterpolator(MessageInterpolator interpolator) {
+		if ( log.isDebugEnabled() ) {
+			if ( interpolator != null ) {
+				log.debug( "Setting custom MessageInterpolator of type " + interpolator.getClass().getName() );
+			}
+		}
+		this.validationBootstrapParameters.setMessageInterpolator( interpolator );
+		return this;
+	}
+
+	public final ConfigurationImpl traversableResolver(TraversableResolver resolver) {
+		if ( log.isDebugEnabled() ) {
+			if ( resolver != null ) {
+				log.debug( "Setting custom TraversableResolver of type " + resolver.getClass().getName() );
+			}
+		}
+		this.validationBootstrapParameters.setTraversableResolver( resolver );
+		return this;
+	}
+
+	public final ConfigurationImpl constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory) {
+		if ( log.isDebugEnabled() ) {
+			if ( constraintValidatorFactory != null ) {
+				log.debug(
+						"Setting custom ConstraintValidatorFactory of type " + constraintValidatorFactory.getClass()
+								.getName()
+				);
+			}
+		}
+		this.validationBootstrapParameters.setConstraintValidatorFactory( constraintValidatorFactory );
+		return this;
+	}
+
+	public final HibernateValidatorConfiguration addMapping(InputStream stream) {
+		Contracts.assertNotNull( stream, MESSAGES.parameterMustNotBeNull( "stream" ) );
+
+		validationBootstrapParameters.addMapping( stream.markSupported() ? stream : new BufferedInputStream( stream ) );
+		return this;
+	}
+
+	public final HibernateValidatorConfiguration failFast(boolean failFast) {
+		this.failFast = failFast;
+		return this;
+	}
+
+	@SuppressWarnings("deprecation")
+	public final ConstraintMapping createConstraintMapping() {
+		//TODO: create internal implementation and return this
+		return new ConstraintMapping();
+	}
+
+	public final HibernateValidatorConfiguration addMapping(ConstraintMapping mapping) {
+		Contracts.assertNotNull( mapping, MESSAGES.parameterMustNotBeNull( "mapping" ) );
+
+		this.programmaticMappings.add( mapping );
+		return this;
+	}
+
+	public final HibernateValidatorConfiguration addProperty(String name, String value) {
+		if ( value != null ) {
+			validationBootstrapParameters.addConfigProperty( name, value );
+		}
+		return this;
+	}
+
+	public final ValidatorFactory buildValidatorFactory() {
+		parseValidationXml();
+		ValidatorFactory factory = null;
+		try {
+			if ( isSpecificProvider() ) {
+				factory = validationBootstrapParameters.getProvider().buildValidatorFactory( this );
+			}
+			else {
+				final Class<? extends ValidationProvider<?>> providerClass = validationBootstrapParameters.getProviderClass();
+				if ( providerClass != null ) {
+					for ( ValidationProvider<?> provider : providerResolver.getValidationProviders() ) {
+						if ( providerClass.isAssignableFrom( provider.getClass() ) ) {
+							factory = provider.buildValidatorFactory( this );
+							break;
+						}
+					}
+					if ( factory == null ) {
+						throw log.getUnableToFindProviderException( providerClass );
+					}
+				}
+				else {
+					List<ValidationProvider<?>> providers = providerResolver.getValidationProviders();
+					assert providers.size() != 0; // I run therefore I am
+					factory = providers.get( 0 ).buildValidatorFactory( this );
+				}
+			}
+		}
+		finally {
+			// close all input streams opened by this configuration
+			for ( InputStream in : configurationStreams ) {
+				try {
+					in.close();
+				}
+				catch ( IOException io ) {
+					log.unableToCloseInputStream();
+				}
+			}
+		}
+
+		return factory;
+	}
+
+	public final boolean isIgnoreXmlConfiguration() {
+		return ignoreXmlConfiguration;
+	}
+
+	public final MessageInterpolator getMessageInterpolator() {
+		return validationBootstrapParameters.getMessageInterpolator();
+	}
+
+	public final Set<InputStream> getMappingStreams() {
+		return validationBootstrapParameters.getMappings();
+	}
+
+	public final boolean getFailFast() {
+		return failFast;
+	}
+
+	public final ConstraintValidatorFactory getConstraintValidatorFactory() {
+		return validationBootstrapParameters.getConstraintValidatorFactory();
+	}
+
+	public final TraversableResolver getTraversableResolver() {
+		return validationBootstrapParameters.getTraversableResolver();
+	}
+
+	public final Map<String, String> getProperties() {
+		return validationBootstrapParameters.getConfigProperties();
+	}
+
+	public final MessageInterpolator getDefaultMessageInterpolator() {
+		return defaultMessageInterpolator;
+	}
+
+	public final TraversableResolver getDefaultTraversableResolver() {
+		return defaultTraversableResolver;
+	}
+
+	public final ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
+		return defaultConstraintValidatorFactory;
+	}
+
+	@SuppressWarnings("deprecation")
+	public final org.hibernate.validator.resourceloading.ResourceBundleLocator getDefaultResourceBundleLocator() {
+		return new Adapter( defaultResourceBundleLocator );
+	}
+
+	public final Set<ConstraintMapping> getProgrammaticMappings() {
+		return programmaticMappings;
+	}
+
+	private boolean isSpecificProvider() {
+		return validationBootstrapParameters.getProvider() != null;
+	}
+
+	/**
+	 * Tries to check whether a validation.xml file exists and parses it using JAXB
+	 */
+	private void parseValidationXml() {
+		if ( ignoreXmlConfiguration ) {
+			log.ignoringXmlConfiguration();
+
+			// make sure we use the defaults in case they haven't been provided yet
+			if ( validationBootstrapParameters.getMessageInterpolator() == null ) {
+				validationBootstrapParameters.setMessageInterpolator( defaultMessageInterpolator );
+			}
+			if ( validationBootstrapParameters.getTraversableResolver() == null ) {
+				validationBootstrapParameters.setTraversableResolver( defaultTraversableResolver );
+			}
+			if ( validationBootstrapParameters.getConstraintValidatorFactory() == null ) {
+				validationBootstrapParameters.setConstraintValidatorFactory( defaultConstraintValidatorFactory );
+			}
+		}
+		else {
+			ValidationBootstrapParameters xmlParameters = new ValidationXmlParser().parseValidationXml();
+			applyXmlSettings( xmlParameters );
+		}
+	}
+
+	private void applyXmlSettings(ValidationBootstrapParameters xmlParameters) {
+		validationBootstrapParameters.setProviderClass( xmlParameters.getProviderClass() );
+
+		if ( validationBootstrapParameters.getMessageInterpolator() == null ) {
+			if ( xmlParameters.getMessageInterpolator() != null ) {
+				validationBootstrapParameters.setMessageInterpolator( xmlParameters.getMessageInterpolator() );
+			}
+			else {
+				validationBootstrapParameters.setMessageInterpolator( defaultMessageInterpolator );
+			}
+		}
+
+		if ( validationBootstrapParameters.getTraversableResolver() == null ) {
+			if ( xmlParameters.getTraversableResolver() != null ) {
+				validationBootstrapParameters.setTraversableResolver( xmlParameters.getTraversableResolver() );
+			}
+			else {
+				validationBootstrapParameters.setTraversableResolver( defaultTraversableResolver );
+			}
+		}
+
+		if ( validationBootstrapParameters.getConstraintValidatorFactory() == null ) {
+			if ( xmlParameters.getConstraintValidatorFactory() != null ) {
+				validationBootstrapParameters.setConstraintValidatorFactory( xmlParameters.getConstraintValidatorFactory() );
+			}
+			else {
+				validationBootstrapParameters.setConstraintValidatorFactory( defaultConstraintValidatorFactory );
+			}
+		}
+
+		validationBootstrapParameters.addAllMappings( xmlParameters.getMappings() );
+		configurationStreams.addAll( xmlParameters.getMappings() );
+
+		for ( Map.Entry<String, String> entry : xmlParameters.getConfigProperties().entrySet() ) {
+			if ( validationBootstrapParameters.getConfigProperties().get( entry.getKey() ) == null ) {
+				validationBootstrapParameters.addConfigProperty( entry.getKey(), entry.getValue() );
+			}
+		}
+	}
+
+	@SuppressWarnings("deprecation")
+	private static class Adapter implements org.hibernate.validator.resourceloading.ResourceBundleLocator {
+
+		private final org.hibernate.validator.spi.resourceloading.ResourceBundleLocator adaptee;
+
+		public Adapter(org.hibernate.validator.spi.resourceloading.ResourceBundleLocator adaptee) {
+			this.adaptee = adaptee;
+		}
+
+		public ResourceBundle getResourceBundle(Locale locale) {
+			return adaptee.getResourceBundle( locale );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintTree.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintTree.java
new file mode 100644
index 0000000..7fceb41
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintTree.java
@@ -0,0 +1,544 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.engine;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.constraints.CompositionType;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.util.CollectionHelper;
+import org.hibernate.validator.internal.util.ConcurrentReferenceHashMap;
+import org.hibernate.validator.internal.util.TypeHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.constraints.CompositionType.ALL_FALSE;
+import static org.hibernate.validator.constraints.CompositionType.AND;
+import static org.hibernate.validator.constraints.CompositionType.OR;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.ConcurrentReferenceHashMap.ReferenceType.SOFT;
+
+/**
+ * Due to constraint composition a single constraint annotation can lead to a whole constraint tree being validated.
+ * This class encapsulates such a tree.
+ *
+ * @author Hardy Ferentschik
+ * @author Federico Mancini
+ * @author Dag Hovland
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2012 SERLI
+ */
+public class ConstraintTree<A extends Annotation> {
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * The default initial capacity for this cache.
+	 */
+	static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+	private final ConstraintTree<?> parent;
+	private final List<ConstraintTree<?>> children;
+
+	/**
+	 * The constraint descriptor for the constraint represented by this constraint tree.
+	 */
+	private final ConstraintDescriptorImpl<A> descriptor;
+
+	/**
+	 * Cache for initialized {@code ConstraintValidator} instance per {@code ConstraintValidatorFactory} and validated type.
+	 * This is necessary, because via {@code aValidatorFactory.usingContext().constraintValidatorFactory(otherCVF)} it
+	 * is possible to create a {@code Validator} instance which is using a different constraint validator factory.
+	 * <p>
+	 * Also note, that {@code ConstraintTree} is part of the {@code BeanMetaData}
+	 * which is cached on {@code ValidatorFactory} level. In most cases there is only one {@code ConstraintValidator}
+	 * instance per {@code ConstraintTree}, unless {@code aValidatorFactory.usingContext().constraintValidatorFactory(otherCVF)} is
+	 * used or the user classes are getting reloaded.
+	 * </p>
+	 */
+	private final ConcurrentReferenceHashMap<ConstraintValidatorCacheKey, ConstraintValidator<A, ?>> constraintValidatorCache;
+
+	public ConstraintTree(ConstraintDescriptorImpl<A> descriptor) {
+		this( descriptor, null );
+	}
+
+	private ConstraintTree(ConstraintDescriptorImpl<A> descriptor, ConstraintTree<?> parent) {
+		this.parent = parent;
+		this.descriptor = descriptor;
+		this.constraintValidatorCache =
+				new ConcurrentReferenceHashMap<ConstraintValidatorCacheKey, ConstraintValidator<A, ?>>(
+						DEFAULT_INITIAL_CAPACITY,
+						SOFT,
+						SOFT
+				);
+
+		final Set<ConstraintDescriptorImpl<?>> composingConstraints = newHashSet();
+		for ( ConstraintDescriptor<?> composingConstraint : descriptor.getComposingConstraints() ) {
+			composingConstraints.add( (ConstraintDescriptorImpl<?>) composingConstraint );
+		}
+
+		children = new ArrayList<ConstraintTree<?>>( composingConstraints.size() );
+
+		for ( ConstraintDescriptorImpl<?> composingDescriptor : composingConstraints ) {
+			ConstraintTree<?> treeNode = createConstraintTree( composingDescriptor );
+			children.add( treeNode );
+		}
+	}
+
+	private <U extends Annotation> ConstraintTree<U> createConstraintTree(ConstraintDescriptorImpl<U> composingDescriptor) {
+		return new ConstraintTree<U>( composingDescriptor, this );
+	}
+
+	public final List<ConstraintTree<?>> getChildren() {
+		return children;
+	}
+
+	public final ConstraintDescriptorImpl<A> getDescriptor() {
+		return descriptor;
+	}
+
+	public final <T, U, V, E extends ConstraintViolation<T>> boolean validateConstraints(ValidationContext<T, E> executionContext, ValueContext<U, V> valueContext) {
+		Set<E> constraintViolations = CollectionHelper.newHashSet();
+		validateConstraints( executionContext, valueContext, constraintViolations );
+		if ( !constraintViolations.isEmpty() ) {
+			executionContext.addConstraintFailures( constraintViolations );
+			return false;
+		}
+		return true;
+	}
+
+	private <T, E extends ConstraintViolation<T>> boolean mainConstraintNeedsEvaluation(ValidationContext<T, E> executionContext, Set<E> constraintViolations) {
+		// there is no validator for the main constraints
+		if ( descriptor.getConstraintValidatorClasses().isEmpty() ) {
+			return false;
+		}
+
+		// report as single violation and there is already a violation
+		if ( descriptor.isReportAsSingleViolation() && descriptor.getCompositionType() == AND && !constraintViolations.isEmpty() ) {
+			return false;
+		}
+
+		// explicit fail fast mode
+		if ( executionContext.isFailFastModeEnabled() && !constraintViolations.isEmpty() ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	private <T, U, V, E extends ConstraintViolation<T>> void validateConstraints(ValidationContext<T, E> executionContext,
+																				 ValueContext<U, V> valueContext,
+																				 Set<E> constraintViolations) {
+		CompositionResult compositionResult = validateComposingConstraints(
+				executionContext, valueContext, constraintViolations
+		);
+
+		Set<E> localViolationList = CollectionHelper.newHashSet();
+
+		// After all children are validated the actual ConstraintValidator of the constraint itself is executed (provided
+		// there is one)
+		if ( mainConstraintNeedsEvaluation( executionContext, constraintViolations ) ) {
+
+			if ( log.isTraceEnabled() ) {
+				log.tracef(
+						"Validating value %s against constraint defined by %s.",
+						valueContext.getCurrentValidatedValue(),
+						descriptor
+				);
+			}
+			ConstraintValidator<A, V> validator = getInitializedValidator(
+					valueContext.getTypeOfAnnotatedElement(),
+					executionContext.getConstraintValidatorFactory()
+			);
+
+			ConstraintValidatorContextImpl constraintValidatorContext = new ConstraintValidatorContextImpl(
+					valueContext.getPropertyPath(), descriptor
+			);
+
+			validateSingleConstraint(
+					executionContext,
+					valueContext,
+					constraintValidatorContext,
+					validator,
+					localViolationList
+			);
+
+			// We re-evaluate the boolean composition by taking into consideration also the violations
+			// from the local constraintValidator
+			if ( localViolationList.isEmpty() ) {
+				compositionResult.setAtLeastOneTrue( true );
+			}
+			else {
+				compositionResult.setAllTrue( false );
+			}
+		}
+
+		if ( !passesCompositionTypeRequirement( constraintViolations, compositionResult ) ) {
+			prepareFinalConstraintViolations(
+					executionContext, valueContext, constraintViolations, localViolationList
+			);
+		}
+	}
+
+	/**
+	 * Before the final constraint violations can be reported back we need to check whether we have a composing
+	 * constraint whose result should be reported as single violation.
+	 *
+	 * @param executionContext Meta data about top level validation
+	 * @param valueContext Meta data for currently validated value
+	 * @param constraintViolations Used to accumulate constraint violations
+	 * @param localViolationList List of constraint violations of top level constraint
+	 */
+	private <T, U, V, E extends ConstraintViolation<T>> void prepareFinalConstraintViolations(ValidationContext<T, E> executionContext, ValueContext<U, V> valueContext, Set<E> constraintViolations, Set<E> localViolationList) {
+		if ( reportAsSingleViolation() ) {
+			// We clear the current violations list anyway
+			constraintViolations.clear();
+
+			// But then we need to distinguish whether the local ConstraintValidator has reported
+			// violations or not (or if there is no local ConstraintValidator at all).
+			// If not we create a violation
+			// using the error message in the annotation declaration at top level.
+			if ( localViolationList.isEmpty() ) {
+				final String message = (String) getDescriptor().getAttributes().get( "message" );
+				MessageAndPath messageAndPath = new MessageAndPath( message, valueContext.getPropertyPath() );
+				E violation = executionContext.createConstraintViolation(
+						valueContext, messageAndPath, descriptor
+				);
+				constraintViolations.add( violation );
+			}
+		}
+
+		// Now, if there were some violations reported by
+		// the local ConstraintValidator, they need to be added to constraintViolations.
+		// Whether we need to report them as a single constraint or just add them to the other violations
+		// from the composing constraints, has been taken care of in the previous conditional block.
+		// This takes also care of possible custom error messages created by the constraintValidator,
+		// as checked in test CustomErrorMessage.java
+		// If no violations have been reported from the local ConstraintValidator, or no such validator exists,
+		// then we just add an empty list.
+		constraintViolations.addAll( localViolationList );
+	}
+
+	/**
+	 * Validates all composing constraints recursively.
+	 *
+	 * @param executionContext Meta data about top level validation
+	 * @param valueContext Meta data for currently validated value
+	 * @param constraintViolations Used to accumulate constraint violations
+	 *
+	 * @return Returns an instance of {@code CompositionResult} relevant for boolean composition of constraints
+	 */
+	private <T, U, V, E extends ConstraintViolation<T>> CompositionResult validateComposingConstraints(ValidationContext<T, E> executionContext,
+																									   ValueContext<U, V> valueContext,
+																									   Set<E> constraintViolations) {
+		CompositionResult compositionResult = new CompositionResult( true, false );
+		for ( ConstraintTree<?> tree : getChildren() ) {
+			Set<E> tmpViolationList = CollectionHelper.newHashSet();
+			tree.validateConstraints( executionContext, valueContext, tmpViolationList );
+			constraintViolations.addAll( tmpViolationList );
+
+			if ( tmpViolationList.isEmpty() ) {
+				compositionResult.setAtLeastOneTrue( true );
+				// no need to further validate constraints, because at least one validation passed
+				if ( descriptor.getCompositionType() == OR ) {
+					break;
+				}
+			}
+			else {
+				compositionResult.setAllTrue( false );
+				if ( descriptor.getCompositionType() == AND
+						&& ( executionContext.isFailFastModeEnabled() || descriptor.isReportAsSingleViolation() ) ) {
+					break;
+				}
+			}
+		}
+		return compositionResult;
+	}
+
+	private boolean passesCompositionTypeRequirement(Set<?> constraintViolations, CompositionResult compositionResult) {
+		CompositionType compositionType = getDescriptor().getCompositionType();
+		boolean passedValidation = false;
+		switch ( compositionType ) {
+			case OR:
+				passedValidation = compositionResult.isAtLeastOneTrue();
+				break;
+			case AND:
+				passedValidation = compositionResult.isAllTrue();
+				break;
+			case ALL_FALSE:
+				passedValidation = !compositionResult.isAtLeastOneTrue();
+				break;
+		}
+		assert ( !passedValidation || !( compositionType == AND ) || constraintViolations.isEmpty() );
+		if ( passedValidation ) {
+			constraintViolations.clear();
+		}
+		return passedValidation;
+	}
+
+	private <T, U, V, E extends ConstraintViolation<T>> Set<E> validateSingleConstraint(ValidationContext<T, E> executionContext,
+																						ValueContext<U, V> valueContext,
+																						ConstraintValidatorContextImpl constraintValidatorContext,
+																						ConstraintValidator<A, V> validator,
+																						Set<E> constraintViolations) {
+		boolean isValid;
+		try {
+			isValid = validator.isValid( valueContext.getCurrentValidatedValue(), constraintValidatorContext );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getExceptionDuringIsValidCall( e );
+		}
+		if ( !isValid ) {
+			//We do not add them these violations yet, since we don't know how they are
+			//going to influence the final boolean evaluation
+			constraintViolations.addAll(
+					executionContext.createConstraintViolations(
+							valueContext, constraintValidatorContext
+					)
+			);
+		}
+		return constraintViolations;
+	}
+
+	/**
+	 * @return {@code} true if the current constraint should be reported as single violation, {@code false otherwise}.
+	 *         When using negation, we only report the single top-level violation, as
+	 *         it is hard, especially for ALL_FALSE to give meaningful reports
+	 */
+	private boolean reportAsSingleViolation() {
+		return getDescriptor().isReportAsSingleViolation()
+				|| getDescriptor().getCompositionType() == ALL_FALSE;
+	}
+
+	/**
+	 * @param validatedValueType The type of the value to be validated (the type of the member/class the constraint was placed on).
+	 * @param constraintFactory constraint factory used to instantiate the constraint validator.
+	 *
+	 * @return A initialized constraint validator matching the type of the value to be validated.
+	 */
+	@SuppressWarnings("unchecked")
+	private <V> ConstraintValidator<A, V> getInitializedValidator(Type validatedValueType, ConstraintValidatorFactory constraintFactory) {
+
+		final ConstraintValidatorCacheKey key = new ConstraintValidatorCacheKey(
+				constraintFactory,
+				validatedValueType
+		);
+		ConstraintValidator<A, V> constraintValidator = (ConstraintValidator<A, V>) constraintValidatorCache.get( key );
+		if ( constraintValidator == null ) {
+			Class<? extends ConstraintValidator<?, ?>> validatorClass = findMatchingValidatorClass( validatedValueType );
+			constraintValidator = createAndInitializeValidator( constraintFactory, validatorClass );
+			constraintValidatorCache.put( key, constraintValidator );
+		}
+		else {
+			log.tracef( "Constraint validator %s found in cache.", constraintValidator );
+		}
+		return constraintValidator;
+	}
+
+	@SuppressWarnings("unchecked")
+	private <V> ConstraintValidator<A, V> createAndInitializeValidator(ConstraintValidatorFactory constraintFactory, Class<? extends ConstraintValidator<?, ?>> validatorClass) {
+		ConstraintValidator<A, V> constraintValidator;
+		constraintValidator = (ConstraintValidator<A, V>) constraintFactory.getInstance(
+				validatorClass
+		);
+		if ( constraintValidator == null ) {
+			throw log.getConstraintFactoryMustNotReturnNullException( validatorClass.getName() );
+		}
+		initializeConstraint( descriptor, constraintValidator );
+		return constraintValidator;
+	}
+
+	/**
+	 * Runs the validator resolution algorithm.
+	 *
+	 * @param validatedValueType The type of the value to be validated (the type of the member/class the constraint was placed on).
+	 *
+	 * @return The class of a matching validator.
+	 */
+	private Class<? extends ConstraintValidator<?, ?>> findMatchingValidatorClass(Type validatedValueType) {
+		Map<Type, Class<? extends ConstraintValidator<?, ?>>> availableValidatorTypes = TypeHelper.getValidatorsTypes(
+				descriptor.getConstraintValidatorClasses()
+		);
+		Map<Type, Type> suitableTypeMap = newHashMap();
+
+		if ( suitableTypeMap.containsKey( validatedValueType ) ) {
+			return availableValidatorTypes.get( suitableTypeMap.get( validatedValueType ) );
+		}
+
+		List<Type> discoveredSuitableTypes = findSuitableValidatorTypes( validatedValueType, availableValidatorTypes );
+		resolveAssignableTypes( discoveredSuitableTypes );
+		verifyResolveWasUnique( validatedValueType, discoveredSuitableTypes );
+
+		Type suitableType = discoveredSuitableTypes.get( 0 );
+		suitableTypeMap.put( validatedValueType, suitableType );
+		return availableValidatorTypes.get( suitableType );
+	}
+
+	private void verifyResolveWasUnique(Type valueClass, List<Type> assignableClasses) {
+		if ( assignableClasses.size() == 0 ) {
+			String className = valueClass.toString();
+			if ( valueClass instanceof Class ) {
+				Class<?> clazz = (Class<?>) valueClass;
+				if ( clazz.isArray() ) {
+					className = clazz.getComponentType().toString() + "[]";
+				}
+				else {
+					className = clazz.getName();
+				}
+			}
+			throw log.getNoValidatorFoundForTypeException( className );
+		}
+		else if ( assignableClasses.size() > 1 ) {
+			StringBuilder builder = new StringBuilder();
+			for ( Type clazz : assignableClasses ) {
+				builder.append( clazz );
+				builder.append( ", " );
+			}
+			builder.delete( builder.length() - 2, builder.length() );
+			throw log.getMoreThanOneValidatorFoundForTypeException( valueClass, builder.toString() );
+		}
+	}
+
+	private List<Type> findSuitableValidatorTypes(Type type, Map<Type, Class<? extends ConstraintValidator<?, ?>>> availableValidatorTypes) {
+		List<Type> determinedSuitableTypes = new ArrayList<Type>();
+		for ( Type validatorType : availableValidatorTypes.keySet() ) {
+			if ( TypeHelper.isAssignable( validatorType, type )
+					&& !determinedSuitableTypes.contains( validatorType ) ) {
+				determinedSuitableTypes.add( validatorType );
+			}
+		}
+		return determinedSuitableTypes;
+	}
+
+	/**
+	 * Tries to reduce all assignable classes down to a single class.
+	 *
+	 * @param assignableTypes The set of all classes which are assignable to the class of the value to be validated and
+	 * which are handled by at least one of the  validators for the specified constraint.
+	 */
+	private void resolveAssignableTypes(List<Type> assignableTypes) {
+		if ( assignableTypes.size() == 0 || assignableTypes.size() == 1 ) {
+			return;
+		}
+
+		List<Type> typesToRemove = new ArrayList<Type>();
+		do {
+			typesToRemove.clear();
+			Type type = assignableTypes.get( 0 );
+			for ( int i = 1; i < assignableTypes.size(); i++ ) {
+				if ( TypeHelper.isAssignable( type, assignableTypes.get( i ) ) ) {
+					typesToRemove.add( type );
+				}
+				else if ( TypeHelper.isAssignable( assignableTypes.get( i ), type ) ) {
+					typesToRemove.add( assignableTypes.get( i ) );
+				}
+			}
+			assignableTypes.removeAll( typesToRemove );
+		} while ( typesToRemove.size() > 0 );
+	}
+
+	private <V> void initializeConstraint(ConstraintDescriptor<A> descriptor, ConstraintValidator<A, V> constraintValidator) {
+		try {
+			constraintValidator.initialize( descriptor.getAnnotation() );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getUnableToInitializeConstraintValidatorException( constraintValidator.getClass().getName(), e );
+		}
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ConstraintTree" );
+		sb.append( "{ descriptor=" ).append( descriptor );
+		sb.append( ", isRoot=" ).append( parent == null );
+		sb.append( '}' );
+		return sb.toString();
+	}
+
+	private static final class ConstraintValidatorCacheKey {
+		private ConstraintValidatorFactory constraintValidatorFactory;
+		private Type validatedType;
+
+		private ConstraintValidatorCacheKey(ConstraintValidatorFactory constraintValidatorFactory, Type validatorType) {
+			this.constraintValidatorFactory = constraintValidatorFactory;
+			this.validatedType = validatorType;
+		}
+
+		@Override
+		public boolean equals(Object o) {
+			if ( this == o ) {
+				return true;
+			}
+			if ( o == null || getClass() != o.getClass() ) {
+				return false;
+			}
+
+			ConstraintValidatorCacheKey that = (ConstraintValidatorCacheKey) o;
+
+			if ( constraintValidatorFactory != null ? !constraintValidatorFactory.equals( that.constraintValidatorFactory ) : that.constraintValidatorFactory != null ) {
+				return false;
+			}
+			if ( validatedType != null ? !validatedType.equals( that.validatedType ) : that.validatedType != null ) {
+				return false;
+			}
+
+			return true;
+		}
+
+		@Override
+		public int hashCode() {
+			int result = constraintValidatorFactory != null ? constraintValidatorFactory.hashCode() : 0;
+			result = 31 * result + ( validatedType != null ? validatedType.hashCode() : 0 );
+			return result;
+		}
+	}
+
+	private static final class CompositionResult {
+		private boolean allTrue;
+		private boolean atLeastOneTrue;
+
+		CompositionResult(boolean allTrue, boolean atLeastOneTrue) {
+			this.allTrue = allTrue;
+			this.atLeastOneTrue = atLeastOneTrue;
+		}
+
+		public boolean isAllTrue() {
+			return allTrue;
+		}
+
+		public boolean isAtLeastOneTrue() {
+			return atLeastOneTrue;
+		}
+
+		public void setAllTrue(boolean allTrue) {
+			this.allTrue = allTrue;
+		}
+
+		public void setAtLeastOneTrue(boolean atLeastOneTrue) {
+			this.atLeastOneTrue = atLeastOneTrue;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorContextImpl.java
new file mode 100644
index 0000000..a04721f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorContextImpl.java
@@ -0,0 +1,176 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintValidatorContextImpl implements ConstraintValidatorContext {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final List<MessageAndPath> messageAndPaths = new ArrayList<MessageAndPath>( 3 );
+	private final PathImpl basePath;
+	private final ConstraintDescriptor<?> constraintDescriptor;
+	private boolean defaultDisabled;
+
+
+	public ConstraintValidatorContextImpl(PathImpl propertyPath, ConstraintDescriptor<?> constraintDescriptor) {
+		this.basePath = PathImpl.createCopy( propertyPath );
+		this.constraintDescriptor = constraintDescriptor;
+	}
+
+	public final void disableDefaultConstraintViolation() {
+		defaultDisabled = true;
+	}
+
+	public final String getDefaultConstraintMessageTemplate() {
+		return (String) constraintDescriptor.getAttributes().get( "message" );
+	}
+
+	public final ConstraintViolationBuilder buildConstraintViolationWithTemplate(String messageTemplate) {
+		return new ErrorBuilderImpl( messageTemplate, PathImpl.createCopy( basePath ) );
+	}
+
+	public final ConstraintDescriptor<?> getConstraintDescriptor() {
+		return constraintDescriptor;
+	}
+
+	public final List<MessageAndPath> getMessageAndPathList() {
+		if ( defaultDisabled && messageAndPaths.size() == 0 ) {
+			throw log.getAtLeastOneCustomMessageMustBeCreatedException();
+		}
+
+		List<MessageAndPath> returnedMessageAndPaths = new ArrayList<MessageAndPath>( messageAndPaths );
+		if ( !defaultDisabled ) {
+			returnedMessageAndPaths.add(
+					new MessageAndPath( getDefaultConstraintMessageTemplate(), basePath )
+			);
+		}
+		return returnedMessageAndPaths;
+	}
+
+	class ErrorBuilderImpl implements ConstraintViolationBuilder {
+		private String messageTemplate;
+		private PathImpl propertyPath;
+
+		ErrorBuilderImpl(String template, PathImpl path) {
+			messageTemplate = template;
+			propertyPath = path;
+		}
+
+		public NodeBuilderDefinedContext addNode(String name) {
+			propertyPath.addNode( name );
+			return new NodeBuilderImpl( messageTemplate, propertyPath );
+		}
+
+		public ConstraintValidatorContext addConstraintViolation() {
+			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
+			return ConstraintValidatorContextImpl.this;
+		}
+	}
+
+	class NodeBuilderImpl implements ConstraintViolationBuilder.NodeBuilderDefinedContext {
+		private final String messageTemplate;
+		private final PathImpl propertyPath;
+
+		NodeBuilderImpl(String template, PathImpl path) {
+			messageTemplate = template;
+			propertyPath = path;
+		}
+
+		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
+			return new InIterableNodeBuilderImpl( messageTemplate, propertyPath, name );
+		}
+
+		public ConstraintValidatorContext addConstraintViolation() {
+			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
+			return ConstraintValidatorContextImpl.this;
+		}
+	}
+
+	class InIterableNodeBuilderImpl implements ConstraintViolationBuilder.NodeBuilderCustomizableContext {
+		private final String messageTemplate;
+		private final PathImpl propertyPath;
+		private final String leafNodeName;
+
+		InIterableNodeBuilderImpl(String template, PathImpl path, String nodeName) {
+			this.messageTemplate = template;
+			this.propertyPath = path;
+			this.leafNodeName = nodeName;
+		}
+
+		public ConstraintViolationBuilder.NodeContextBuilder inIterable() {
+			this.propertyPath.makeLeafNodeIterable();
+			return new InIterablePropertiesBuilderImpl( messageTemplate, propertyPath, leafNodeName );
+		}
+
+		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
+			propertyPath.addNode( leafNodeName );
+			return new InIterableNodeBuilderImpl( messageTemplate, propertyPath, name );
+		}
+
+		public ConstraintValidatorContext addConstraintViolation() {
+			propertyPath.addNode( leafNodeName );
+			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
+			return ConstraintValidatorContextImpl.this;
+		}
+	}
+
+	class InIterablePropertiesBuilderImpl implements ConstraintViolationBuilder.NodeContextBuilder {
+		private final String messageTemplate;
+		private final PathImpl propertyPath;
+		private final String leafNodeName;
+
+		InIterablePropertiesBuilderImpl(String template, PathImpl path, String nodeName) {
+			this.messageTemplate = template;
+			this.propertyPath = path;
+			this.leafNodeName = nodeName;
+		}
+
+		public ConstraintViolationBuilder.NodeBuilderDefinedContext atKey(Object key) {
+			propertyPath.setLeafNodeMapKey( key );
+			propertyPath.addNode( leafNodeName );
+			return new NodeBuilderImpl( messageTemplate, propertyPath );
+		}
+
+		public ConstraintViolationBuilder.NodeBuilderDefinedContext atIndex(Integer index) {
+			propertyPath.setLeafNodeIndex( index );
+			propertyPath.addNode( leafNodeName );
+			return new NodeBuilderImpl( messageTemplate, propertyPath );
+		}
+
+		public ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name) {
+			propertyPath.addNode( leafNodeName );
+			return new InIterableNodeBuilderImpl( messageTemplate, propertyPath, name );
+		}
+
+		public ConstraintValidatorContext addConstraintViolation() {
+			propertyPath.addNode( leafNodeName );
+			messageAndPaths.add( new MessageAndPath( messageTemplate, propertyPath ) );
+			return ConstraintValidatorContextImpl.this;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorFactoryImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorFactoryImpl.java
new file mode 100644
index 0000000..b1c8e2c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintValidatorFactoryImpl.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorFactory;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+/**
+ * Default <code>ConstraintValidatorFactory</code> using a no-arg constructor.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class ConstraintValidatorFactoryImpl implements ConstraintValidatorFactory {
+
+	public final <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
+		return ReflectionHelper.newInstance( key, "ConstraintValidator" );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintViolationImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintViolationImpl.java
new file mode 100644
index 0000000..3de1f0d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ConstraintViolationImpl.java
@@ -0,0 +1,144 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.annotation.ElementType;
+import javax.validation.ConstraintViolation;
+import javax.validation.Path;
+import javax.validation.metadata.ConstraintDescriptor;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class ConstraintViolationImpl<T> implements ConstraintViolation<T>, java.io.Serializable {
+
+	private static final long serialVersionUID = -4970067626703103139L;
+
+	private final String interpolatedMessage;
+	private final T rootBean;
+	private final Object value;
+	private final Path propertyPath;
+	private final Object leafBeanInstance;
+	private final ConstraintDescriptor<?> constraintDescriptor;
+	private final String messageTemplate;
+	private final Class<T> rootBeanClass;
+	private final ElementType elementType;
+
+	public ConstraintViolationImpl(String messageTemplate, String interpolatedMessage, Class<T> rootBeanClass,
+								   T rootBean, Object leafBeanInstance, Object value,
+								   Path propertyPath, ConstraintDescriptor<?> constraintDescriptor, ElementType elementType) {
+		this.messageTemplate = messageTemplate;
+		this.interpolatedMessage = interpolatedMessage;
+		this.rootBean = rootBean;
+		this.value = value;
+		this.propertyPath = propertyPath;
+		this.leafBeanInstance = leafBeanInstance;
+		this.constraintDescriptor = constraintDescriptor;
+		this.rootBeanClass = rootBeanClass;
+		this.elementType = elementType;
+	}
+
+	public final String getMessage() {
+		return interpolatedMessage;
+	}
+
+	public final String getMessageTemplate() {
+		return messageTemplate;
+	}
+
+	public final T getRootBean() {
+		return rootBean;
+	}
+
+	public final Class<T> getRootBeanClass() {
+		return rootBeanClass;
+	}
+
+	public final Object getLeafBean() {
+		return leafBeanInstance;
+	}
+
+	public final Object getInvalidValue() {
+		return value;
+	}
+
+	public final Path getPropertyPath() {
+		return propertyPath;
+	}
+
+	public final ConstraintDescriptor<?> getConstraintDescriptor() {
+		return this.constraintDescriptor;
+	}
+
+	@Override
+	// IMPORTANT - some behaviour of Validator depends on the correct implementation of this equals method!
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( !( o instanceof ConstraintViolationImpl ) ) {
+			return false;
+		}
+
+		ConstraintViolationImpl<?> that = ( ConstraintViolationImpl<?> ) o;
+
+		if ( interpolatedMessage != null ? !interpolatedMessage.equals( that.interpolatedMessage ) : that.interpolatedMessage != null ) {
+			return false;
+		}
+		if ( propertyPath != null ? !propertyPath.equals( that.propertyPath ) : that.propertyPath != null ) {
+			return false;
+		}
+		if ( rootBean != null ? !rootBean.equals( that.rootBean ) : that.rootBean != null ) {
+			return false;
+		}
+		if ( leafBeanInstance != null ? !leafBeanInstance.equals( that.leafBeanInstance ) : that.leafBeanInstance != null ) {
+			return false;
+		}
+		if ( elementType != null ? !elementType.equals( that.elementType ) : that.elementType != null ) {
+			return false;
+		}
+		if ( value != null ? !value.equals( that.value ) : that.value != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = interpolatedMessage != null ? interpolatedMessage.hashCode() : 0;
+		result = 31 * result + ( propertyPath != null ? propertyPath.hashCode() : 0 );
+		result = 31 * result + ( rootBean != null ? rootBean.hashCode() : 0 );
+		result = 31 * result + ( leafBeanInstance != null ? leafBeanInstance.hashCode() : 0 );
+		result = 31 * result + ( value != null ? value.hashCode() : 0 );
+		result = 31 * result + ( elementType != null ? elementType.hashCode() : 0 );
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ConstraintViolationImpl" );
+		sb.append( "{interpolatedMessage='" ).append( interpolatedMessage ).append( '\'' );
+		sb.append( ", propertyPath=" ).append( propertyPath );
+		sb.append( ", rootBeanClass=" ).append( rootBeanClass );
+		sb.append( ", messageTemplate='" ).append( messageTemplate ).append( '\'' );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageAndPath.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageAndPath.java
new file mode 100644
index 0000000..604b42b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageAndPath.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import javax.validation.Path;
+
+/**
+ * Container class for a validation error message and its corresponding path.
+ *
+ * @author Hardy Ferentschik
+ */
+public class MessageAndPath {
+	private final String message;
+	private final Path propertyPath;
+
+	public MessageAndPath(String message, Path property) {
+		this.message = message;
+		this.propertyPath = property;
+	}
+
+	public final String getMessage() {
+		return message;
+	}
+
+	public final Path getPath() {
+		return propertyPath;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageInterpolatorContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageInterpolatorContext.java
new file mode 100644
index 0000000..7839e0c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MessageInterpolatorContext.java
@@ -0,0 +1,82 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.MessageInterpolator;
+
+/**
+ * Implementation of the context used during message interpolation.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class MessageInterpolatorContext implements MessageInterpolator.Context {
+	private final ConstraintDescriptor<?> constraintDescriptor;
+	private final Object validatedValue;
+
+	public MessageInterpolatorContext(ConstraintDescriptor<?> constraintDescriptor, Object validatedValue) {
+		this.constraintDescriptor = constraintDescriptor;
+		this.validatedValue = validatedValue;
+	}
+
+	public ConstraintDescriptor<?> getConstraintDescriptor() {
+		return constraintDescriptor;
+	}
+
+	public Object getValidatedValue() {
+		return validatedValue;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		MessageInterpolatorContext that = ( MessageInterpolatorContext ) o;
+
+		if ( constraintDescriptor != null ? !constraintDescriptor.equals( that.constraintDescriptor ) : that.constraintDescriptor != null ) {
+			return false;
+		}
+		if ( validatedValue != null ? !validatedValue.equals( that.validatedValue ) : that.validatedValue != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = constraintDescriptor != null ? constraintDescriptor.hashCode() : 0;
+		result = 31 * result + ( validatedValue != null ? validatedValue.hashCode() : 0 );
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "MessageInterpolatorContext" );
+		sb.append( "{constraintDescriptor=" ).append( constraintDescriptor );
+		sb.append( ", validatedValue=" ).append( validatedValue );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodConstraintViolationImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodConstraintViolationImpl.java
new file mode 100644
index 0000000..6e6ac99
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodConstraintViolationImpl.java
@@ -0,0 +1,154 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Method;
+import javax.validation.Path;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.method.MethodConstraintViolation;
+
+/**
+ * @author Gunnar Morling
+ */
+public class MethodConstraintViolationImpl<T> extends ConstraintViolationImpl<T>
+		implements MethodConstraintViolation<T> {
+
+	private static final long serialVersionUID = 7907489574577836537L;
+
+	private final Method method;
+	private final Integer parameterIndex;
+	private final String parameterName;
+	private final Kind kind;
+
+	public MethodConstraintViolationImpl(
+			String messageTemplate,
+			String interpolatedMessage,
+			Method method,
+			Integer parameterIndex,
+			String parameterName,
+			Class<T> rootBeanClass,
+			T rootBean,
+			Object leafBeanInstance,
+			Object value,
+			Path propertyPath,
+			ConstraintDescriptor<?> constraintDescriptor,
+			ElementType elementType) {
+		super(
+				messageTemplate,
+				interpolatedMessage,
+				rootBeanClass,
+				rootBean,
+				leafBeanInstance,
+				value,
+				propertyPath,
+				constraintDescriptor,
+				elementType
+		);
+
+		this.method = method;
+		this.parameterIndex = parameterIndex;
+		this.parameterName = parameterName;
+		this.kind = parameterIndex != null ? Kind.PARAMETER : Kind.RETURN_VALUE;
+	}
+
+	public Method getMethod() {
+		return method;
+	}
+
+	public Integer getParameterIndex() {
+		return parameterIndex;
+	}
+
+	public String getParameterName() {
+		return parameterName;
+	}
+
+	public Kind getKind() {
+		return kind;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = super.hashCode();
+		result = prime * result + ( ( kind == null ) ? 0 : kind.hashCode() );
+		result = prime * result + ( ( method == null ) ? 0 : method.hashCode() );
+		result = prime * result
+				+ ( ( parameterIndex == null ) ? 0 : parameterIndex.hashCode() );
+		result = prime * result
+				+ ( ( parameterName == null ) ? 0 : parameterName.hashCode() );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( !super.equals( obj ) ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		MethodConstraintViolationImpl<?> other = (MethodConstraintViolationImpl<?>) obj;
+		if ( kind != other.kind ) {
+			return false;
+		}
+		if ( method == null ) {
+			if ( other.method != null ) {
+				return false;
+			}
+		}
+		else if ( !method.equals( other.method ) ) {
+			return false;
+		}
+		if ( parameterIndex == null ) {
+			if ( other.parameterIndex != null ) {
+				return false;
+			}
+		}
+		else if ( !parameterIndex.equals( other.parameterIndex ) ) {
+			return false;
+		}
+		if ( parameterName == null ) {
+			if ( other.parameterName != null ) {
+				return false;
+			}
+		}
+		else if ( !parameterName.equals( other.parameterName ) ) {
+			return false;
+		}
+		return true;
+	}
+
+	@Override
+	public String toString() {
+		return "MethodConstraintViolationImpl [method=" + method
+				+ ", parameterIndex=" + parameterIndex + ", parameterName="
+				+ parameterName + ", kind=" + kind + ", message="
+				+ getMessage() + ", messageTemplate=" + getMessageTemplate()
+				+ ", rootBean=" + getRootBean() + ", rootBeanClass="
+				+ getRootBeanClass() + ", leafBean=" + getLeafBean()
+				+ ", invalidValue=" + getInvalidValue() + ", propertyPath="
+				+ getPropertyPath() + ", constraintDescriptor="
+				+ getConstraintDescriptor() + "]";
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodParameterNodeImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodParameterNodeImpl.java
new file mode 100644
index 0000000..2512791
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodParameterNodeImpl.java
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.reflect.Method;
+
+/**
+ * A {@link javax.validation.Path.Node} implementation representing a single method parameter.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodParameterNodeImpl extends NodeImpl {
+
+	private static final long serialVersionUID = -1964614171714243780L;
+
+	private final static String NAME_TEMPLATE = "%s#%s(%s)";
+
+	/**
+	 * Creates a new {@link MethodParameterNodeImpl}.
+	 *
+	 * @param method The method hosting the parameter to represent.
+	 * @param parameterName The name of the parameter to represent.
+	 * @param parent The parent node, representing the bean hosting the given
+	 * method.
+	 */
+	MethodParameterNodeImpl(Method method, String parameterName, NodeImpl parent) {
+		super(
+				String.format(
+						NAME_TEMPLATE, method.getDeclaringClass().getSimpleName(), method.getName(), parameterName
+				),
+				parent, false, null, null
+		);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodReturnValueNodeImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodReturnValueNodeImpl.java
new file mode 100644
index 0000000..5c155f0
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodReturnValueNodeImpl.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.reflect.Method;
+
+/**
+ * A {@link javax.validation.Path.Node} implementation representing a single method parameter.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodReturnValueNodeImpl extends NodeImpl {
+
+	private static final long serialVersionUID = -1964614171714243780L;
+
+	private final static String NAME_TEMPLATE = "%s#%s()";
+
+	/**
+	 * Creates a new {@link MethodReturnValueNodeImpl}.
+	 *
+	 * @param method The method hosting the parameter to represent.
+	 * @param parent The parent node, representing the bean hosting the given
+	 * method.
+	 */
+	MethodReturnValueNodeImpl(Method method, NodeImpl parent) {
+		super(
+				String.format( NAME_TEMPLATE, method.getDeclaringClass().getSimpleName(), method.getName() ),
+				parent, false, null, null
+		);
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodValidationContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodValidationContext.java
new file mode 100644
index 0000000..fa46e07
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/MethodValidationContext.java
@@ -0,0 +1,114 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.reflect.Method;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.method.MethodConstraintViolation;
+
+/**
+ * A {@link ValidationContext} implementation which creates and manages
+ * violations of type {@link MethodConstraintViolation}.
+ *
+ * @param <T> The type of the root bean for which this context is created.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodValidationContext<T> extends ValidationContext<T, MethodConstraintViolation<T>> {
+
+	/**
+	 * The method of the current validation call.
+	 */
+	private final Method method;
+
+	/**
+	 * The index of the parameter to validate if this context is used for validation of a single parameter, null otherwise.
+	 */
+	private final Integer parameterIndex;
+
+	protected MethodValidationContext(Class<T> rootBeanClass, T rootBean,
+									  Method method,
+									  MessageInterpolator messageInterpolator,
+									  ConstraintValidatorFactory constraintValidatorFactory,
+									  TraversableResolver traversableResolver,
+									  boolean failFast) {
+
+		this(
+				rootBeanClass,
+				rootBean,
+				method,
+				null,
+				messageInterpolator,
+				constraintValidatorFactory,
+				traversableResolver,
+				failFast
+		);
+
+	}
+
+	protected MethodValidationContext(Class<T> rootBeanClass, T rootBean,
+									  Method method,
+									  Integer parameterIndex,
+									  MessageInterpolator messageInterpolator,
+									  ConstraintValidatorFactory constraintValidatorFactory,
+									  TraversableResolver traversableResolver,
+									  boolean failFast) {
+
+		super( rootBeanClass, rootBean, messageInterpolator, constraintValidatorFactory, traversableResolver, failFast );
+
+		this.method = method;
+		this.parameterIndex = parameterIndex;
+	}
+
+	public Method getMethod() {
+		return method;
+	}
+
+	public Integer getParameterIndex() {
+		return parameterIndex;
+	}
+
+	@Override
+	public <U, V> MethodConstraintViolation<T> createConstraintViolation(
+			ValueContext<U, V> localContext, MessageAndPath messageAndPath,
+			ConstraintDescriptor<?> descriptor) {
+
+		String messageTemplate = messageAndPath.getMessage();
+		String interpolatedMessage = messageInterpolator.interpolate(
+				messageTemplate,
+				new MessageInterpolatorContext( descriptor, localContext.getCurrentValidatedValue() )
+		);
+		return new MethodConstraintViolationImpl<T>(
+				messageTemplate,
+				interpolatedMessage,
+				method,
+				localContext.getParameterIndex(),
+				localContext.getParameterName(),
+				getRootBeanClass(),
+				getRootBean(),
+				localContext.getCurrentBean(),
+				localContext.getCurrentValidatedValue(),
+				messageAndPath.getPath(),
+				descriptor,
+				localContext.getElementType()
+		);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/NodeImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/NodeImpl.java
new file mode 100644
index 0000000..1831c30
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/NodeImpl.java
@@ -0,0 +1,178 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.io.Serializable;
+import javax.validation.Path;
+
+/**
+ * Immutable implementation of a {@code Path.Node}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class NodeImpl implements Path.Node, Serializable {
+	private static final long serialVersionUID = 2075466571633860499L;
+
+	public static final String INDEX_OPEN = "[";
+	public static final String INDEX_CLOSE = "]";
+
+	private final String name;
+	private final NodeImpl parent;
+	private final boolean isIterable;
+	private final Integer index;
+	private final Object key;
+	private final int hashCode;
+
+	private String asString;
+
+	public NodeImpl(String name, NodeImpl parent, boolean indexable, Integer index, Object key) {
+		this.name = name;
+		this.parent = parent;
+		this.index = index;
+		this.key = key;
+		this.isIterable = indexable;
+		this.hashCode = buildHashCode();
+	}
+
+	public final String getName() {
+		return name;
+	}
+
+	public final boolean isInIterable() {
+		return parent != null && parent.isIterable();
+	}
+
+	public final boolean isIterable() {
+		return isIterable;
+	}
+
+	public final Integer getIndex() {
+		if ( parent == null ) {
+			return null;
+		}
+		else {
+			return parent.index;
+		}
+	}
+
+	public final Object getKey() {
+		if ( parent == null ) {
+			return null;
+		}
+		else {
+			return parent.key;
+		}
+	}
+
+	public final NodeImpl getParent() {
+		return parent;
+	}
+
+	@Override
+	public String toString() {
+		return asString();
+	}
+
+	public final String asString() {
+		if ( asString == null ) {
+			asString = buildToString();
+		}
+		return asString;
+	}
+
+	private String buildToString() {
+		StringBuilder builder = new StringBuilder();
+		builder.append( getName() );
+		if ( isIterable() ) {
+			builder.append( INDEX_OPEN );
+			if ( index != null ) {
+				builder.append( index );
+			}
+			else if ( key != null ) {
+				builder.append( key );
+			}
+			builder.append( INDEX_CLOSE );
+		}
+		return builder.toString();
+	}
+
+	public int buildHashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ( ( index == null ) ? 0 : index.hashCode() );
+		result = prime * result + ( isIterable ? 1231 : 1237 );
+		result = prime * result + ( ( key == null ) ? 0 : key.hashCode() );
+		result = prime * result + ( ( name == null ) ? 0 : name.hashCode() );
+		result = prime * result + ( ( parent == null ) ? 0 : parent.hashCode() );
+		return result;
+	}
+
+	@Override
+	public int hashCode() {
+		return hashCode;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		NodeImpl other = (NodeImpl) obj;
+		if ( index == null ) {
+			if ( other.index != null ) {
+				return false;
+			}
+		}
+		else if ( !index.equals( other.index ) ) {
+			return false;
+		}
+		if ( isIterable != other.isIterable ) {
+			return false;
+		}
+		if ( key == null ) {
+			if ( other.key != null ) {
+				return false;
+			}
+		}
+		else if ( !key.equals( other.key ) ) {
+			return false;
+		}
+		if ( name == null ) {
+			if ( other.name != null ) {
+				return false;
+			}
+		}
+		else if ( !name.equals( other.name ) ) {
+			return false;
+		}
+		if ( parent == null ) {
+			if ( other.parent != null ) {
+				return false;
+			}
+		}
+		else if ( !parent.equals( other.parent ) ) {
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/PathImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/PathImpl.java
new file mode 100644
index 0000000..f92eb25
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/PathImpl.java
@@ -0,0 +1,350 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.validation.Path;
+
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class PathImpl implements Path, Serializable {
+	private static final long serialVersionUID = 7564511574909882392L;
+	private static final Log log = LoggerFactory.make();
+
+	public static final String PROPERTY_PATH_SEPARATOR = ".";
+
+	/**
+	 * Regular expression used to split a string path into its elements.
+	 *
+	 * @see <a href="http://www.regexplanet.com/simple/index.jsp">Regular expression tester</a>
+	 */
+	private static final String LEADING_PROPERTY_GROUP = "[^\\[\\.]+";  // everything up to a [ or .
+	private static final String OPTIONAL_INDEX_GROUP = "\\[(\\w*)\\]";
+	private static final String REMAINING_PROPERTY_STRING = "\\.(.*)";  // processed recursively
+
+	private static final Pattern PATH_PATTERN = Pattern.compile( "(" + LEADING_PROPERTY_GROUP + ")(" + OPTIONAL_INDEX_GROUP + ")?(" + REMAINING_PROPERTY_STRING + ")*" );
+	private static final int PROPERTY_NAME_GROUP = 1;
+	private static final int INDEXED_GROUP = 2;
+	private static final int INDEX_GROUP = 3;
+	private static final int REMAINING_STRING_GROUP = 5;
+
+	private final List<Node> nodeList;
+	private NodeImpl currentLeafNode;
+	private int hashCode;
+
+	/**
+	 * Returns a {@code Path} instance representing the path described by the
+	 * given string. To create a root node the empty string should be passed.
+	 *
+	 * @param propertyPath the path as string representation.
+	 *
+	 * @return a {@code Path} instance representing the path described by the
+	 *         given string.
+	 *
+	 * @throws IllegalArgumentException in case {@code property == null} or
+	 * {@code property} cannot be parsed.
+	 */
+	public static PathImpl createPathFromString(String propertyPath) {
+		Contracts.assertNotNull( propertyPath, MESSAGES.propertyPathCannotBeNull() );
+
+		if ( propertyPath.length() == 0 ) {
+			return createNewPath( null );
+		}
+
+		return parseProperty( propertyPath );
+	}
+
+	/**
+	 * Creates a path representing the specified method parameter.
+	 *
+	 * @param method The method hosting the parameter to represent.
+	 * @param parameterName The parameter's name, e.g. "arg0" or "param1".
+	 *
+	 * @return A path representing the specified method parameter.
+	 */
+	public static PathImpl createPathForMethodParameter(Method method, String parameterName) {
+		Contracts.assertNotNull( method, "A method is required to create a method parameter path." );
+		Contracts.assertNotNull( parameterName, "A parameter name is required to create a method parameter path." );
+
+		PathImpl path = createRootPath();
+		path.addMethodParameterNode( method, parameterName );
+
+		return path;
+	}
+
+	public static PathImpl createPathForMethodReturnValue(Method method) {
+		Contracts.assertNotNull( method, "A method is required to create a method return value path." );
+
+		PathImpl path = createRootPath();
+		path.addMethodReturnValueNode( method );
+
+		return path;
+	}
+
+	public static PathImpl createRootPath() {
+		return createNewPath( null );
+	}
+
+	public static PathImpl createCopy(PathImpl path) {
+		return new PathImpl( path );
+	}
+
+	public final boolean isRootPath() {
+		return nodeList.size() == 1 && nodeList.get( 0 ).getName() == null;
+	}
+
+	public final PathImpl getPathWithoutLeafNode() {
+		return new PathImpl( nodeList.subList( 0, nodeList.size() - 1 ) );
+	}
+
+	public final NodeImpl addNode(String nodeName) {
+		NodeImpl parent = nodeList.isEmpty() ? null : (NodeImpl) nodeList.get( nodeList.size() - 1 );
+		currentLeafNode = new NodeImpl( nodeName, parent, false, null, null );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	private NodeImpl addMethodParameterNode(Method method, String parameterName) {
+		NodeImpl parent = nodeList.isEmpty() ? null : (NodeImpl) nodeList.get( nodeList.size() - 1 );
+		currentLeafNode = new MethodParameterNodeImpl( method, parameterName, parent );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	private NodeImpl addMethodReturnValueNode(Method method) {
+		NodeImpl parent = nodeList.isEmpty() ? null : (NodeImpl) nodeList.get( nodeList.size() - 1 );
+		currentLeafNode = new MethodReturnValueNodeImpl( method, parent );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	public final NodeImpl makeLeafNodeIterable() {
+		currentLeafNode = new NodeImpl( currentLeafNode.getName(), currentLeafNode.getParent(), true, null, null );
+		nodeList.remove( nodeList.size() - 1 );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	public final NodeImpl setLeafNodeIndex(Integer index) {
+		currentLeafNode = new NodeImpl( currentLeafNode.getName(), currentLeafNode.getParent(), true, index, null );
+		nodeList.remove( nodeList.size() - 1 );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	public final NodeImpl setLeafNodeMapKey(Object key) {
+		currentLeafNode = new NodeImpl( currentLeafNode.getName(), currentLeafNode.getParent(), true, null, key );
+		nodeList.remove( nodeList.size() - 1 );
+		nodeList.add( currentLeafNode );
+		hashCode = -1;
+		return currentLeafNode;
+	}
+
+	public final NodeImpl getLeafNode() {
+		return currentLeafNode;
+	}
+
+	public final Iterator<Path.Node> iterator() {
+		if ( nodeList.size() == 0 ) {
+			return Collections.<Path.Node>emptyList().iterator();
+		}
+		if ( nodeList.size() == 1 ) {
+			return nodeList.iterator();
+		}
+		return nodeList.subList( 1, nodeList.size() ).iterator();
+	}
+
+	public final String asString() {
+		StringBuilder builder = new StringBuilder();
+		boolean first = true;
+		for ( int i = 1; i < nodeList.size(); i++ ) {
+			NodeImpl nodeImpl = (NodeImpl) nodeList.get( i );
+			if ( nodeImpl.getName() != null ) {
+				if ( !first ) {
+					builder.append( PROPERTY_PATH_SEPARATOR );
+				}
+				builder.append( nodeImpl.asString() );
+			}
+
+			first = false;
+		}
+		return builder.toString();
+	}
+
+	@Override
+	public String toString() {
+		return asString();
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		PathImpl other = (PathImpl) obj;
+		if ( nodeList == null ) {
+			if ( other.nodeList != null ) {
+				return false;
+			}
+		}
+		else if ( !nodeList.equals( other.nodeList ) ) {
+			return false;
+		}
+		return true;
+	}
+
+	@Override
+	// deferred hash code building
+	public int hashCode() {
+		if ( hashCode == -1 ) {
+			hashCode = buildHashCode();
+		}
+
+		return hashCode;
+	}
+
+	private int buildHashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ( ( nodeList == null ) ? 0 : nodeList.hashCode() );
+		return result;
+	}
+
+	private static PathImpl createNewPath(String name) {
+		PathImpl path = new PathImpl();
+		path.addNode( name );
+		return path;
+	}
+
+	/**
+	 * Copy constructor.
+	 *
+	 * @param path the path to make a copy of.
+	 */
+	private PathImpl(PathImpl path) {
+		this( path.nodeList );
+		currentLeafNode = (NodeImpl) nodeList.get( nodeList.size() - 1 );
+	}
+
+	private PathImpl() {
+		nodeList = new ArrayList<Node>();
+	}
+
+	private PathImpl(List<Node> nodeList) {
+		this.nodeList = new ArrayList<Node>( nodeList );
+	}
+
+	private static PathImpl parseProperty(String property) {
+		PathImpl path = createNewPath( null );
+		String tmp = property;
+		do {
+			Matcher matcher = PATH_PATTERN.matcher( tmp );
+			if ( matcher.matches() ) {
+
+				String value = matcher.group( PROPERTY_NAME_GROUP );
+				if ( !isValidJavaIdentifier( value ) ) {
+					throw log.getInvalidJavaIdentifierException( value );
+				}
+
+				// create the node
+				path.addNode( value );
+
+				// is the node indexable
+				if ( matcher.group( INDEXED_GROUP ) != null ) {
+					path.makeLeafNodeIterable();
+				}
+
+				// take care of the index/key if one exists
+				String indexOrKey = matcher.group( INDEX_GROUP );
+				if ( indexOrKey != null && indexOrKey.length() > 0 ) {
+					try {
+						Integer i = Integer.parseInt( indexOrKey );
+						path.setLeafNodeIndex( i );
+					}
+					catch ( NumberFormatException e ) {
+						path.setLeafNodeMapKey( indexOrKey );
+					}
+				}
+
+				// match the remaining string
+				tmp = matcher.group( REMAINING_STRING_GROUP );
+			}
+			else {
+				throw log.getUnableToParsePropertyPathException( property );
+			}
+		} while ( tmp != null );
+
+		if ( path.getLeafNode().isIterable() ) {
+			path.addNode( null );
+		}
+
+		return path;
+	}
+
+	/**
+	 * Validate that the given identifier is a valid Java identifier according to the Java Language Specification,
+	 * <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8">chapter 3.8</a>
+	 *
+	 * @param identifier string identifier to validate
+	 *
+	 * @return true if the given identifier is a valid Java Identifier
+	 *
+	 * @throws IllegalArgumentException if the given identifier is {@code null}
+	 */
+	private static boolean isValidJavaIdentifier(String identifier) {
+		Contracts.assertNotNull( identifier, "identifier param cannot be null" );
+
+		if ( identifier.length() == 0 || !Character.isJavaIdentifierStart( (int) identifier.charAt( 0 ) ) ) {
+			return false;
+		}
+
+		for ( int i = 1; i < identifier.length(); i++ ) {
+			if ( !Character.isJavaIdentifierPart( (int) identifier.charAt( i ) ) ) {
+				return false;
+			}
+		}
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/StandardValidationContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/StandardValidationContext.java
new file mode 100644
index 0000000..03b2dc3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/StandardValidationContext.java
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.metadata.ConstraintDescriptor;
+
+/**
+ * A {@link ValidationContext} implementation which creates and manages violations of type {@link ConstraintViolation}.
+ *
+ * @param <T> The type of the root bean for which this context is created.
+ *
+ * @author Gunnar Morling
+ */
+public class StandardValidationContext<T> extends ValidationContext<T, ConstraintViolation<T>> {
+
+	protected StandardValidationContext(Class<T> rootBeanClass, T rootBean,
+										MessageInterpolator messageInterpolator,
+										ConstraintValidatorFactory constraintValidatorFactory,
+										TraversableResolver traversableResolver,
+										boolean failFast) {
+
+		super(
+				rootBeanClass,
+				rootBean,
+				messageInterpolator,
+				constraintValidatorFactory,
+				traversableResolver,
+				failFast
+		);
+	}
+
+	@Override
+	public <U, V> ConstraintViolation<T> createConstraintViolation(
+			ValueContext<U, V> localContext, MessageAndPath messageAndPath,
+			ConstraintDescriptor<?> descriptor) {
+
+		String messageTemplate = messageAndPath.getMessage();
+		String interpolatedMessage = messageInterpolator.interpolate(
+				messageTemplate,
+				new MessageInterpolatorContext( descriptor, localContext.getCurrentValidatedValue() )
+		);
+
+		return new ConstraintViolationImpl<T>(
+				messageTemplate,
+				interpolatedMessage,
+				getRootBeanClass(),
+				getRootBean(),
+				localContext.getCurrentBean(),
+				localContext.getCurrentValidatedValue(),
+				messageAndPath.getPath(),
+				descriptor,
+				localContext.getElementType()
+		);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidationContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidationContext.java
new file mode 100644
index 0000000..2372b11
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidationContext.java
@@ -0,0 +1,288 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.MessageInterpolator;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.internal.util.IdentitySet;
+
+/**
+ * Context object keeping track of all important data for a top level {@link javax.validation.Validator#validate(Object, Class[])} },
+ * {@link javax.validation.Validator#validateValue(Class, String, Object, Class[])}  }
+ * or {@link javax.validation.Validator#validateProperty(Object, String, Class[])}  call.
+ * <p>
+ * We use this object to collect all failing constraints, but also to cache the caching traversable resolver for a full stack call.
+ * </p>
+ *
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ * @author Gunnar Morling
+ */
+public abstract class ValidationContext<T, C extends ConstraintViolation<T>> {
+
+	/**
+	 * The root bean of the validation.
+	 */
+	private final T rootBean;
+
+	/**
+	 * The root bean class of the validation.
+	 */
+	private final Class<T> rootBeanClass;
+
+	/**
+	 * Maps a group to an identity set to keep track of already validated objects. We have to make sure
+	 * that each object gets only validated once per group and property path.
+	 */
+	private final Map<Class<?>, IdentitySet> processedObjects;
+
+	/**
+	 * Maps an object to a list of paths in which it has been invalidated.
+	 */
+	private final Map<Object, Set<PathImpl>> processedPaths;
+
+	/**
+	 * Contains all failing constraints so far.
+	 */
+	private final Set<C> failingConstraintViolations;
+
+	/**
+	 * Flag indicating whether an object can only be validated once per group or once per group AND validation path.
+	 */
+	private boolean allowOneValidationPerPath = true;
+
+	/**
+	 * The message resolver which should be used in this context.
+	 */
+	protected final MessageInterpolator messageInterpolator;
+
+	/**
+	 * The constraint factory which should be used in this context.
+	 */
+	private final ConstraintValidatorFactory constraintValidatorFactory;
+
+	/**
+	 * Allows a JPA provider to decide whether a property should be validated.
+	 */
+	private final TraversableResolver traversableResolver;
+
+	/**
+	 * Whether or not validation should fail on the first constraint violation.
+	 */
+	private final boolean failFast;
+
+	public static <T> ValidationContext<T, ConstraintViolation<T>> getContextForValidate(T object, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) object.getClass();
+		return new StandardValidationContext<T>(
+				rootBeanClass, object, messageInterpolator, constraintValidatorFactory, traversableResolver, failFast
+		);
+	}
+
+	public static <T> ValidationContext<T, ConstraintViolation<T>> getContextForValidateProperty(T rootBean, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) rootBean.getClass();
+		return new StandardValidationContext<T>(
+				rootBeanClass, rootBean, messageInterpolator, constraintValidatorFactory, traversableResolver, failFast
+		);
+	}
+
+	public static <T> ValidationContext<T, ConstraintViolation<T>> getContextForValidateValue(Class<T> rootBeanClass, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+		return new StandardValidationContext<T>(
+				rootBeanClass,
+				null,
+				messageInterpolator,
+				constraintValidatorFactory,
+				traversableResolver,
+				failFast
+		);
+	}
+
+	public static <T> MethodValidationContext<T> getContextForValidateParameter(Method method, int parameterIndex, T object, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) object.getClass();
+		return new MethodValidationContext<T>(
+				rootBeanClass,
+				object,
+				method,
+				parameterIndex,
+				messageInterpolator,
+				constraintValidatorFactory,
+				traversableResolver,
+				failFast
+
+		);
+	}
+
+	public static <T> MethodValidationContext<T> getContextForValidateParameters(Method method, T object, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) object.getClass();
+		return new MethodValidationContext<T>(
+				rootBeanClass,
+				object,
+				method,
+				messageInterpolator,
+				constraintValidatorFactory,
+				traversableResolver,
+				failFast
+		);
+	}
+
+	protected ValidationContext(Class<T> rootBeanClass, T rootBean, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, boolean failFast) {
+
+		this.rootBean = rootBean;
+		this.rootBeanClass = rootBeanClass;
+		this.messageInterpolator = messageInterpolator;
+		this.constraintValidatorFactory = constraintValidatorFactory;
+		this.traversableResolver = traversableResolver;
+		this.failFast = failFast;
+
+		processedObjects = new HashMap<Class<?>, IdentitySet>();
+		processedPaths = new IdentityHashMap<Object, Set<PathImpl>>();
+		failingConstraintViolations = new HashSet<C>();
+	}
+
+	public final T getRootBean() {
+		return rootBean;
+	}
+
+	public final Class<T> getRootBeanClass() {
+		return rootBeanClass;
+	}
+
+	public final TraversableResolver getTraversableResolver() {
+		return traversableResolver;
+	}
+
+	public final boolean isFailFastModeEnabled() {
+		return failFast;
+	}
+
+	public abstract <U, V> C createConstraintViolation(ValueContext<U, V> localContext, MessageAndPath messageAndPath, ConstraintDescriptor<?> descriptor);
+
+	public final <U, V> List<C> createConstraintViolations(ValueContext<U, V> localContext, ConstraintValidatorContextImpl constraintValidatorContext) {
+		List<C> constraintViolations = new ArrayList<C>();
+		for ( MessageAndPath messageAndPath : constraintValidatorContext.getMessageAndPathList() ) {
+			C violation = createConstraintViolation(
+					localContext, messageAndPath, constraintValidatorContext.getConstraintDescriptor()
+			);
+			constraintViolations.add( violation );
+		}
+		return constraintViolations;
+	}
+
+	public final ConstraintValidatorFactory getConstraintValidatorFactory() {
+		return constraintValidatorFactory;
+	}
+
+	public boolean isAlreadyValidated(Object value, Class<?> group, PathImpl path) {
+		boolean alreadyValidated;
+		alreadyValidated = isAlreadyValidatedForCurrentGroup( value, group );
+
+		if ( alreadyValidated && allowOneValidationPerPath ) {
+			alreadyValidated = isAlreadyValidatedForPath( value, path );
+		}
+		return alreadyValidated;
+	}
+
+	public void markProcessed(Object value, Class<?> group, PathImpl path) {
+		markProcessForCurrentGroup( value, group );
+		if ( allowOneValidationPerPath ) {
+			markProcessedForCurrentPath( value, path );
+		}
+	}
+
+	public final void addConstraintFailures(Set<C> failingConstraintViolations) {
+		this.failingConstraintViolations.addAll( failingConstraintViolations );
+	}
+
+	public Set<C> getFailingConstraints() {
+		return failingConstraintViolations;
+	}
+
+	private boolean isAlreadyValidatedForPath(Object value, PathImpl path) {
+		Set<PathImpl> pathSet = processedPaths.get( value );
+		if ( pathSet == null ) {
+			return false;
+		}
+
+		for ( PathImpl p : pathSet ) {
+			if ( path.isRootPath() || p.isRootPath() || isSubPathOf( path, p ) || isSubPathOf( p, path ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	private boolean isSubPathOf(Path p1, Path p2) {
+		Iterator<Path.Node> p1Iter = p1.iterator();
+		Iterator<Path.Node> p2Iter = p2.iterator();
+		while ( p1Iter.hasNext() ) {
+			Path.Node p1Node = p1Iter.next();
+			if ( !p2Iter.hasNext() ) {
+				return false;
+			}
+			Path.Node p2Node = p2Iter.next();
+			if ( !p1Node.equals( p2Node ) ) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	private boolean isAlreadyValidatedForCurrentGroup(Object value, Class<?> group) {
+		final IdentitySet objectsProcessedInCurrentGroups = processedObjects.get( group );
+		return objectsProcessedInCurrentGroups != null && objectsProcessedInCurrentGroups.contains( value );
+	}
+
+	private void markProcessedForCurrentPath(Object value, PathImpl path) {
+		if ( processedPaths.containsKey( value ) ) {
+			processedPaths.get( value ).add( path );
+		}
+		else {
+			Set<PathImpl> set = new HashSet<PathImpl>();
+			set.add( path );
+			processedPaths.put( value, set );
+		}
+	}
+
+	private void markProcessForCurrentGroup(Object value, Class<?> group) {
+		if ( processedObjects.containsKey( group ) ) {
+			processedObjects.get( group ).add( value );
+		}
+		else {
+			IdentitySet set = new IdentitySet();
+			set.add( value );
+			processedObjects.put( group, set );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorContextImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorContextImpl.java
new file mode 100644
index 0000000..af9ee63
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorContextImpl.java
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.Validator;
+
+import org.hibernate.validator.HibernateValidatorContext;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Gunnar Morling
+ */
+public class ValidatorContextImpl implements HibernateValidatorContext {
+
+	private MessageInterpolator messageInterpolator;
+	private TraversableResolver traversableResolver;
+	private ConstraintValidatorFactory constraintValidatorFactory;
+	private final MessageInterpolator factoryMessageInterpolator;
+	private final TraversableResolver factoryTraversableResolver;
+	private final ConstraintValidatorFactory factoryConstraintValidatorFactory;
+	private final BeanMetaDataManager beanMetaDataManager;
+	private boolean failFast;
+
+	public ValidatorContextImpl(ConstraintValidatorFactory constraintValidatorFactory,
+								MessageInterpolator factoryMessageInterpolator,
+								TraversableResolver factoryTraversableResolver,
+								BeanMetaDataManager beanMetaDataManager,
+								boolean failFast) {
+
+		this.factoryConstraintValidatorFactory = constraintValidatorFactory;
+		this.factoryMessageInterpolator = factoryMessageInterpolator;
+		this.factoryTraversableResolver = factoryTraversableResolver;
+		this.beanMetaDataManager = beanMetaDataManager;
+		this.failFast = failFast;
+
+		messageInterpolator( factoryMessageInterpolator );
+		traversableResolver( factoryTraversableResolver );
+		constraintValidatorFactory( factoryConstraintValidatorFactory );
+	}
+
+	public HibernateValidatorContext messageInterpolator(MessageInterpolator messageInterpolator) {
+		if ( messageInterpolator == null ) {
+			this.messageInterpolator = factoryMessageInterpolator;
+		}
+		else {
+			this.messageInterpolator = messageInterpolator;
+		}
+		return this;
+	}
+
+	public HibernateValidatorContext traversableResolver(TraversableResolver traversableResolver) {
+		if ( traversableResolver == null ) {
+			this.traversableResolver = factoryTraversableResolver;
+		}
+		else {
+			this.traversableResolver = traversableResolver;
+		}
+		return this;
+	}
+
+	public HibernateValidatorContext constraintValidatorFactory(ConstraintValidatorFactory factory) {
+		if ( constraintValidatorFactory == null ) {
+			this.constraintValidatorFactory = factoryConstraintValidatorFactory;
+		}
+		else {
+			this.constraintValidatorFactory = factory;
+		}
+		return this;
+	}
+
+	public HibernateValidatorContext failFast(boolean failFast) {
+		this.failFast = failFast;
+		return this;
+	}
+
+	public Validator getValidator() {
+		return new ValidatorImpl(
+				constraintValidatorFactory,
+				messageInterpolator,
+				traversableResolver,
+				beanMetaDataManager,
+				failFast
+		);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorFactoryImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorFactoryImpl.java
new file mode 100644
index 0000000..4a45d70
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorFactoryImpl.java
@@ -0,0 +1,145 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.util.List;
+import java.util.Map;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.Validator;
+import javax.validation.spi.ConfigurationState;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.HibernateValidatorContext;
+import org.hibernate.validator.HibernateValidatorFactory;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.provider.MetaDataProvider;
+import org.hibernate.validator.internal.metadata.provider.ProgrammaticMetaDataProvider;
+import org.hibernate.validator.internal.metadata.provider.XmlMetaDataProvider;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+
+/**
+ * Factory returning initialized {@code Validator} instances. This is Hibernate Validator default
+ * implementation of the {@code ValidatorFactory} interface.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ValidatorFactoryImpl implements HibernateValidatorFactory {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final MessageInterpolator messageInterpolator;
+	private final TraversableResolver traversableResolver;
+	private final ConstraintValidatorFactory constraintValidatorFactory;
+	private final BeanMetaDataManager metaDataManager;
+	private final boolean failFast;
+
+	public ValidatorFactoryImpl(ConfigurationState configurationState) {
+		this.messageInterpolator = configurationState.getMessageInterpolator();
+		this.constraintValidatorFactory = configurationState.getConstraintValidatorFactory();
+		this.traversableResolver = configurationState.getTraversableResolver();
+		ConstraintHelper constraintHelper = new ConstraintHelper();
+
+		List<MetaDataProvider> metaDataProviders = newArrayList();
+
+		// HV-302; don't load XmlMappingParser if not necessary
+		if ( !configurationState.getMappingStreams().isEmpty() ) {
+			metaDataProviders.add(
+					new XmlMetaDataProvider(
+							constraintHelper, configurationState.getMappingStreams()
+					)
+			);
+		}
+
+		Map<String, String> properties = configurationState.getProperties();
+
+		boolean tmpFailFast = false;
+		if ( configurationState instanceof ConfigurationImpl ) {
+			ConfigurationImpl hibernateSpecificConfig = (ConfigurationImpl) configurationState;
+
+			if ( hibernateSpecificConfig.getProgrammaticMappings().size() > 0 ) {
+				metaDataProviders.add(
+						new ProgrammaticMetaDataProvider(
+								constraintHelper,
+								hibernateSpecificConfig.getProgrammaticMappings()
+						)
+				);
+			}
+			// check whether fail fast is programmatically enabled
+			tmpFailFast = hibernateSpecificConfig.getFailFast();
+		}
+		tmpFailFast = checkPropertiesForFailFast(
+				properties, tmpFailFast
+		);
+		this.failFast = tmpFailFast;
+		metaDataManager = new BeanMetaDataManager( constraintHelper, metaDataProviders );
+	}
+
+	public Validator getValidator() {
+		return usingContext().getValidator();
+	}
+
+	public MessageInterpolator getMessageInterpolator() {
+		return messageInterpolator;
+	}
+
+	public TraversableResolver getTraversableResolver() {
+		return traversableResolver;
+	}
+
+	public ConstraintValidatorFactory getConstraintValidatorFactory() {
+		return constraintValidatorFactory;
+	}
+
+	public <T> T unwrap(Class<T> type) {
+		if ( HibernateValidatorFactory.class.equals( type ) ) {
+			return type.cast( this );
+		}
+		throw log.getTypeNotSupportedException( type );
+	}
+
+	public HibernateValidatorContext usingContext() {
+		return new ValidatorContextImpl(
+				constraintValidatorFactory,
+				messageInterpolator,
+				traversableResolver,
+				metaDataManager,
+				failFast
+		);
+	}
+
+	private boolean checkPropertiesForFailFast(Map<String, String> properties, boolean programmaticConfiguredFailFast) {
+		boolean failFast = programmaticConfiguredFailFast;
+		String failFastPropValue = properties.get( HibernateValidatorConfiguration.FAIL_FAST );
+		if ( failFastPropValue != null ) {
+			boolean tmpFailFast = Boolean.valueOf( failFastPropValue );
+			if ( programmaticConfiguredFailFast && !tmpFailFast ) {
+				throw log.getInconsistentFailFastConfigurationException();
+			}
+			failFast = tmpFailFast;
+		}
+		return failFast;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
new file mode 100644
index 0000000..09c4fdd
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
@@ -0,0 +1,1288 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.MessageInterpolator;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.Validator;
+import javax.validation.groups.Default;
+import javax.validation.metadata.BeanDescriptor;
+
+import org.hibernate.validator.internal.engine.groups.Group;
+import org.hibernate.validator.internal.engine.groups.ValidationOrder;
+import org.hibernate.validator.internal.engine.groups.ValidationOrderGenerator;
+import org.hibernate.validator.internal.engine.groups.Sequence;
+import org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.aggregated.MethodMetaData;
+import org.hibernate.validator.internal.metadata.aggregated.ParameterMetaData;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.TypeHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodValidator;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * The main Bean Validation class. This is the core processing class of Hibernate Validator.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ValidatorImpl implements Validator, MethodValidator {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * The default group array used in case any of the validate methods is called without a group.
+	 */
+	private static final Class<?>[] DEFAULT_GROUP_ARRAY = new Class<?>[] { Default.class };
+
+	/**
+	 * Used to resolve the group execution order for a validate call.
+	 */
+	private final transient ValidationOrderGenerator validationOrderGenerator;
+
+	/**
+	 * Reference to shared {@code ConstraintValidatorFactory}.
+	 */
+	private final ConstraintValidatorFactory constraintValidatorFactory;
+
+	/**
+	 * {@link MessageInterpolator} as passed to the constructor of this instance.
+	 */
+	private final MessageInterpolator messageInterpolator;
+
+	/**
+	 * {@link TraversableResolver} as passed to the constructor of this instance.
+	 * Never use it directly, always use {@link #getCachingTraversableResolver()} to retrieved the single threaded caching wrapper.
+	 */
+	private final TraversableResolver traversableResolver;
+
+	/**
+	 * Used to get access to the bean meta data. Used to avoid to parsing the constraint configuration for each call
+	 * of a given entity.
+	 */
+	private final BeanMetaDataManager beanMetaDataManager;
+
+	/**
+	 * Indicates if validation has to be stopped on first constraint violation.
+	 */
+	private final boolean failFast;
+
+	public ValidatorImpl(ConstraintValidatorFactory constraintValidatorFactory, MessageInterpolator messageInterpolator, TraversableResolver traversableResolver, BeanMetaDataManager beanMetaDataManager, boolean failFast) {
+		this.constraintValidatorFactory = constraintValidatorFactory;
+		this.messageInterpolator = messageInterpolator;
+		this.traversableResolver = traversableResolver;
+		this.beanMetaDataManager = beanMetaDataManager;
+		this.failFast = failFast;
+
+		validationOrderGenerator = new ValidationOrderGenerator();
+	}
+
+	public final <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
+
+		Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() );
+
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		ValidationContext<T, ConstraintViolation<T>> validationContext = ValidationContext.getContextForValidate(
+				object, messageInterpolator, constraintValidatorFactory, getCachingTraversableResolver(), failFast
+		);
+
+		ValueContext<?, T> valueContext = ValueContext.getLocalExecutionContext( object, PathImpl.createRootPath() );
+
+		return validateInContext( valueContext, validationContext, validationOrder );
+	}
+
+	public final <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
+
+		Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() );
+
+		sanityCheckPropertyPath( propertyName );
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		ValidationContext<T, ConstraintViolation<T>> context = ValidationContext.getContextForValidateProperty(
+				object,
+				messageInterpolator,
+				constraintValidatorFactory,
+				getCachingTraversableResolver(),
+				failFast
+		);
+
+		return validatePropertyInContext( context, PathImpl.createPathFromString( propertyName ), validationOrder );
+	}
+
+	public final <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
+
+		Contracts.assertNotNull( beanType, MESSAGES.beanTypeCannotBeNull() );
+
+		sanityCheckPropertyPath( propertyName );
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		ValidationContext<T, ConstraintViolation<T>> context = ValidationContext.getContextForValidateValue(
+				beanType,
+				messageInterpolator,
+				constraintValidatorFactory,
+				getCachingTraversableResolver(),
+				failFast
+		);
+
+		return validateValueInContext( context, value, PathImpl.createPathFromString( propertyName ), validationOrder );
+	}
+
+	public final <T> Set<MethodConstraintViolation<T>> validateParameter(T object, Method method, Object parameterValue, int parameterIndex, Class<?>... groups) {
+
+		Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() );
+		Contracts.assertNotNull( method, MESSAGES.validatedMethodMustNotBeNull() );
+
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		MethodValidationContext<T> context = ValidationContext.getContextForValidateParameter(
+				method,
+				parameterIndex,
+				object,
+				messageInterpolator,
+				constraintValidatorFactory,
+				getCachingTraversableResolver(),
+				failFast
+		);
+
+		Object[] parameterValues = new Object[method.getParameterTypes().length];
+		parameterValues[parameterIndex] = parameterValue;
+
+		validateParametersInContext( context, object, parameterValues, validationOrder );
+
+		return context.getFailingConstraints();
+	}
+
+	public final <T> Set<MethodConstraintViolation<T>> validateAllParameters(T object, Method method, Object[] parameterValues, Class<?>... groups) {
+
+		Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() );
+		Contracts.assertNotNull( method, MESSAGES.validatedMethodMustNotBeNull() );
+
+		//this might be the case for parameterless methods
+		if ( parameterValues == null ) {
+			return Collections.emptySet();
+		}
+
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		MethodValidationContext<T> context = ValidationContext.getContextForValidateParameters(
+				method,
+				object,
+				messageInterpolator,
+				constraintValidatorFactory,
+				getCachingTraversableResolver(),
+				failFast
+		);
+
+		validateParametersInContext( context, object, parameterValues, validationOrder );
+
+		return context.getFailingConstraints();
+	}
+
+	public <T> Set<MethodConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups) {
+
+		Contracts.assertNotNull( method, MESSAGES.validatedMethodMustNotBeNull() );
+
+		ValidationOrder validationOrder = determineGroupValidationOrder( groups );
+
+		MethodValidationContext<T> context = ValidationContext.getContextForValidateParameters(
+				method,
+				object,
+				messageInterpolator,
+				constraintValidatorFactory,
+				getCachingTraversableResolver(),
+				failFast
+		);
+
+		validateReturnValueInContext( context, object, returnValue, validationOrder );
+
+		return context.getFailingConstraints();
+	}
+
+	public final BeanDescriptor getConstraintsForClass(Class<?> clazz) {
+		return beanMetaDataManager.getBeanMetaData( clazz ).getBeanDescriptor();
+	}
+
+	public final TypeDescriptor getConstraintsForType(Class<?> clazz) {
+		return beanMetaDataManager.getBeanMetaData( clazz ).getTypeDescriptor();
+	}
+
+	public final <T> T unwrap(Class<T> type) {
+		if ( type.isAssignableFrom( getClass() ) ) {
+			return type.cast( this );
+		}
+		throw log.getTypeNotSupportedException( type );
+	}
+
+	private void sanityCheckPropertyPath(String propertyName) {
+		if ( propertyName == null || propertyName.length() == 0 ) {
+			throw log.getInvalidPropertyPathException();
+		}
+	}
+
+	private ValidationOrder determineGroupValidationOrder(Class<?>[] groups) {
+		Contracts.assertNotNull( groups, MESSAGES.groupMustNotBeNull() );
+
+		Class<?>[] tmpGroups = groups;
+		// if no groups is specified use the default
+		if ( tmpGroups.length == 0 ) {
+			tmpGroups = DEFAULT_GROUP_ARRAY;
+		}
+
+		return validationOrderGenerator.getValidationOrder( Arrays.asList( tmpGroups ) );
+	}
+
+	/**
+	 * Validates the given object using the available context information.
+	 *
+	 * @param valueContext the current validation context
+	 * @param context the global validation context
+	 * @param validationOrder Contains the information which and in which order groups have to be executed
+	 * @param <T> The root bean type
+	 * @param <V> The type of the current object on the validation stack
+	 *
+	 * @return Set of constraint violations or the empty set if there were no violations.
+	 */
+	private <T, U, V, E extends ConstraintViolation<T>> Set<E> validateInContext(ValueContext<U, V> valueContext, ValidationContext<T, E> context, ValidationOrder validationOrder) {
+		if ( valueContext.getCurrentBean() == null ) {
+			return Collections.emptySet();
+		}
+
+		BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
+			validationOrder.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence( valueContext.getCurrentBean() ) );
+		}
+
+		// process first single groups. For these we can optimise object traversal by first running all validations on the current bean
+		// before traversing the object.
+		Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+		while ( groupIterator.hasNext() ) {
+			Group group = groupIterator.next();
+			valueContext.setCurrentGroup( group.getDefiningClass() );
+			validateConstraintsForCurrentGroup( context, valueContext );
+			if ( shouldFailFast( context ) ) {
+				return context.getFailingConstraints();
+			}
+		}
+		groupIterator = validationOrder.getGroupIterator();
+		while ( groupIterator.hasNext() ) {
+			Group group = groupIterator.next();
+			valueContext.setCurrentGroup( group.getDefiningClass() );
+			validateCascadedConstraints( context, valueContext );
+			if ( shouldFailFast( context ) ) {
+				return context.getFailingConstraints();
+			}
+		}
+
+		// now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
+		Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
+		while ( sequenceIterator.hasNext() ) {
+			Sequence sequence = sequenceIterator.next();
+			for ( Group group : sequence.getComposingGroups() ) {
+				int numberOfViolations = context.getFailingConstraints().size();
+				valueContext.setCurrentGroup( group.getDefiningClass() );
+
+				validateConstraintsForCurrentGroup( context, valueContext );
+				if ( shouldFailFast( context ) ) {
+					return context.getFailingConstraints();
+				}
+
+				validateCascadedConstraints( context, valueContext );
+				if ( shouldFailFast( context ) ) {
+					return context.getFailingConstraints();
+				}
+
+				if ( context.getFailingConstraints().size() > numberOfViolations ) {
+					break;
+				}
+			}
+		}
+		return context.getFailingConstraints();
+	}
+
+	private <T, U, V, E extends ConstraintViolation<T>> void validateConstraintsForCurrentGroup(ValidationContext<T, E> validationContext, ValueContext<U, V> valueContext) {
+		// we are not validating the default group there is nothing special to consider. If we are validating the default
+		// group sequence we have to consider that a class in the hierarchy could redefine the default group sequence.
+		if ( !valueContext.validatingDefault() ) {
+			validateConstraintsForNonDefaultGroup( validationContext, valueContext );
+		}
+		else {
+			validateConstraintsForDefaultGroup( validationContext, valueContext );
+		}
+	}
+
+	private <T, U, V, E extends ConstraintViolation<T>> void validateConstraintsForDefaultGroup(ValidationContext<T, E> validationContext, ValueContext<U, V> valueContext) {
+		final BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		final Map<Class<?>, Class<?>> validatedInterfaces = newHashMap();
+
+		// evaluating the constraints of a bean per class in hierarchy, this is necessary to detect potential default group re-definitions
+		for ( Class<?> clazz : beanMetaData.getClassHierarchy() ) {
+			BeanMetaData<U> hostingBeanMetaData = (BeanMetaData<U>) beanMetaDataManager.getBeanMetaData( clazz );
+			boolean defaultGroupSequenceIsRedefined = hostingBeanMetaData.defaultGroupSequenceIsRedefined();
+			List<Class<?>> defaultGroupSequence = hostingBeanMetaData.getDefaultGroupSequence( valueContext.getCurrentBean() );
+			Set<MetaConstraint<?>> metaConstraints = hostingBeanMetaData.getDirectMetaConstraints();
+
+			// if the current class redefined the default group sequence, this sequence has to be applied to all the class hierarchy.
+			if ( defaultGroupSequenceIsRedefined ) {
+				metaConstraints = hostingBeanMetaData.getMetaConstraints();
+			}
+
+			PathImpl currentPath = valueContext.getPropertyPath();
+			for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
+				valueContext.setCurrentGroup( defaultSequenceMember );
+				boolean validationSuccessful = true;
+				for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
+					// HV-466, an interface implemented more than one time in the hierarchy has to be validated only one
+					// time. An interface can define more than one constraint, we have to check the class we are validating.
+					final Class<?> declaringClass = metaConstraint.getLocation().getBeanClass();
+					if ( declaringClass.isInterface() ) {
+						Class<?> validatedForClass = validatedInterfaces.get( declaringClass );
+						if ( validatedForClass != null && !validatedForClass.equals( clazz ) ) {
+							continue;
+						}
+						validatedInterfaces.put( declaringClass, clazz );
+					}
+
+					boolean tmp = validateConstraint(
+							validationContext, valueContext, metaConstraint
+					);
+					if ( shouldFailFast( validationContext ) ) {
+						return;
+					}
+					validationSuccessful = validationSuccessful && tmp;
+					valueContext.setPropertyPath( currentPath );
+				}
+				if ( !validationSuccessful ) {
+					break;
+				}
+			}
+			validationContext.markProcessed(
+					valueContext.getCurrentBean(),
+					valueContext.getCurrentGroup(),
+					valueContext.getPropertyPath()
+			);
+
+			// all constraints in the hierarchy has been validated, stop validation.
+			if ( defaultGroupSequenceIsRedefined ) {
+				break;
+			}
+		}
+	}
+
+	private <T, U, V> void validateConstraintsForNonDefaultGroup(ValidationContext<T, ?> validationContext, ValueContext<U, V> valueContext) {
+		BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		PathImpl currentPath = valueContext.getPropertyPath();
+		for ( MetaConstraint<?> metaConstraint : beanMetaData.getMetaConstraints() ) {
+			validateConstraint( validationContext, valueContext, metaConstraint );
+			if ( shouldFailFast( validationContext ) ) {
+				return;
+			}
+			// reset the path to the state before this call
+			valueContext.setPropertyPath( currentPath );
+		}
+		validationContext.markProcessed(
+				valueContext.getCurrentBean(),
+				valueContext.getCurrentGroup(),
+				valueContext.getPropertyPath()
+		);
+	}
+
+	private <T, U, V> boolean validateConstraint(ValidationContext<T, ?> validationContext, ValueContext<U, V> valueContext, MetaConstraint<?> metaConstraint) {
+		boolean validationSuccessful = true;
+
+		if ( metaConstraint.getElementType() != ElementType.TYPE ) {
+			valueContext.appendNode( ReflectionHelper.getPropertyName( metaConstraint.getLocation().getMember() ) );
+		}
+
+		if ( isValidationRequired( validationContext, valueContext, metaConstraint ) ) {
+			@SuppressWarnings("unchecked")
+			V valueToValidate = (V) metaConstraint.getValue( valueContext.getCurrentBean() );
+			valueContext.setCurrentValidatedValue( valueToValidate );
+			validationSuccessful = metaConstraint.validateConstraint( validationContext, valueContext );
+		}
+
+		return validationSuccessful;
+	}
+
+	/**
+	 * Validates all cascaded constraints for the given bean using the current group set in the execution context.
+	 * This method must always be called after validateConstraints for the same context.
+	 *
+	 * @param validationContext The execution context
+	 * @param valueContext Collected information for single validation
+	 */
+	private <T, U, V> void validateCascadedConstraints(ValidationContext<T, ?> validationContext, ValueContext<U, V> valueContext) {
+		Set<Member> cascadedMembers = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() )
+				.getCascadedMembers();
+		PathImpl currentPath = valueContext.getPropertyPath();
+		for ( Member member : cascadedMembers ) {
+			String newNode = ReflectionHelper.getPropertyName( member );
+			valueContext.appendNode( newNode );
+
+			if ( isCascadeRequired( validationContext, valueContext, member ) ) {
+				Object value = ReflectionHelper.getValue( member, valueContext.getCurrentBean() );
+				if ( value != null ) {
+					Type type = value.getClass();
+					Iterator<?> iter = createIteratorForCascadedValue( type, value, valueContext );
+					boolean isIndexable = isIndexable( type );
+					validateCascadedConstraint(
+							validationContext,
+							iter,
+							isIndexable,
+							valueContext
+					);
+					if ( shouldFailFast( validationContext ) ) {
+						return;
+					}
+				}
+			}
+			// reset the path
+			valueContext.setPropertyPath( currentPath );
+		}
+	}
+
+	/**
+	 * Validates the cascading parameter or return value specified with the
+	 * given value context. Any further cascading references are followed if
+	 * applicable.
+	 *
+	 * @param validationContext The global context for the current validateParameter(s) or
+	 * validateReturnValue() call.
+	 * @param valueContext The local context for validating the given parameter/return
+	 * value.
+	 */
+	private <T, U, V> void validateCascadedMethodConstraints(MethodValidationContext<T> validationContext, ValueContext<U, V> valueContext) {
+
+		Object value = valueContext.getCurrentBean();
+		Type type = valueContext.getCurrentBeanType();
+		Iterator<?> iter = createIteratorForCascadedValue( type, value, valueContext );
+		boolean isIndexable = isIndexable( type );
+
+		validateCascadedConstraint(
+				validationContext,
+				iter,
+				isIndexable,
+				valueContext
+		);
+	}
+
+	/**
+	 * Called when processing cascaded constraints. This methods inspects the type of the cascaded constraints and in case
+	 * of a list or array creates an iterator in order to validate each element.
+	 *
+	 * @param type the type of the cascaded field or property.
+	 * @param value the actual value.
+	 * @param valueContext context object containing state about the currently validated instance
+	 *
+	 * @return An iterator over the value of a cascaded property.
+	 */
+	private Iterator<?> createIteratorForCascadedValue(Type type, Object value, ValueContext<?, ?> valueContext) {
+		Iterator<?> iter;
+		if ( ReflectionHelper.isIterable( type ) ) {
+			iter = ( (Iterable<?>) value ).iterator();
+			valueContext.markCurrentPropertyAsIterable();
+		}
+		else if ( ReflectionHelper.isMap( type ) ) {
+			Map<?, ?> map = (Map<?, ?>) value;
+			iter = map.entrySet().iterator();
+			valueContext.markCurrentPropertyAsIterable();
+		}
+		else if ( TypeHelper.isArray( type ) ) {
+			List<?> arrayList = Arrays.asList( (Object[]) value );
+			iter = arrayList.iterator();
+			valueContext.markCurrentPropertyAsIterable();
+		}
+		else {
+			List<Object> list = newArrayList();
+			list.add( value );
+			iter = list.iterator();
+		}
+		return iter;
+	}
+
+	/**
+	 * Called when processing cascaded constraints. This methods inspects the type of the cascaded constraints and in case
+	 * of a list or array creates an iterator in order to validate each element.
+	 *
+	 * @param type the type of the cascaded field or property.
+	 *
+	 * @return An iterator over the value of a cascaded property.
+	 */
+	private boolean isIndexable(Type type) {
+		boolean isIndexable = false;
+		if ( ReflectionHelper.isList( type ) ) {
+			isIndexable = true;
+		}
+		else if ( ReflectionHelper.isMap( type ) ) {
+			isIndexable = true;
+		}
+		else if ( TypeHelper.isArray( type ) ) {
+			isIndexable = true;
+		}
+		return isIndexable;
+	}
+
+	private <T> void validateCascadedConstraint(ValidationContext<T, ?> context, Iterator<?> iter, boolean isIndexable, ValueContext<?, ?> valueContext) {
+		Object value;
+		Object mapKey;
+		int i = 0;
+		while ( iter.hasNext() ) {
+			value = iter.next();
+			if ( value instanceof Map.Entry ) {
+				mapKey = ( (Map.Entry<?, ?>) value ).getKey();
+				valueContext.setKey( mapKey );
+				value = ( (Map.Entry<?, ?>) value ).getValue();
+			}
+			else if ( isIndexable ) {
+				valueContext.setIndex( i );
+			}
+
+			if ( !context.isAlreadyValidated(
+					value, valueContext.getCurrentGroup(), valueContext.getPropertyPath()
+			) ) {
+				ValidationOrder validationOrder = validationOrderGenerator.getValidationOrder(
+						Arrays.<Class<?>>asList( valueContext.getCurrentGroup() )
+				);
+
+				ValueContext<?, T> newValueContext;
+				if ( value != null ) {
+					newValueContext = ValueContext.getLocalExecutionContext( value, valueContext.getPropertyPath() );
+				}
+				else {
+					newValueContext = ValueContext.getLocalExecutionContext(
+							valueContext.getCurrentBeanType(), valueContext.getPropertyPath()
+					);
+				}
+
+				//propagate parameter index/name if required
+				if ( valueContext.getParameterIndex() != null ) {
+					newValueContext.setParameterIndex( valueContext.getParameterIndex() );
+					newValueContext.setParameterName( valueContext.getParameterName() );
+				}
+
+				validateInContext( newValueContext, context, validationOrder );
+				if ( shouldFailFast( context ) ) {
+					return;
+				}
+			}
+			i++;
+		}
+	}
+
+	private <T, U, V> Set<ConstraintViolation<T>> validatePropertyInContext(ValidationContext<T, ConstraintViolation<T>> context, PathImpl propertyPath, ValidationOrder validationOrder) {
+		List<MetaConstraint<?>> metaConstraints = newArrayList();
+		Iterator<Path.Node> propertyIter = propertyPath.iterator();
+		ValueContext<U, V> valueContext = collectMetaConstraintsForPath(
+				context.getRootBeanClass(),
+				context.getRootBean(),
+				propertyIter,
+				propertyPath,
+				metaConstraints
+		);
+
+		if ( valueContext.getCurrentBean() == null ) {
+			throw log.getInvalidPropertyPathException();
+		}
+
+		if ( metaConstraints.size() == 0 ) {
+			return context.getFailingConstraints();
+		}
+
+		BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
+			validationOrder.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence( valueContext.getCurrentBean() ) );
+		}
+
+		// process first single groups
+		Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+		while ( groupIterator.hasNext() ) {
+			Group group = groupIterator.next();
+			valueContext.setCurrentGroup( group.getDefiningClass() );
+			validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
+			if ( shouldFailFast( context ) ) {
+				return context.getFailingConstraints();
+			}
+		}
+
+		// now process sequences, stop after the first erroneous group
+		Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
+		while ( sequenceIterator.hasNext() ) {
+			Sequence sequence = sequenceIterator.next();
+			for ( Group group : sequence.getComposingGroups() ) {
+				valueContext.setCurrentGroup( group.getDefiningClass() );
+				int numberOfConstraintViolations = validatePropertyForCurrentGroup(
+						valueContext, context, metaConstraints
+				);
+				if ( shouldFailFast( context ) ) {
+					return context.getFailingConstraints();
+				}
+				if ( numberOfConstraintViolations > 0 ) {
+					break;
+				}
+			}
+		}
+
+		return context.getFailingConstraints();
+	}
+
+	private <T, U, V> Set<ConstraintViolation<T>> validateValueInContext(ValidationContext<T, ConstraintViolation<T>> context, V value, PathImpl propertyPath, ValidationOrder validationOrder) {
+		List<MetaConstraint<?>> metaConstraints = newArrayList();
+		ValueContext<U, V> valueContext = collectMetaConstraintsForPath(
+				context.getRootBeanClass(), null, propertyPath.iterator(), propertyPath, metaConstraints
+		);
+		valueContext.setCurrentValidatedValue( value );
+
+		if ( metaConstraints.size() == 0 ) {
+			return context.getFailingConstraints();
+		}
+
+		BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
+			validationOrder.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence( null ) );
+		}
+
+		// process first single groups
+		Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+		while ( groupIterator.hasNext() ) {
+			Group group = groupIterator.next();
+			valueContext.setCurrentGroup( group.getDefiningClass() );
+			validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
+			if ( shouldFailFast( context ) ) {
+				return context.getFailingConstraints();
+			}
+		}
+
+		// now process sequences, stop after the first erroneous group
+		Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
+		while ( sequenceIterator.hasNext() ) {
+			Sequence sequence = sequenceIterator.next();
+			for ( Group group : sequence.getComposingGroups() ) {
+				valueContext.setCurrentGroup( group.getDefiningClass() );
+				int numberOfConstraintViolations = validatePropertyForCurrentGroup(
+						valueContext, context, metaConstraints
+				);
+				if ( shouldFailFast( context ) ) {
+					return context.getFailingConstraints();
+				}
+				if ( numberOfConstraintViolations > 0 ) {
+					break;
+				}
+			}
+		}
+
+		return context.getFailingConstraints();
+	}
+
+	/**
+	 * Validates the property constraints associated to the current {@code ValueContext} group.
+	 *
+	 * @param valueContext The current validation context.
+	 * @param validationContext The global validation context.
+	 * @param metaConstraints All constraints associated to the property.
+	 *
+	 * @return The number of constraint violations raised when validating the {@code ValueContext} current group.
+	 */
+	private <T, U, V> int validatePropertyForCurrentGroup(ValueContext<U, V> valueContext, ValidationContext<T, ConstraintViolation<T>> validationContext, List<MetaConstraint<?>> metaConstraints) {
+		// we do not validate the default group, nothing special to do
+		if ( !valueContext.validatingDefault() ) {
+			return validatePropertyForNonDefaultGroup( valueContext, validationContext, metaConstraints );
+		}
+
+		// we are validating the default group, we have to consider that a class in the hierarchy could redefine the default group sequence
+		return validatePropertyForDefaultGroup( valueContext, validationContext, metaConstraints );
+	}
+
+	/**
+	 * Validates the property constraints for the current {@code ValueContext} group.
+	 * <p>
+	 * The current {@code ValueContext} group is not the default group.
+	 * </p>
+	 *
+	 * @param valueContext The current validation context.
+	 * @param validationContext The global validation context.
+	 * @param metaConstraints All constraints associated to the property.
+	 *
+	 * @return The number of constraint violations raised when validating the {@code ValueContext} current group.
+	 */
+	private <T, U, V> int validatePropertyForNonDefaultGroup(ValueContext<U, V> valueContext, ValidationContext<T, ConstraintViolation<T>> validationContext, List<MetaConstraint<?>> metaConstraints) {
+		int numberOfConstraintViolationsBefore = validationContext.getFailingConstraints().size();
+
+		for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
+			if ( isValidationRequired( validationContext, valueContext, metaConstraint ) ) {
+				if ( valueContext.getCurrentBean() != null ) {
+					@SuppressWarnings("unchecked")
+					V valueToValidate = (V) metaConstraint.getValue( valueContext.getCurrentBean() );
+					valueContext.setCurrentValidatedValue( valueToValidate );
+				}
+				metaConstraint.validateConstraint( validationContext, valueContext );
+				if ( shouldFailFast( validationContext ) ) {
+					return validationContext.getFailingConstraints()
+							.size() - numberOfConstraintViolationsBefore;
+				}
+			}
+		}
+		return validationContext.getFailingConstraints().size() - numberOfConstraintViolationsBefore;
+	}
+
+	/**
+	 * Validates the property for the default group.
+	 * <p>
+	 * This method checks that the default group sequence is not redefined in the class hierarchy for a superclass
+	 * hosting constraints for the property to validate.
+	 * </p>
+	 *
+	 * @param valueContext The current validation context.
+	 * @param validationContext The global validation context.
+	 * @param constraintList All constraints associated to the property to check.
+	 *
+	 * @return The number of constraint violations raised when validating the default group.
+	 */
+	private <T, U, V> int validatePropertyForDefaultGroup(ValueContext<U, V> valueContext, ValidationContext<T, ConstraintViolation<T>> validationContext, List<MetaConstraint<?>> constraintList) {
+		final int numberOfConstraintViolationsBefore = validationContext.getFailingConstraints().size();
+		final BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
+		final Map<Class<?>, Class<?>> validatedInterfaces = newHashMap();
+
+		// evaluating the constraints of a bean per class in hierarchy. this is necessary to detect potential default group re-definitions
+		for ( Class<?> clazz : beanMetaData.getClassHierarchy() ) {
+			BeanMetaData<U> hostingBeanMetaData = (BeanMetaData<U>) beanMetaDataManager.getBeanMetaData( clazz );
+			boolean defaultGroupSequenceIsRedefined = hostingBeanMetaData.defaultGroupSequenceIsRedefined();
+			Set<MetaConstraint<?>> metaConstraints = hostingBeanMetaData.getDirectMetaConstraints();
+			List<Class<?>> defaultGroupSequence = hostingBeanMetaData.getDefaultGroupSequence( valueContext.getCurrentBean() );
+
+			if ( defaultGroupSequenceIsRedefined ) {
+				metaConstraints = hostingBeanMetaData.getMetaConstraints();
+			}
+
+			for ( Class<?> groupClass : defaultGroupSequence ) {
+				boolean validationSuccessful = true;
+				valueContext.setCurrentGroup( groupClass );
+				for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
+					// HV-466, an interface implemented more than one time in the hierarchy has to be validated only one
+					// time. An interface can define more than one constraint, we have to check the class we are validating.
+					final Class<?> declaringClass = metaConstraint.getLocation().getBeanClass();
+					if ( declaringClass.isInterface() ) {
+						Class<?> validatedForClass = validatedInterfaces.get( declaringClass );
+						if ( validatedForClass != null && !validatedForClass.equals( clazz ) ) {
+							continue;
+						}
+						validatedInterfaces.put( declaringClass, clazz );
+					}
+
+					if ( constraintList.contains( metaConstraint )
+							&& isValidationRequired( validationContext, valueContext, metaConstraint ) ) {
+
+						if ( valueContext.getCurrentBean() != null ) {
+							@SuppressWarnings("unchecked")
+							V valueToValidate = (V) metaConstraint.getValue( valueContext.getCurrentBean() );
+							valueContext.setCurrentValidatedValue( valueToValidate );
+						}
+						boolean tmp = metaConstraint.validateConstraint( validationContext, valueContext );
+						validationSuccessful = validationSuccessful && tmp;
+						if ( shouldFailFast( validationContext ) ) {
+							return validationContext.getFailingConstraints()
+									.size() - numberOfConstraintViolationsBefore;
+						}
+					}
+				}
+				if ( !validationSuccessful ) {
+					break;
+				}
+			}
+			// all the hierarchy has been validated, stop validation.
+			if ( defaultGroupSequenceIsRedefined ) {
+				break;
+			}
+		}
+		return validationContext.getFailingConstraints().size() - numberOfConstraintViolationsBefore;
+	}
+
+	private <T> void validateParametersInContext(MethodValidationContext<T> validationContext, T object, Object[] parameterValues, ValidationOrder validationOrder) {
+
+		BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() );
+
+		//assert that there are no illegal method parameter constraints
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( validationContext.getMethod() );
+		methodMetaData.assertCorrectnessOfMethodParameterConstraints();
+
+		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
+			validationOrder.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence( object ) );
+		}
+
+		// process first single groups
+		Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+		while ( groupIterator.hasNext() ) {
+			validateParametersForGroup( validationContext, object, parameterValues, groupIterator.next() );
+			if ( shouldFailFast( validationContext ) ) {
+				return;
+			}
+		}
+
+		// now process sequences, stop after the first erroneous group
+		Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
+		while ( sequenceIterator.hasNext() ) {
+			Sequence sequence = sequenceIterator.next();
+			for ( Group group : sequence.getComposingGroups() ) {
+				int numberOfFailingConstraint = validateParametersForGroup(
+						validationContext, object, parameterValues, group
+				);
+				if ( shouldFailFast( validationContext ) ) {
+					return;
+				}
+				if ( numberOfFailingConstraint > 0 ) {
+					break;
+				}
+			}
+		}
+	}
+
+	private <T> int validateParametersForGroup(MethodValidationContext<T> validationContext, T object, Object[] parameterValues, Group group) {
+
+		int numberOfViolationsBefore = validationContext.getFailingConstraints().size();
+
+		Method method = validationContext.getMethod();
+
+		BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		// TODO GM: define behavior with respect to redefined default sequences. Should only the
+		// sequence from the validated bean be honored or also default sequence definitions up in
+		// the inheritance tree?
+		// For now a redefined default sequence will only be considered if specified at the bean
+		// hosting the validated itself, but no other default sequence from parent types
+
+		List<Class<?>> groupList;
+		if ( group.isDefaultGroup() ) {
+			groupList = beanMetaData.getDefaultGroupSequence( object );
+		}
+		else {
+			groupList = Arrays.<Class<?>>asList( group.getDefiningClass() );
+		}
+
+		//the only case where we can have multiple groups here is a redefined default group sequence
+		for ( Class<?> oneGroup : groupList ) {
+
+			int numberOfViolationsOfCurrentGroup = 0;
+
+			for ( int i = 0; i < parameterValues.length; i++ ) {
+
+				//ignore this parameter if this validation is for a single parameter and this is not the right one
+				if ( validationContext.getParameterIndex() != null && !validationContext.getParameterIndex()
+						.equals( i ) ) {
+					continue;
+				}
+
+				Object value = parameterValues[i];
+				String parameterName = methodMetaData.getParameterMetaData( i ).getName();
+
+				// validate constraints at parameter itself
+				ValueContext<T, Object> valueContext = ValueContext.getLocalExecutionContext(
+						object, PathImpl.createPathForMethodParameter( method, parameterName ), i, parameterName
+				);
+				valueContext.setCurrentValidatedValue( value );
+				valueContext.setCurrentGroup( oneGroup );
+
+				numberOfViolationsOfCurrentGroup += validateParameterForGroup(
+						validationContext, valueContext, methodMetaData.getParameterMetaData( i )
+				);
+				if ( shouldFailFast( validationContext ) ) {
+					return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+				}
+			}
+
+			//stop processing after first group with errors occurred
+			if ( numberOfViolationsOfCurrentGroup > 0 ) {
+				break;
+			}
+		}
+
+		// validate parameter beans annotated with @Valid if required
+		for ( int i = 0; i < parameterValues.length; i++ ) {
+
+			//ignore this parameter if this validation is for a single parameter and this is not the right one
+			if ( validationContext.getParameterIndex() != null && !validationContext.getParameterIndex().equals( i ) ) {
+				continue;
+			}
+
+			Object value = parameterValues[i];
+			ParameterMetaData parameterMetaData = methodMetaData.getParameterMetaData( i );
+			String parameterName = parameterMetaData.getName();
+
+			if ( parameterMetaData.isCascading() && value != null ) {
+
+				ValueContext<Object, ?> cascadingvalueContext = ValueContext.getLocalExecutionContext(
+						value, PathImpl.createPathForMethodParameter( method, parameterName ), i, parameterName
+				);
+				cascadingvalueContext.setCurrentGroup( group.getDefiningClass() );
+
+				//TODO GM: consider violations from cascaded validation
+				validateCascadedMethodConstraints( validationContext, cascadingvalueContext );
+				if ( shouldFailFast( validationContext ) ) {
+					break;
+				}
+			}
+		}
+
+		return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+	}
+
+	/**
+	 * Validates the constraints at the specified parameter which are part of
+	 * the given value context's current group. Any occurred constraint
+	 * violations are stored in the given validation context.
+	 *
+	 * @param validationContext The validation context for storing constraint violations.
+	 * @param valueContext The value context specifying the group and value to validate.
+	 * @param parameterMetaData Meta data on the constraints to evaluate.
+	 *
+	 * @return The number of constraint violations occurred during validation of
+	 *         the specified constraints.
+	 */
+	private <T, U, V> int validateParameterForGroup(MethodValidationContext<T> validationContext, ValueContext<U, V> valueContext, ParameterMetaData parameterMetaData) {
+
+		int numberOfViolationsBefore = validationContext.getFailingConstraints().size();
+
+		for ( MetaConstraint<?> metaConstraint : parameterMetaData ) {
+
+			//ignore constraints not part of the evaluated group
+			if ( !metaConstraint.getGroupList().contains( valueContext.getCurrentGroup() ) ) {
+				continue;
+			}
+
+			metaConstraint.validateConstraint( validationContext, valueContext );
+			if ( shouldFailFast( validationContext ) ) {
+				break;
+			}
+		}
+
+		return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+	}
+
+	private <V, T> void validateReturnValueInContext(MethodValidationContext<T> context, T bean, V value, ValidationOrder validationOrder) {
+
+		BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( context.getRootBeanClass() );
+
+		if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
+			validationOrder.assertDefaultGroupSequenceIsExpandable( beanMetaData.getDefaultGroupSequence( bean ) );
+		}
+
+		Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+
+		// process first single groups
+		while ( groupIterator.hasNext() ) {
+			validateReturnValueForGroup( context, bean, value, groupIterator.next() );
+			if ( shouldFailFast( context ) ) {
+				return;
+			}
+		}
+
+		// now process sequences, stop after the first erroneous group
+		Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
+		while ( sequenceIterator.hasNext() ) {
+			Sequence sequence = sequenceIterator.next();
+			for ( Group group : sequence.getComposingGroups() ) {
+				int numberOfFailingConstraint = validateReturnValueForGroup(
+						context, bean, value, group
+				);
+				if ( shouldFailFast( context ) ) {
+					return;
+				}
+				if ( numberOfFailingConstraint > 0 ) {
+					break;
+				}
+			}
+		}
+	}
+
+	//TODO GM: if possible integrate with validateParameterForGroup()
+	private <T, V> int validateReturnValueForGroup(MethodValidationContext<T> validationContext, T bean, V value, Group group) {
+
+		int numberOfViolationsBefore = validationContext.getFailingConstraints().size();
+
+		Method method = validationContext.getMethod();
+
+		BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		// TODO GM: define behavior with respect to redefined default sequences. Should only the
+		// sequence from the validated bean be honored or also default sequence definitions up in
+		// the inheritance tree?
+		// For now a redefined default sequence will only be considered if specified at the bean
+		// hosting the validated itself, but no other default sequence from parent types
+
+		List<Class<?>> groupList;
+		if ( group.isDefaultGroup() ) {
+			groupList = beanMetaData.getDefaultGroupSequence( bean );
+		}
+		else {
+			groupList = Arrays.<Class<?>>asList( group.getDefiningClass() );
+		}
+
+		//the only case where we can have multiple groups here is a redefined default group sequence
+		for ( Class<?> oneGroup : groupList ) {
+
+			int numberOfViolationsOfCurrentGroup = 0;
+
+			// validate constraints at return value itself
+			ValueContext<T, V> valueContext = ValueContext.getLocalExecutionContext(
+					bean, PathImpl.createPathForMethodReturnValue( method )
+			);
+			valueContext.setCurrentValidatedValue( value );
+			valueContext.setCurrentGroup( oneGroup );
+
+			numberOfViolationsOfCurrentGroup +=
+					validateReturnValueForGroup(
+							validationContext, valueContext, methodMetaData
+					);
+			if ( shouldFailFast( validationContext ) ) {
+				return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+			}
+
+			//stop processing after first group with errors occurred
+			if ( numberOfViolationsOfCurrentGroup > 0 ) {
+				break;
+			}
+		}
+
+		// cascaded validation if required
+		if ( methodMetaData.isCascading() && value != null ) {
+
+			ValueContext<V, Object> cascadingvalueContext = ValueContext.getLocalExecutionContext(
+					value, PathImpl.createPathForMethodReturnValue( method )
+			);
+			cascadingvalueContext.setCurrentGroup( group.getDefiningClass() );
+
+			validateCascadedMethodConstraints( validationContext, cascadingvalueContext );
+		}
+
+		return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+	}
+
+	private <T, V> int validateReturnValueForGroup(MethodValidationContext<T> validationContext,
+												   ValueContext<T, V> valueContext, MethodMetaData methodMetaData) {
+
+		int numberOfViolationsBefore = validationContext.getFailingConstraints().size();
+
+		for ( MetaConstraint<?> metaConstraint : methodMetaData ) {
+
+			if ( !metaConstraint.getGroupList().contains( valueContext.getCurrentGroup() ) ) {
+				continue;
+			}
+			metaConstraint.validateConstraint( validationContext, valueContext );
+			if ( shouldFailFast( validationContext ) ) {
+				break;
+			}
+		}
+
+		return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
+	}
+
+	/**
+	 * Collects all {@code MetaConstraint}s which match the given path relative to the specified root class.
+	 * <p>
+	 * This method is called recursively.
+	 * </p>
+	 *
+	 * @param clazz The class type to check for constraints.
+	 * @param value While resolving the property path this instance points to the current object. Might be {@code null}.
+	 * @param propertyIter An instance of {@code PropertyIterator} in order to iterate the items of the original property path.
+	 * @param propertyPath The property path for which constraints have to be collected.
+	 * @param metaConstraintsList An instance of {@code Map} where {@code MetaConstraint}s which match the given path are saved for each class in the hosting class hierarchy.
+	 *
+	 * @return Returns an instance of {@code ValueContext} which describes the local validation context associated to the given property path.
+	 */
+	private <T, U, V> ValueContext<U, V> collectMetaConstraintsForPath(Class<T> clazz, Object value, Iterator<Path.Node> propertyIter, PathImpl propertyPath, List<MetaConstraint<?>> metaConstraintsList) {
+		Path.Node elem = propertyIter.next();
+		Object newValue = value;
+
+		BeanMetaData<?> metaData = beanMetaDataManager.getBeanMetaData( clazz );
+		//use precomputed method list as ReflectionHelper#containsMember is slow
+		if ( !metaData.isPropertyPresent( elem.getName() ) ) {
+			throw log.getInvalidPropertyPathException( elem.getName(), metaData.getBeanClass().getName() );
+		}
+
+		if ( !propertyIter.hasNext() ) {
+			for ( Class<?> hierarchyClass : metaData.getClassHierarchy() ) {
+				metaData = beanMetaDataManager.getBeanMetaData( hierarchyClass );
+				for ( MetaConstraint<?> constraint : metaData.getDirectMetaConstraints() ) {
+					if ( elem.getName() != null && elem.getName()
+							.equals( ReflectionHelper.getPropertyName( constraint.getLocation().getMember() ) ) ) {
+						metaConstraintsList.add( constraint );
+					}
+				}
+			}
+		}
+		else {
+			Set<Member> cascadedMembers = metaData.getCascadedMembers();
+			for ( Member m : cascadedMembers ) {
+				if ( ReflectionHelper.getPropertyName( m ).equals( elem.getName() ) ) {
+					Type type = ReflectionHelper.typeOf( m );
+					newValue = newValue == null ? null : ReflectionHelper.getValue( m, newValue );
+					if ( elem.isInIterable() ) {
+						if ( newValue != null && elem.getIndex() != null ) {
+							newValue = ReflectionHelper.getIndexedValue( newValue, elem.getIndex() );
+						}
+						else if ( newValue != null && elem.getKey() != null ) {
+							newValue = ReflectionHelper.getMappedValue( newValue, elem.getKey() );
+						}
+						else if ( newValue != null ) {
+							throw log.getPropertyPathMustProvideIndexOrMapKeyException();
+						}
+						type = ReflectionHelper.getIndexedType( type );
+					}
+
+					// todo check the use of generics in this method. it really does not make sense - HF
+					@SuppressWarnings("unchecked")
+					Class<T> castedValueClass = (Class<T>) ( newValue == null ? type : newValue.getClass() );
+					@SuppressWarnings("unchecked")
+					T castedValue = (T) newValue;
+					return collectMetaConstraintsForPath(
+							castedValueClass,
+							castedValue,
+							propertyIter,
+							propertyPath,
+							metaConstraintsList
+					);
+				}
+			}
+		}
+
+		if ( newValue == null ) {
+			return ValueContext.getLocalExecutionContext( (Class<U>) clazz, propertyPath );
+		}
+		return ValueContext.getLocalExecutionContext( (U) value, propertyPath );
+	}
+
+	/**
+	 * Must be called and stored for the duration of the stack call
+	 * A new instance is returned each time
+	 *
+	 * @return The resolver for the duration of a full validation.
+	 */
+	private TraversableResolver getCachingTraversableResolver() {
+		return new SingleThreadCachedTraversableResolver( traversableResolver );
+	}
+
+	private boolean isValidationRequired(ValidationContext<?, ?> validationContext, ValueContext<?, ?> valueContext, MetaConstraint<?> metaConstraint) {
+		if ( !metaConstraint.getGroupList().contains( valueContext.getCurrentGroup() ) ) {
+			return false;
+		}
+
+		// HV-524 - class level constraints are reachable
+		if ( ElementType.TYPE.equals( metaConstraint.getElementType() ) ) {
+			return true;
+		}
+
+		boolean isReachable;
+		PathImpl path = valueContext.getPropertyPath();
+		Path pathToObject = path.getPathWithoutLeafNode();
+
+		try {
+			isReachable = validationContext.getTraversableResolver().isReachable(
+					valueContext.getCurrentBean(),
+					path.getLeafNode(),
+					validationContext.getRootBeanClass(),
+					pathToObject,
+					metaConstraint.getElementType()
+			);
+		}
+		catch ( RuntimeException e ) {
+			throw log.getErrorDuringCallOfTraversableResolverIsReachableException( e );
+		}
+
+		return isReachable;
+	}
+
+	private boolean isCascadeRequired(ValidationContext<?, ?> validationContext, ValueContext<?, ?> valueContext, Member member) {
+		final ElementType type = member instanceof Field ? ElementType.FIELD : ElementType.METHOD;
+		boolean isReachable;
+		boolean isCascadable;
+
+		PathImpl path = valueContext.getPropertyPath();
+		Path pathToObject = path.getPathWithoutLeafNode();
+
+		// HV-524 - class level constraints are reachable
+		if ( ElementType.TYPE.equals( type ) ) {
+			isReachable = true;
+		}
+		else {
+			try {
+				isReachable = validationContext.getTraversableResolver().isReachable(
+						valueContext.getCurrentBean(),
+						path.getLeafNode(),
+						validationContext.getRootBeanClass(),
+						pathToObject,
+						type
+				);
+			}
+			catch ( RuntimeException e ) {
+				throw log.getErrorDuringCallOfTraversableResolverIsReachableException( e );
+			}
+		}
+
+		if ( ElementType.TYPE.equals( type ) ) {
+			isCascadable = true;
+		}
+		else {
+			try {
+				isCascadable = validationContext.getTraversableResolver().isCascadable(
+						valueContext.getCurrentBean(),
+						path.getLeafNode(),
+						validationContext.getRootBeanClass(),
+						pathToObject,
+						type
+				);
+			}
+			catch ( RuntimeException e ) {
+				throw log.getErrorDuringCallOfTraversableResolverIsCascadableException( e );
+			}
+		}
+
+		return isReachable && isCascadable;
+	}
+
+	private boolean shouldFailFast(ValidationContext context) {
+		return context.isFailFastModeEnabled() && !context.getFailingConstraints().isEmpty();
+	}
+}
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValueContext.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValueContext.java
new file mode 100644
index 0000000..388a25f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/ValueContext.java
@@ -0,0 +1,223 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Type;
+import javax.validation.groups.Default;
+
+import org.hibernate.validator.internal.util.Contracts;
+
+/**
+ * An instance of this class is used to collect all the relevant information for validating a single class, property or
+ * method invocation.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class ValueContext<T, V> {
+	/**
+	 * The current bean which gets validated. This is the bean hosting the constraints which get validated.
+	 */
+	private final T currentBean;
+
+	/**
+	 * The class of the current bean.
+	 */
+	private final Class<T> currentBeanType;
+
+	/**
+	 * The index of the currently validated parameter if this context is used for a method parameter validation, null
+	 * in all other cases (standard bean validation, return value validation).
+	 */
+	private Integer parameterIndex;
+
+	/**
+	 * The name of the currently validated parameter if this context is used for a method parameter validation, null
+	 * in all other cases (standard bean validation, return value validation).
+	 */
+	private String parameterName;
+
+	/**
+	 * The current property path we are validating.
+	 */
+	private PathImpl propertyPath;
+
+	/**
+	 * The current group we are validating.
+	 */
+	private Class<?> currentGroup;
+
+	/**
+	 * The value which gets currently evaluated.
+	 */
+	private V currentValue;
+
+	/**
+	 * The {@code ElementType} the constraint was defined on
+	 */
+	private ElementType elementType;
+
+	/**
+	 * The type of annotated element.
+	 */
+	private Type typeOfAnnotatedElement;
+
+	public static <T, V> ValueContext<T, V> getLocalExecutionContext(T value, PathImpl propertyPath) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) value.getClass();
+		return new ValueContext<T, V>( value, rootBeanClass, propertyPath );
+	}
+
+	public static <T, V> ValueContext<T, V> getLocalExecutionContext(T value, PathImpl propertyPath, int parameterIndex, String parameterName) {
+		@SuppressWarnings("unchecked")
+		Class<T> rootBeanClass = (Class<T>) value.getClass();
+		return new ValueContext<T, V>( value, rootBeanClass, propertyPath, parameterIndex, parameterName );
+	}
+
+	public static <T, V> ValueContext<T, V> getLocalExecutionContext(Class<T> type, PathImpl propertyPath) {
+		return new ValueContext<T, V>( null, type, propertyPath );
+	}
+
+	protected ValueContext(T currentBean, Class<T> currentBeanType, PathImpl propertyPath) {
+		this.currentBean = currentBean;
+		this.currentBeanType = currentBeanType;
+		this.propertyPath = propertyPath;
+	}
+
+	private ValueContext(T currentBean, Class<T> currentBeanType, PathImpl propertyPath, int parameterIndex, String parameterName) {
+		this.currentBean = currentBean;
+		this.currentBeanType = currentBeanType;
+		this.propertyPath = propertyPath;
+		this.parameterIndex = parameterIndex;
+		this.parameterName = parameterName;
+	}
+
+	/**
+	 * @return returns the current path.
+	 */
+	public final PathImpl getPropertyPath() {
+		return propertyPath;
+	}
+
+	public final Class<?> getCurrentGroup() {
+		return currentGroup;
+	}
+
+	public final T getCurrentBean() {
+		return currentBean;
+	}
+
+	public final Class<T> getCurrentBeanType() {
+		return currentBeanType;
+	}
+
+	public Integer getParameterIndex() {
+		return parameterIndex;
+	}
+
+	public void setParameterIndex(int parameterIndex) {
+		this.parameterIndex = parameterIndex;
+	}
+
+	public String getParameterName() {
+		return parameterName;
+	}
+
+	public void setParameterName(String parameterName) {
+		this.parameterName = parameterName;
+	}
+
+	public final V getCurrentValidatedValue() {
+		return currentValue;
+	}
+
+	/**
+	 * Sets the property path to the match the currently validated value. To avoid side effects a copy of the
+	 * provided path is stored.
+	 *
+	 * @param propertyPath Sets the new property path.
+	 */
+	public final void setPropertyPath(PathImpl propertyPath) {
+		this.propertyPath = propertyPath;
+	}
+
+	/**
+	 * Adds a new node with the specified name to the current property path.
+	 *
+	 * @param node the name of the new node. Cannot be {@code null}.
+	 */
+	public final void appendNode(String node) {
+
+		Contracts.assertValueNotNull( node, "node" );
+
+		propertyPath = PathImpl.createCopy( propertyPath );
+		propertyPath.addNode( node );
+	}
+
+	public final void markCurrentPropertyAsIterable() {
+		propertyPath.makeLeafNodeIterable();
+	}
+
+	public final void setKey(Object key) {
+		propertyPath.setLeafNodeMapKey( key );
+	}
+
+	public final void setIndex(Integer index) {
+		propertyPath.setLeafNodeIndex( index );
+	}
+
+	public final void setCurrentGroup(Class<?> currentGroup) {
+		this.currentGroup = currentGroup;
+	}
+
+	public final void setCurrentValidatedValue(V currentValue) {
+		this.currentValue = currentValue;
+	}
+
+	public final boolean validatingDefault() {
+		return getCurrentGroup() != null && getCurrentGroup().getName().equals( Default.class.getName() );
+	}
+
+	public final ElementType getElementType() {
+		return elementType;
+	}
+
+	public final void setElementType(ElementType elementType) {
+		this.elementType = elementType;
+	}
+
+	public final Type getTypeOfAnnotatedElement() {
+		return typeOfAnnotatedElement;
+	}
+
+	public final void setTypeOfAnnotatedElement(Type typeOfAnnotatedElement) {
+		this.typeOfAnnotatedElement = typeOfAnnotatedElement;
+	}
+
+	@Override
+	public String toString() {
+		return "ValueContext [currentBean=" + currentBean
+				+ ", currentBeanType=" + currentBeanType + ", parameterIndex="
+				+ parameterIndex + ", parameterName=" + parameterName
+				+ ", propertyPath=" + propertyPath + ", currentGroup="
+				+ currentGroup + ", currentValue=" + currentValue
+				+ ", elementType=" + elementType + ", typeOfAnnotatedElement="
+				+ typeOfAnnotatedElement + "]";
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultGroupSequenceProviderAdapter.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultGroupSequenceProviderAdapter.java
new file mode 100644
index 0000000..abfbee9
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultGroupSequenceProviderAdapter.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import java.util.List;
+
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+/**
+ * Adapts a {@link org.hibernate.validator.group.DefaultGroupSequenceProvider} to a {@link DefaultGroupSequenceProvider}.
+ *
+ * @author Gunnar Morling
+ */
+ at SuppressWarnings("deprecation")
+public class DefaultGroupSequenceProviderAdapter<T> implements DefaultGroupSequenceProvider<T> {
+
+	private final org.hibernate.validator.group.DefaultGroupSequenceProvider<T> adaptee;
+
+	public static <T> DefaultGroupSequenceProviderAdapter<T> getInstance(org.hibernate.validator.group.DefaultGroupSequenceProvider<T> adaptee) {
+		return new DefaultGroupSequenceProviderAdapter<T>( adaptee );
+	}
+
+	private DefaultGroupSequenceProviderAdapter(org.hibernate.validator.group.DefaultGroupSequenceProvider<T> adaptee) {
+		this.adaptee = adaptee;
+	}
+
+	public List<Class<?>> getValidationGroups(T object) {
+		return adaptee.getValidationGroups( object );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultValidationOrder.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultValidationOrder.java
new file mode 100644
index 0000000..587bd6c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultValidationOrder.java
@@ -0,0 +1,131 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import javax.validation.GroupDefinitionException;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+
+/**
+ * An instance of {@code ValidationOrder} defines the group order during one validation call.
+ *
+ * @author Hardy Ferentschik
+ */
+public final class DefaultValidationOrder implements ValidationOrder {
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * The list of single groups to be used this validation.
+	 */
+	private List<Group> groupList = newArrayList();
+
+	/**
+	 * The different sequences for this validation. The map contains the sequences mapped to their sequence
+	 * name.
+	 */
+	private Map<Class<?>, Sequence> sequenceMap = newHashMap();
+
+	public Iterator<Group> getGroupIterator() {
+		return groupList.iterator();
+	}
+
+	public Iterator<Sequence> getSequenceIterator() {
+		return sequenceMap.values().iterator();
+	}
+
+	public void insertGroup(Group group) {
+		if ( !groupList.contains( group ) ) {
+			groupList.add( group );
+		}
+	}
+
+	public void insertSequence(Sequence sequence) {
+		if ( sequence == null ) {
+			return;
+		}
+
+		if ( !sequenceMap.containsKey( sequence.getDefiningClass() ) ) {
+			sequenceMap.put( sequence.getDefiningClass(), sequence );
+		}
+	}
+
+	@Override
+	public String toString() {
+		return "ValidationOrder{" +
+				"groupList=" + groupList +
+				", sequenceMap=" + sequenceMap +
+				'}';
+	}
+
+	/**
+	 * Asserts that the default group sequence of the validated bean can be expanded into the sequences which needs to
+	 * be validated.
+	 *
+	 * @param defaultGroupSequence the default group sequence of the bean currently validated
+	 *
+	 * @throws javax.validation.GroupDefinitionException in case {@code defaultGroupSequence} cannot be expanded into one of the group sequences
+	 * which need to be validated
+	 */
+	public void assertDefaultGroupSequenceIsExpandable(List<Class<?>> defaultGroupSequence)
+			throws GroupDefinitionException {
+		for ( Map.Entry<Class<?>, Sequence> entry : sequenceMap.entrySet() ) {
+			List<Group> sequenceGroups = entry.getValue().getComposingGroups();
+			int defaultGroupIndex = sequenceGroups.indexOf( Group.DEFAULT_GROUP );
+			if ( defaultGroupIndex != -1 ) {
+				List<Group> defaultGroupList = buildTempGroupList( defaultGroupSequence );
+				ensureDefaultGroupSequenceIsExpandable( sequenceGroups, defaultGroupList, defaultGroupIndex );
+			}
+		}
+	}
+
+	private void ensureDefaultGroupSequenceIsExpandable(List<Group> groupList, List<Group> defaultGroupList, int defaultGroupIndex) {
+		for ( int i = 0; i < defaultGroupList.size(); i++ ) {
+			Group group = defaultGroupList.get( i );
+			if ( Group.DEFAULT_GROUP.equals( group ) ) {
+				continue; // we don't have to consider the default group since it is the one we want to replace
+			}
+			int index = groupList.indexOf( group ); // check whether the sequence contains group of the default group sequence
+			if ( index == -1 ) {
+				continue; // if the group is not in the sequence we can continue
+			}
+
+			if ( ( i == 0 && index == defaultGroupIndex - 1 ) || ( i == defaultGroupList.size() - 1 && index == defaultGroupIndex + 1 ) ) {
+				// if we are at the beginning or end of he defaultGroupSequence and the matches are either directly before resp after we can continue as well,
+				// since we basically have two groups
+				continue;
+			}
+			throw log.getUnableToExpandDefaultGroupListException( defaultGroupList, groupList );
+		}
+	}
+
+	private List<Group> buildTempGroupList(List<Class<?>> defaultGroupSequence) {
+		List<Group> groups = new ArrayList<Group>();
+		for ( Class<?> clazz : defaultGroupSequence ) {
+			Group g = new Group( clazz );
+			groups.add( g );
+		}
+		return groups;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Group.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Group.java
new file mode 100644
index 0000000..e5498b1
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Group.java
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import javax.validation.groups.Default;
+
+/**
+ * Encapsulates a single group.
+ *
+ * @author Hardy Ferentschik
+ */
+public class Group {
+	public static final Group DEFAULT_GROUP = new Group( Default.class );
+
+	/**
+	 * The actual group.
+	 */
+	private Class<?> group;
+
+	public Group(Class<?> group) {
+		this.group = group;
+	}
+
+	public Class<?> getDefiningClass() {
+		return group;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		Group group1 = ( Group ) o;
+
+		if ( group != null ? !group.equals( group1.group ) : group1.group != null ) {
+			return false;
+		}
+		return true;
+	}
+
+	public boolean isDefaultGroup() {
+		return getDefiningClass().getName().equals( Default.class.getName() );
+	}
+
+	@Override
+	public int hashCode() {
+		return group != null ? group.hashCode() : 0;
+	}
+
+	@Override
+	public String toString() {
+		return "Group{" + "group=" + group.getName() + '}';
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Sequence.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Sequence.java
new file mode 100644
index 0000000..4a13239
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/Sequence.java
@@ -0,0 +1,126 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import java.util.List;
+import javax.validation.GroupSequence;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+
+/**
+ * Models a group sequence.
+ *
+ * @author Hardy Ferentschik
+ */
+public class Sequence {
+	private static final Log log = LoggerFactory.make();
+
+	private final Class<?> sequence;
+	private List<Group> groups;
+	private boolean inheritedGroupsExpanded = false;
+
+	public Sequence(Class<?> sequence, List<Group> groups) {
+		this.groups = groups;
+		this.sequence = sequence;
+	}
+
+	public List<Group> getComposingGroups() {
+		return groups;
+	}
+
+	public Class<?> getDefiningClass() {
+		return sequence;
+	}
+
+	public void expandInheritedGroups() {
+		if ( inheritedGroupsExpanded ) {
+			return;
+		}
+
+		List<Group> expandedGroups = newArrayList();
+		for ( Group group : groups ) {
+			expandedGroups.add( group );
+			addInheritedGroups( group, expandedGroups );
+		}
+		groups = expandedGroups;
+		inheritedGroupsExpanded = true;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		Sequence sequence1 = (Sequence) o;
+
+		if ( groups != null ? !groups.equals( sequence1.groups ) : sequence1.groups != null ) {
+			return false;
+		}
+		if ( sequence != null ? !sequence.equals( sequence1.sequence ) : sequence1.sequence != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = sequence != null ? sequence.hashCode() : 0;
+		result = 31 * result + ( groups != null ? groups.hashCode() : 0 );
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "Sequence" );
+		sb.append( "{sequence=" ).append( sequence );
+		sb.append( ", groups=" ).append( groups );
+		sb.append( '}' );
+		return sb.toString();
+	}
+
+	/**
+	 * Recursively add inherited (groups defined on superclasses).
+	 *
+	 * @param group the group for which the inherited groups need to be added to {@code expandedGroups}
+	 * @param expandedGroups The list into which to add all groups
+	 */
+	private void addInheritedGroups(Group group, List<Group> expandedGroups) {
+		for ( Class<?> inheritedGroup : group.getDefiningClass().getInterfaces() ) {
+			if ( isGroupSequence( inheritedGroup ) ) {
+				throw log.getSequenceDefinitionsNotAllowedException();
+			}
+			Group g = new Group( inheritedGroup );
+			expandedGroups.add( g );
+			addInheritedGroups( g, expandedGroups );
+		}
+	}
+
+	private boolean isGroupSequence(Class<?> clazz) {
+		return clazz.getAnnotation( GroupSequence.class ) != null;
+	}
+}
+
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrder.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrder.java
new file mode 100644
index 0000000..253e095
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrder.java
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import java.util.Iterator;
+import java.util.List;
+import javax.validation.GroupDefinitionException;
+
+/**
+ * Interface defining the methods needed to execute groups and sequences in the right order.
+ *
+ * @author Hardy Ferentschik
+ */
+public interface ValidationOrder {
+
+	public Iterator<Group> getGroupIterator();
+
+	public Iterator<Sequence> getSequenceIterator();
+
+	/**
+	 * Asserts that the default group sequence of the validated bean can be expanded into the sequences which needs to
+	 * be validated.
+	 *
+	 * @param defaultGroupSequence the default group sequence of the bean currently validated
+	 *
+	 * @throws GroupDefinitionException in case {@code defaultGroupSequence} cannot be expanded into one of the group sequences
+	 * which need to be validated
+	 */
+	public void assertDefaultGroupSequenceIsExpandable(List<Class<?>> defaultGroupSequence)
+			throws GroupDefinitionException;
+}
\ No newline at end of file
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrderGenerator.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrderGenerator.java
new file mode 100644
index 0000000..0d58db2
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/ValidationOrderGenerator.java
@@ -0,0 +1,150 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.groups;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import javax.validation.GroupSequence;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Helper class used to order groups and sequences into the right order for validation.
+ *
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ValidationOrderGenerator {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final ConcurrentMap<Class<?>, Sequence> resolvedSequences = new ConcurrentHashMap<Class<?>, Sequence>();
+
+	/**
+	 * Generates a order of groups and sequences for the specified validation groups.
+	 *
+	 * @param groups The groups specified at the validation call.
+	 *
+	 * @return an instance of {@code ValidationOrder} defining the order in which validation has to occur.
+	 */
+	public ValidationOrder getValidationOrder(Collection<Class<?>> groups) {
+		if ( groups == null || groups.size() == 0 ) {
+			throw log.getAtLeastOneGroupHasToBeSpecifiedException();
+		}
+
+		for ( Class<?> clazz : groups ) {
+			if ( !clazz.isInterface() ) {
+				throw log.getGroupHasToBeAnInterfaceException( clazz.getName() );
+			}
+		}
+
+		DefaultValidationOrder order = new DefaultValidationOrder();
+		for ( Class<?> clazz : groups ) {
+			if ( isGroupSequence( clazz ) ) {
+				insertSequence( clazz, order );
+			}
+			else {
+				Group group = new Group( clazz );
+				order.insertGroup( group );
+				insertInheritedGroups( clazz, order );
+			}
+		}
+
+		return order;
+	}
+
+	private boolean isGroupSequence(Class<?> clazz) {
+		return clazz.getAnnotation( GroupSequence.class ) != null;
+	}
+
+	/**
+	 * Recursively add inherited groups into the group chain.
+	 *
+	 * @param clazz The group interface
+	 * @param chain The group chain we are currently building.
+	 */
+	private void insertInheritedGroups(Class<?> clazz, DefaultValidationOrder chain) {
+		for ( Class<?> inheritedGroup : clazz.getInterfaces() ) {
+			Group group = new Group( inheritedGroup );
+			chain.insertGroup( group );
+			insertInheritedGroups( inheritedGroup, chain );
+		}
+	}
+
+	private void insertSequence(Class<?> sequenceClass, DefaultValidationOrder validationOrder) {
+		Sequence sequence = resolvedSequences.get( sequenceClass );
+		if ( sequence == null ) {
+			sequence = resolveSequence( sequenceClass, new ArrayList<Class<?>>() );
+			// we expand the inherited groups only after we determined whether the sequence is expandable
+			sequence.expandInheritedGroups();
+
+			// cache already resolved sequences
+			final Sequence cachedResolvedSequence = resolvedSequences.putIfAbsent( sequenceClass, sequence );
+			if ( cachedResolvedSequence != null ) {
+				sequence = cachedResolvedSequence;
+			}
+		}
+		validationOrder.insertSequence( sequence );
+	}
+
+	private Sequence resolveSequence(Class<?> sequenceClass, List<Class<?>> processedSequences) {
+		if ( processedSequences.contains( sequenceClass ) ) {
+			throw log.getCyclicDependencyInGroupsDefinitionException();
+		}
+		else {
+			processedSequences.add( sequenceClass );
+		}
+		List<Group> resolvedSequenceGroups = new ArrayList<Group>();
+		GroupSequence sequenceAnnotation = sequenceClass.getAnnotation( GroupSequence.class );
+		Class<?>[] sequenceArray = sequenceAnnotation.value();
+		for ( Class<?> clazz : sequenceArray ) {
+			if ( isGroupSequence( clazz ) ) {
+				Sequence tmpSequence = resolveSequence( clazz, processedSequences );
+				addGroups( resolvedSequenceGroups, tmpSequence.getComposingGroups() );
+			}
+			else {
+				List<Group> list = new ArrayList<Group>();
+				list.add( new Group( clazz ) );
+				addGroups( resolvedSequenceGroups, list );
+			}
+		}
+		return new Sequence( sequenceClass, resolvedSequenceGroups );
+	}
+
+	private void addGroups(List<Group> resolvedGroupSequence, List<Group> groups) {
+		for ( Group tmpGroup : groups ) {
+			if ( resolvedGroupSequence.contains( tmpGroup ) && resolvedGroupSequence.indexOf( tmpGroup ) < resolvedGroupSequence
+					.size() - 1 ) {
+				throw log.getUnableToExpandGroupSequenceException();
+			}
+			resolvedGroupSequence.add( tmpGroup );
+		}
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ValidationOrderGenerator" );
+		sb.append( "{resolvedSequences=" ).append( resolvedSequences );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/package.html
new file mode 100644
index 0000000..4956af3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/groups/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Helper classes for the processing of groups.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/engine/package.html
new file mode 100644
index 0000000..4940d4e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Implementations for the core interfaces of JSR-303.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/DefaultTraversableResolver.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/DefaultTraversableResolver.java
new file mode 100644
index 0000000..03faac8
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/DefaultTraversableResolver.java
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.engine.resolver;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Method;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidationException;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * A JPA 2 aware {@code TraversableResolver}.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class DefaultTraversableResolver implements TraversableResolver {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * Class to load to check whether JPA is on the classpath.
+	 */
+	private static final String PERSISTENCE_CLASS_NAME = "javax.persistence.Persistence";
+
+	/**
+	 * Method to check whether the found {@code Persistence} class is of the version 2
+	 */
+	private static final String PERSISTENCE_UTIL_METHOD = "getPersistenceUtil";
+
+	/**
+	 * Class to instantiate in case JPA 2 is on the classpath.
+	 */
+	private static final String JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME = "org.hibernate.validator.internal.engine.resolver.JPATraversableResolver";
+
+	/**
+	 * A JPA 2 aware traversable resolver.
+	 */
+	private TraversableResolver jpaTraversableResolver;
+
+
+	public DefaultTraversableResolver() {
+		detectJPA();
+	}
+
+	/**
+	 * Tries to load detect and load JPA.
+	 */
+	private void detectJPA() {
+		// check whether we have Persistence on the classpath
+		Class<?> persistenceClass;
+		try {
+			persistenceClass = ReflectionHelper.loadClass( PERSISTENCE_CLASS_NAME, this.getClass() );
+		}
+		catch ( ValidationException e ) {
+			log.debugf(
+					"Cannot find %s on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.",
+					PERSISTENCE_CLASS_NAME
+			);
+			return;
+		}
+
+		// check whether Persistence contains getPersistenceUtil
+		Method persistenceUtilGetter = ReflectionHelper.getMethod( persistenceClass, PERSISTENCE_UTIL_METHOD );
+		if ( persistenceUtilGetter == null ) {
+			log.debugf(
+					"Found %s on classpath, but no method '%s'. Assuming JPA 1 environment. All properties will per default be traversable.",
+					PERSISTENCE_CLASS_NAME,
+					PERSISTENCE_UTIL_METHOD
+			);
+			return;
+		}
+
+		// try to invoke the method to make sure that we are dealing with a complete JPA2 implementation
+		// unfortunately there are several incomplete implementations out there (see HV-374)
+		try {
+			Object persistence = ReflectionHelper.newInstance( persistenceClass, "persistence provider" );
+			ReflectionHelper.getValue(persistenceUtilGetter, persistence );
+		}
+		catch ( Exception e ) {
+			log.debugf(
+					"Unable to invoke %s.%s. Inconsistent JPA environment. All properties will per default be traversable.",
+					PERSISTENCE_CLASS_NAME,
+					PERSISTENCE_UTIL_METHOD
+			);
+		}
+
+		log.debugf(
+				"Found %s on classpath containing '%s'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver",
+				PERSISTENCE_CLASS_NAME,
+				PERSISTENCE_UTIL_METHOD
+		);
+
+		try {
+			@SuppressWarnings("unchecked")
+			Class<? extends TraversableResolver> jpaAwareResolverClass = (Class<? extends TraversableResolver>)
+					ReflectionHelper.loadClass( JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME, this.getClass() );
+			jpaTraversableResolver = ReflectionHelper.newInstance( jpaAwareResolverClass, "" );
+			log.debugf(
+					"Instantiated JPA aware TraversableResolver of type %s.", JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME
+			);
+		}
+		catch ( ValidationException e ) {
+			log.debugf(
+					"Unable to load or instantiate JPA aware resolver %s. All properties will per default be traversable.",
+					JPA_AWARE_TRAVERSABLE_RESOLVER_CLASS_NAME
+			);
+		}
+	}
+
+	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		return jpaTraversableResolver == null || jpaTraversableResolver.isReachable(
+				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
+		);
+	}
+
+	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		return jpaTraversableResolver == null || jpaTraversableResolver.isCascadable(
+				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
+		);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/JPATraversableResolver.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/JPATraversableResolver.java
new file mode 100644
index 0000000..e87e622
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/JPATraversableResolver.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.resolver;
+
+import java.lang.annotation.ElementType;
+import javax.persistence.Persistence;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * An implementation of {@code TraversableResolver} which is aware of JPA 2 and utilizes {@code PersistenceUtil} to get
+ * query the reachability of a property.
+ * This resolver will be automatically enabled if JPA 2 is on the classpath and the {@code DefaultTraversableResolver} is
+ * used.
+ *
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+public class JPATraversableResolver implements TraversableResolver {
+	private static final Log log = LoggerFactory.make();
+
+	public final boolean isReachable(Object traversableObject,
+									 Path.Node traversableProperty,
+									 Class<?> rootBeanType,
+									 Path pathToTraversableObject,
+									 ElementType elementType) {
+		if ( log.isTraceEnabled() ) {
+			log.tracef(
+					"Calling isReachable on object %s with node name %s.",
+					traversableObject,
+					traversableProperty.getName()
+			);
+		}
+
+		// we have to check traversableProperty.getName() against null to check the root gets validated (see HV-266)
+		if ( traversableObject == null || traversableProperty.getName() == null ) {
+			return true;
+		}
+		else {
+			return Persistence.getPersistenceUtil().isLoaded( traversableObject, traversableProperty.getName() );
+		}
+	}
+
+	public final boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/SingleThreadCachedTraversableResolver.java b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/SingleThreadCachedTraversableResolver.java
new file mode 100644
index 0000000..2cce9af
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/SingleThreadCachedTraversableResolver.java
@@ -0,0 +1,161 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.engine.resolver;
+
+import java.lang.annotation.ElementType;
+import java.util.HashMap;
+import java.util.Map;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+
+/**
+ * Cache results of a delegated traversable resovler to optimize calls
+ * It works only for a single validate* call and should not be used if
+ * the TraversableResolver is accessed concurrently
+ *
+ * @author Emmanuel Bernard
+ */
+public class SingleThreadCachedTraversableResolver implements TraversableResolver {
+	private TraversableResolver delegate;
+	private Map<TraversableHolder, TraversableHolder> traversables = new HashMap<TraversableHolder, TraversableHolder>();
+
+	public SingleThreadCachedTraversableResolver(TraversableResolver delegate) {
+		this.delegate = delegate;
+	}
+
+	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		TraversableHolder currentLH = new TraversableHolder(
+				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
+		);
+		TraversableHolder cachedLH = traversables.get( currentLH );
+		if ( cachedLH == null ) {
+			currentLH.isReachable = delegate.isReachable(
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+			traversables.put( currentLH, currentLH );
+			cachedLH = currentLH;
+		}
+		else if ( cachedLH.isReachable == null ) {
+			cachedLH.isReachable = delegate.isReachable(
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+		}
+		return cachedLH.isReachable;
+	}
+
+	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		TraversableHolder currentLH = new TraversableHolder(
+				traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
+		);
+		TraversableHolder cachedLH = traversables.get( currentLH );
+		if ( cachedLH == null ) {
+			currentLH.isCascadable = delegate.isCascadable(
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+			traversables.put( currentLH, currentLH );
+			cachedLH = currentLH;
+		}
+		else if ( cachedLH.isCascadable == null ) {
+			cachedLH.isCascadable = delegate.isCascadable(
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+		}
+		return cachedLH.isCascadable;
+	}
+
+	private static final class TraversableHolder {
+		private final Object traversableObject;
+		private final Path.Node traversableProperty;
+		private final Class<?> rootBeanType;
+		private final Path pathToTraversableObject;
+		private final ElementType elementType;
+		private final int hashCode;
+
+		private Boolean isReachable;
+		private Boolean isCascadable;
+
+
+		private TraversableHolder(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			this.traversableObject = traversableObject;
+			this.traversableProperty = traversableProperty;
+			this.rootBeanType = rootBeanType;
+			this.pathToTraversableObject = pathToTraversableObject;
+			this.elementType = elementType;
+			this.hashCode = buildHashCode();
+		}
+
+		@Override
+		public boolean equals(Object o) {
+			if ( this == o ) {
+				return true;
+			}
+			if ( o == null || getClass() != o.getClass() ) {
+				return false;
+			}
+
+			TraversableHolder that = ( TraversableHolder ) o;
+
+			if ( elementType != that.elementType ) {
+				return false;
+			}
+			if ( !pathToTraversableObject.equals( that.pathToTraversableObject ) ) {
+				return false;
+			}
+			if ( !rootBeanType.equals( that.rootBeanType ) ) {
+				return false;
+			}
+			if ( traversableObject != null ? !traversableObject.equals( that.traversableObject ) : that.traversableObject != null ) {
+				return false;
+			}
+			if ( !traversableProperty.equals( that.traversableProperty ) ) {
+				return false;
+			}
+
+			return true;
+		}
+
+		@Override
+		public int hashCode() {
+			return hashCode;
+		}
+
+		public int buildHashCode() {
+			int result = traversableObject != null ? traversableObject.hashCode() : 0;
+			result = 31 * result + traversableProperty.hashCode();
+			result = 31 * result + rootBeanType.hashCode();
+			result = 31 * result + pathToTraversableObject.hashCode();
+			result = 31 * result + elementType.hashCode();
+			return result;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/package.html
new file mode 100644
index 0000000..3399178
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/engine/resolver/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Various implementations of the TraversableResolver interface.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/BeanMetaDataManager.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/BeanMetaDataManager.java
new file mode 100644
index 0000000..14bd31c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/BeanMetaDataManager.java
@@ -0,0 +1,179 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata;
+
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl;
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl.BeanMetaDataBuilder;
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider;
+import org.hibernate.validator.internal.metadata.provider.MetaDataProvider;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+import org.hibernate.validator.internal.util.ConcurrentReferenceHashMap;
+import org.hibernate.validator.internal.util.Contracts;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.ConcurrentReferenceHashMap.Option.IDENTITY_COMPARISONS;
+import static org.hibernate.validator.internal.util.ConcurrentReferenceHashMap.ReferenceType.SOFT;
+
+/**
+ * This manager is in charge of providing all constraint related meta data
+ * required by the validation engine.
+ * <p>
+ * Actual retrieval of meta data is delegated to {@link MetaDataProvider}
+ * implementations which load meta-data based e.g. based on annotations or XML.
+ * </p>
+ * <p>
+ * For performance reasons a cache is used which stores all meta data once
+ * loaded for repeated retrieval. Upon initialization this cache is populated
+ * with meta data provided by the given <i>eager</i> providers. If the cache
+ * doesn't contain the meta data for a requested type it will be retrieved on
+ * demand using the annotation based provider.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public class BeanMetaDataManager {
+	/**
+	 * The default initial capacity for this cache.
+	 */
+	static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+	/**
+	 * The default load factor for this cache.
+	 */
+	static final float DEFAULT_LOAD_FACTOR = 0.75f;
+
+	/**
+	 * The default concurrency level for this cache.
+	 */
+	static final int DEFAULT_CONCURRENCY_LEVEL = 16;
+
+	/**
+	 * Additional metadata providers used for meta data retrieval if
+	 * the XML and/or programmatic configuration is used.
+	 */
+	private final List<MetaDataProvider> metaDataProviders;
+
+	/**
+	 * Helper for builtin constraints and their validator implementations
+	 */
+	private final ConstraintHelper constraintHelper;
+
+	/**
+	 * Used to cache the constraint meta data for validated entities
+	 */
+	private final ConcurrentReferenceHashMap<Class<?>, BeanMetaData<?>> beanMetaDataCache;
+
+	public BeanMetaDataManager(ConstraintHelper constraintHelper, MetaDataProvider... metaDataProviders) {
+		this( constraintHelper, Arrays.asList( metaDataProviders ) );
+	}
+
+	/**
+	 * @param constraintHelper the constraint helper
+	 * @param optionalMetaDataProviders optional meta data provider used on top of the annotation based provider
+	 */
+	public BeanMetaDataManager(ConstraintHelper constraintHelper,
+							   List<MetaDataProvider> optionalMetaDataProviders) {
+		this.constraintHelper = constraintHelper;
+		this.metaDataProviders = newArrayList();
+		this.metaDataProviders.addAll( optionalMetaDataProviders );
+
+		this.beanMetaDataCache = new ConcurrentReferenceHashMap<Class<?>, BeanMetaData<?>>(
+				DEFAULT_INITIAL_CAPACITY,
+				DEFAULT_LOAD_FACTOR,
+				DEFAULT_CONCURRENCY_LEVEL,
+				SOFT,
+				SOFT,
+				EnumSet.of( IDENTITY_COMPARISONS )
+		);
+
+
+		AnnotationProcessingOptions annotationProcessingOptions = getAnnotationProcessingOptionsFromNonDefaultProviders();
+		AnnotationMetaDataProvider defaultProvider = new AnnotationMetaDataProvider(
+				constraintHelper,
+				annotationProcessingOptions
+		);
+		this.metaDataProviders.add( defaultProvider );
+	}
+
+	@SuppressWarnings("unchecked")
+	public <T> BeanMetaData<T> getBeanMetaData(Class<T> beanClass) {
+		// TODO - Avoid usages of Messages class until https://issues.jboss.org/browse/LOGTOOL-45 is resolved (HF)
+		Contracts.assertNotNull( beanClass, "The bean type cannot be null." );
+
+		BeanMetaData<T> beanMetaData = (BeanMetaData<T>) beanMetaDataCache.get( beanClass );
+
+		// create a new BeanMetaData in case none is cached
+		if ( beanMetaData == null ) {
+			beanMetaData = createBeanMetaData( beanClass );
+
+			final BeanMetaData<T> cachedBeanMetaData = (BeanMetaData<T>) beanMetaDataCache.putIfAbsent(
+					beanClass,
+					beanMetaData
+			);
+			if ( cachedBeanMetaData != null ) {
+				beanMetaData = cachedBeanMetaData;
+			}
+		}
+
+		return beanMetaData;
+	}
+
+
+	public int numberOfCachedBeanMetaDataInstances() {
+		return beanMetaDataCache.size();
+	}
+
+	/**
+	 * Creates a {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaData} containing the meta data from all meta
+	 * data providers for the given type and its hierarchy.
+	 *
+	 * @param <T> The type of interest.
+	 * @param clazz The type's class.
+	 *
+	 * @return A bean meta data object for the given type.
+	 */
+	private <T> BeanMetaDataImpl<T> createBeanMetaData(Class<T> clazz) {
+		BeanMetaDataBuilder<T> builder = BeanMetaDataBuilder.getInstance( constraintHelper, clazz );
+
+		for ( MetaDataProvider provider : metaDataProviders ) {
+			for ( BeanConfiguration<? super T> beanConfiguration : provider.getBeanConfigurationForHierarchy( clazz ) ) {
+				builder.add( beanConfiguration );
+			}
+		}
+
+		return builder.build();
+	}
+
+	/**
+	 * @return returns the annotation ignores from the non annotation based meta data providers
+	 */
+	private AnnotationProcessingOptions getAnnotationProcessingOptionsFromNonDefaultProviders() {
+		AnnotationProcessingOptions options = new AnnotationProcessingOptions();
+		for ( MetaDataProvider metaDataProvider : metaDataProviders ) {
+			options.merge( metaDataProvider.getAnnotationProcessingOptions() );
+		}
+
+		return options;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/AbstractConstraintMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/AbstractConstraintMetaData.java
new file mode 100644
index 0000000..b95a111
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/AbstractConstraintMetaData.java
@@ -0,0 +1,149 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Base implementation for {@link ConstraintMetaData} with attributes common
+ * to all type of meta data.
+ *
+ * @author Gunnar Morling
+ */
+public abstract class AbstractConstraintMetaData implements ConstraintMetaData {
+
+	private final String name;
+
+	private final Class<?> type;
+
+	private final ConstraintMetaDataKind constrainedMetaDataKind;
+
+	private final Set<MetaConstraint<?>> constraints;
+
+	private final boolean isCascading;
+
+	private final boolean isConstrained;
+
+	/**
+	 * @param name the name of the constrained property, method or parameter
+	 * @param type the type of the constrained element
+	 * @param constraints the set of constraints
+	 * @param constrainedMetaDataKind the type of constraint - property, method or parameter constraint
+	 * @param isCascading should cascading constraints be evaluated. Returns {@code true} is the constrained element
+	 * is marked for cascaded validation ({@code @Valid}), {@code false} otherwise.
+	 * @param isConstrained returns {@code true} is there are direct constraints defined on this element or it is
+	 * marked for cascaded validation, {@code false} otherwise.
+	 */
+	public AbstractConstraintMetaData(String name,
+									  Class<?> type,
+									  Set<MetaConstraint<?>> constraints,
+									  ConstraintMetaDataKind constrainedMetaDataKind,
+									  boolean isCascading,
+									  boolean isConstrained) {
+		this.name = name;
+		this.type = type;
+		this.constraints = Collections.unmodifiableSet( constraints );
+		this.constrainedMetaDataKind = constrainedMetaDataKind;
+		this.isCascading = isCascading;
+		this.isConstrained = isConstrained;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public Class<?> getType() {
+		return type;
+	}
+
+	public Iterator<MetaConstraint<?>> iterator() {
+		return constraints.iterator();
+	}
+
+	public Set<MetaConstraint<?>> getConstraints() {
+		return constraints;
+	}
+
+	public ConstraintMetaDataKind getKind() {
+		return constrainedMetaDataKind;
+	}
+
+	public boolean isCascading() {
+		return isCascading;
+	}
+
+	public boolean isConstrained() {
+		return isConstrained;
+	}
+
+	protected Set<ConstraintDescriptorImpl<?>> asDescriptors(Set<MetaConstraint<?>> constraints) {
+		Set<ConstraintDescriptorImpl<?>> theValue = newHashSet();
+
+		for ( MetaConstraint<?> oneConstraint : constraints ) {
+			theValue.add( oneConstraint.getDescriptor() );
+		}
+
+		return theValue;
+	}
+
+	@Override
+	public String toString() {
+		return "AbstractConstraintMetaData [name=" + name
+				+ ", constrainedMetaDataKind=" + constrainedMetaDataKind
+				+ ", constraints=" + constraints + ", isCascading="
+				+ isCascading + ", isConstrained=" + isConstrained + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ( ( name == null ) ? 0 : name.hashCode() );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		AbstractConstraintMetaData other = (AbstractConstraintMetaData) obj;
+		if ( name == null ) {
+			if ( other.name != null ) {
+				return false;
+			}
+		}
+		else if ( !name.equals( other.name ) ) {
+			return false;
+		}
+		return true;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaData.java
new file mode 100644
index 0000000..0edaff3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaData.java
@@ -0,0 +1,139 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Set;
+import javax.validation.metadata.BeanDescriptor;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+
+/**
+ * Interface defining the meta data about the constraints defined in a given bean.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public interface BeanMetaData<T> {
+
+	/**
+	 * @return the class of the bean.
+	 */
+	Class<T> getBeanClass();
+
+	/**
+	 * @return an instance of {@code ElementDescriptor} describing the bean this meta data applies for.
+	 */
+	BeanDescriptor getBeanDescriptor();
+
+	/**
+	 * @return An instance of {@link TypeDescriptor} describing the bean this meta data applies for.
+	 */
+	TypeDescriptor getTypeDescriptor();
+
+	/**
+	 * @return A list of all cascaded methods and fields (methods/fields annotated with @Valid).
+	 */
+	Set<Member> getCascadedMembers();
+
+	/**
+	 * Get the composition of the default group sequence.
+	 * <p>
+	 * If the bean state is given in parameter and the bean metadata has a default group sequence provider then the
+	 * dynamic default group sequence composition is returned. In the other cases the default group sequence
+	 * redefinition specified by BV is used.
+	 * </p>
+	 *
+	 * @param beanState the bean state.
+	 *
+	 * @return a list of classes representing the default group sequence.
+	 */
+	List<Class<?>> getDefaultGroupSequence(T beanState);
+
+	/**
+	 * @return {@code true} if the entity redefines the default group sequence, {@code false} otherwise.
+	 */
+	boolean defaultGroupSequenceIsRedefined();
+
+	/**
+	 * @return A set of {@code MetaConstraint} instances encapsulating the information of all the constraints
+	 *         defined on the bean. This collection includes constraints from super classes as well
+	 */
+	Set<MetaConstraint<?>> getMetaConstraints();
+
+	/**
+	 * @return A set of {@code MetaConstraint} instances encapsulating the information of all the constraints
+	 *         defined on the bean directly (including constraints defined on implemented interfaces). It does not
+	 *         contain constraints from super classes or interfaces implemented by super classes
+	 */
+	Set<MetaConstraint<?>> getDirectMetaConstraints();
+
+	/**
+	 * Returns the constraint-related meta data for the given method of the
+	 * class represented by this bean meta data.
+	 *
+	 * @param method The method of interest.
+	 *
+	 * @return An aggregated view on the constraint related meta data from the
+	 *         given method all the methods from super-types which it overrides
+	 *         or implements.
+	 */
+	MethodMetaData getMetaDataFor(Method method);
+
+	/**
+	 * Returns the constraint-related meta data for all the methods of the type
+	 * represented by this bean meta data.
+	 *
+	 * @return A set with constraint-related method meta data. May be empty, but
+	 *         will never be null.
+	 */
+	Set<MethodMetaData> getAllMethodMetaData();
+
+	/**
+	 * Return {@code PropertyDescriptor} for the given property.
+	 *
+	 * @param propertyName the name of the property for which to retrieve the descriptor.
+	 *
+	 * @return Returns the {@code PropertyDescriptor} for the given property or {@code null} in case the
+	 *         property does not have a descriptor.
+	 */
+	PropertyMetaData getMetaDataFor(String propertyName);
+
+	/**
+	 * @param name The name of the property
+	 *
+	 * @return true if the property exists on the object
+	 *         even if the property does not host any constraint nor is cascaded
+	 */
+	boolean isPropertyPresent(String name);
+
+	/**
+	 * @return the property descriptors having at least one constraint defined or which are marked
+	 *         as cascaded (@Valid).
+	 */
+	Set<PropertyMetaData> getAllPropertyMetaData();
+
+	/**
+	 * @return Returns a list of classes representing the class hierarchy for the entity. The list start with the
+	 *         element itself and goes up the hierarchy chain. Interfaces are not included.
+	 */
+	List<Class<?>> getClassHierarchy();
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaDataImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaDataImpl.java
new file mode 100644
index 0000000..4a2d3ab
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/BeanMetaDataImpl.java
@@ -0,0 +1,593 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.validation.groups.Default;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.PropertyDescriptor;
+
+import org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.ConstraintMetaDataKind;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.BeanDescriptorImpl;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+import org.hibernate.validator.internal.metadata.raw.ConfigurationSource;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement.ConstrainedElementKind;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedField;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.internal.util.CollectionHelper.Partitioner;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.CollectionHelper.partition;
+import static org.hibernate.validator.internal.util.ReflectionHelper.computeAllImplementedInterfaces;
+
+/**
+ * This class encapsulates all meta data needed for validation. Implementations of {@code Validator} interface can
+ * instantiate an instance of this class and delegate the metadata extraction to it.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+ at SuppressWarnings("deprecation")
+public final class BeanMetaDataImpl<T> implements BeanMetaData<T> {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * The root bean class for this meta data.
+	 */
+	private final Class<T> beanClass;
+
+	/**
+	 * Set of all constraints for this bean type (defined on any implemented interfaces or super types)
+	 */
+	private final Set<MetaConstraint<?>> allMetaConstraints;
+
+	/**
+	 * Set of all constraints which are directly defined on the bean or any of the directly implemented interfaces
+	 */
+	private final Set<MetaConstraint<?>> directMetaConstraints;
+
+	/**
+	 * Contains constrained related meta data for all methods of the type
+	 * represented by this bean meta data. Keyed by method, values are an
+	 * aggregated view on each method together with all the methods from the
+	 * inheritance hierarchy with the same signature.
+	 */
+	private final Map<String, MethodMetaData> methodMetaData;
+
+	private final Map<String, PropertyMetaData> propertyMetaData;
+
+	/**
+	 * List of cascaded members.
+	 */
+	private final Set<Member> cascadedMembers;
+
+	/**
+	 * The default groups sequence for this bean class.
+	 */
+	private List<Class<?>> defaultGroupSequence = newArrayList();
+
+	/**
+	 * The default group sequence provider.
+	 *
+	 * @see org.hibernate.validator.group.GroupSequenceProvider
+	 * @see DefaultGroupSequenceProvider
+	 */
+	private DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider;
+
+	/**
+	 * The class hierarchy for this class starting with the class itself going up the inheritance chain. Interfaces
+	 * are not included.
+	 */
+	private List<Class<?>> classHierarchyWithoutInterfaces;
+
+	/**
+	 * Creates a new {@link BeanMetaDataImpl}
+	 *
+	 * @param beanClass The Java type represented by this meta data object.
+	 * @param defaultGroupSequence The default group sequence.
+	 * @param defaultGroupSequenceProvider The default group sequence provider if set.
+	 * @param constraintMetaData All constraint meta data relating to the represented type.
+	 */
+	public BeanMetaDataImpl(Class<T> beanClass,
+							List<Class<?>> defaultGroupSequence,
+							DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider,
+							Set<ConstraintMetaData> constraintMetaData) {
+
+		this.beanClass = beanClass;
+		this.propertyMetaData = newHashMap();
+
+		Set<PropertyMetaData> propertyMetaDataSet = newHashSet();
+		Set<MethodMetaData> methodMetaDataSet = newHashSet();
+
+		for ( ConstraintMetaData oneElement : constraintMetaData ) {
+			if ( oneElement.getKind() == ConstraintMetaDataKind.PROPERTY ) {
+				propertyMetaDataSet.add( (PropertyMetaData) oneElement );
+			}
+			else {
+				methodMetaDataSet.add( (MethodMetaData) oneElement );
+			}
+		}
+
+		Set<Member> cascadedMembers = newHashSet();
+		Set<MetaConstraint<?>> allMetaConstraints = newHashSet();
+
+		for ( PropertyMetaData oneProperty : propertyMetaDataSet ) {
+
+			propertyMetaData.put( oneProperty.getName(), oneProperty );
+
+			if ( oneProperty.isCascading() ) {
+				cascadedMembers.addAll( oneProperty.getCascadingMembers() );
+			}
+
+			allMetaConstraints.addAll( oneProperty.getConstraints() );
+		}
+
+		this.cascadedMembers = Collections.unmodifiableSet( cascadedMembers );
+		this.allMetaConstraints = Collections.unmodifiableSet( allMetaConstraints );
+
+		classHierarchyWithoutInterfaces = ReflectionHelper.computeClassHierarchy( beanClass, false );
+
+		setDefaultGroupSequenceOrProvider( defaultGroupSequence, defaultGroupSequenceProvider );
+
+		directMetaConstraints = buildDirectConstraintSets();
+
+		this.methodMetaData = Collections.unmodifiableMap( buildMethodMetaData( methodMetaDataSet ) );
+	}
+
+	public Class<T> getBeanClass() {
+		return beanClass;
+	}
+
+	public BeanDescriptor getBeanDescriptor() {
+		return getBeanDescriptorInternal();
+	}
+
+	public TypeDescriptor getTypeDescriptor() {
+		return getBeanDescriptorInternal();
+	}
+
+	public Set<Member> getCascadedMembers() {
+		return cascadedMembers;
+	}
+
+	public Set<MetaConstraint<?>> getMetaConstraints() {
+		return allMetaConstraints;
+	}
+
+	public Set<MetaConstraint<?>> getDirectMetaConstraints() {
+		return directMetaConstraints;
+	}
+
+	public MethodMetaData getMetaDataFor(Method method) {
+		return methodMetaData.get( method.getName() + Arrays.toString( method.getParameterTypes() ) );
+	}
+
+	public Set<MethodMetaData> getAllMethodMetaData() {
+		return new HashSet<MethodMetaData>( methodMetaData.values() );
+	}
+
+	public PropertyMetaData getMetaDataFor(String propertyName) {
+		return propertyMetaData.get( propertyName );
+	}
+
+	public boolean isPropertyPresent(String name) {
+		return propertyMetaData.containsKey( name );
+	}
+
+	public List<Class<?>> getDefaultGroupSequence(T beanState) {
+		if ( hasDefaultGroupSequenceProvider() ) {
+			List<Class<?>> providerDefaultGroupSequence = defaultGroupSequenceProvider.getValidationGroups( beanState );
+			return getValidDefaultGroupSequence( providerDefaultGroupSequence );
+		}
+
+		return Collections.unmodifiableList( defaultGroupSequence );
+	}
+
+	public boolean defaultGroupSequenceIsRedefined() {
+		return defaultGroupSequence.size() > 1 || hasDefaultGroupSequenceProvider();
+	}
+
+	public Set<PropertyMetaData> getAllPropertyMetaData() {
+		return Collections.unmodifiableSet( new HashSet<PropertyMetaData>( propertyMetaData.values() ) );
+	}
+
+	public List<Class<?>> getClassHierarchy() {
+		return classHierarchyWithoutInterfaces;
+	}
+
+	/**
+	 * Returns a bean descriptor representing this meta data object. A new
+	 * descriptor instance is created with each invocation. The descriptor might
+	 * be cached internally in the future should that need arise.
+	 *
+	 * @return A bean descriptor for this meta data object.
+	 */
+	private BeanDescriptorImpl<T> getBeanDescriptorInternal() {
+
+		return new BeanDescriptorImpl<T>(
+				beanClass,
+				getClassLevelConstraintsAsDescriptors(),
+				getConstrainedPropertiesAsDescriptors(),
+				getMethodsAsDescriptors(),
+				defaultGroupSequenceIsRedefined(),
+				getDefaultGroupSequence( null )
+		);
+	}
+
+	private Set<ConstraintDescriptorImpl<?>> getClassLevelConstraintsAsDescriptors() {
+
+		Set<MetaConstraint<?>> classLevelConstraints = getClassLevelConstraints( allMetaConstraints );
+
+		Set<ConstraintDescriptorImpl<?>> theValue = newHashSet();
+
+		for ( MetaConstraint<?> oneConstraint : classLevelConstraints ) {
+			theValue.add( oneConstraint.getDescriptor() );
+		}
+
+		return theValue;
+	}
+
+	private Map<String, PropertyDescriptor> getConstrainedPropertiesAsDescriptors() {
+		Map<String, PropertyDescriptor> theValue = newHashMap();
+
+		for ( Entry<String, PropertyMetaData> oneProperty : propertyMetaData.entrySet() ) {
+			if ( oneProperty.getValue().isConstrained() ) {
+				theValue.put(
+						oneProperty.getKey(),
+						oneProperty.getValue()
+								.asDescriptor( defaultGroupSequenceIsRedefined(), getDefaultGroupSequence( null ) )
+				);
+			}
+		}
+
+		return theValue;
+	}
+
+	private Map<String, MethodDescriptor> getMethodsAsDescriptors() {
+		Map<String, MethodDescriptor> theValue = newHashMap();
+
+		for ( Entry<String, MethodMetaData> oneMethod : methodMetaData.entrySet() ) {
+			theValue.put(
+					oneMethod.getKey(), oneMethod.getValue().asDescriptor(
+					defaultGroupSequenceIsRedefined(),
+					getDefaultGroupSequence( null )
+			)
+			);
+		}
+
+		return theValue;
+	}
+
+	private void setDefaultGroupSequenceOrProvider(List<Class<?>> defaultGroupSequence, DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider) {
+
+		if ( defaultGroupSequence != null && defaultGroupSequenceProvider != null ) {
+			throw log.getInvalidDefaultGroupSequenceDefinitionException();
+		}
+
+		if ( defaultGroupSequenceProvider != null ) {
+			this.defaultGroupSequenceProvider = defaultGroupSequenceProvider;
+		}
+		else if ( defaultGroupSequence != null && !defaultGroupSequence.isEmpty() ) {
+			setDefaultGroupSequence( defaultGroupSequence );
+		}
+		else {
+			setDefaultGroupSequence( Arrays.<Class<?>>asList( beanClass ) );
+		}
+	}
+
+	private Set<MetaConstraint<?>> getClassLevelConstraints(Set<MetaConstraint<?>> constraints) {
+
+		Set<MetaConstraint<?>> classLevelConstraints = partition(
+				constraints,
+				byElementType()
+		).get( ElementType.TYPE );
+
+		return classLevelConstraints != null ? classLevelConstraints : Collections.<MetaConstraint<?>>emptySet();
+	}
+
+	private Set<MetaConstraint<?>> buildDirectConstraintSets() {
+
+		Set<MetaConstraint<?>> constraints = newHashSet();
+
+		Set<Class<?>> classAndInterfaces = computeAllImplementedInterfaces( beanClass );
+		classAndInterfaces.add( beanClass );
+
+		for ( Class<?> clazz : classAndInterfaces ) {
+			for ( MetaConstraint<?> oneConstraint : allMetaConstraints ) {
+				if ( oneConstraint.getLocation().getBeanClass().equals( clazz ) ) {
+					constraints.add( oneConstraint );
+				}
+			}
+		}
+
+		return Collections.unmodifiableSet( constraints );
+	}
+
+	/**
+	 * Builds up the method meta data for this type
+	 */
+	private Map<String, MethodMetaData> buildMethodMetaData(Set<MethodMetaData> allMethodMetaData) {
+
+		Map<String, MethodMetaData> theValue = newHashMap();
+
+		for ( MethodMetaData oneAggregatedMethodMetaData : allMethodMetaData ) {
+			theValue.put(
+					oneAggregatedMethodMetaData.getName() + Arrays.toString( oneAggregatedMethodMetaData.getParameterTypes() ),
+					oneAggregatedMethodMetaData
+			);
+		}
+
+		return theValue;
+	}
+
+	private void setDefaultGroupSequence(List<Class<?>> groupSequence) {
+		defaultGroupSequence = getValidDefaultGroupSequence( groupSequence );
+	}
+
+	private List<Class<?>> getValidDefaultGroupSequence(List<Class<?>> groupSequence) {
+		List<Class<?>> validDefaultGroupSequence = new ArrayList<Class<?>>();
+
+		boolean groupSequenceContainsDefault = false;
+		if ( groupSequence != null ) {
+			for ( Class<?> group : groupSequence ) {
+				if ( group.getName().equals( beanClass.getName() ) ) {
+					validDefaultGroupSequence.add( Default.class );
+					groupSequenceContainsDefault = true;
+				}
+				else if ( group.getName().equals( Default.class.getName() ) ) {
+					throw log.getNoDefaultGroupInGroupSequenceException();
+				}
+				else {
+					validDefaultGroupSequence.add( group );
+				}
+			}
+		}
+		if ( !groupSequenceContainsDefault ) {
+			throw log.getBeanClassMustBePartOfRedefinedDefaultGroupSequenceException( beanClass.getName() );
+		}
+		if ( log.isTraceEnabled() ) {
+			log.tracef(
+					"Members of the default group sequence for bean %s are: %s.",
+					beanClass.getName(),
+					validDefaultGroupSequence
+			);
+		}
+
+		return validDefaultGroupSequence;
+	}
+
+	private boolean hasDefaultGroupSequenceProvider() {
+		return defaultGroupSequenceProvider != null;
+	}
+
+	private Partitioner<ElementType, MetaConstraint<?>> byElementType() {
+		return new Partitioner<ElementType, MetaConstraint<?>>() {
+			public ElementType getPartition(MetaConstraint<?> constraint) {
+				return constraint.getElementType();
+			}
+		};
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "BeanMetaDataImpl" );
+		sb.append( "{beanClass=" ).append( beanClass.getSimpleName() );
+		sb.append( ", constraintCount=" ).append( getMetaConstraints().size() );
+		sb.append( ", cascadedMemberCount=" ).append( cascadedMembers.size() );
+		sb.append( ", defaultGroupSequence=" ).append( getDefaultGroupSequence( null ) );
+		sb.append( '}' );
+		return sb.toString();
+	}
+
+	public static class BeanMetaDataBuilder<T> {
+
+		private final ConstraintHelper constraintHelper;
+
+		private final Class<T> beanClass;
+
+		private final Set<BuilderDelegate> builders = newHashSet();
+
+		private ConfigurationSource sequenceSource;
+
+		private ConfigurationSource providerSource;
+
+		private List<Class<?>> defaultGroupSequence;
+
+		private DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider;
+
+
+		public BeanMetaDataBuilder(ConstraintHelper constraintHelper, Class<T> beanClass) {
+			this.beanClass = beanClass;
+			this.constraintHelper = constraintHelper;
+		}
+
+		public static <T> BeanMetaDataBuilder<T> getInstance(ConstraintHelper constraintHelper, Class<T> beanClass) {
+			return new BeanMetaDataBuilder<T>( constraintHelper, beanClass );
+		}
+
+		public void add(BeanConfiguration<? super T> configuration) {
+			if ( configuration.getBeanClass().equals( beanClass ) ) {
+				if ( configuration.getDefaultGroupSequence() != null
+						&& ( sequenceSource == null || configuration.getSource()
+						.getPriority() >= sequenceSource.getPriority() ) ) {
+
+					sequenceSource = configuration.getSource();
+					defaultGroupSequence = configuration.getDefaultGroupSequence();
+				}
+
+				if ( configuration.getDefaultGroupSequenceProvider() != null
+						&& ( providerSource == null || configuration.getSource()
+						.getPriority() >= providerSource.getPriority() ) ) {
+
+					providerSource = configuration.getSource();
+					defaultGroupSequenceProvider = configuration.getDefaultGroupSequenceProvider();
+				}
+			}
+
+			for ( ConstrainedElement oneConstrainedElement : configuration.getConstrainedElements() ) {
+				addMetaDataToBuilder( oneConstrainedElement, builders );
+			}
+		}
+
+		private void addMetaDataToBuilder(ConstrainedElement constrainableElement, Set<BuilderDelegate> builders) {
+
+			for ( BuilderDelegate oneBuilder : builders ) {
+				boolean foundBuilder = oneBuilder.add( constrainableElement );
+
+				if ( foundBuilder ) {
+					return;
+				}
+			}
+
+			builders.add(
+					new BuilderDelegate(
+							constrainableElement,
+							constraintHelper
+					)
+			);
+		}
+
+		public BeanMetaDataImpl<T> build() {
+
+			Set<ConstraintMetaData> aggregatedElements = newHashSet();
+
+			for ( BuilderDelegate oneBuilder : builders ) {
+				aggregatedElements.addAll(
+						oneBuilder.build(
+								( defaultGroupSequence != null && defaultGroupSequence.size() > 1 ) || defaultGroupSequenceProvider != null,
+								defaultGroupSequence
+						)
+				);
+			}
+
+			return new BeanMetaDataImpl<T>(
+					beanClass,
+					defaultGroupSequence,
+					defaultGroupSequenceProvider,
+					aggregatedElements
+			);
+		}
+	}
+
+	private static class BuilderDelegate {
+		private final ConstraintHelper constraintHelper;
+		private MetaDataBuilder propertyBuilder;
+		private MethodMetaData.Builder methodBuilder;
+
+		public BuilderDelegate(ConstrainedElement constrainedElement, ConstraintHelper constraintHelper) {
+			this.constraintHelper = constraintHelper;
+
+			switch ( constrainedElement.getKind() ) {
+				case FIELD:
+					ConstrainedField constrainedField = (ConstrainedField) constrainedElement;
+					propertyBuilder = new PropertyMetaData.Builder(
+							constrainedField,
+							constraintHelper
+					);
+					break;
+				case METHOD:
+					ConstrainedMethod constrainedMethod = (ConstrainedMethod) constrainedElement;
+					methodBuilder = new MethodMetaData.Builder(
+							constrainedMethod,
+							constraintHelper
+					);
+
+					if ( constrainedMethod.isGetterMethod() ) {
+						propertyBuilder = new PropertyMetaData.Builder(
+								constrainedMethod,
+								constraintHelper
+						);
+					}
+					break;
+				case TYPE:
+					ConstrainedType constrainedType = (ConstrainedType) constrainedElement;
+					propertyBuilder = new PropertyMetaData.Builder(
+							constrainedType,
+							constraintHelper
+					);
+					break;
+			}
+		}
+
+		public boolean add(ConstrainedElement constrainedElement) {
+			boolean added = false;
+
+			if ( methodBuilder != null && methodBuilder.accepts( constrainedElement ) ) {
+				methodBuilder.add( constrainedElement );
+				added = true;
+			}
+
+			if ( propertyBuilder != null && propertyBuilder.accepts( constrainedElement ) ) {
+				propertyBuilder.add( constrainedElement );
+
+				if ( added == false && constrainedElement.getKind() == ConstrainedElementKind.METHOD && methodBuilder == null ) {
+					ConstrainedMethod constrainedMethod = (ConstrainedMethod) constrainedElement;
+					methodBuilder = new MethodMetaData.Builder(
+							constrainedMethod,
+							constraintHelper
+					);
+				}
+
+				added = true;
+			}
+
+			return added;
+		}
+
+		public Set<ConstraintMetaData> build(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+
+			Set<ConstraintMetaData> theValue = newHashSet();
+
+			if ( propertyBuilder != null ) {
+				theValue.add( propertyBuilder.build() );
+			}
+
+			if ( methodBuilder != null ) {
+				theValue.add( methodBuilder.build() );
+			}
+
+			return theValue;
+		}
+
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ConstraintMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ConstraintMetaData.java
new file mode 100644
index 0000000..bb953d1
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ConstraintMetaData.java
@@ -0,0 +1,94 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.util.List;
+import javax.validation.metadata.ElementDescriptor;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+
+/**
+ * An aggregated view of the constraint related meta data for a given bean/type
+ * element and all the elements in the inheritance hierarchy which it overrides
+ * or implements.
+ *
+ * @author Gunnar Morling
+ */
+public interface ConstraintMetaData extends Iterable<MetaConstraint<?>> {
+
+	/**
+	 * The kind of a {@link ConstraintMetaData}. Can be used to determine the type of
+	 * meta data when traversing over a collection of constraint meta data objects.
+	 *
+	 * @author Gunnar Morling
+	 */
+	public static enum ConstraintMetaDataKind {
+		METHOD, PROPERTY, PARAMETER
+	}
+
+	/**
+	 * Returns the name of this meta data object.
+	 *
+	 * @return This meta data object's name.
+	 */
+	String getName();
+
+	/**
+	 * Returns the data type of this meta data object, e.g. the type of a bean property or the
+	 * return type of a method.
+	 *
+	 * @return This meta data object's type.
+	 */
+	Class<?> getType();
+
+	/**
+	 * Returns the {@link ConstraintMetaDataKind kind} of this meta data object.
+	 *
+	 * @return The {@link ConstraintMetaDataKind kind} of this meta data object.
+	 */
+	ConstraintMetaDataKind getKind();
+
+	/**
+	 * Whether this meta data object is marked for cascaded validation or not.
+	 *
+	 * @return <code>True</code> if this object is marked for cascaded validation, <code>false</code> otherwise.
+	 */
+	boolean isCascading();
+
+	/**
+	 * Whether this meta data object is constrained by any means or not.
+	 *
+	 * @return <code>True</code> if this object is marked for cascaded validation or has any constraints, <code>false</code> otherwise.
+	 */
+	boolean isConstrained();
+
+	/**
+	 * Returns this meta data object's corresponding representation in the
+	 * descriptor model.
+	 *
+	 * @param defaultGroupSequenceRedefined Whether the bean hosting the represented element has a
+	 * redefined default group sequence or not.
+	 * @param defaultGroupSequence The default group sequence of the bean hosting the represented
+	 * element.
+	 *
+	 * @return This meta data object's corresponding descriptor model
+	 *         representation. Implementations should return a specific sub type
+	 *         of {@link ElementDescriptor}.
+	 */
+	ElementDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence);
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MetaDataBuilder.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MetaDataBuilder.java
new file mode 100644
index 0000000..943c3df
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MetaDataBuilder.java
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Builds {@link ConstraintMetaData} instances for the
+ * {@link ConstrainedElement} objects representing one method or property in a
+ * type's inheritance hierarchy.
+ *
+ * @author Gunnar Morling
+ */
+public abstract class MetaDataBuilder {
+
+	protected final ConstraintHelper constraintHelper;
+
+	protected MetaDataBuilder(ConstraintHelper constraintHelper) {
+		this.constraintHelper = constraintHelper;
+	}
+
+	/**
+	 * Whether this builder allows to add the given element or not. This is the
+	 * case if the specified element relates to the same property or method with
+	 * which this builder was instantiated.
+	 *
+	 * @param constrainedElement The element to check.
+	 *
+	 * @return <code>true</code> if the given element can be added to this
+	 *         builder, <code>false</code> otherwise.
+	 */
+	public abstract boolean accepts(ConstrainedElement constrainedElement);
+
+	/**
+	 * Adds the given element to this builder. It must be checked with
+	 * {@link #accepts(ConstrainedElement)} before, whether this is allowed or
+	 * not.
+	 *
+	 * @param constrainedElement The element to add.
+	 */
+	public abstract void add(ConstrainedElement constrainedElement);
+
+	/**
+	 * Creates a new, read-only {@link ConstraintMetaData} object with all
+	 * constraint information related to the method or property represented by
+	 * this builder.
+	 *
+	 * @return A {@link ConstraintMetaData} object.
+	 */
+	public abstract ConstraintMetaData build();
+
+	/**
+	 * Adapts the given constraints to the given bean type. In case a constraint
+	 * is defined locally at the bean class the original constraint will be
+	 * returned without any modifications. If a constraint is defined in the
+	 * hierarchy (interface or super class) a new constraint will be returned
+	 * with an origin of {@link org.hibernate.validator.internal.metadata.core.ConstraintOrigin#DEFINED_IN_HIERARCHY}. If a
+	 * constraint is defined on an interface, the interface type will
+	 * additionally be part of the constraint's groups (implicit grouping).
+	 *
+	 * @param beanClass The bean type to which the constraint shall be adapted.
+	 * @param constraints The constraints that shall be adapted. The constraints themselves
+	 * will not be altered.
+	 *
+	 * @return A constraint adapted to the given bean type.
+	 */
+	protected Set<MetaConstraint<?>> adaptOriginsAndImplicitGroups(Class<?> beanClass,
+																   Set<MetaConstraint<?>> constraints) {
+		Set<MetaConstraint<?>> adaptedConstraints = newHashSet();
+
+		for ( MetaConstraint<?> oneConstraint : constraints ) {
+			adaptedConstraints.add(
+					adaptOriginAndImplicitGroup(
+							beanClass, oneConstraint
+					)
+			);
+		}
+		return adaptedConstraints;
+	}
+
+	private <A extends Annotation> MetaConstraint<A> adaptOriginAndImplicitGroup(
+			Class<?> beanClass, MetaConstraint<A> constraint) {
+
+		ConstraintOrigin definedIn = definedIn( beanClass, constraint.getLocation().getBeanClass() );
+
+		if ( definedIn == ConstraintOrigin.DEFINED_LOCALLY ) {
+			return constraint;
+		}
+
+		Class<?> constraintClass = constraint.getLocation().getBeanClass();
+
+		ConstraintDescriptorImpl<A> descriptor = new ConstraintDescriptorImpl<A>(
+				constraint.getDescriptor().getAnnotation(),
+				constraintHelper,
+				constraintClass.isInterface() ? constraintClass : null,
+				constraint.getElementType(),
+				definedIn
+		);
+
+		return new MetaConstraint<A>(
+				descriptor,
+				constraint.getLocation()
+		);
+	}
+
+	/**
+	 * @param rootClass The root class. That is the class for which we currently
+	 * create a {@code BeanMetaData}
+	 * @param hierarchyClass The class on which the current constraint is defined on
+	 *
+	 * @return Returns {@code ConstraintOrigin.DEFINED_LOCALLY} if the
+	 *         constraint was defined on the root bean,
+	 *         {@code ConstraintOrigin.DEFINED_IN_HIERARCHY} otherwise.
+	 */
+	private ConstraintOrigin definedIn(Class<?> rootClass, Class<?> hierarchyClass) {
+		if ( hierarchyClass.equals( rootClass ) ) {
+			return ConstraintOrigin.DEFINED_LOCALLY;
+		}
+		else {
+			return ConstraintOrigin.DEFINED_IN_HIERARCHY;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MethodMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MethodMetaData.java
new file mode 100644
index 0000000..4a23057
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/MethodMetaData.java
@@ -0,0 +1,412 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintDeclarationException;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.MethodDescriptorImpl;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement.ConstrainedElementKind;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedParameter;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * An aggregated view of the constraint related meta data for a given method and
+ * all the methods in the inheritance hierarchy which it overrides or
+ * implements.
+ * <p>
+ * Instances are retrieved by creating a {@link Builder} and adding all required
+ * {@link ConstrainedMethod} objects to it. Instances are read-only after
+ * creation.
+ * </p>
+ * <p>
+ * Identity is solely based on the method's name and parameter types, hence sets
+ * and similar collections of this type may only be created in the scope of one
+ * Java type.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public class MethodMetaData extends AbstractConstraintMetaData {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final Class<?>[] parameterTypes;
+	private final List<ParameterMetaData> parameterMetaData;
+
+	/**
+	 * A declaration exception in case this method contains any illegal method
+	 * parameter constraints. Such illegal parameter constraints shall not
+	 * hinder standard bean/property validation as defined by the Bean
+	 * Validation API. Therefore this exception is created when building up the
+	 * meta data for validated beans, but it will only be thrown by the
+	 * validation engine when actually a method validation is performed.
+	 */
+	private final ConstraintDeclarationException parameterConstraintDeclarationException;
+
+	private MethodMetaData(
+			String name,
+			Class<?> returnType,
+			Class<?>[] parameterTypes,
+			Set<MetaConstraint<?>> returnValueConstraints,
+			List<ParameterMetaData> parameterMetaData,
+			ConstraintDeclarationException parameterConstraintDeclarationException,
+			boolean isCascading,
+			boolean isConstrained) {
+
+		super(
+				name,
+				returnType,
+				returnValueConstraints,
+				ConstraintMetaDataKind.METHOD,
+				isCascading,
+				isConstrained
+		);
+
+		this.parameterTypes = parameterTypes;
+		this.parameterMetaData = Collections.unmodifiableList( parameterMetaData );
+		this.parameterConstraintDeclarationException = parameterConstraintDeclarationException;
+	}
+
+	/**
+	 * Creates new {@link MethodMetaData} instances.
+	 *
+	 * @author Gunnar Morling
+	 * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+	 */
+	public static class Builder extends MetaDataBuilder {
+		private Set<ConstrainedMethod> constrainedMethods = newHashSet();
+		private MethodConstraintLocation location;
+		private final Set<MetaConstraint<?>> returnValueConstraints = newHashSet();
+		private boolean isCascading = false;
+		private boolean isConstrained = false;
+
+		/**
+		 * Creates a new builder based on the given method meta data.
+		 *
+		 * @param constrainedMethod The base method for this builder. This is the lowest
+		 * method with a given signature within a type hierarchy.
+		 * @param constraintHelper the constraint helper
+		 */
+		public Builder(ConstrainedMethod constrainedMethod, ConstraintHelper constraintHelper) {
+			super( constraintHelper );
+
+			location = constrainedMethod.getLocation();
+			add( constrainedMethod );
+		}
+
+		/**
+		 * {@inheritDoc}
+		 */
+		public boolean accepts(ConstrainedElement constrainedElement) {
+			return constrainedElement.getKind() == ConstrainedElementKind.METHOD &&
+					ReflectionHelper.haveSameSignature(
+							location.getMember(),
+							( (ConstrainedMethod) constrainedElement ).getLocation().getMember()
+					);
+		}
+
+		/**
+		 * {@inheritDoc}
+		 */
+		public void add(ConstrainedElement constrainedElement) {
+			ConstrainedMethod constrainedMethod = (ConstrainedMethod) constrainedElement;
+
+			constrainedMethods.add( constrainedMethod );
+			isCascading = isCascading || constrainedMethod.isCascading();
+			isConstrained = isConstrained || constrainedMethod.isConstrained();
+			returnValueConstraints.addAll( constrainedMethod.getConstraints() );
+		}
+
+		/**
+		 * {@inheritDoc}
+		 */
+		public MethodMetaData build() {
+			Method method = location.getMember();
+
+			return new MethodMetaData(
+					method.getName(),
+					method.getReturnType(),
+					method.getParameterTypes(),
+					adaptOriginsAndImplicitGroups( location.getBeanClass(), returnValueConstraints ),
+					findParameterMetaData(),
+					checkParameterConstraints(),
+					isCascading,
+					isConstrained
+			);
+		}
+
+		/**
+		 * Finds the one method from the underlying hierarchy with parameter
+		 * constraints. If no method in the hierarchy is parameter constrained,
+		 * the parameter meta data from this builder's base method is returned.
+		 *
+		 * @return The parameter meta data for this builder's method.
+		 */
+		private List<ParameterMetaData> findParameterMetaData() {
+
+			List<ParameterMetaData.Builder> parameterBuilders = null;
+
+			for ( ConstrainedMethod oneMethod : constrainedMethods ) {
+
+				if ( parameterBuilders == null ) {
+					parameterBuilders = newArrayList();
+
+					for ( ConstrainedParameter oneParameter : oneMethod.getAllParameterMetaData() ) {
+						parameterBuilders.add(
+								new ParameterMetaData.Builder(
+										location.getBeanClass(),
+										oneParameter,
+										constraintHelper
+								)
+						);
+					}
+				}
+				else {
+					int i = 0;
+					for ( ConstrainedParameter oneParameter : oneMethod.getAllParameterMetaData() ) {
+						parameterBuilders.get( i ).add( oneParameter );
+						i++;
+					}
+				}
+			}
+
+			List<ParameterMetaData> parameterMetaDatas = newArrayList();
+
+			for ( ParameterMetaData.Builder oneBuilder : parameterBuilders ) {
+				parameterMetaDatas.add( oneBuilder.build() );
+			}
+
+			return parameterMetaDatas;
+		}
+
+		/**
+		 * Checks that there are no invalid parameter constraints defined at
+		 * this builder's methods.
+		 *
+		 * @return A {@link ConstraintDeclarationException} describing the first
+		 *         illegal method parameter constraint found or {@code null}, if
+		 *         the methods of this builder have no such illegal constraints.
+		 */
+		private ConstraintDeclarationException checkParameterConstraints() {
+
+			Set<ConstrainedMethod> methodsWithParameterConstraints = getMethodsWithParameterConstraints(
+					constrainedMethods
+			);
+
+			if ( methodsWithParameterConstraints.isEmpty() ) {
+				return null;
+			}
+			Set<Class<?>> definingTypes = newHashSet();
+
+			for ( ConstrainedMethod constrainedMethod : methodsWithParameterConstraints ) {
+				definingTypes.add( constrainedMethod.getLocation().getBeanClass() );
+			}
+
+			if ( definingTypes.size() > 1 ) {
+				return new ConstraintDeclarationException(
+						"Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints, " +
+								"but there are parameter constraints defined at all of the following overridden methods: " +
+								methodsWithParameterConstraints
+				);
+			}
+
+			ConstrainedMethod constrainedMethod = methodsWithParameterConstraints.iterator().next();
+
+			for ( ConstrainedMethod oneMethod : constrainedMethods ) {
+
+				if ( !constrainedMethod.getLocation().getBeanClass()
+						.isAssignableFrom( oneMethod.getLocation().getBeanClass() ) ) {
+					return new ConstraintDeclarationException(
+							"Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints. " +
+									"The following method itself has no parameter constraints but it is not defined on a sub-type of " +
+									constrainedMethod.getLocation().getBeanClass() + ": " + oneMethod
+					);
+				}
+			}
+
+			return null;
+		}
+
+		/**
+		 * Returns a set with those methods from the given pile of methods that have
+		 * at least one constrained parameter or at least one parameter annotated
+		 * with {@link javax.validation.Valid}.
+		 *
+		 * @param methods The methods to search in.
+		 *
+		 * @return A set with constrained methods. May be empty, but never null.
+		 */
+		private Set<ConstrainedMethod> getMethodsWithParameterConstraints(Iterable<ConstrainedMethod> methods) {
+			Set<ConstrainedMethod> theValue = newHashSet();
+
+			for ( ConstrainedMethod oneMethod : methods ) {
+				if ( oneMethod.hasParameterConstraints() ) {
+					theValue.add( oneMethod );
+				}
+			}
+
+			return theValue;
+		}
+
+	}
+
+	/**
+	 * <p>
+	 * Checks the parameter constraints of this method for correctness.
+	 * </p>
+	 * <p>
+	 * The following rules apply for this check:
+	 * </p>
+	 * <ul>
+	 * <li>Only the root method of an overridden method in an inheritance
+	 * hierarchy may be annotated with parameter constraints in order to avoid
+	 * the strengthening of a method's preconditions by additional parameter
+	 * constraints defined at sub-types. If the root method itself has no
+	 * parameter constraints, also no parameter constraints may be added in
+	 * sub-types.</li>
+	 * <li>If there are multiple root methods for an method in an inheritance
+	 * hierarchy (e.g. by implementing two interfaces defining the same method)
+	 * no parameter constraints for this method are allowed at all in order to
+	 * avoid a strengthening of a method's preconditions in parallel types.</li>
+	 * </ul>
+	 *
+	 * @throws ConstraintDeclarationException In case the represented method has an illegal parameter
+	 * constraint.
+	 */
+	public void assertCorrectnessOfMethodParameterConstraints() throws ConstraintDeclarationException {
+
+		if ( parameterConstraintDeclarationException != null ) {
+			throw parameterConstraintDeclarationException;
+		}
+	}
+
+	/**
+	 * Returns meta data for the specified parameter of the represented method.
+	 *
+	 * @param parameterIndex the index of the parameter
+	 *
+	 * @return Meta data for the specified parameter. Will never be {@code null}.
+	 */
+	public ParameterMetaData getParameterMetaData(int parameterIndex) {
+
+		if ( parameterIndex < 0 || parameterIndex > parameterMetaData.size() - 1 ) {
+			throw log.getInvalidMethodParameterIndexException( getName(), parameterIndex );
+		}
+
+		return parameterMetaData.get( parameterIndex );
+	}
+
+	/**
+	 * Returns meta data for all parameters of the represented method.
+	 *
+	 * @return A list with parameter meta data. The length corresponds to the
+	 *         number of parameters of the method represented by this meta data
+	 *         object, so an empty list may be returned (in case of a
+	 *         parameterless method), but never <code>null</code>.
+	 */
+	public List<ParameterMetaData> getAllParameterMetaData() {
+		return parameterMetaData;
+	}
+
+	public Class<?>[] getParameterTypes() {
+		return parameterTypes;
+	}
+
+	public MethodDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		return new MethodDescriptorImpl(
+				getType(),
+				getName(),
+				asDescriptors( getConstraints() ),
+				isCascading(),
+				parametersAsDescriptors( defaultGroupSequenceRedefined, defaultGroupSequence ),
+				defaultGroupSequenceRedefined,
+				defaultGroupSequence
+		);
+	}
+
+	private List<ParameterDescriptor> parametersAsDescriptors(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		List<ParameterDescriptor> theValue = newArrayList();
+
+		for ( ParameterMetaData oneParameter : parameterMetaData ) {
+			theValue.add( oneParameter.asDescriptor( defaultGroupSequenceRedefined, defaultGroupSequence ) );
+		}
+
+		return theValue;
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder parameterBuilder = new StringBuilder();
+
+		for ( Class<?> oneParameterType : getParameterTypes() ) {
+			parameterBuilder.append( oneParameterType.getSimpleName() );
+			parameterBuilder.append( ", " );
+		}
+
+		String parameters =
+				parameterBuilder.length() > 0 ?
+						parameterBuilder.substring( 0, parameterBuilder.length() - 2 ) :
+						parameterBuilder.toString();
+
+		return "MethodMetaData [method=" + getType().getSimpleName() + " " + getName() + "(" + parameters + "), isCascading=" + isCascading() + ", isConstrained="
+				+ isConstrained() + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = super.hashCode();
+		result = prime * result + Arrays.hashCode( parameterTypes );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( !super.equals( obj ) ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		MethodMetaData other = (MethodMetaData) obj;
+		if ( !Arrays.equals( parameterTypes, other.parameterTypes ) ) {
+			return false;
+		}
+		return true;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ParameterMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ParameterMetaData.java
new file mode 100644
index 0000000..bb66cec
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/ParameterMetaData.java
@@ -0,0 +1,143 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ParameterDescriptorImpl;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement.ConstrainedElementKind;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedParameter;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * <p>
+ * An aggregated view of the constraint related meta data for a single method
+ * parameter.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public class ParameterMetaData extends AbstractConstraintMetaData {
+
+	private final int index;
+
+	/**
+	 * @param index the parameter index
+	 * @param name the parameter name
+	 * @param type the parameter type
+	 * @param constraints the constraints defined for this parameter
+	 * @param isCascading should cascading constraints be evaluated. Returns {@code true} is the constrained element
+	 * is marked for cascaded validation ({@code @Valid}), {@code false} otherwise.
+	 */
+	private ParameterMetaData(int index, String name, Class<?> type, Set<MetaConstraint<?>> constraints, boolean isCascading) {
+		super(
+				name,
+				type,
+				constraints,
+				ConstraintMetaDataKind.PARAMETER,
+				isCascading,
+				!constraints.isEmpty() || isCascading
+		);
+
+		this.index = index;
+	}
+
+	public int getIndex() {
+		return index;
+	}
+
+	public ParameterDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		return new ParameterDescriptorImpl(
+				getType(),
+				index,
+				asDescriptors( getConstraints() ),
+				isCascading(),
+				defaultGroupSequenceRedefined,
+				defaultGroupSequence
+		);
+	}
+
+	public static class Builder extends MetaDataBuilder {
+
+		private final Class<?> rootClass;
+
+		private final Class<?> parameterType;
+
+		private final int parameterIndex;
+
+		private final Set<MetaConstraint<?>> constraints = newHashSet();
+
+		private String name;
+
+		private boolean isCascading = false;
+
+		public Builder(Class<?> rootClass, ConstrainedParameter constrainedParameter, ConstraintHelper constraintHelper) {
+
+			super( constraintHelper );
+
+			this.rootClass = rootClass;
+			this.parameterType = constrainedParameter.getLocation().getParameterType();
+			this.parameterIndex = constrainedParameter.getLocation().getParameterIndex();
+
+			add( constrainedParameter );
+		}
+
+		@Override
+		public boolean accepts(ConstrainedElement constrainedElement) {
+
+			if ( constrainedElement.getKind() != ConstrainedElementKind.PARAMETER ) {
+				return false;
+			}
+
+			return ( (ConstrainedParameter) constrainedElement ).getLocation().getParameterIndex() == parameterIndex;
+		}
+
+		@Override
+		public void add(ConstrainedElement constrainedElement) {
+
+			ConstrainedParameter constrainedParameter = (ConstrainedParameter) constrainedElement;
+
+			constraints.addAll( constrainedParameter.getConstraints() );
+
+			if ( name == null ) {
+				name = constrainedParameter.getParameterName();
+			}
+
+			isCascading = isCascading || constrainedParameter.isCascading();
+		}
+
+		@Override
+		public ParameterMetaData build() {
+
+			return new ParameterMetaData(
+					parameterIndex,
+					name,
+					parameterType,
+					adaptOriginsAndImplicitGroups( rootClass, constraints ),
+					isCascading
+			);
+		}
+
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/PropertyMetaData.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/PropertyMetaData.java
new file mode 100644
index 0000000..a8e4888
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/PropertyMetaData.java
@@ -0,0 +1,210 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.aggregated;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.PropertyDescriptorImpl;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement.ConstrainedElementKind;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedField;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Represents the constraint related meta data for a JavaBeans property.
+ * Abstracts from the concrete physical type of the underlying Java element(s)
+ * (fields or getter methods).
+ * <p>
+ * In order to provide a unified access to all JavaBeans constraints also
+ * class-level constraints are represented by this meta data type.
+ * </p>
+ * <p>
+ * Identity is solely based on the property name, hence sets and similar
+ * collections of this type may only be created in the scope of one Java type.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public class PropertyMetaData extends AbstractConstraintMetaData {
+
+	private final Set<Member> cascadingMembers;
+
+	private PropertyMetaData(String propertyName, Class<?> type, Set<MetaConstraint<?>> constraints, Set<Member> cascadingMembers) {
+		super(
+				propertyName,
+				type,
+				constraints,
+				ConstraintMetaDataKind.PROPERTY,
+				!cascadingMembers.isEmpty(),
+				!cascadingMembers.isEmpty() || !constraints.isEmpty()
+		);
+
+		this.cascadingMembers = Collections.unmodifiableSet( cascadingMembers );
+	}
+
+	public Set<Member> getCascadingMembers() {
+		return cascadingMembers;
+	}
+
+	public PropertyDescriptorImpl asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+
+		return new PropertyDescriptorImpl(
+				getType(),
+				getName(),
+				asDescriptors( getConstraints() ),
+				isCascading(),
+				defaultGroupSequenceRedefined,
+				defaultGroupSequence
+		);
+	}
+
+	@Override
+	public String toString() {
+
+		StringBuilder cascadingMembers = new StringBuilder();
+
+		for ( Member oneCascadingMember : this.cascadingMembers ) {
+			cascadingMembers.append( oneCascadingMember.getName() );
+			cascadingMembers.append( ", " );
+		}
+
+		if ( cascadingMembers.length() > 0 ) {
+			cascadingMembers.subSequence( 0, cascadingMembers.length() - 2 );
+		}
+
+		return "PropertyMetaData [type=" + getType().getSimpleName() + ", propertyName="
+				+ getName() + ", cascadingMembers=[" + cascadingMembers + "]]";
+	}
+
+	@Override
+	public int hashCode() {
+		return super.hashCode();
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( !super.equals( obj ) ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		return true;
+	}
+
+	public static class Builder extends MetaDataBuilder {
+
+		private final static EnumSet<ConstrainedElementKind> SUPPORTED_ELEMENT_KINDS = EnumSet.of(
+				ConstrainedElementKind.TYPE,
+				ConstrainedElementKind.FIELD,
+				ConstrainedElementKind.METHOD
+		);
+
+		private final Class<?> beanClass;
+
+		private final String propertyName;
+
+		private final Class<?> propertyType;
+
+		private final Set<MetaConstraint<?>> constraints = newHashSet();
+
+		private final Set<Member> cascadingMembers = newHashSet();
+
+
+		public Builder(ConstrainedField constrainedField, ConstraintHelper constraintHelper) {
+			super( constraintHelper );
+
+			this.beanClass = constrainedField.getLocation().getBeanClass();
+			this.propertyName = ReflectionHelper.getPropertyName( constrainedField.getLocation().getMember() );
+			this.propertyType = ( (Field) constrainedField.getLocation().getMember() ).getType();
+			add( constrainedField );
+		}
+
+		public Builder(ConstrainedType constrainedType, ConstraintHelper constraintHelper) {
+			super( constraintHelper );
+
+			this.beanClass = constrainedType.getLocation().getBeanClass();
+			this.propertyName = null;
+			this.propertyType = null;
+			add( constrainedType );
+		}
+
+		public Builder(ConstrainedMethod constrainedMethod, ConstraintHelper constraintHelper) {
+			super( constraintHelper );
+
+			this.beanClass = constrainedMethod.getLocation().getBeanClass();
+			this.propertyName = ReflectionHelper.getPropertyName( constrainedMethod.getLocation().getMember() );
+			this.propertyType = constrainedMethod.getLocation().getMember().getReturnType();
+			add( constrainedMethod );
+		}
+
+		public boolean accepts(ConstrainedElement constrainedElement) {
+
+			if ( !SUPPORTED_ELEMENT_KINDS.contains( constrainedElement.getKind() ) ) {
+				return false;
+			}
+
+			if ( constrainedElement.getKind() == ConstrainedElementKind.METHOD &&
+					!( (ConstrainedMethod) constrainedElement ).isGetterMethod() ) {
+				return false;
+			}
+
+			return equals(
+					ReflectionHelper.getPropertyName( constrainedElement.getLocation().getMember() ),
+					propertyName
+			);
+		}
+
+		public void add(ConstrainedElement constrainedElement) {
+
+			constraints.addAll( constrainedElement.getConstraints() );
+
+			if ( constrainedElement.isCascading() ) {
+				cascadingMembers.add( constrainedElement.getLocation().getMember() );
+			}
+		}
+
+		public PropertyMetaData build() {
+
+			return new PropertyMetaData(
+					propertyName,
+					propertyType,
+					adaptOriginsAndImplicitGroups( beanClass, constraints ),
+					cascadingMembers
+			);
+		}
+
+		private boolean equals(String s1, String s2) {
+			return ( s1 != null && s1.equals( s2 ) ) || ( s1 == null && s2 == null );
+		}
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/package.html
new file mode 100644
index 0000000..0989c17
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>The classes in this package contain the aggregated meta data needed for an actual validation. The aggregated
+meta data view takes into account type inheritance, configuration source, etc and aggregates for a given type.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/AnnotationProcessingOptions.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/AnnotationProcessingOptions.java
new file mode 100644
index 0000000..3dccc6e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/AnnotationProcessingOptions.java
@@ -0,0 +1,144 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.core;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+
+/**
+ * An  {@code AnnotationProcessingOptions} instance keeps track of annotations which should be ignored as configuration source.
+ * The main validation source for Bean Validation is annotation and alternate configuration sources use this class
+ * to override/ignore existing annotations.
+ *
+ * @author Hardy Ferentschik
+ */
+public class AnnotationProcessingOptions {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * Keeps track whether the 'ignore-annotations' flag is set on bean level in the xml configuration. If 'ignore-annotations'
+	 * is not specified {@code true} is the default.
+	 */
+	private final Map<Class<?>, Boolean> ignoreAnnotationDefaults = newHashMap();
+
+	/**
+	 * Keeps track of explicitly excluded members (fields and properties) for a given class. If a member appears in
+	 * the list mapped to a given class 'ignore-annotations' was explicitly set to {@code true} in the configuration
+	 * for this class.
+	 */
+	private final Map<Class<?>, List<Member>> propertyConstraintAnnotationIgnores = newHashMap();
+
+	/**
+	 * Keeps track of explicitly excluded class level constraints.
+	 */
+	private final Map<Class<?>, Boolean> classConstraintAnnotationIgnores = newHashMap();
+
+	public void ignoreAnnotationConstraintForClass(Class<?> clazz, Boolean b) {
+		if ( b == null ) {
+			ignoreAnnotationDefaults.put( clazz, Boolean.TRUE );
+		}
+		else {
+			ignoreAnnotationDefaults.put( clazz, b );
+		}
+	}
+
+	public boolean areConstraintAnnotationsIgnored(Class<?> clazz) {
+		return ignoreAnnotationDefaults.containsKey( clazz ) && ignoreAnnotationDefaults.get( clazz );
+	}
+
+	public void ignorePropertyLevelConstraintAnnotationsOnMember(Member member) {
+		Class<?> beanClass = member.getDeclaringClass();
+		if ( propertyConstraintAnnotationIgnores.get( beanClass ) == null ) {
+			List<Member> tmpList = new ArrayList<Member>();
+			tmpList.add( member );
+			propertyConstraintAnnotationIgnores.put( beanClass, tmpList );
+		}
+		else {
+			propertyConstraintAnnotationIgnores.get( beanClass ).add( member );
+		}
+	}
+
+	public boolean arePropertyLevelConstraintAnnotationsIgnored(Member member) {
+		boolean ignoreAnnotation;
+		Class<?> clazz = member.getDeclaringClass();
+		List<Member> ignoreAnnotationForMembers = propertyConstraintAnnotationIgnores.get( clazz );
+		if ( ignoreAnnotationForMembers == null || !ignoreAnnotationForMembers.contains( member ) ) {
+			ignoreAnnotation = areConstraintAnnotationsIgnored( clazz );
+		}
+		else {
+			ignoreAnnotation = ignoreAnnotationForMembers.contains( member );
+		}
+		if ( ignoreAnnotation ) {
+			logMessage( member, clazz );
+		}
+		return ignoreAnnotation;
+	}
+
+	public void ignoreClassLevelConstraintAnnotations(Class<?> clazz, boolean b) {
+		classConstraintAnnotationIgnores.put( clazz, b );
+	}
+
+	public boolean areClassLevelConstraintAnnotationsIgnored(Class<?> clazz) {
+		boolean ignoreAnnotation;
+		if ( classConstraintAnnotationIgnores.containsKey( clazz ) ) {
+			ignoreAnnotation = classConstraintAnnotationIgnores.get( clazz );
+		}
+		else {
+			ignoreAnnotation = areConstraintAnnotationsIgnored( clazz );
+		}
+		if ( log.isDebugEnabled() && ignoreAnnotation ) {
+			log.debugf( "Class level annotation are getting ignored for %s.", clazz.getName() );
+		}
+		return ignoreAnnotation;
+	}
+
+	public void merge(AnnotationProcessingOptions annotationProcessingOptions) {
+		this.ignoreAnnotationDefaults.putAll( annotationProcessingOptions.ignoreAnnotationDefaults );
+		this.propertyConstraintAnnotationIgnores
+				.putAll( annotationProcessingOptions.propertyConstraintAnnotationIgnores );
+		this.classConstraintAnnotationIgnores
+				.putAll( annotationProcessingOptions.classConstraintAnnotationIgnores );
+	}
+
+	private void logMessage(Member member, Class<?> clazz) {
+		if ( log.isDebugEnabled() ) {
+			String type;
+			if ( member instanceof Field ) {
+				type = "Field";
+			}
+			else {
+				type = "Property";
+			}
+
+			log.debugf(
+					"%s level annotations are getting ignored for %s.%s.",
+					type,
+					clazz.getName(),
+					member.getName()
+			);
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintHelper.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintHelper.java
new file mode 100644
index 0000000..3f1caec
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintHelper.java
@@ -0,0 +1,428 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.core;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ValidationException;
+import javax.validation.constraints.AssertFalse;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Null;
+import javax.validation.constraints.Past;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.constraints.NotBlank;
+import org.hibernate.validator.constraints.SafeHtml;
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.constraints.URL;
+import org.hibernate.validator.internal.constraintvalidators.AssertFalseValidator;
+import org.hibernate.validator.internal.constraintvalidators.AssertTrueValidator;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMaxValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMaxValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMinValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMinValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.DigitsValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.DigitsValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.EmailValidator;
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForCalendar;
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForDate;
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForReadableInstant;
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForReadablePartial;
+import org.hibernate.validator.internal.constraintvalidators.LengthValidator;
+import org.hibernate.validator.internal.constraintvalidators.MaxValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.MaxValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.MinValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.MinValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.ModCheckValidator;
+import org.hibernate.validator.internal.constraintvalidators.NotBlankValidator;
+import org.hibernate.validator.internal.constraintvalidators.NotNullValidator;
+import org.hibernate.validator.internal.constraintvalidators.NullValidator;
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForCalendar;
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForDate;
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForReadableInstant;
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForReadablePartial;
+import org.hibernate.validator.internal.constraintvalidators.PatternValidator;
+import org.hibernate.validator.internal.constraintvalidators.SafeHtmlValidator;
+import org.hibernate.validator.internal.constraintvalidators.ScriptAssertValidator;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArray;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfBoolean;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfByte;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfChar;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfDouble;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfFloat;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfInt;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfLong;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForCollection;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForMap;
+import org.hibernate.validator.internal.constraintvalidators.URLValidator;
+import org.hibernate.validator.internal.util.CollectionHelper;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Keeps track of builtin constraints and their validator implementations, as well as already resolved validator definitions.
+ *
+ * @author Hardy Ferentschik
+ * @author Alaa Nassef
+ * @author Gunnar Morling
+ */
+public class ConstraintHelper {
+	private static final Log log = LoggerFactory.make();
+	private static final String JODA_TIME_CLASS_NAME = "org.joda.time.ReadableInstant";
+	private final ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<?, ?>>>> builtinConstraints =
+			CollectionHelper.newConcurrentHashMap();
+	private final ConcurrentHashMap<Class<? extends Annotation>, List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>> constraintValidatorDefinitions =
+			CollectionHelper.newConcurrentHashMap();
+
+	public ConstraintHelper() {
+		List<Class<? extends ConstraintValidator<?, ?>>> constraintList = newArrayList();
+		constraintList.add( AssertFalseValidator.class );
+		builtinConstraints.put( AssertFalse.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( AssertTrueValidator.class );
+		builtinConstraints.put( AssertTrue.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( DecimalMaxValidatorForNumber.class );
+		constraintList.add( DecimalMaxValidatorForCharSequence.class );
+		builtinConstraints.put( DecimalMax.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( DecimalMinValidatorForNumber.class );
+		constraintList.add( DecimalMinValidatorForCharSequence.class );
+		builtinConstraints.put( DecimalMin.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( DigitsValidatorForCharSequence.class );
+		constraintList.add( DigitsValidatorForNumber.class );
+		builtinConstraints.put( Digits.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( FutureValidatorForCalendar.class );
+		constraintList.add( FutureValidatorForDate.class );
+		if ( isJodaTimeInClasspath() ) {
+			constraintList.add( FutureValidatorForReadableInstant.class );
+			constraintList.add( FutureValidatorForReadablePartial.class );
+		}
+		builtinConstraints.put( Future.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( MaxValidatorForNumber.class );
+		constraintList.add( MaxValidatorForCharSequence.class );
+		builtinConstraints.put( Max.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( MinValidatorForNumber.class );
+		constraintList.add( MinValidatorForCharSequence.class );
+		builtinConstraints.put( Min.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( NotNullValidator.class );
+		builtinConstraints.put( NotNull.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( NullValidator.class );
+		builtinConstraints.put( Null.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( PastValidatorForCalendar.class );
+		constraintList.add( PastValidatorForDate.class );
+		if ( isJodaTimeInClasspath() ) {
+			constraintList.add( PastValidatorForReadableInstant.class );
+			constraintList.add( PastValidatorForReadablePartial.class );
+		}
+		builtinConstraints.put( Past.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( PatternValidator.class );
+		builtinConstraints.put( Pattern.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( SizeValidatorForCharSequence.class );
+		constraintList.add( SizeValidatorForCollection.class );
+		constraintList.add( SizeValidatorForArray.class );
+		constraintList.add( SizeValidatorForMap.class );
+		constraintList.add( SizeValidatorForArraysOfBoolean.class );
+		constraintList.add( SizeValidatorForArraysOfByte.class );
+		constraintList.add( SizeValidatorForArraysOfChar.class );
+		constraintList.add( SizeValidatorForArraysOfDouble.class );
+		constraintList.add( SizeValidatorForArraysOfFloat.class );
+		constraintList.add( SizeValidatorForArraysOfInt.class );
+		constraintList.add( SizeValidatorForArraysOfLong.class );
+		builtinConstraints.put( Size.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( EmailValidator.class );
+		builtinConstraints.put( Email.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( LengthValidator.class );
+		builtinConstraints.put( Length.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( ModCheckValidator.class );
+		builtinConstraints.put( ModCheck.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( NotBlankValidator.class );
+		builtinConstraints.put( NotBlank.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( SafeHtmlValidator.class );
+		builtinConstraints.put( SafeHtml.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( ScriptAssertValidator.class );
+		builtinConstraints.put( ScriptAssert.class, constraintList );
+
+		constraintList = newArrayList();
+		constraintList.add( URLValidator.class );
+		builtinConstraints.put( URL.class, constraintList );
+	}
+
+	public List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> getBuiltInConstraints(Class<? extends Annotation> annotationClass) {
+		final List<Class<? extends ConstraintValidator<?, ?>>> builtInList = builtinConstraints.get( annotationClass );
+
+		if ( builtInList == null || builtInList.size() == 0 ) {
+			throw log.getUnableToFindAnnotationConstraintsException( annotationClass );
+		}
+
+		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraints = newArrayList( builtInList.size() );
+		for ( Class<? extends ConstraintValidator<?, ?>> validatorClass : builtInList ) {
+			//safe cause all CV for a given annotation A are CV<A, ?>
+			@SuppressWarnings("unchecked")
+			Class<ConstraintValidator<? extends Annotation, ?>> safeValidatorClass = (Class<ConstraintValidator<? extends Annotation, ?>>) validatorClass;
+			constraints.add( safeValidatorClass );
+		}
+
+		return constraints;
+	}
+
+	public boolean isBuiltinConstraint(Class<? extends Annotation> annotationType) {
+		return builtinConstraints.containsKey( annotationType );
+	}
+
+	/**
+	 * Checks whether a given annotation is a multi value constraint or not.
+	 *
+	 * @param annotationType the annotation type to check.
+	 *
+	 * @return {@code true} if the specified annotation is a multi value constraints, {@code false}
+	 *         otherwise.
+	 */
+	public boolean isMultiValueConstraint(Class<? extends Annotation> annotationType) {
+		boolean isMultiValueConstraint = false;
+		final Method method = ReflectionHelper.getMethod( annotationType, "value" );
+		if ( method != null ) {
+			Class<?> returnType = method.getReturnType();
+			if ( returnType.isArray() && returnType.getComponentType().isAnnotation() ) {
+				@SuppressWarnings("unchecked")
+				Class<? extends Annotation> componentType = (Class<? extends Annotation>) returnType.getComponentType();
+				if ( isConstraintAnnotation( componentType ) || isBuiltinConstraint( componentType ) ) {
+					isMultiValueConstraint = true;
+				}
+				else {
+					isMultiValueConstraint = false;
+				}
+			}
+		}
+		return isMultiValueConstraint;
+	}
+
+
+	/**
+	 * Checks whether a given annotation is a multi value constraint and returns the contained constraints if so.
+	 *
+	 * @param annotation the annotation to check.
+	 *
+	 * @return A list of constraint annotations or the empty list if <code>annotation</code> is not a multi constraint
+	 *         annotation.
+	 */
+	public <A extends Annotation> List<Annotation> getMultiValueConstraints(A annotation) {
+		List<Annotation> annotationList = newArrayList();
+		try {
+			final Method method = ReflectionHelper.getMethod( annotation.getClass(), "value" );
+			if ( method != null ) {
+				Class<?> returnType = method.getReturnType();
+				if ( returnType.isArray() && returnType.getComponentType().isAnnotation() ) {
+					Annotation[] annotations = (Annotation[]) method.invoke( annotation );
+					for ( Annotation a : annotations ) {
+						Class<? extends Annotation> annotationType = a.annotationType();
+						if ( isConstraintAnnotation( annotationType ) || isBuiltinConstraint( annotationType ) ) {
+							annotationList.add( a );
+						}
+					}
+				}
+			}
+		}
+		catch ( IllegalAccessException iae ) {
+			// ignore
+		}
+		catch ( InvocationTargetException ite ) {
+			// ignore
+		}
+		return annotationList;
+	}
+
+	/**
+	 * Checks whether the specified annotation is a valid constraint annotation. A constraint annotations has to
+	 * fulfill the following conditions:
+	 * <ul>
+	 * <li>Has to contain a <code>ConstraintValidator</code> implementation.</li>
+	 * <li>Defines a message parameter.</li>
+	 * <li>Defines a group parameter.</li>
+	 * <li>Defines a payload parameter.</li>
+	 * </ul>
+	 *
+	 * @param annotationType The annotation type to test.
+	 *
+	 * @return <code>true</code> if the annotation fulfills the above condtions, <code>false</code> otherwise.
+	 */
+	public boolean isConstraintAnnotation(Class<? extends Annotation> annotationType) {
+		Constraint constraint = annotationType.getAnnotation( Constraint.class );
+		if ( constraint == null ) {
+			return false;
+		}
+
+		assertMessageParameterExists( annotationType );
+		assertGroupsParameterExists( annotationType );
+		assertPayloadParameterExists( annotationType );
+		assertNoParameterStartsWithValid( annotationType );
+
+		return true;
+	}
+
+	private void assertNoParameterStartsWithValid(Class<? extends Annotation> annotationType) {
+		final Method[] methods = ReflectionHelper.getDeclaredMethods( annotationType );
+		for ( Method m : methods ) {
+			if ( m.getName().startsWith( "valid" ) ) {
+				throw log.getConstraintParametersCannotStartWithValidException();
+			}
+		}
+	}
+
+	private void assertPayloadParameterExists(Class<? extends Annotation> annotationType) {
+		try {
+			final Method method = ReflectionHelper.getMethod( annotationType, "payload" );
+			if ( method == null ) {
+				throw log.getConstraintWithoutMandatoryParameterException( "payload", annotationType.getName() );
+			}
+			Class<?>[] defaultPayload = (Class<?>[]) method.getDefaultValue();
+			if ( defaultPayload.length != 0 ) {
+				throw log.getWrongDefaultValueForPayloadParameterException( annotationType.getName() );
+			}
+		}
+		catch ( ClassCastException e ) {
+			throw log.getWrongTypeForPayloadParameterException( annotationType.getName(), e );
+		}
+	}
+
+	private void assertGroupsParameterExists(Class<? extends Annotation> annotationType) {
+		try {
+			final Method method = ReflectionHelper.getMethod( annotationType, "groups" );
+			if ( method == null ) {
+				throw log.getConstraintWithoutMandatoryParameterException( "groups", annotationType.getName() );
+			}
+			Class<?>[] defaultGroups = (Class<?>[]) method.getDefaultValue();
+			if ( defaultGroups.length != 0 ) {
+				throw log.getWrongDefaultValueForGroupsParameterException( annotationType.getName() );
+			}
+		}
+		catch ( ClassCastException e ) {
+			throw log.getWrongTypeForGroupsParameterException( annotationType.getName(), e );
+		}
+	}
+
+	private void assertMessageParameterExists(Class<? extends Annotation> annotationType) {
+		final Method method = ReflectionHelper.getMethod( annotationType, "message" );
+		if ( method == null ) {
+			throw log.getConstraintWithoutMandatoryParameterException( "message", annotationType.getName() );
+		}
+		if ( method.getReturnType() != String.class ) {
+			throw log.getWrongTypeForMessageParameterException( annotationType.getName() );
+		}
+	}
+
+	public <T extends Annotation> List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorDefinition
+			(Class<T> annotationClass) {
+
+		Contracts.assertNotNull( annotationClass, MESSAGES.classCannotBeNull() );
+
+		final List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> list = constraintValidatorDefinitions.get(
+				annotationClass
+		);
+
+		List<Class<? extends ConstraintValidator<T, ?>>> constraintsValidators = newArrayList( list.size() );
+
+		for ( Class<? extends ConstraintValidator<?, ?>> validatorClass : list ) {
+			//safe cause all CV for a given annotation A are CV<A, ?>
+			@SuppressWarnings("unchecked")
+			Class<ConstraintValidator<T, ?>> safeValidatorClass = (Class<ConstraintValidator<T, ?>>) validatorClass;
+			constraintsValidators.add( safeValidatorClass );
+		}
+
+		return constraintsValidators;
+	}
+
+	public <A extends Annotation> void addConstraintValidatorDefinition(Class<A> annotationClass, List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> definitionClasses) {
+		constraintValidatorDefinitions.putIfAbsent( annotationClass, definitionClasses );
+	}
+
+	public boolean containsConstraintValidatorDefinition(Class<? extends Annotation> annotationClass) {
+		return constraintValidatorDefinitions.containsKey( annotationClass );
+	}
+
+	public boolean isConstraintComposition(Class<? extends Annotation> annotationType) {
+		return annotationType == ConstraintComposition.class;
+	}
+
+	private boolean isJodaTimeInClasspath() {
+		boolean isInClasspath;
+		try {
+			ReflectionHelper.loadClass( JODA_TIME_CLASS_NAME, this.getClass() );
+			isInClasspath = true;
+		}
+		catch ( ValidationException e ) {
+			isInClasspath = false;
+		}
+		return isInClasspath;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintOrigin.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintOrigin.java
new file mode 100644
index 0000000..e67ac98
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintOrigin.java
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.core;
+
+/**
+ * Visibility looked at when discovering constraints.
+ *
+ * @author Hardy Ferentschik
+ */
+public enum ConstraintOrigin {
+	/**
+	 * Constraint is defined on the root class
+	 */
+	DEFINED_LOCALLY,
+
+	/**
+	 * Constraint is defined in a super-class or interface of the root class.
+	 */
+	DEFINED_IN_HIERARCHY
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/MetaConstraint.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/MetaConstraint.java
new file mode 100644
index 0000000..3693f3f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/core/MetaConstraint.java
@@ -0,0 +1,149 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.core;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+import org.hibernate.validator.internal.engine.ConstraintTree;
+import org.hibernate.validator.internal.engine.ValidationContext;
+import org.hibernate.validator.internal.engine.ValueContext;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+/**
+ * Instances of this class abstract the constraint type  (class, method or field constraint) and give access to
+ * meta data about the constraint. This allows a unified handling of constraints in the validator implementation.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class MetaConstraint<A extends Annotation> {
+
+	/**
+	 * The constraint tree created from the constraint annotation.
+	 */
+	private final ConstraintTree<A> constraintTree;
+
+	/**
+	 * The constraint descriptor.
+	 */
+	private final ConstraintDescriptorImpl<A> constraintDescriptor;
+
+	/**
+	 * The location at which this constraint is defined.
+	 */
+	private final ConstraintLocation location;
+
+	/**
+	 * @param constraintDescriptor The constraint descriptor for this constraint
+	 * @param location meta data about constraint placement
+	 */
+	public MetaConstraint(ConstraintDescriptorImpl<A> constraintDescriptor, ConstraintLocation location) {
+
+		this.constraintTree = new ConstraintTree<A>( constraintDescriptor );
+		this.constraintDescriptor = constraintDescriptor;
+		this.location = location;
+	}
+
+	/**
+	 * @return Returns the list of groups this constraint is part of. This might include the default group even when
+	 *         it is not explicitly specified, but part of the redefined default group list of the hosting bean.
+	 */
+	public final Set<Class<?>> getGroupList() {
+		return constraintDescriptor.getGroups();
+	}
+
+	public final ConstraintDescriptorImpl<A> getDescriptor() {
+		return constraintDescriptor;
+	}
+
+	public final ElementType getElementType() {
+		return constraintDescriptor.getElementType();
+	}
+
+	public boolean validateConstraint(ValidationContext<?, ?> executionContext, ValueContext<?, ?> valueContext) {
+		valueContext.setElementType( getElementType() );
+		valueContext.setTypeOfAnnotatedElement( typeOfAnnotatedElement() );
+
+		return constraintTree.validateConstraints( executionContext, valueContext );
+	}
+
+	public ConstraintLocation getLocation() {
+		return location;
+	}
+
+	protected final Type typeOfAnnotatedElement() {
+		return location.typeOfAnnotatedElement();
+	}
+
+	/**
+	 * @param o the object from which to retrieve the value.
+	 *
+	 * @return Returns the value for this constraint from the specified object. Depending on the type either the value itself
+	 *         is returned of method or field access is used to access the value.
+	 */
+	public Object getValue(Object o) {
+		if ( location.getMember() == null ) {
+			return o;
+		}
+		else {
+			return ReflectionHelper.getValue( location.getMember(), o );
+		}
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		MetaConstraint<?> that = (MetaConstraint<?>) o;
+
+		if ( constraintDescriptor != null ? !constraintDescriptor.equals( that.constraintDescriptor ) : that.constraintDescriptor != null ) {
+			return false;
+		}
+		if ( location != null ? !location.equals( that.location ) : that.location != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = constraintDescriptor != null ? constraintDescriptor.hashCode() : 0;
+		result = 31 * result + ( location != null ? location.hashCode() : 0 );
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "MetaConstraint" );
+		sb.append( "{constraintType=" ).append( constraintDescriptor.getAnnotation().annotationType().getName() );
+		sb.append( ", location=" ).append( location );
+		sb.append( "}" );
+		return sb.toString();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/BeanDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/BeanDescriptorImpl.java
new file mode 100644
index 0000000..e288150
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/BeanDescriptorImpl.java
@@ -0,0 +1,116 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.PropertyDescriptor;
+
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.Contracts.assertNotNull;
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Describes a validated bean.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class BeanDescriptorImpl<T> extends ElementDescriptorImpl implements BeanDescriptor, TypeDescriptor {
+	private final Map<String, PropertyDescriptor> constrainedProperties;
+	private final Map<String, MethodDescriptor> methods;
+	private final Set<MethodDescriptor> constrainedMethods;
+
+	public BeanDescriptorImpl(Class<T> beanClass, Set<ConstraintDescriptorImpl<?>> classLevelConstraints, Map<String, PropertyDescriptor> properties, Map<String, MethodDescriptor> methods, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		super( beanClass, classLevelConstraints, false, defaultGroupSequenceRedefined, defaultGroupSequence );
+
+		this.constrainedProperties = Collections.unmodifiableMap( properties );
+		this.methods = Collections.unmodifiableMap( methods );
+		this.constrainedMethods = Collections.unmodifiableSet( getConstrainedMethods( methods.values() ) );
+	}
+
+	//BeanDescriptor methods
+
+	public final boolean isBeanConstrained() {
+		return hasConstraints() || !constrainedProperties.isEmpty();
+	}
+
+	public final PropertyDescriptor getConstraintsForProperty(String propertyName) {
+
+		assertNotNull( propertyName, "The property name cannot be null" );
+
+		return constrainedProperties.get( propertyName );
+	}
+
+	public final Set<PropertyDescriptor> getConstrainedProperties() {
+		return new HashSet<PropertyDescriptor>( constrainedProperties.values() );
+	}
+
+	//TypeDescriptor methods
+
+	public boolean isTypeConstrained() {
+		return isBeanConstrained() || !constrainedMethods.isEmpty();
+	}
+
+	public Set<MethodDescriptor> getConstrainedMethods() {
+		return constrainedMethods;
+	}
+
+	//TODO GM: to be compatible with getConstraintsForProperty() this method should only return
+	//a descriptor if the given method is constrained.
+	public MethodDescriptor getConstraintsForMethod(String methodName, Class<?>... parameterTypes) {
+
+		Contracts.assertNotNull( methodName, MESSAGES.methodNameMustNotBeNull() );
+
+		return methods.get( methodName + Arrays.toString( parameterTypes ) );
+	}
+
+	public BeanDescriptor getBeanDescriptor() {
+		return this;
+	}
+
+	private Set<MethodDescriptor> getConstrainedMethods(Collection<MethodDescriptor> methods) {
+		Set<MethodDescriptor> theValue = newHashSet();
+
+		for ( MethodDescriptor oneMethod : methods ) {
+			if ( oneMethod.hasConstraints() || oneMethod.isCascaded() ) {
+				theValue.add( oneMethod );
+			}
+
+			for ( ParameterDescriptor oneParameter : oneMethod.getParameterDescriptors() ) {
+				if ( oneParameter.hasConstraints() || oneParameter.isCascaded() ) {
+					theValue.add( oneMethod );
+				}
+			}
+		}
+
+		return theValue;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ConstraintDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ConstraintDescriptorImpl.java
new file mode 100644
index 0000000..2c2874f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ConstraintDescriptorImpl.java
@@ -0,0 +1,545 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.OverridesAttribute;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.ValidationException;
+import javax.validation.groups.Default;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.hibernate.validator.constraints.CompositionType;
+import org.hibernate.validator.constraints.ConstraintComposition;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.constraints.CompositionType.AND;
+
+/**
+ * Describes a single constraint (including it's composing constraints).
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class ConstraintDescriptorImpl<T extends Annotation> implements ConstraintDescriptor<T>, Serializable {
+
+	private static final long serialVersionUID = -2563102960314069246L;
+	private static final Log log = LoggerFactory.make();
+	private static final int OVERRIDES_PARAMETER_DEFAULT_INDEX = -1;
+	private static final String GROUPS = "groups";
+	private static final String PAYLOAD = "payload";
+
+	/**
+	 * A list of annotations which can be ignored when investigating for composing constraints.
+	 */
+	private static final List<String> NON_COMPOSING_CONSTRAINT_ANNOTATIONS = new ArrayList<String>();
+
+	static {
+		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Documented.class.getName() );
+		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Retention.class.getName() );
+		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Target.class.getName() );
+		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( Constraint.class.getName() );
+		NON_COMPOSING_CONSTRAINT_ANNOTATIONS.add( ReportAsSingleViolation.class.getName() );
+	}
+
+	/**
+	 * The actual constraint annotation.
+	 */
+	private final T annotation;
+
+	/**
+	 * The type of the annotation made instance variable, because {@code annotation.annotationType()} is quite expensive.
+	 */
+	private final Class<T> annotationType;
+
+	/**
+	 * The set of classes implementing the validation for this constraint. See also
+	 * {@code ConstraintValidator} resolution algorithm.
+	 */
+	private final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorDefinitionClasses;
+
+	/**
+	 * The groups for which to apply this constraint.
+	 */
+	private final Set<Class<?>> groups;
+
+	/**
+	 * The constraint parameters as map. The key is the parameter name and the value the
+	 * parameter value as specified in the constraint.
+	 */
+	private final Map<String, Object> attributes;
+
+	/**
+	 * The specified payload of the constraint.
+	 */
+	private final Set<Class<? extends Payload>> payloads;
+
+	/**
+	 * The composing constraints for this constraint.
+	 */
+	private final Set<ConstraintDescriptor<?>> composingConstraints;
+
+	/**
+	 * Flag indicating if in case of a composing constraint a single error or multiple errors should be raised.
+	 */
+	private final boolean isReportAsSingleInvalidConstraint;
+
+	/**
+	 * Describes on which level (<code>TYPE</code>, <code>METHOD</code>, <code>FIELD</code>) the constraint was
+	 * defined on.
+	 */
+	private final ElementType elementType;
+
+	/**
+	 * The origin of the constraint. Defined on the actual root class or somehwere in the class hierarchy
+	 */
+	private final ConstraintOrigin definedOn;
+
+	/**
+	 * Type indicating how composing constraints should be combined. By default this is set to {@code ConstraintComposition.CompositionType.AND}.
+	 */
+	private CompositionType compositionType = AND;
+
+
+	/**
+	 * Handle to the built-in constraint implementations.
+	 */
+	//TODO Can be made transient since it is only used during object construction. It would be better if we would not have to pass it at all
+	private final transient ConstraintHelper constraintHelper;
+
+	public ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, Class<?> implicitGroup, ElementType type, ConstraintOrigin definedOn) {
+		this.annotation = annotation;
+		this.annotationType = (Class<T>) this.annotation.annotationType();
+		this.constraintHelper = constraintHelper;
+		this.elementType = type;
+		this.definedOn = definedOn;
+		this.isReportAsSingleInvalidConstraint = annotationType.isAnnotationPresent(
+				ReportAsSingleViolation.class
+		);
+
+		// HV-181 - To avoid and thread visibility issues we are building the different data structures in tmp variables and
+		// then assign them to the final variables
+		this.attributes = buildAnnotationParameterMap( annotation );
+		this.groups = buildGroupSet( implicitGroup );
+		this.payloads = buildPayloadSet( annotation );
+		this.constraintValidatorDefinitionClasses = findConstraintValidatorClasses();
+		this.composingConstraints = parseComposingConstraints();
+	}
+
+	public ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, ElementType type, ConstraintOrigin definedOn) {
+		this( annotation, constraintHelper, null, type, definedOn );
+	}
+
+	private Set<Class<? extends Payload>> buildPayloadSet(T annotation) {
+		Set<Class<? extends Payload>> payloadSet = new HashSet<Class<? extends Payload>>();
+		Class<Payload>[] payloadFromAnnotation;
+		try {
+			//TODO be extra safe and make sure this is an array of Payload
+			payloadFromAnnotation = ReflectionHelper.getAnnotationParameter( annotation, PAYLOAD, Class[].class );
+		}
+		catch ( ValidationException e ) {
+			//ignore people not defining payloads
+			payloadFromAnnotation = null;
+		}
+		if ( payloadFromAnnotation != null ) {
+			payloadSet.addAll( Arrays.asList( payloadFromAnnotation ) );
+		}
+		return Collections.unmodifiableSet( payloadSet );
+	}
+
+	private Set<Class<?>> buildGroupSet(Class<?> implicitGroup) {
+		Set<Class<?>> groupSet = new HashSet<Class<?>>();
+		final Class<?>[] groupsFromAnnotation = ReflectionHelper.getAnnotationParameter(
+				annotation, GROUPS, Class[].class
+		);
+		if ( groupsFromAnnotation.length == 0 ) {
+			groupSet.add( Default.class );
+		}
+		else {
+			groupSet.addAll( Arrays.asList( groupsFromAnnotation ) );
+		}
+
+		// if the constraint is part of the Default group it is automatically part of the implicit group as well
+		if ( implicitGroup != null && groupSet.contains( Default.class ) ) {
+			groupSet.add( implicitGroup );
+		}
+		return Collections.unmodifiableSet( groupSet );
+	}
+
+	private List<Class<? extends ConstraintValidator<T, ?>>> findConstraintValidatorClasses() {
+		final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorClasses = new ArrayList<Class<? extends ConstraintValidator<T, ?>>>();
+		if ( constraintHelper.containsConstraintValidatorDefinition( annotationType ) ) {
+			for ( Class<? extends ConstraintValidator<T, ?>> validator : constraintHelper
+					.getConstraintValidatorDefinition( annotationType ) ) {
+				constraintValidatorClasses.add( validator );
+			}
+			return Collections.unmodifiableList( constraintValidatorClasses );
+		}
+
+		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintDefinitionClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
+		if ( constraintHelper.isBuiltinConstraint( annotationType ) ) {
+			constraintDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
+		}
+		else {
+			Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
+					.getAnnotation( Constraint.class )
+					.validatedBy();
+			constraintDefinitionClasses.addAll( Arrays.asList( validatedBy ) );
+		}
+
+		constraintHelper.addConstraintValidatorDefinition(
+				annotationType, constraintDefinitionClasses
+		);
+
+		for ( Class<? extends ConstraintValidator<? extends Annotation, ?>> validator : constraintDefinitionClasses ) {
+			@SuppressWarnings("unchecked")
+			Class<? extends ConstraintValidator<T, ?>> safeValidator = (Class<? extends ConstraintValidator<T, ?>>) validator;
+			constraintValidatorClasses.add( safeValidator );
+		}
+		return Collections.unmodifiableList( constraintValidatorClasses );
+	}
+
+	public T getAnnotation() {
+		return annotation;
+	}
+
+	public Set<Class<?>> getGroups() {
+		return groups;
+	}
+
+	public Set<Class<? extends Payload>> getPayload() {
+		return payloads;
+	}
+
+	public List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorClasses() {
+		return constraintValidatorDefinitionClasses;
+	}
+
+	public Map<String, Object> getAttributes() {
+		return attributes;
+	}
+
+	public Set<ConstraintDescriptor<?>> getComposingConstraints() {
+		return composingConstraints;
+	}
+
+	public boolean isReportAsSingleViolation() {
+		return isReportAsSingleInvalidConstraint;
+	}
+
+	public ElementType getElementType() {
+		return elementType;
+	}
+
+	public ConstraintOrigin getDefinedOn() {
+		return definedOn;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		ConstraintDescriptorImpl<?> that = (ConstraintDescriptorImpl<?>) o;
+
+		if ( annotation != null ? !annotation.equals( that.annotation ) : that.annotation != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		return annotation != null ? annotation.hashCode() : 0;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ConstraintDescriptorImpl" );
+		sb.append( "{annotation=" ).append( annotationType.getName() );
+		sb.append( ", payloads=" ).append( payloads );
+		sb.append( ", hasComposingConstraints=" ).append( composingConstraints.isEmpty() );
+		sb.append( ", isReportAsSingleInvalidConstraint=" ).append( isReportAsSingleInvalidConstraint );
+		sb.append( ", elementType=" ).append( elementType );
+		sb.append( ", definedOn=" ).append( definedOn );
+		sb.append( ", groups=" ).append( groups );
+		sb.append( ", attributes=" ).append( attributes );
+		sb.append( '}' );
+		return sb.toString();
+	}
+
+	private Map<String, Object> buildAnnotationParameterMap(Annotation annotation) {
+		final Method[] declaredMethods = ReflectionHelper.getDeclaredMethods( annotation.annotationType() );
+		Map<String, Object> parameters = new HashMap<String, Object>( declaredMethods.length );
+		for ( Method m : declaredMethods ) {
+			try {
+				parameters.put( m.getName(), m.invoke( annotation ) );
+			}
+			catch ( IllegalAccessException e ) {
+				throw log.getUnableToReadAnnotationAttributesException( annotation.getClass(), e );
+			}
+			catch ( InvocationTargetException e ) {
+				throw log.getUnableToReadAnnotationAttributesException( annotation.getClass(), e );
+			}
+		}
+		return Collections.unmodifiableMap( parameters );
+	}
+
+	private Object getMethodValue(Annotation annotation, Method m) {
+		Object value;
+		try {
+			value = m.invoke( annotation );
+		}
+		// should never happen
+		catch ( IllegalAccessException e ) {
+			throw log.getUnableToRetrieveAnnotationParameterValueException( e );
+		}
+		catch ( InvocationTargetException e ) {
+			throw log.getUnableToRetrieveAnnotationParameterValueException( e );
+		}
+		return value;
+	}
+
+	private Map<ClassIndexWrapper, Map<String, Object>> parseOverrideParameters() {
+		Map<ClassIndexWrapper, Map<String, Object>> overrideParameters = new HashMap<ClassIndexWrapper, Map<String, Object>>();
+		final Method[] methods = ReflectionHelper.getDeclaredMethods( annotationType );
+		for ( Method m : methods ) {
+			if ( m.getAnnotation( OverridesAttribute.class ) != null ) {
+				addOverrideAttributes(
+						overrideParameters, m, m.getAnnotation( OverridesAttribute.class )
+				);
+			}
+			else if ( m.getAnnotation( OverridesAttribute.List.class ) != null ) {
+				addOverrideAttributes(
+						overrideParameters,
+						m,
+						m.getAnnotation( OverridesAttribute.List.class ).value()
+				);
+			}
+		}
+		return overrideParameters;
+	}
+
+	private void addOverrideAttributes(Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, Method m, OverridesAttribute... attributes) {
+
+		Object value = getMethodValue( annotation, m );
+		for ( OverridesAttribute overridesAttribute : attributes ) {
+			ensureAttributeIsOverridable( m, overridesAttribute );
+
+			ClassIndexWrapper wrapper = new ClassIndexWrapper(
+					overridesAttribute.constraint(), overridesAttribute.constraintIndex()
+			);
+			Map<String, Object> map = overrideParameters.get( wrapper );
+			if ( map == null ) {
+				map = new HashMap<String, Object>();
+				overrideParameters.put( wrapper, map );
+			}
+			map.put( overridesAttribute.name(), value );
+		}
+	}
+
+	private void ensureAttributeIsOverridable(Method m, OverridesAttribute overridesAttribute) {
+		final Method method = ReflectionHelper.getMethod( overridesAttribute.constraint(), overridesAttribute.name() );
+		if ( method == null ) {
+			throw log.getOverriddenConstraintAttributeNotFoundException( overridesAttribute.name() );
+		}
+		Class<?> returnTypeOfOverriddenConstraint = method.getReturnType();
+		if ( !returnTypeOfOverriddenConstraint.equals( m.getReturnType() ) ) {
+			throw log.getWrongAttributeTypeForOverriddenConstraintException(
+					returnTypeOfOverriddenConstraint.getName(),
+					m.getReturnType()
+			);
+		}
+	}
+
+	private Set<ConstraintDescriptor<?>> parseComposingConstraints() {
+		Set<ConstraintDescriptor<?>> composingConstraintsSet = new HashSet<ConstraintDescriptor<?>>();
+		Map<ClassIndexWrapper, Map<String, Object>> overrideParameters = parseOverrideParameters();
+
+		for ( Annotation declaredAnnotation : annotationType.getDeclaredAnnotations() ) {
+			Class<? extends Annotation> declaredAnnotationType = declaredAnnotation.annotationType();
+			if ( NON_COMPOSING_CONSTRAINT_ANNOTATIONS.contains( declaredAnnotationType.getName() ) ) {
+				// ignore the usual suspects which will be in almost any constraint, but are no composing constraint
+				continue;
+			}
+
+			//If there is a @ConstraintCompositionType annotation, set its value as the local compositionType field
+			if ( constraintHelper.isConstraintComposition( declaredAnnotationType ) ) {
+				this.setCompositionType( ( (ConstraintComposition) declaredAnnotation ).value() );
+				if ( log.isDebugEnabled() ) {
+					log.debugf( "Adding Bool %s.", declaredAnnotationType.getName() );
+				}
+				continue;
+			}
+
+			if ( constraintHelper.isConstraintAnnotation( declaredAnnotationType )
+					|| constraintHelper.isBuiltinConstraint( declaredAnnotationType ) ) {
+				ConstraintDescriptorImpl<?> descriptor = createComposingConstraintDescriptor(
+						declaredAnnotation, overrideParameters, OVERRIDES_PARAMETER_DEFAULT_INDEX
+				);
+				composingConstraintsSet.add( descriptor );
+				log.debugf( "Adding composing constraint: %s.", descriptor );
+			}
+			else if ( constraintHelper.isMultiValueConstraint( declaredAnnotationType ) ) {
+				List<Annotation> multiValueConstraints = constraintHelper.getMultiValueConstraints( declaredAnnotation );
+				int index = 0;
+				for ( Annotation constraintAnnotation : multiValueConstraints ) {
+					ConstraintDescriptorImpl<?> descriptor = createComposingConstraintDescriptor(
+							constraintAnnotation, overrideParameters, index
+					);
+					composingConstraintsSet.add( descriptor );
+					log.debugf( "Adding composing constraint: %s.", descriptor );
+					index++;
+				}
+			}
+		}
+		return Collections.unmodifiableSet( composingConstraintsSet );
+	}
+
+	private <U extends Annotation> ConstraintDescriptorImpl<U> createComposingConstraintDescriptor(U declaredAnnotation, Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, int index) {
+		@SuppressWarnings("unchecked")
+		final Class<U> annotationType = (Class<U>) declaredAnnotation.annotationType();
+		return createComposingConstraintDescriptor(
+				overrideParameters,
+				index,
+				declaredAnnotation,
+				annotationType
+		);
+	}
+
+	private <U extends Annotation> ConstraintDescriptorImpl<U> createComposingConstraintDescriptor(Map<ClassIndexWrapper, Map<String, Object>> overrideParameters, int index, U constraintAnnotation, Class<U> annotationType) {
+		// use a annotation proxy
+		AnnotationDescriptor<U> annotationDescriptor = new AnnotationDescriptor<U>(
+				annotationType, buildAnnotationParameterMap( constraintAnnotation )
+		);
+
+		// get the right override parameters
+		Map<String, Object> overrides = overrideParameters.get(
+				new ClassIndexWrapper(
+						annotationType, index
+				)
+		);
+		if ( overrides != null ) {
+			for ( Map.Entry<String, Object> entry : overrides.entrySet() ) {
+				annotationDescriptor.setValue( entry.getKey(), entry.getValue() );
+			}
+		}
+
+		// groups get inherited from the parent
+		annotationDescriptor.setValue( GROUPS, groups.toArray( new Class<?>[groups.size()] ) );
+
+		// HV-183 - payloads are propagated to composing constraints
+		annotationDescriptor.setValue( PAYLOAD, payloads.toArray( new Class<?>[payloads.size()] ) );
+
+		U annotationProxy = AnnotationFactory.create( annotationDescriptor );
+		return new ConstraintDescriptorImpl<U>(
+				annotationProxy, constraintHelper, elementType, definedOn
+		);
+	}
+
+	/**
+	 * @param compositionType the compositionType to set
+	 */
+	public void setCompositionType(CompositionType compositionType) {
+		this.compositionType = compositionType;
+	}
+
+	/**
+	 * @return the compositionType
+	 */
+	public CompositionType getCompositionType() {
+		return compositionType;
+	}
+
+	/**
+	 * A wrapper class to keep track for which composing constraints (class and index) a given attribute override applies to.
+	 */
+	private class ClassIndexWrapper {
+		final Class<?> clazz;
+		final int index;
+
+		ClassIndexWrapper(Class<?> clazz, int index) {
+			this.clazz = clazz;
+			this.index = index;
+		}
+
+		@Override
+		@SuppressWarnings("SimplifiableIfStatement")
+		public boolean equals(Object o) {
+			if ( this == o ) {
+				return true;
+			}
+			if ( o == null || getClass() != o.getClass() ) {
+				return false;
+			}
+
+			@SuppressWarnings("unchecked") // safe due to the check above
+					ClassIndexWrapper that = (ClassIndexWrapper) o;
+
+			if ( index != that.index ) {
+				return false;
+			}
+			if ( clazz != null && !clazz.equals( that.clazz ) ) {
+				return false;
+			}
+			if ( clazz == null && that.clazz != null ) {
+				return false;
+			}
+
+			return true;
+		}
+
+		@Override
+		public int hashCode() {
+			int result = clazz != null ? clazz.hashCode() : 0;
+			result = 31 * result + index;
+			return result;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ElementDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ElementDescriptorImpl.java
new file mode 100644
index 0000000..e1a3735
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ElementDescriptorImpl.java
@@ -0,0 +1,177 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.lang.annotation.ElementType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.validation.groups.Default;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.ElementDescriptor;
+import javax.validation.metadata.Scope;
+
+import org.hibernate.validator.internal.engine.groups.Group;
+import org.hibernate.validator.internal.engine.groups.ValidationOrder;
+import org.hibernate.validator.internal.engine.groups.ValidationOrderGenerator;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Describes a validated element (class, field or property).
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class ElementDescriptorImpl implements ElementDescriptor {
+
+	private final Class<?> type;
+	private final Set<ConstraintDescriptorImpl<?>> constraintDescriptors;
+	private final boolean cascaded;
+	private final boolean defaultGroupSequenceRedefined;
+	private final List<Class<?>> defaultGroupSequence;
+
+	public ElementDescriptorImpl(Class<?> type, Set<ConstraintDescriptorImpl<?>> constraintDescriptors, boolean cascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		this.type = type;
+		this.constraintDescriptors = Collections.unmodifiableSet( constraintDescriptors );
+		this.cascaded = cascaded;
+		this.defaultGroupSequenceRedefined = defaultGroupSequenceRedefined;
+		this.defaultGroupSequence = Collections.unmodifiableList( defaultGroupSequence );
+	}
+
+	public boolean isCascaded() {
+		return cascaded;
+	}
+
+	public final boolean hasConstraints() {
+		return constraintDescriptors.size() != 0;
+	}
+
+	public final Class<?> getElementClass() {
+		return type;
+	}
+
+	public final Set<ConstraintDescriptor<?>> getConstraintDescriptors() {
+		return findConstraints().getConstraintDescriptors();
+	}
+
+	public final ConstraintFinder findConstraints() {
+		return new ConstraintFinderImpl();
+	}
+
+	protected static Set<ConstraintDescriptorImpl<?>> asDescriptors(Set<MetaConstraint<?>> constraints) {
+		Set<ConstraintDescriptorImpl<?>> theValue = newHashSet();
+
+		for ( MetaConstraint<?> oneConstraint : constraints ) {
+			theValue.add( oneConstraint.getDescriptor() );
+		}
+
+		return theValue;
+	}
+
+	private class ConstraintFinderImpl implements ConstraintFinder {
+		private List<Class<?>> groups;
+		private Set<ConstraintOrigin> definedInSet;
+		private Set<ElementType> elementTypes;
+
+		ConstraintFinderImpl() {
+			elementTypes = new HashSet<ElementType>();
+			elementTypes.add( ElementType.TYPE );
+			elementTypes.add( ElementType.METHOD );
+			elementTypes.add( ElementType.FIELD );
+
+			//for a bean descriptor there will be no parameter constraints, so we can safely add this element type here
+			elementTypes.add( ElementType.PARAMETER );
+
+			definedInSet = new HashSet<ConstraintOrigin>();
+			definedInSet.add( ConstraintOrigin.DEFINED_LOCALLY );
+			definedInSet.add( ConstraintOrigin.DEFINED_IN_HIERARCHY );
+			groups = Collections.emptyList();
+		}
+
+		public ConstraintFinder unorderedAndMatchingGroups(Class<?>... classes) {
+			this.groups = new ArrayList<Class<?>>();
+			for ( Class<?> clazz : classes ) {
+				if ( Default.class.equals( clazz ) && defaultGroupSequenceRedefined ) {
+					this.groups.addAll( defaultGroupSequence );
+				}
+				else {
+					groups.add( clazz );
+				}
+			}
+			return this;
+		}
+
+		public ConstraintFinder lookingAt(Scope visibility) {
+			if ( visibility.equals( Scope.LOCAL_ELEMENT ) ) {
+				definedInSet.remove( ConstraintOrigin.DEFINED_IN_HIERARCHY );
+			}
+			return this;
+		}
+
+		public ConstraintFinder declaredOn(ElementType... elementTypes) {
+			this.elementTypes.clear();
+			this.elementTypes.addAll( Arrays.asList( elementTypes ) );
+			return this;
+		}
+
+		public Set<ConstraintDescriptor<?>> getConstraintDescriptors() {
+
+			Set<ConstraintDescriptor<?>> matchingDescriptors = new HashSet<ConstraintDescriptor<?>>();
+			findMatchingDescriptors( matchingDescriptors );
+			return Collections.unmodifiableSet( matchingDescriptors );
+		}
+
+		private void findMatchingDescriptors(Set<ConstraintDescriptor<?>> matchingDescriptors) {
+			if ( !groups.isEmpty() ) {
+				ValidationOrder validationOrder = new ValidationOrderGenerator().getValidationOrder( groups );
+				Iterator<Group> groupIterator = validationOrder.getGroupIterator();
+				while ( groupIterator.hasNext() ) {
+					Group g = groupIterator.next();
+					addMatchingDescriptorsForGroup( g.getDefiningClass(), matchingDescriptors );
+				}
+			}
+			else {
+				for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) {
+					if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() ) ) {
+						matchingDescriptors.add( descriptor );
+					}
+				}
+			}
+		}
+
+		public boolean hasConstraints() {
+			return getConstraintDescriptors().size() != 0;
+		}
+
+		private void addMatchingDescriptorsForGroup(Class<?> group, Set<ConstraintDescriptor<?>> matchingDescriptors) {
+			for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) {
+				if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() )
+						&& descriptor.getGroups().contains( group ) ) {
+					matchingDescriptors.add( descriptor );
+				}
+			}
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/MethodDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/MethodDescriptorImpl.java
new file mode 100644
index 0000000..26ec02e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/MethodDescriptorImpl.java
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+
+/**
+ * Describes a validated method.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodDescriptorImpl extends ElementDescriptorImpl implements MethodDescriptor {
+	private final String name;
+	private final List<ParameterDescriptor> parameters;
+
+	public MethodDescriptorImpl(Class<?> returnType, String name, Set<ConstraintDescriptorImpl<?>> returnValueConstraints, boolean isCascaded, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		super( returnType, returnValueConstraints, isCascaded, defaultGroupSequenceRedefined, defaultGroupSequence );
+
+		this.name = name;
+		this.parameters = Collections.unmodifiableList( parameters );
+	}
+
+	public String getMethodName() {
+		return name;
+	}
+
+	public List<ParameterDescriptor> getParameterDescriptors() {
+		return parameters;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ParameterDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ParameterDescriptorImpl.java
new file mode 100644
index 0000000..b8cab55
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/ParameterDescriptorImpl.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+
+/**
+ * Describes a validated method parameter.
+ *
+ * @author Gunnar Morling
+ */
+public class ParameterDescriptorImpl extends ElementDescriptorImpl implements ParameterDescriptor {
+
+	private final int index;
+
+	public ParameterDescriptorImpl(Class<?> type, int index, Set<ConstraintDescriptorImpl<?>> constraints, boolean isCascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		super( type, constraints, isCascaded, defaultGroupSequenceRedefined, defaultGroupSequence );
+
+		this.index = index;
+	}
+
+	public int getIndex() {
+		return index;
+	}
+}
\ No newline at end of file
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/PropertyDescriptorImpl.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/PropertyDescriptorImpl.java
new file mode 100644
index 0000000..1bc8d23
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/PropertyDescriptorImpl.java
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.descriptor;
+
+import java.util.List;
+import java.util.Set;
+import javax.validation.metadata.PropertyDescriptor;
+
+/**
+ * Describes a validated property.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class PropertyDescriptorImpl extends ElementDescriptorImpl implements PropertyDescriptor {
+
+	private final String property;
+
+	public PropertyDescriptorImpl(Class<?> returnType, String propertyName, Set<ConstraintDescriptorImpl<?>> constraints, boolean cascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
+		super( returnType, constraints, cascaded, defaultGroupSequenceRedefined, defaultGroupSequence );
+		this.property = propertyName;
+	}
+
+	public String getPropertyName() {
+		return property;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/package.html
new file mode 100644
index 0000000..da63753
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/descriptor/package.html
@@ -0,0 +1,30 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head/>
+<body>
+<p>Implementation of the Bean Validation meta data API and its Hibernate Validator specific extension for the
+    representation of method level constraints.
+</p>
+
+<p>The types in this package are generally immutable. Also any collections returned from methods in this package are
+    unmodifiable and an exception will be thrown when trying to alter them.
+</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/BeanConstraintLocation.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/BeanConstraintLocation.java
new file mode 100644
index 0000000..20050f5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/BeanConstraintLocation.java
@@ -0,0 +1,151 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.location;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.TypeHelper;
+
+/**
+ * A {@link ConstraintLocation} implementation that represents either a bean (in case of class-level
+ * constraints), a field or a getter method (in case of property-level constraints).
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class BeanConstraintLocation implements ConstraintLocation {
+
+	/**
+	 * The member the constraint was defined on.
+	 */
+	private final Member member;
+
+	/**
+	 * The class of the bean hosting this constraint.
+	 */
+	private final Class<?> beanClass;
+
+	/**
+	 * The type of element hosting this constraint. One of TYPE, FIELD or METHOD.
+	 */
+	private final ElementType elementType;
+
+	/**
+	 * The type of the annotated element
+	 */
+	private final Type typeOfAnnotatedElement;
+
+	public BeanConstraintLocation(Class<?> beanClass) {
+		this( beanClass, null );
+	}
+
+	public BeanConstraintLocation(Member member) {
+		this( member.getDeclaringClass(), member );
+	}
+
+	/**
+	 * @param beanClass The class in which the constraint is defined on
+	 * @param member The member on which the constraint is defined on, {@code null} if it is a class constraint}
+	 */
+	public BeanConstraintLocation(Class<?> beanClass, Member member) {
+		this.member = member;
+
+		if ( this.member != null ) {
+			this.elementType = ( member instanceof Method ) ? ElementType.METHOD : ElementType.FIELD;
+		}
+		else {
+			this.elementType = ElementType.TYPE;
+		}
+		this.beanClass = beanClass;
+		this.typeOfAnnotatedElement = determineTypeOfAnnotatedElement();
+	}
+
+	public Class<?> getBeanClass() {
+		return beanClass;
+	}
+
+	public Member getMember() {
+		return member;
+	}
+
+	public Type typeOfAnnotatedElement() {
+		return typeOfAnnotatedElement;
+	}
+
+	public ElementType getElementType() {
+		return elementType;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		BeanConstraintLocation that = (BeanConstraintLocation) o;
+
+		if ( beanClass != null ? !beanClass.equals( that.beanClass ) : that.beanClass != null ) {
+			return false;
+		}
+		if ( member != null ? !member.equals( that.member ) : that.member != null ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = member != null ? member.hashCode() : 0;
+		result = 31 * result + ( beanClass != null ? beanClass.hashCode() : 0 );
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		return "BeanConstraintLocation [" + beanClass.getSimpleName() + "#" + ReflectionHelper.getPropertyName( member ) + " (" + elementType + ")]";
+	}
+
+	private Type determineTypeOfAnnotatedElement() {
+		Type t;
+
+		if ( member == null ) {
+			// HV-623 - create a ParameterizedType in case the class has type parameters. Needed for constraint validator resolution (HF)
+			if ( beanClass.getTypeParameters().length != 0 ) {
+				t = TypeHelper.parameterizedType( beanClass, beanClass.getTypeParameters() );
+			}
+			else {
+				t = beanClass;
+			}
+		}
+		else {
+			t = ReflectionHelper.typeOf( member );
+			if ( t instanceof Class && ( (Class<?>) t ).isPrimitive() ) {
+				t = ReflectionHelper.boxedType( (Class<?>) t );
+			}
+		}
+
+		return t;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/ConstraintLocation.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/ConstraintLocation.java
new file mode 100644
index 0000000..d55a2ba
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/ConstraintLocation.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.location;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Type;
+
+/**
+ * Implementations describe the location at which a constraint is specified (a
+ * bean, a method parameter etc.).
+ *
+ * @author Gunnar Morling
+ */
+public interface ConstraintLocation {
+
+	Class<?> getBeanClass();
+
+	/**
+	 * Returns the type of the element at this constraint location. Depending
+	 * on the concrete implementation this might be the type of an annotated bean, method parameter etc.
+	 *
+	 * @return The type of the element at this constraint location.
+	 */
+	Type typeOfAnnotatedElement();
+
+	ElementType getElementType();
+
+	Member getMember();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/MethodConstraintLocation.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/MethodConstraintLocation.java
new file mode 100644
index 0000000..604caed
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/MethodConstraintLocation.java
@@ -0,0 +1,147 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.location;
+
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+/**
+ * A {@link ConstraintLocation} implementation that represents a method
+ * parameter or return value.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodConstraintLocation implements ConstraintLocation {
+	private final Method method;
+	private final Integer parameterIndex;
+
+	public MethodConstraintLocation(Method method) {
+		Contracts.assertValueNotNull( method, "method" );
+
+		this.method = method;
+		this.parameterIndex = null;
+	}
+
+	/**
+	 * Creates a new {@link MethodConstraintLocation}.
+	 *
+	 * @param method The method of the location to be created.
+	 * @param parameterIndex The parameter index of the location to be created.
+	 */
+	public MethodConstraintLocation(Method method, int parameterIndex) {
+		Contracts.assertValueNotNull( method, "method" );
+
+		this.method = method;
+		this.parameterIndex = parameterIndex;
+	}
+
+	public Class<?> getBeanClass() {
+		return method.getDeclaringClass();
+	}
+
+	public Type typeOfAnnotatedElement() {
+		Type t;
+
+		if ( parameterIndex == null ) {
+			t = ReflectionHelper.typeOf( method );
+		}
+		else {
+			t = ReflectionHelper.typeOf( method, parameterIndex );
+		}
+
+		if ( t instanceof Class && ( (Class<?>) t ).isPrimitive() ) {
+			t = ReflectionHelper.boxedType( (Class<?>) t );
+		}
+
+		return t;
+	}
+
+	public Method getMember() {
+		return method;
+	}
+
+	public ElementType getElementType() {
+		return parameterIndex != null ? ElementType.PARAMETER : ElementType.METHOD;
+	}
+
+	/**
+	 * @return returns the parameter index of this constraint location or <code>null</code> if
+	 *         this location represents a method return value.
+	 */
+	public Integer getParameterIndex() {
+		return parameterIndex;
+	}
+
+	public Class<?> getParameterType() {
+		return parameterIndex != null ? method.getParameterTypes()[parameterIndex] : null;
+	}
+
+	@Override
+	public String toString() {
+		return String.format(
+				"%s#%s(%s)",
+				method.getDeclaringClass().getSimpleName(),
+				method.getName(),
+				parameterIndex != null ? parameterIndex : ""
+		);
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ( ( method == null ) ? 0 : method.hashCode() );
+		result = prime * result
+				+ ( ( parameterIndex == null ) ? 0 : parameterIndex.hashCode() );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		MethodConstraintLocation other = (MethodConstraintLocation) obj;
+		if ( method == null ) {
+			if ( other.method != null ) {
+				return false;
+			}
+		}
+		else if ( !method.equals( other.method ) ) {
+			return false;
+		}
+		if ( parameterIndex == null ) {
+			if ( other.parameterIndex != null ) {
+				return false;
+			}
+		}
+		else if ( !parameterIndex.equals( other.parameterIndex ) ) {
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/package.html
new file mode 100644
index 0000000..b2ce595
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/location/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Contains types for the representation of constraint locations.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/package.html
new file mode 100644
index 0000000..299ab54
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Implementations of the Bean Validation metadata interfaces as well as Hibernate Validator specific meta data classes.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/AnnotationMetaDataProvider.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/AnnotationMetaDataProvider.java
new file mode 100644
index 0000000..2f773d9
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/AnnotationMetaDataProvider.java
@@ -0,0 +1,439 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.provider;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import javax.validation.GroupSequence;
+import javax.validation.Valid;
+
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+import org.hibernate.validator.internal.metadata.raw.ConfigurationSource;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedField;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedParameter;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.internal.util.ConcurrentReferenceHashMap;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.ConcurrentReferenceHashMap.ReferenceType.SOFT;
+import static org.hibernate.validator.internal.util.ReflectionHelper.getMethods;
+import static org.hibernate.validator.internal.util.ReflectionHelper.newInstance;
+
+/**
+ * {@code MetaDataProvider} which reads the metadata from annotations which is the default configuration source.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public class AnnotationMetaDataProvider implements MetaDataProvider {
+	private static final Log log = LoggerFactory.make();
+	/**
+	 * The default initial capacity for this cache.
+	 */
+	static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+	private final ConstraintHelper constraintHelper;
+	private final ConcurrentReferenceHashMap<Class<?>, BeanConfiguration<?>> configuredBeans;
+	private final AnnotationProcessingOptions annotationProcessingOptions;
+
+	public AnnotationMetaDataProvider(ConstraintHelper constraintHelper, AnnotationProcessingOptions annotationProcessingOptions) {
+		this.constraintHelper = constraintHelper;
+		this.annotationProcessingOptions = annotationProcessingOptions;
+		configuredBeans = new ConcurrentReferenceHashMap<Class<?>, BeanConfiguration<?>>(
+				DEFAULT_INITIAL_CAPACITY,
+				SOFT,
+				SOFT
+		);
+	}
+
+	@Override
+	public AnnotationProcessingOptions getAnnotationProcessingOptions() {
+		return new AnnotationProcessingOptions();
+	}
+
+	@Override
+	public <T> List<BeanConfiguration<? super T>> getBeanConfigurationForHierarchy(Class<T> beanClass) {
+		List<BeanConfiguration<? super T>> configurations = newArrayList();
+
+		for ( Class<?> hierarchyClass : ReflectionHelper.computeClassHierarchy( beanClass, true ) ) {
+			@SuppressWarnings("unchecked")
+			BeanConfiguration<? super T> configuration = (BeanConfiguration<? super T>) getBeanConfiguration(
+					hierarchyClass
+			);
+			if ( configuration != null ) {
+				configurations.add( configuration );
+			}
+		}
+
+		return configurations;
+	}
+
+	private BeanConfiguration<?> getBeanConfiguration(Class<?> beanClass) {
+		BeanConfiguration<?> configuration = configuredBeans.get( beanClass );
+
+		if ( configuration != null ) {
+			return configuration;
+		}
+
+		configuration = retrieveBeanConfiguration( beanClass );
+		configuredBeans.put( beanClass, configuration );
+
+		return configuration;
+	}
+
+	/**
+	 * @param beanClass The bean class for which to retrieve the meta data
+	 *
+	 * @return Retrieves constraint related meta data from the annotations of the given type.
+	 */
+	private <T> BeanConfiguration<T> retrieveBeanConfiguration(Class<T> beanClass) {
+		Set<ConstrainedElement> propertyMetaData = getPropertyMetaData( beanClass );
+		propertyMetaData.addAll( getMethodMetaData( beanClass ) );
+
+		//TODO GM: currently class level constraints are represented by a PropertyMetaData. This
+		//works but seems somewhat unnatural
+		Set<MetaConstraint<?>> classLevelConstraints = getClassLevelConstraints( beanClass );
+		if ( !classLevelConstraints.isEmpty() ) {
+			ConstrainedType classLevelMetaData =
+					new ConstrainedType(
+							ConfigurationSource.ANNOTATION,
+							new BeanConstraintLocation( beanClass ),
+							classLevelConstraints
+					);
+			propertyMetaData.add( classLevelMetaData );
+		}
+
+		return new BeanConfiguration<T>(
+				ConfigurationSource.ANNOTATION,
+				beanClass,
+				propertyMetaData,
+				getDefaultGroupSequence( beanClass ),
+				getDefaultGroupSequenceProvider( beanClass )
+		);
+	}
+
+	private List<Class<?>> getDefaultGroupSequence(Class<?> beanClass) {
+		GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
+		return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
+	}
+
+	private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
+		GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );
+
+		if ( groupSequenceProviderAnnotation != null ) {
+			return newGroupSequenceProviderClassInstance( beanClass, groupSequenceProviderAnnotation.value() );
+		}
+
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	private <T> DefaultGroupSequenceProvider<? super T> newGroupSequenceProviderClassInstance(Class<T> beanClass, Class<?> providerClass) {
+		Method[] providerMethods = getMethods( providerClass );
+		for ( Method method : providerMethods ) {
+			Class<?>[] paramTypes = method.getParameterTypes();
+			if ( "getValidationGroups".equals( method.getName() ) && !method.isBridge()
+					&& paramTypes.length == 1 && paramTypes[0].isAssignableFrom( beanClass ) ) {
+
+				return (DefaultGroupSequenceProvider<? super T>) newInstance(
+						providerClass, "the default group sequence provider"
+				);
+			}
+		}
+
+		throw log.getWrongDefaultGroupSequenceProviderTypeException( beanClass.getName() );
+	}
+
+	private Set<MetaConstraint<?>> getClassLevelConstraints(Class<?> clazz) {
+		if ( annotationProcessingOptions.areClassLevelConstraintAnnotationsIgnored( clazz ) ) {
+			return Collections.emptySet();
+		}
+
+		Set<MetaConstraint<?>> classLevelConstraints = newHashSet();
+
+		// HV-262
+		List<ConstraintDescriptorImpl<?>> classMetaData = findClassLevelConstraints( clazz );
+
+		for ( ConstraintDescriptorImpl<?> constraintDescription : classMetaData ) {
+			classLevelConstraints.add( createMetaConstraint( clazz, constraintDescription ) );
+		}
+
+		return classLevelConstraints;
+	}
+
+	private Set<ConstrainedElement> getPropertyMetaData(Class<?> beanClass) {
+		Set<ConstrainedElement> propertyMetaData = newHashSet();
+
+		for ( Field field : ReflectionHelper.getDeclaredFields( beanClass ) ) {
+
+			// HV-172
+			if ( Modifier.isStatic( field.getModifiers() ) ||
+					annotationProcessingOptions.arePropertyLevelConstraintAnnotationsIgnored( field ) ||
+					field.isSynthetic() ) {
+
+				continue;
+			}
+
+			propertyMetaData.add( findPropertyMetaData( field ) );
+		}
+		return propertyMetaData;
+	}
+
+	private ConstrainedField findPropertyMetaData(Field field) {
+		Set<MetaConstraint<?>> constraints = convertToMetaConstraints(
+				findConstraints( field, ElementType.FIELD ),
+				field
+		);
+
+		boolean isCascading = field.isAnnotationPresent( Valid.class );
+
+		return new ConstrainedField(
+				ConfigurationSource.ANNOTATION,
+				new BeanConstraintLocation( field ),
+				constraints,
+				isCascading
+		);
+	}
+
+	private Set<MetaConstraint<?>> convertToMetaConstraints(List<ConstraintDescriptorImpl<?>> constraintDescriptors, Field field) {
+		Set<MetaConstraint<?>> constraints = newHashSet();
+
+		for ( ConstraintDescriptorImpl<?> constraintDescription : constraintDescriptors ) {
+			constraints.add( createMetaConstraint( field, constraintDescription ) );
+		}
+		return constraints;
+	}
+
+	private Set<ConstrainedMethod> getMethodMetaData(Class<?> clazz) {
+		Set<ConstrainedMethod> methodMetaData = newHashSet();
+
+		final Method[] declaredMethods = ReflectionHelper.getDeclaredMethods( clazz );
+
+		for ( Method method : declaredMethods ) {
+
+			// HV-172; ignoring synthetic methods (inserted by the compiler), as they can't have any constraints
+			// anyway and possibly hide the actual method with the same signature in the built meta model
+			if ( Modifier.isStatic( method.getModifiers() ) || annotationProcessingOptions.arePropertyLevelConstraintAnnotationsIgnored(
+					method
+			) || method
+					.isSynthetic() ) {
+				continue;
+			}
+
+			methodMetaData.add( findMethodMetaData( method ) );
+		}
+
+		return methodMetaData;
+	}
+
+	/**
+	 * Finds all constraint annotations defined for the given method.
+	 *
+	 * @param method The method to check for constraints annotations.
+	 *
+	 * @return A meta data object describing the constraints specified for the
+	 *         given method.
+	 */
+	private ConstrainedMethod findMethodMetaData(Method method) {
+		List<ConstrainedParameter> parameterConstraints = getParameterMetaData( method );
+		boolean isCascading = method.isAnnotationPresent( Valid.class );
+		Set<MetaConstraint<?>> constraints =
+				convertToMetaConstraints( findConstraints( method, ElementType.METHOD ), method );
+
+		return new ConstrainedMethod(
+				ConfigurationSource.ANNOTATION,
+				new MethodConstraintLocation( method ),
+				parameterConstraints,
+				constraints,
+				isCascading
+		);
+	}
+
+	private Set<MetaConstraint<?>> convertToMetaConstraints(List<ConstraintDescriptorImpl<?>> constraintsDescriptors, Method method) {
+		Set<MetaConstraint<?>> constraints = newHashSet();
+
+		for ( ConstraintDescriptorImpl<?> oneDescriptor : constraintsDescriptors ) {
+			constraints.add( createReturnValueMetaConstraint( method, oneDescriptor ) );
+		}
+
+		return constraints;
+	}
+
+	/**
+	 * Retrieves constraint related meta data for the parameters of the given
+	 * method.
+	 *
+	 * @param method The method of interest.
+	 *
+	 * @return A list with parameter meta data for the given method.
+	 */
+	private List<ConstrainedParameter> getParameterMetaData(Method method) {
+		List<ConstrainedParameter> metaData = newArrayList();
+
+		int i = 0;
+
+		for ( Annotation[] annotationsOfOneParameter : method.getParameterAnnotations() ) {
+
+			boolean parameterIsCascading = false;
+			String parameterName = DEFAULT_PARAMETER_NAME_PREFIX + i;
+			Set<MetaConstraint<?>> constraintsOfOneParameter = newHashSet();
+
+			for ( Annotation oneAnnotation : annotationsOfOneParameter ) {
+
+				//1. collect constraints if this annotation is a constraint annotation
+				List<ConstraintDescriptorImpl<?>> constraints = findConstraintAnnotations(
+						oneAnnotation, ElementType.PARAMETER
+				);
+				for ( ConstraintDescriptorImpl<?> constraintDescriptorImpl : constraints ) {
+					constraintsOfOneParameter.add(
+							createParameterMetaConstraint(
+									method, i, constraintDescriptorImpl
+							)
+					);
+				}
+
+				//2. mark parameter as cascading if this annotation is the @Valid annotation
+				if ( oneAnnotation.annotationType().equals( Valid.class ) ) {
+					parameterIsCascading = true;
+				}
+			}
+
+			metaData.add(
+					new ConstrainedParameter(
+							ConfigurationSource.ANNOTATION,
+							new MethodConstraintLocation( method, i ),
+							parameterName,
+							constraintsOfOneParameter,
+							parameterIsCascading
+					)
+			);
+			i++;
+		}
+
+		return metaData;
+	}
+
+	/**
+	 * Finds all constraint annotations defined for the given field/method and returns them in a list of
+	 * constraint descriptors.
+	 *
+	 * @param member The fields or method to check for constraints annotations.
+	 * @param type The element type the constraint/annotation is placed on.
+	 *
+	 * @return A list of constraint descriptors for all constraint specified for the given field or method.
+	 */
+	private List<ConstraintDescriptorImpl<?>> findConstraints(AccessibleObject member, ElementType type) {
+		List<ConstraintDescriptorImpl<?>> metaData = new ArrayList<ConstraintDescriptorImpl<?>>();
+		for ( Annotation annotation : member.getDeclaredAnnotations() ) {
+			metaData.addAll( findConstraintAnnotations( annotation, type ) );
+		}
+
+		return metaData;
+	}
+
+	/**
+	 * Finds all constraint annotations defined for the given class and returns them in a list of
+	 * constraint descriptors.
+	 *
+	 * @param beanClass The class to check for constraints annotations.
+	 *
+	 * @return A list of constraint descriptors for all constraint specified on the given class.
+	 */
+	private List<ConstraintDescriptorImpl<?>> findClassLevelConstraints(Class<?> beanClass) {
+		List<ConstraintDescriptorImpl<?>> metaData = new ArrayList<ConstraintDescriptorImpl<?>>();
+		for ( Annotation annotation : beanClass.getDeclaredAnnotations() ) {
+			metaData.addAll( findConstraintAnnotations( annotation, ElementType.TYPE ) );
+		}
+		return metaData;
+	}
+
+	/**
+	 * Examines the given annotation to see whether it is a single- or multi-valued constraint annotation.
+	 *
+	 * @param annotation The annotation to examine
+	 * @param type the element type on which the annotation/constraint is placed on
+	 *
+	 * @return A list of constraint descriptors or the empty list in case <code>annotation</code> is neither a
+	 *         single nor multi-valued annotation.
+	 */
+	private <A extends Annotation> List<ConstraintDescriptorImpl<?>> findConstraintAnnotations(A annotation, ElementType type) {
+		List<ConstraintDescriptorImpl<?>> constraintDescriptors = new ArrayList<ConstraintDescriptorImpl<?>>();
+
+		List<Annotation> constraints = new ArrayList<Annotation>();
+		Class<? extends Annotation> annotationType = annotation.annotationType();
+		if ( constraintHelper.isConstraintAnnotation( annotationType )
+				|| constraintHelper.isBuiltinConstraint( annotationType ) ) {
+			constraints.add( annotation );
+		}
+		else if ( constraintHelper.isMultiValueConstraint( annotationType ) ) {
+			constraints.addAll( constraintHelper.getMultiValueConstraints( annotation ) );
+		}
+
+		for ( Annotation constraint : constraints ) {
+			final ConstraintDescriptorImpl<?> constraintDescriptor = buildConstraintDescriptor(
+					constraint, type
+			);
+			constraintDescriptors.add( constraintDescriptor );
+		}
+		return constraintDescriptors;
+	}
+
+	private <A extends Annotation> MetaConstraint<?> createMetaConstraint(Class<?> declaringClass, ConstraintDescriptorImpl<A> descriptor) {
+		return new MetaConstraint<A>( descriptor, new BeanConstraintLocation( declaringClass ) );
+	}
+
+	private <A extends Annotation> MetaConstraint<?> createMetaConstraint(Member member, ConstraintDescriptorImpl<A> descriptor) {
+		return new MetaConstraint<A>( descriptor, new BeanConstraintLocation( member ) );
+	}
+
+	private <A extends Annotation> MetaConstraint<A> createParameterMetaConstraint(Method method, int parameterIndex, ConstraintDescriptorImpl<A> descriptor) {
+		return new MetaConstraint<A>( descriptor, new MethodConstraintLocation( method, parameterIndex ) );
+	}
+
+	private <A extends Annotation> MetaConstraint<A> createReturnValueMetaConstraint(Method method, ConstraintDescriptorImpl<A> descriptor) {
+		return new MetaConstraint<A>( descriptor, new MethodConstraintLocation( method ) );
+	}
+
+	private <A extends Annotation> ConstraintDescriptorImpl<A> buildConstraintDescriptor(A annotation, ElementType type) {
+		return new ConstraintDescriptorImpl<A>( annotation, constraintHelper, type, ConstraintOrigin.DEFINED_LOCALLY );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProvider.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProvider.java
new file mode 100644
index 0000000..18d2441
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProvider.java
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.provider;
+
+import java.util.List;
+
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+
+/**
+ * A provider for constraint related meta data such as constraints, default
+ * group sequences etc.
+ * <p>
+ * Implementations are based one different meta data sources such as XML,
+ * programmatic mappings and annotations. Meta data providers only return meta
+ * data directly configured for one class, they don't deal with merging meta
+ * data from super-classes or implemented interfaces.
+ * </p>
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public interface MetaDataProvider {
+	/**
+	 * Used as prefix for parameter names, if no explicit names are given.
+	 */
+	static final String DEFAULT_PARAMETER_NAME_PREFIX = "arg";
+
+	/**
+	 * Returns the annotation processing options as configured by this provider.
+	 *
+	 * @return The annotation processing options as configured by this provider.
+	 */
+	AnnotationProcessingOptions getAnnotationProcessingOptions();
+
+	/**
+	 * Returns a list with the configurations for all types contained in the
+	 * given type's hierarchy (including implemented interfaces) starting at the
+	 * specified type.
+	 *
+	 * @param beanClass The type of interest.
+	 *
+	 * @return A set with the configurations for the complete hierarchy of the
+	 *         given type. May be empty, but never {@code null}.
+	 */
+	<T> List<BeanConfiguration<? super T>> getBeanConfigurationForHierarchy(Class<T> beanClass);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProviderKeyedByClassName.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProviderKeyedByClassName.java
new file mode 100644
index 0000000..4fd560b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/MetaDataProviderKeyedByClassName.java
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.metadata.provider;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+import org.hibernate.validator.internal.metadata.raw.ConfigurationSource;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+
+/**
+ * Base implementation for {@link MetaDataProvider}s which cache the {@code BeanConfiguration} by class name.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public abstract class MetaDataProviderKeyedByClassName implements MetaDataProvider {
+	protected final ConstraintHelper constraintHelper;
+	// cached against the fqcn of a class. not a class instance itself (HV-479)
+	private final Map<String, BeanConfiguration<?>> configuredBeans;
+
+	public MetaDataProviderKeyedByClassName(ConstraintHelper constraintHelper) {
+		this.constraintHelper = constraintHelper;
+		this.configuredBeans = newHashMap();
+	}
+
+	public <T> List<BeanConfiguration<? super T>> getBeanConfigurationForHierarchy(Class<T> beanClass) {
+		List<BeanConfiguration<? super T>> configurations = newArrayList();
+
+		for ( Class<?> oneHierarchyClass : ReflectionHelper.computeClassHierarchy( beanClass, true ) ) {
+			@SuppressWarnings("unchecked")
+			BeanConfiguration<? super T> configuration = (BeanConfiguration<? super T>) getBeanConfiguration(
+					oneHierarchyClass
+			);
+			if ( configuration != null ) {
+				configurations.add( configuration );
+			}
+		}
+
+		return configurations;
+	}
+
+	protected void addBeanConfiguration(Class<?> beanClass, BeanConfiguration<?> beanConfiguration) {
+		configuredBeans.put( beanClass.getName(), beanConfiguration );
+	}
+
+	protected BeanConfiguration<?> getBeanConfiguration(Class<?> beanClass) {
+		Contracts.assertNotNull( beanClass );
+		return configuredBeans.get( beanClass.getName() );
+	}
+
+	protected <T> BeanConfiguration<T> createBeanConfiguration(ConfigurationSource source,
+															   Class<T> beanClass,
+															   Set<? extends ConstrainedElement> constrainableElements,
+															   List<Class<?>> defaultGroupSequence,
+															   DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider) {
+		return new BeanConfiguration<T>(
+				source,
+				beanClass,
+				constrainableElements,
+				defaultGroupSequence,
+				defaultGroupSequenceProvider
+		);
+	}
+}
\ No newline at end of file
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/ProgrammaticMetaDataProvider.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/ProgrammaticMetaDataProvider.java
new file mode 100644
index 0000000..38cbd1a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/ProgrammaticMetaDataProvider.java
@@ -0,0 +1,397 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.provider;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.internal.cfg.context.ConfiguredConstraint;
+import org.hibernate.validator.internal.cfg.context.ConstraintMappingContext;
+import org.hibernate.validator.internal.engine.groups.DefaultGroupSequenceProviderAdapter;
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.metadata.raw.ConfigurationSource;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedField;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedParameter;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.internal.util.CollectionHelper.Partitioner;
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.CollectionHelper.partition;
+
+/**
+ * A {@link MetaDataProvider} based on the programmatic constraint API.
+ *
+ * @author Gunnar Morling
+ */
+ at SuppressWarnings("deprecation")
+public class ProgrammaticMetaDataProvider extends MetaDataProviderKeyedByClassName {
+
+	private static final Log log = LoggerFactory.make();
+	private final AnnotationProcessingOptions annotationProcessingOptions;
+
+	public ProgrammaticMetaDataProvider(ConstraintHelper constraintHelper, Set<ConstraintMapping> programmaticMappings) {
+		super( constraintHelper );
+		Contracts.assertNotNull( programmaticMappings );
+		ConstraintMappingContext mergedContext = createMergedMappingContext( programmaticMappings );
+		initProgrammaticConfiguration( mergedContext );
+		annotationProcessingOptions = mergedContext.getAnnotationProcessingOptions();
+	}
+
+	public AnnotationProcessingOptions getAnnotationProcessingOptions() {
+		return annotationProcessingOptions;
+	}
+
+	/**
+	 * Reads the configuration from {@code context} and creates the appropriate meta-data structures.
+	 *
+	 * @param context the pre-processed configuration information
+	 */
+	private void initProgrammaticConfiguration(ConstraintMappingContext context) {
+		for ( Class<?> clazz : context.getConfiguredClasses() ) {
+			initClass( clazz, context );
+		}
+	}
+
+	private <T> void initClass(Class<T> clazz, ConstraintMappingContext context) {
+
+		Set<ConstrainedElement> constrainedElements =
+				retrievePropertyMetaData(
+						context.getConstraintConfig().get( clazz ),
+						context.getCascadeConfig().get( clazz )
+				);
+
+		Set<ConstrainedElement> methodMetaData =
+				retrieveMethodMetaData(
+						context.getMethodCascadeConfig().get( clazz ),
+						context.getMethodConstraintConfig().get( clazz )
+				);
+
+		constrainedElements.addAll( methodMetaData );
+
+		DefaultGroupSequenceProvider<? super T> sequenceProvider = getDefaultGroupSequenceProvider( clazz, context );
+
+		addBeanConfiguration(
+				clazz,
+				createBeanConfiguration(
+						ConfigurationSource.API,
+						clazz,
+						constrainedElements,
+						context.getDefaultSequence( clazz ),
+						sequenceProvider
+				)
+		);
+	}
+
+	private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanType, ConstraintMappingContext context) {
+
+		Class<? extends DefaultGroupSequenceProvider<? super T>> providerClass = context.getDefaultGroupSequenceProvider(
+				beanType
+		);
+
+		//retrieve provider from new annotation
+		if ( providerClass != null ) {
+			DefaultGroupSequenceProvider<? super T> provider = ReflectionHelper.newInstance(
+					providerClass,
+					"default group sequence provider"
+			);
+			return provider;
+		}
+
+		Class<? extends org.hibernate.validator.group.DefaultGroupSequenceProvider<? super T>> deprecatedProviderClass = context
+				.getDeprecatedDefaultGroupSequenceProvider( beanType );
+
+		//retrieve provider from deprecated annotation and wrap into adapter
+		if ( deprecatedProviderClass != null ) {
+			org.hibernate.validator.group.DefaultGroupSequenceProvider<? super T> provider = ReflectionHelper.newInstance(
+					deprecatedProviderClass,
+					"default group sequence provider"
+			);
+			return DefaultGroupSequenceProviderAdapter.getInstance( provider );
+		}
+
+		return null;
+	}
+
+	private Set<ConstrainedElement> retrievePropertyMetaData(
+			Set<ConfiguredConstraint<?, BeanConstraintLocation>> constraints,
+			Set<BeanConstraintLocation> cascades) {
+
+		Map<BeanConstraintLocation, Set<ConfiguredConstraint<?, BeanConstraintLocation>>> constraintsByLocation = partition(
+				constraints,
+				constraintsByLocation()
+		);
+
+		if ( cascades == null ) {
+			cascades = Collections.emptySet();
+		}
+
+		Set<BeanConstraintLocation> allConfiguredProperties = new HashSet<BeanConstraintLocation>( cascades );
+		allConfiguredProperties.addAll( constraintsByLocation.keySet() );
+
+		Set<ConstrainedElement> allPropertyMetaData = newHashSet();
+		for ( BeanConstraintLocation oneConfiguredProperty : allConfiguredProperties ) {
+			if ( oneConfiguredProperty.getElementType() == ElementType.FIELD ) {
+				allPropertyMetaData.add(
+						new ConstrainedField(
+								ConfigurationSource.API,
+								oneConfiguredProperty,
+								asMetaConstraints( constraintsByLocation.get( oneConfiguredProperty ) ),
+								cascades.contains( oneConfiguredProperty )
+						)
+				);
+			}
+			else {
+				allPropertyMetaData.add(
+						new ConstrainedType(
+								ConfigurationSource.API,
+								oneConfiguredProperty,
+								asMetaConstraints( constraintsByLocation.get( oneConfiguredProperty ) )
+						)
+				);
+			}
+		}
+		return allPropertyMetaData;
+	}
+
+	private Set<ConstrainedElement> retrieveMethodMetaData(Set<MethodConstraintLocation> methodCascades, Set<ConfiguredConstraint<?, MethodConstraintLocation>> methodConstraints) {
+
+		Map<Method, Set<MethodConstraintLocation>> cascadesByMethod = partition(
+				methodCascades, cascadesByMethod()
+		);
+		Map<Method, Set<ConfiguredConstraint<?, MethodConstraintLocation>>> constraintsByMethod = partition(
+				methodConstraints, constraintsByMethod()
+		);
+
+		Set<Method> allConfiguredMethods = new HashSet<Method>( cascadesByMethod.keySet() );
+		allConfiguredMethods.addAll( constraintsByMethod.keySet() );
+		Set<ConstrainedElement> allMethodMetaData = newHashSet();
+
+		for ( Method oneMethod : allConfiguredMethods ) {
+
+			Map<Integer, Set<MethodConstraintLocation>> cascadesByParameter = partition(
+					cascadesByMethod.get(
+							oneMethod
+					), cascadesByParameterIndex()
+			);
+			Map<Integer, Set<ConfiguredConstraint<?, MethodConstraintLocation>>> constraintsByParameter = partition(
+					constraintsByMethod.get( oneMethod ), constraintsByParameterIndex()
+			);
+			List<ConstrainedParameter> parameterMetaDataList = newArrayList();
+
+			for ( int i = 0; i < oneMethod.getParameterTypes().length; i++ ) {
+				parameterMetaDataList.add(
+						new ConstrainedParameter(
+								ConfigurationSource.API,
+								new MethodConstraintLocation( oneMethod, i ),
+								DEFAULT_PARAMETER_NAME_PREFIX + i,
+								asMetaConstraints( constraintsByParameter.get( i ) ),
+								cascadesByParameter.containsKey( i )
+						)
+				);
+			}
+
+			ConstrainedMethod methodMetaData = new ConstrainedMethod(
+					ConfigurationSource.API,
+					new MethodConstraintLocation( oneMethod ),
+					parameterMetaDataList,
+					asMetaConstraints( constraintsByParameter.get( null ) ),
+					cascadesByParameter.containsKey( null )
+			);
+			allMethodMetaData.add( methodMetaData );
+		}
+		return allMethodMetaData;
+	}
+
+	private Set<MetaConstraint<?>> asMetaConstraints(Set<? extends ConfiguredConstraint<?, ?>> constraints) {
+
+		if ( constraints == null ) {
+			return Collections.emptySet();
+		}
+
+		Set<MetaConstraint<?>> theValue = newHashSet();
+
+		for ( ConfiguredConstraint<?, ? extends ConstraintLocation> oneConfiguredConstraint : constraints ) {
+			theValue.add( asMetaConstraint( oneConfiguredConstraint ) );
+		}
+
+		return theValue;
+	}
+
+	private <A extends Annotation> MetaConstraint<A> asMetaConstraint(ConfiguredConstraint<A, ? extends ConstraintLocation> config) {
+
+		ConstraintDescriptorImpl<A> constraintDescriptor = new ConstraintDescriptorImpl<A>(
+				config.createAnnotationProxy(),
+				constraintHelper,
+				config.getLocation().getElementType(),
+				ConstraintOrigin.DEFINED_LOCALLY
+		);
+
+		return new MetaConstraint<A>( constraintDescriptor, config.getLocation() );
+	}
+
+	private Partitioner<Method, MethodConstraintLocation> cascadesByMethod() {
+		return new Partitioner<Method, MethodConstraintLocation>() {
+			public Method getPartition(MethodConstraintLocation location) {
+				return location.getMember();
+			}
+		};
+	}
+
+	private Partitioner<Integer, MethodConstraintLocation> cascadesByParameterIndex() {
+		return new Partitioner<Integer, MethodConstraintLocation>() {
+			public Integer getPartition(MethodConstraintLocation location) {
+				return location.getParameterIndex();
+			}
+		};
+	}
+
+	private Partitioner<Method, ConfiguredConstraint<?, MethodConstraintLocation>> constraintsByMethod() {
+		return new Partitioner<Method, ConfiguredConstraint<?, MethodConstraintLocation>>() {
+			public Method getPartition(ConfiguredConstraint<?, MethodConstraintLocation> constraint) {
+				return constraint.getLocation().getMember();
+			}
+		};
+	}
+
+	private Partitioner<Integer, ConfiguredConstraint<?, MethodConstraintLocation>> constraintsByParameterIndex() {
+		return new Partitioner<Integer, ConfiguredConstraint<?, MethodConstraintLocation>>() {
+
+			public Integer getPartition(
+					ConfiguredConstraint<?, MethodConstraintLocation> v) {
+
+				return v.getLocation().getParameterIndex();
+			}
+		};
+	}
+
+	/**
+	 * Creates a single merged {@code ConstraintMappingContext} in case multiple programmatic mappings are provided.
+	 *
+	 * @param programmaticMappings set of constraint mappings to merge into a single context
+	 *
+	 * @return a single merged constraint context
+	 */
+	private ConstraintMappingContext createMergedMappingContext(Set<ConstraintMapping> programmaticMappings) {
+		// if we only have one mapping we can return the context of just this mapping
+		if ( programmaticMappings.size() == 1 ) {
+			return ConstraintMappingContext.getFromMapping( programmaticMappings.iterator().next() );
+		}
+
+		ConstraintMappingContext mergedContext = new ConstraintMappingContext();
+		for ( ConstraintMapping mapping : programmaticMappings ) {
+			ConstraintMappingContext context = ConstraintMappingContext.getFromMapping( mapping );
+
+			mergedContext.getAnnotationProcessingOptions().merge( context.getAnnotationProcessingOptions() );
+
+			for ( Set<ConfiguredConstraint<?, BeanConstraintLocation>> propertyConstraints : context.getConstraintConfig()
+					.values() ) {
+				for ( ConfiguredConstraint<?, BeanConstraintLocation> constraint : propertyConstraints ) {
+					mergedContext.addConstraintConfig( constraint );
+				}
+			}
+
+			for ( Set<BeanConstraintLocation> beanConstraintLocations : context.getCascadeConfig().values() ) {
+				for ( BeanConstraintLocation beanLocation : beanConstraintLocations ) {
+					mergedContext.addCascadeConfig( beanLocation );
+				}
+			}
+
+			for ( Set<ConfiguredConstraint<?, MethodConstraintLocation>> methodConstraints : context.getMethodConstraintConfig()
+					.values() ) {
+				for ( ConfiguredConstraint<?, MethodConstraintLocation> methodConstraint : methodConstraints ) {
+					mergedContext.addMethodConstraintConfig( methodConstraint );
+				}
+			}
+
+			for ( Set<MethodConstraintLocation> cascadedMethodConstraints : context.getMethodCascadeConfig()
+					.values() ) {
+				for ( MethodConstraintLocation methodCascade : cascadedMethodConstraints ) {
+					mergedContext.addMethodCascadeConfig( methodCascade );
+				}
+			}
+
+			mergeGroupSequenceAndGroupSequenceProvider( mergedContext, context );
+		}
+		return mergedContext;
+	}
+
+	private void mergeGroupSequenceAndGroupSequenceProvider(ConstraintMappingContext mergedContext, ConstraintMappingContext context) {
+		for ( Class<?> clazz : context.getConfiguredClasses() ) {
+			mergeSequenceAndProviderForClass( mergedContext, context, clazz );
+		}
+	}
+
+	private <T> void mergeSequenceAndProviderForClass(ConstraintMappingContext mergedContext, ConstraintMappingContext context, Class<T> clazz) {
+		if ( context.getDefaultGroupSequenceProvider( clazz ) != null ) {
+			if ( mergedContext.getDefaultGroupSequenceProvider( clazz ) != null ) {
+				throw log.getMultipleDefinitionOfDefaultGroupSequenceProviderException();
+			}
+			mergedContext.addDefaultGroupSequenceProvider(
+					clazz,
+					context.getDefaultGroupSequenceProvider( clazz )
+			);
+		}
+		if ( context.getDeprecatedDefaultGroupSequenceProvider( clazz ) != null ) {
+			if ( mergedContext.getDeprecatedDefaultGroupSequenceProvider( clazz ) != null ) {
+				throw log.getMultipleDefinitionOfDefaultGroupSequenceProviderException();
+			}
+			mergedContext.addDeprecatedDefaultGroupSequenceProvider(
+					clazz,
+					context.getDeprecatedDefaultGroupSequenceProvider( clazz )
+			);
+		}
+		if ( context.getDefaultSequence( clazz ) != null ) {
+			if ( mergedContext.getDefaultSequence( clazz ) != null ) {
+				throw log.getMultipleDefinitionOfDefaultGroupSequenceException();
+			}
+			mergedContext.addDefaultGroupSequence(
+					clazz,
+					context.getDefaultSequence( clazz )
+			);
+		}
+	}
+
+	private Partitioner<BeanConstraintLocation, ConfiguredConstraint<?, BeanConstraintLocation>> constraintsByLocation() {
+		return new Partitioner<BeanConstraintLocation, ConfiguredConstraint<?, BeanConstraintLocation>>() {
+			public BeanConstraintLocation getPartition(ConfiguredConstraint<?, BeanConstraintLocation> constraint) {
+				return constraint.getLocation();
+			}
+		};
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/XmlMetaDataProvider.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/XmlMetaDataProvider.java
new file mode 100644
index 0000000..b5a9934
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/XmlMetaDataProvider.java
@@ -0,0 +1,160 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.provider;
+
+import java.io.InputStream;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.metadata.raw.ConfigurationSource;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedField;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.internal.util.CollectionHelper.Partitioner;
+import org.hibernate.validator.internal.xml.XmlMappingParser;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.CollectionHelper.partition;
+
+/**
+ * A {@link MetaDataProvider} providing constraint related meta data based on
+ * XML descriptors as defined by the Bean Validation API.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public class XmlMetaDataProvider extends MetaDataProviderKeyedByClassName {
+
+	private final AnnotationProcessingOptions annotationProcessingOptions;
+
+	/**
+	 * @param constraintHelper the constraint helper
+	 * @param mappingStreams the input stream for the xml configuration
+	 */
+	public XmlMetaDataProvider(ConstraintHelper constraintHelper, Set<InputStream> mappingStreams) {
+		super( constraintHelper );
+
+		XmlMappingParser mappingParser = new XmlMappingParser( constraintHelper );
+		mappingParser.parse( mappingStreams );
+
+		for ( Class<?> clazz : mappingParser.getXmlConfiguredClasses() ) {
+
+			Map<ConstraintLocation, Set<MetaConstraint<?>>> constraintsByLocation = partition(
+					mappingParser.getConstraintsForClass( clazz ), byLocation()
+			);
+			Set<ConstraintLocation> cascades = getCascades( mappingParser, clazz );
+
+			Set<ConstrainedElement> constrainedElements = getConstrainedElements( constraintsByLocation, cascades );
+
+			addBeanConfiguration(
+					clazz,
+					createBeanConfiguration(
+							ConfigurationSource.XML,
+							clazz,
+							constrainedElements,
+							mappingParser.getDefaultSequenceForClass( clazz ),
+							null
+					)
+			);
+		}
+
+		annotationProcessingOptions = mappingParser.getAnnotationProcessingOptions();
+	}
+
+	public AnnotationProcessingOptions getAnnotationProcessingOptions() {
+		return annotationProcessingOptions;
+	}
+
+	private Set<ConstrainedElement> getConstrainedElements(Map<ConstraintLocation, Set<MetaConstraint<?>>> constraintsByLocation, Set<ConstraintLocation> cascades) {
+
+		Set<ConstraintLocation> configuredLocations = new HashSet<ConstraintLocation>( cascades );
+		configuredLocations.addAll( constraintsByLocation.keySet() );
+
+		Set<ConstrainedElement> propertyMetaData = newHashSet();
+
+		for ( ConstraintLocation oneConfiguredLocation : configuredLocations ) {
+			if ( oneConfiguredLocation.getElementType() == ElementType.FIELD ) {
+				propertyMetaData.add(
+						new ConstrainedField(
+								ConfigurationSource.XML,
+								(BeanConstraintLocation) oneConfiguredLocation,
+								constraintsByLocation.get( oneConfiguredLocation ),
+								cascades.contains( oneConfiguredLocation )
+						)
+				);
+			}
+			else if ( oneConfiguredLocation.getElementType() == ElementType.METHOD ) {
+				propertyMetaData.add(
+						new ConstrainedMethod(
+								ConfigurationSource.XML,
+								new MethodConstraintLocation( (Method) oneConfiguredLocation.getMember() ),
+								constraintsByLocation.get( oneConfiguredLocation ),
+								cascades.contains( oneConfiguredLocation )
+						)
+				);
+			}
+			else if ( oneConfiguredLocation.getElementType() == ElementType.TYPE ) {
+				propertyMetaData.add(
+						new ConstrainedType(
+								ConfigurationSource.XML,
+								(BeanConstraintLocation) oneConfiguredLocation,
+								constraintsByLocation.get( oneConfiguredLocation )
+						)
+				);
+			}
+
+		}
+
+		return propertyMetaData;
+	}
+
+	/**
+	 * @param mappingParser the xml parser
+	 * @param clazz the type for which to retrieve cascaded members
+	 *
+	 * @return returns a set of cascaded constraints
+	 */
+	private Set<ConstraintLocation> getCascades(XmlMappingParser mappingParser, Class<?> clazz) {
+
+		Set<ConstraintLocation> cascadedConstraintSet = newHashSet();
+
+		for ( Member member : mappingParser.getCascadedMembersForClass( clazz ) ) {
+			cascadedConstraintSet.add( new BeanConstraintLocation( member ) );
+		}
+
+		return cascadedConstraintSet;
+	}
+
+	protected Partitioner<ConstraintLocation, MetaConstraint<?>> byLocation() {
+		return new Partitioner<ConstraintLocation, MetaConstraint<?>>() {
+			public ConstraintLocation getPartition(MetaConstraint<?> constraint) {
+				return constraint.getLocation();
+			}
+		};
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/package.html
new file mode 100644
index 0000000..6d16a07
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/provider/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Abstraction of the meta data sources - annotation, xml, programmatic</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/AbstractConstrainedElement.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/AbstractConstrainedElement.java
new file mode 100644
index 0000000..c8eec32
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/AbstractConstrainedElement.java
@@ -0,0 +1,122 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+
+/**
+ * Base implementation of with functionality common to all {@link ConstrainedElement} implementations.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public abstract class AbstractConstrainedElement implements ConstrainedElement {
+	private final ConstrainedElementKind kind;
+	private final ConfigurationSource source;
+	private final ConstraintLocation location;
+	private final Set<MetaConstraint<?>> constraints;
+	private final boolean isCascading;
+
+	public AbstractConstrainedElement(ConfigurationSource source, ConstrainedElementKind kind, ConstraintLocation location, Set<MetaConstraint<?>> constraints, boolean isCascading) {
+
+		this.kind = kind;
+		this.source = source;
+		this.location = location;
+		this.constraints = constraints != null ? Collections.unmodifiableSet( constraints ) : Collections.<MetaConstraint<?>>emptySet();
+		this.isCascading = isCascading;
+	}
+
+	public ConstrainedElementKind getKind() {
+		return kind;
+	}
+
+	public ConfigurationSource getSource() {
+		return source;
+	}
+
+	public ConstraintLocation getLocation() {
+		return location;
+	}
+
+	public Iterator<MetaConstraint<?>> iterator() {
+		return constraints.iterator();
+	}
+
+	public Set<MetaConstraint<?>> getConstraints() {
+		return constraints;
+	}
+
+	public boolean isCascading() {
+		return isCascading;
+	}
+
+	public boolean isConstrained() {
+		return isCascading || !constraints.isEmpty();
+	}
+
+	@Override
+	public String toString() {
+		return "AbstractConstrainedElement [kind=" + kind + ", source="
+				+ source + ", location=" + location + ", constraints="
+				+ constraints + ", isCascading=" + isCascading + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ( ( location == null ) ? 0 : location.hashCode() );
+		result = prime * result + ( ( source == null ) ? 0 : source.hashCode() );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		AbstractConstrainedElement other = (AbstractConstrainedElement) obj;
+		if ( location == null ) {
+			if ( other.location != null ) {
+				return false;
+			}
+		}
+		else if ( !location.equals( other.location ) ) {
+			return false;
+		}
+		if ( source == null ) {
+			if ( other.source != null ) {
+				return false;
+			}
+		}
+		else if ( !source.equals( other.source ) ) {
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/BeanConfiguration.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/BeanConfiguration.java
new file mode 100644
index 0000000..19471ba
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/BeanConfiguration.java
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * Represents the complete constraint related configuration of one Java type
+ * originating from one {@link ConfigurationSource}. Contains meta-data on
+ * constraints (field, method and class level) as well as meta data on default
+ * group sequences.
+ *
+ * @author Gunnar Morling
+ */
+public class BeanConfiguration<T> {
+
+	private final ConfigurationSource source;
+
+	private final Class<T> beanClass;
+
+	private final Set<ConstrainedElement> constrainedElements;
+
+	private final List<Class<?>> defaultGroupSequence;
+
+	private final DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider;
+
+	/**
+	 * Creates a new bean configuration.
+	 *
+	 * @param source The source of this configuration.
+	 * @param beanClass The type represented by this configuration.
+	 * @param constrainedElements The constraint elements representing this type's fields,
+	 * methods etc.
+	 * @param defaultGroupSequence The default group sequence for the given type as configured by
+	 * the given configuration source.
+	 * @param defaultGroupSequenceProvider The default group sequence provider for the given type as
+	 * configured by the given configuration source.
+	 */
+	public BeanConfiguration(
+			ConfigurationSource source,
+			Class<T> beanClass,
+			Set<? extends ConstrainedElement> constrainedElements,
+			List<Class<?>> defaultGroupSequence,
+			DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider) {
+
+		this.source = source;
+		this.beanClass = beanClass;
+		this.constrainedElements = newHashSet( constrainedElements );
+		this.defaultGroupSequence = defaultGroupSequence;
+		this.defaultGroupSequenceProvider = defaultGroupSequenceProvider;
+	}
+
+	public ConfigurationSource getSource() {
+		return source;
+	}
+
+	public Class<T> getBeanClass() {
+		return beanClass;
+	}
+
+	public Set<ConstrainedElement> getConstrainedElements() {
+		return constrainedElements;
+	}
+
+	public List<Class<?>> getDefaultGroupSequence() {
+		return defaultGroupSequence;
+	}
+
+	public DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider() {
+		return defaultGroupSequenceProvider;
+	}
+
+	@Override
+	public String toString() {
+		return "BeanConfiguration [beanClass=" + beanClass.getSimpleName()
+				+ ", source=" + source
+				+ ", constrainedElements=" + constrainedElements
+				+ ", defaultGroupSequence=" + defaultGroupSequence
+				+ ", defaultGroupSequenceProvider="
+				+ defaultGroupSequenceProvider + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ( ( beanClass == null ) ? 0 : beanClass.hashCode() );
+		result = prime * result + ( ( source == null ) ? 0 : source.hashCode() );
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if ( this == obj ) {
+			return true;
+		}
+		if ( obj == null ) {
+			return false;
+		}
+		if ( getClass() != obj.getClass() ) {
+			return false;
+		}
+		BeanConfiguration<?> other = (BeanConfiguration<?>) obj;
+		if ( beanClass == null ) {
+			if ( other.beanClass != null ) {
+				return false;
+			}
+		}
+		else if ( !beanClass.equals( other.beanClass ) ) {
+			return false;
+		}
+		if ( source != other.source ) {
+			return false;
+		}
+		return true;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConfigurationSource.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConfigurationSource.java
new file mode 100644
index 0000000..71b09c1
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConfigurationSource.java
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+/**
+ * The source of constraint meta data.
+ *
+ * @author Gunnar Morling
+ */
+public enum ConfigurationSource {
+
+	ANNOTATION( 0 ),
+
+	XML( 1 ),
+
+	API( 2 );
+
+	private int priority;
+
+	private ConfigurationSource(int priority) {
+		this.priority = priority;
+	}
+
+	/**
+	 * Returns this sources priority. Can be used to determine which
+	 * configuration shall apply in case of conflicting configurations by
+	 * several providers.
+	 *
+	 * @return This source's priority.
+	 */
+	public int getPriority() {
+		return priority;
+	}
+}
\ No newline at end of file
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedElement.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedElement.java
new file mode 100644
index 0000000..61aea73
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedElement.java
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
+
+/**
+ * Represents a (potentially) constrained Java element such as a type, field or
+ * method. Such an element has a set of {@link org.hibernate.validator.internal.metadata.core.MetaConstraint}s and can be
+ * marked for a cascaded validation. Furthermore each constrained element has a
+ * {@link ConfigurationSource configuration source} which determines its origin.
+ * <p>
+ * The hierarchy of constrained elements resembles the physical structure of the
+ * represented Java types. In particular it doesn't provide the notion of
+ * properties and it doesn't aggregate meta data for overridden elements in an
+ * inheritance hierarchy.
+ * </p>
+ * <p>
+ * Identity of implementations is based on the element location and constraint
+ * source. That means that for instance in a set there can be two configurations
+ * for one and the same Java field created by two different configuration
+ * sources (e.g. via annotation and XML) but not two configurations for the same
+ * field originating from one configuration source.
+ * </p>
+ * <p>
+ * Implementations are strictly read-only.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public interface ConstrainedElement extends Iterable<MetaConstraint<?>> {
+
+	/**
+	 * The kind of a {@link ConstrainedElement}. Can be used to determine an
+	 * element's type when traversing over a collection of constrained elements.
+	 *
+	 * @author Gunnar Morling
+	 */
+	public enum ConstrainedElementKind {
+		TYPE, FIELD, METHOD, PARAMETER
+	}
+
+	/**
+	 * Returns the kind of this constrained element.
+	 *
+	 * @return The kind of this constrained element.
+	 */
+	ConstrainedElementKind getKind();
+
+	/**
+	 * Returns the location of this constrained element.
+	 *
+	 * @return The location of this constrained element.
+	 */
+	ConstraintLocation getLocation();
+
+	/**
+	 * Returns a set containing the constraints specified for this constrained
+	 * element.
+	 *
+	 * @return A set with this constrained element's constraints. May be empty,
+	 *         but never <code>null</code>.
+	 */
+	Set<MetaConstraint<?>> getConstraints();
+
+	/**
+	 * Whether cascading validation for the represented element shall be
+	 * performed or not.
+	 *
+	 * @return <code>True</code>, if cascading validation for the represented
+	 *         element shall be performed, <code>false</code> otherwise.
+	 */
+	boolean isCascading();
+
+	/**
+	 * Whether this element is constrained or not. This is the case, if this
+	 * element has at least one constraint or a cascaded validation shall be
+	 * performed for it.
+	 *
+	 * @return <code>True</code>, if this element is constrained,
+	 *         <code>false</code> otherwise.
+	 */
+	boolean isConstrained();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedField.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedField.java
new file mode 100644
index 0000000..bba61b5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedField.java
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.lang.reflect.Member;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+/**
+ * Represents a field of a Java type and all its associated meta-data relevant
+ * in the context of bean validation, for instance its constraints.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstrainedField extends AbstractConstrainedElement {
+
+	/**
+	 * Creates a new field meta data object.
+	 *
+	 * @param source The source of meta data.
+	 * @param location The location of the represented field.
+	 * @param constraints The constraints of the represented field, if any.
+	 * @param isCascading Whether a cascaded validation of the represented field shall
+	 * be performed or not.
+	 */
+	public ConstrainedField(ConfigurationSource source, BeanConstraintLocation location, Set<MetaConstraint<?>> constraints,
+							boolean isCascading) {
+
+		super( source, ConstrainedElementKind.FIELD, location, constraints, isCascading );
+
+		Member member = location.getMember();
+		if ( member != null && isConstrained() ) {
+			ReflectionHelper.setAccessibility( member );
+		}
+	}
+
+	public BeanConstraintLocation getLocation() {
+		return (BeanConstraintLocation) super.getLocation();
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedMethod.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedMethod.java
new file mode 100644
index 0000000..b6145d0
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedMethod.java
@@ -0,0 +1,210 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Represents a method of a Java type and all its associated meta-data relevant
+ * in the context of bean validation, for instance the constraints at it's
+ * parameters or return value.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstrainedMethod extends AbstractConstrainedElement {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * Constrained-related meta data for this method's parameters.
+	 */
+	private final List<ConstrainedParameter> parameterMetaData;
+
+	private final boolean hasParameterConstraints;
+
+	/**
+	 * Creates a new method meta data object for a parameter-less method.
+	 *
+	 * @param source The source of meta data.
+	 * @param location The location of the represented method.
+	 * @param returnValueConstraints The return value constraints of the represented method, if
+	 * any.
+	 * @param isCascading Whether a cascaded validation of the represented method's
+	 * return value shall be performed or not.
+	 */
+	public ConstrainedMethod(
+			ConfigurationSource source,
+			MethodConstraintLocation location,
+			Set<MetaConstraint<?>> returnValueConstraints,
+			boolean isCascading) {
+
+		this(
+				source,
+				location,
+				Collections.<ConstrainedParameter>emptyList(),
+				returnValueConstraints,
+				isCascading
+		);
+	}
+
+	/**
+	 * Creates a new method meta data object.
+	 *
+	 * @param source The source of meta data.
+	 * @param location The location of the represented method.
+	 * @param parameterMetaData A list with parameter meta data. The length must correspond
+	 * with the number of parameters of the represented method. So
+	 * this list may be empty (in case of a parameterless method),
+	 * but never <code>null</code>.
+	 * @param returnValueConstraints The return value constraints of the represented method, if
+	 * any.
+	 * @param isCascading Whether a cascaded validation of the represented method's
+	 * return value shall be performed or not.
+	 */
+	public ConstrainedMethod(
+			ConfigurationSource source,
+			MethodConstraintLocation location,
+			List<ConstrainedParameter> parameterMetaData,
+			Set<MetaConstraint<?>> returnValueConstraints,
+			boolean isCascading) {
+
+		super(
+				source,
+				ConstrainedElementKind.METHOD,
+				location,
+				returnValueConstraints,
+				isCascading
+		);
+
+		Method method = location.getMember();
+
+		if ( parameterMetaData.size() != method.getParameterTypes().length ) {
+			throw log.getInvalidLengthOfParameterMetaDataListException(
+					method,
+					method.getParameterTypes().length,
+					parameterMetaData.size()
+			);
+		}
+
+		this.parameterMetaData = Collections.unmodifiableList( parameterMetaData );
+		this.hasParameterConstraints = hasParameterConstraints( parameterMetaData );
+
+		if ( isConstrained() ) {
+			ReflectionHelper.setAccessibility( method );
+		}
+	}
+
+	private boolean hasParameterConstraints(List<ConstrainedParameter> parameterMetaData) {
+
+		for ( ConstrainedParameter oneParameter : parameterMetaData ) {
+			if ( oneParameter.isConstrained() ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	public MethodConstraintLocation getLocation() {
+		return (MethodConstraintLocation) super.getLocation();
+	}
+
+	/**
+	 * Constraint meta data for the specified parameter.
+	 *
+	 * @param parameterIndex The index in this method's parameter array of the parameter of
+	 * interest.
+	 *
+	 * @return Meta data for the specified parameter. Will never be
+	 *         <code>null</code>.
+	 *
+	 * @throws IllegalArgumentException In case this method doesn't have a parameter with the
+	 * specified index.
+	 */
+	public ConstrainedParameter getParameterMetaData(int parameterIndex) {
+
+		if ( parameterIndex < 0 || parameterIndex > parameterMetaData.size() - 1 ) {
+			throw log.getInvalidMethodParameterIndexException( getLocation().getMember().getName(), parameterIndex );
+		}
+
+		return parameterMetaData.get( parameterIndex );
+	}
+
+	/**
+	 * Returns meta data for all parameters of the represented method.
+	 *
+	 * @return A list with parameter meta data. The length corresponds to the
+	 *         number of parameters of the method represented by this meta data
+	 *         object, so an empty list may be returned (in case of a
+	 *         parameterless method), but never <code>null</code>.
+	 */
+	public List<ConstrainedParameter> getAllParameterMetaData() {
+		return parameterMetaData;
+	}
+
+	/**
+	 * Whether the represented method is constrained or not. This is the case if
+	 * it has at least one constrained parameter, at least one parameter marked
+	 * for cascaded validation, at least one return value constraint or if the
+	 * return value is marked for cascaded validation.
+	 *
+	 * @return <code>True</code>, if this method is constrained by any means,
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isConstrained() {
+
+		return super.isConstrained() || hasParameterConstraints;
+	}
+
+	/**
+	 * Whether this method has at least one cascaded parameter or at least one
+	 * parameter with constraints.
+	 *
+	 * @return <code>True</code>, if this method has at least one cascading or
+	 *         constrained parameter, <code>false</code> otherwise.
+	 */
+	public boolean hasParameterConstraints() {
+		return hasParameterConstraints;
+	}
+
+	/**
+	 * Whether the represented method is a JavaBeans getter method or not.
+	 *
+	 * @return <code>True</code>, if this method is a getter method,
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isGetterMethod() {
+		return ReflectionHelper.isGetterMethod( getLocation().getMember() );
+	}
+
+	@Override
+	public String toString() {
+		return "ConstrainedMethod [location=" + getLocation()
+				+ ", parameterMetaData=" + parameterMetaData
+				+ ", hasParameterConstraints=" + hasParameterConstraints + "]";
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedParameter.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedParameter.java
new file mode 100644
index 0000000..ceae6f5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedParameter.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.MethodConstraintLocation;
+
+/**
+ * Contains constraint-related meta-data for one method parameter.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstrainedParameter extends AbstractConstrainedElement {
+
+	private final String name;
+
+	/**
+	 * Creates a new parameter meta data object.
+	 *
+	 * @param source The source of meta data.
+	 * @param location The location of the represented method parameter.
+	 * @param name The name of the represented parameter.
+	 * @param constraints The constraints of the represented method parameter, if
+	 * any.
+	 * @param isCascading Whether a cascaded validation of the represented method
+	 * parameter shall be performed or not.
+	 */
+	public ConstrainedParameter(ConfigurationSource source, MethodConstraintLocation location, String name, Set<MetaConstraint<?>> constraints, boolean isCascading) {
+
+		super( source, ConstrainedElementKind.PARAMETER, location, constraints, isCascading );
+
+		this.name = name;
+	}
+
+	public MethodConstraintLocation getLocation() {
+		return (MethodConstraintLocation) super.getLocation();
+	}
+
+	public String getParameterName() {
+		return name;
+	}
+
+	@Override
+	public String toString() {
+
+		//display short annotation type names
+		StringBuilder sb = new StringBuilder();
+
+		for ( MetaConstraint<?> oneConstraint : getConstraints() ) {
+			sb.append( oneConstraint.getDescriptor().getAnnotation().annotationType().getSimpleName() );
+			sb.append( ", " );
+		}
+
+		String constraintsAsString = sb.length() > 0 ? sb.substring( 0, sb.length() - 2 ) : sb.toString();
+
+		return "ParameterMetaData [location=" + getLocation() + "], name=" + name + "], constraints=["
+				+ constraintsAsString + "], isCascading=" + isCascading() + "]";
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedType.java b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedType.java
new file mode 100644
index 0000000..459be2a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/ConstrainedType.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.metadata.raw;
+
+import java.util.Set;
+
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+
+/**
+ * Represents a Java type and all its associated meta-data relevant in the
+ * context of bean validation, for instance its constraints. Only class level
+ * meta-data is represented by this type, but not meta-data for any members.
+ *
+ * @author Gunnar Morling
+ */
+public class ConstrainedType extends AbstractConstrainedElement {
+
+	/**
+	 * Creates a new type meta data object.
+	 *
+	 * @param source The source of meta data.
+	 * @param location The location of the represented type.
+	 * @param constraints The constraints of the represented type, if any.
+	 */
+	public ConstrainedType(ConfigurationSource source, BeanConstraintLocation location, Set<MetaConstraint<?>> constraints) {
+
+		super( source, ConstrainedElementKind.TYPE, location, constraints, false );
+	}
+
+	public BeanConstraintLocation getLocation() {
+		return (BeanConstraintLocation) super.getLocation();
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/package.html
new file mode 100644
index 0000000..ce4a24b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/metadata/raw/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>The raw metadata is a reflection of all configured constraints including constraints defined via multiple
+    configuration sources.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/CollectionHelper.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/CollectionHelper.java
new file mode 100644
index 0000000..8d28637
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/CollectionHelper.java
@@ -0,0 +1,173 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Provides some methods for simplified collection instantiation.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ */
+public final class CollectionHelper {
+
+	private CollectionHelper() {
+	}
+
+	public static <K, V> HashMap<K, V> newHashMap() {
+		return new HashMap<K, V>();
+	}
+
+	public static <K, V> HashMap<K, V> newHashMap(int size) {
+		return new HashMap<K, V>( size );
+	}
+
+	public static <K, V> ConcurrentHashMap<K, V> newConcurrentHashMap() {
+		return new ConcurrentHashMap<K, V>();
+	}
+
+	public static <T> HashSet<T> newHashSet() {
+		return new HashSet<T>();
+	}
+
+	public static <T> HashSet<T> newHashSet(int size) {
+		return new HashSet<T>( size );
+	}
+
+	public static <T> HashSet<T> newHashSet(Collection<? extends T> c) {
+		return new HashSet<T>( c );
+	}
+
+	public static <T> HashSet<T> newHashSet(Collection<? extends T> s1, Collection<? extends T> s2) {
+		HashSet<T> set = newHashSet( s1 );
+		set.addAll( s2 );
+		return set;
+	}
+
+	public static <T> HashSet<T> newHashSet(Iterable<? extends T> iterable) {
+		HashSet<T> set = newHashSet();
+		for ( T t : iterable ) {
+			set.add( t );
+		}
+		return set;
+	}
+
+	public static <T> ArrayList<T> newArrayList() {
+		return new ArrayList<T>();
+	}
+
+	public static <T> ArrayList<T> newArrayList(int size) {
+		return new ArrayList<T>( size );
+	}
+
+	public static <T> ArrayList<T> newArrayList(Iterable<T>... iterables) {
+		ArrayList<T> resultList = newArrayList();
+		for ( Iterable<T> oneIterable : iterables ) {
+			for ( T oneElement : oneIterable ) {
+				resultList.add( oneElement );
+			}
+		}
+		return resultList;
+	}
+
+	public static <T> Set<T> asSet(T... ts) {
+		return new HashSet<T>( Arrays.asList( ts ) );
+	}
+
+	/**
+	 * Creates a map containing the given list's values partitioned by the given
+	 * partitioner.
+	 *
+	 * @param <K> The key type of the resulting map.
+	 * @param <V> The element type of the list to be partitioned.
+	 * @param list The list to be partitioned.
+	 * @param partitioner The partitioner to be used for determining the partitions.
+	 *
+	 * @return A map containing the given list's values partitioned by the given
+	 *         partitioner.
+	 */
+	public static <K, V> Map<K, List<V>> partition(List<V> list, Partitioner<K, V> partitioner) {
+		if ( list == null ) {
+			return Collections.emptyMap();
+		}
+
+		Map<K, List<V>> theValue = newHashMap();
+
+		for ( V v : list ) {
+			K key = partitioner.getPartition( v );
+
+			List<V> partition = theValue.get( key );
+			if ( partition == null ) {
+				partition = newArrayList();
+				theValue.put( key, partition );
+			}
+
+			partition.add( v );
+		}
+
+		return theValue;
+	}
+
+	/**
+	 * Creates a map containing the given set's values partitioned by the given
+	 * partitioner.
+	 *
+	 * @param <K> The key type of the resulting map.
+	 * @param <V> The element type of the set to be partitioned.
+	 * @param set The set to be partitioned.
+	 * @param partitioner The partitioner to be used for determining the partitions.
+	 *
+	 * @return A map containing the given set's values partitioned by the given
+	 *         partitioner.
+	 */
+	public static <K, V> Map<K, Set<V>> partition(Set<V> set, Partitioner<K, V> partitioner) {
+		if ( set == null ) {
+			return Collections.emptyMap();
+		}
+
+		Map<K, Set<V>> theValue = newHashMap();
+
+		for ( V v : set ) {
+			K key = partitioner.getPartition( v );
+
+			Set<V> partition = theValue.get( key );
+			if ( partition == null ) {
+				partition = newHashSet();
+				theValue.put( key, partition );
+			}
+
+			partition.add( v );
+		}
+
+		return theValue;
+	}
+
+	public interface Partitioner<K, V> {
+		K getPartition(V v);
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/ConcurrentReferenceHashMap.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/ConcurrentReferenceHashMap.java
new file mode 100644
index 0000000..bc4eb2d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/ConcurrentReferenceHashMap.java
@@ -0,0 +1,1727 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+/*
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/licenses/publicdomain
+ */
+
+package org.hibernate.validator.internal.util;
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
+import java.util.AbstractCollection;
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.Collection;
+import java.util.ConcurrentModificationException;
+import java.util.EnumSet;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * An advanced hash table supporting configurable garbage collection semantics
+ * of keys and values, optional referential-equality, full concurrency of
+ * retrievals, and adjustable expected concurrency for updates.
+ *
+ * This table is designed around specific advanced use-cases. If there is any
+ * doubt whether this table is for you, you most likely should be using
+ * {@link java.util.concurrent.ConcurrentHashMap} instead.
+ *
+ * This table supports strong, weak, and soft keys and values. By default keys
+ * are weak, and values are strong. Such a configuration offers similar behavior
+ * to {@link java.util.WeakHashMap}, entries of this table are periodically
+ * removed once their corresponding keys are no longer referenced outside of
+ * this table. In other words, this table will not prevent a key from being
+ * discarded by the garbage collector. Once a key has been discarded by the
+ * collector, the corresponding entry is no longer visible to this table;
+ * however, the entry may occupy space until a future table operation decides to
+ * reclaim it. For this reason, summary functions such as <tt>size</tt> and
+ * <tt>isEmpty</tt> might return a value greater than the observed number of
+ * entries. In order to support a high level of concurrency, stale entries are
+ * only reclaimed during blocking (usually mutating) operations.
+ *
+ * Enabling soft keys allows entries in this table to remain until their space
+ * is absolutely needed by the garbage collector. This is unlike weak keys which
+ * can be reclaimed as soon as they are no longer referenced by a normal strong
+ * reference. The primary use case for soft keys is a cache, which ideally
+ * occupies memory that is not in use for as long as possible.
+ *
+ * By default, values are held using a normal strong reference. This provides
+ * the commonly desired guarantee that a value will always have at least the
+ * same life-span as it's key. For this reason, care should be taken to ensure
+ * that a value never refers, either directly or indirectly, to its key, thereby
+ * preventing reclamation. If this is unavoidable, then it is recommended to use
+ * the same reference type in use for the key. However, it should be noted that
+ * non-strong values may disappear before their corresponding key.
+ *
+ * While this table does allow the use of both strong keys and values, it is
+ * recommended to use {@link java.util.concurrent.ConcurrentHashMap} for such a
+ * configuration, since it is optimized for that case.
+ *
+ * Just like {@link java.util.concurrent.ConcurrentHashMap}, this class obeys
+ * the same functional specification as {@link java.util.Hashtable}, and
+ * includes versions of methods corresponding to each method of
+ * <tt>Hashtable</tt>. However, even though all operations are thread-safe,
+ * retrieval operations do <em>not</em> entail locking, and there is
+ * <em>not</em> any support for locking the entire table in a way that
+ * prevents all access. This class is fully interoperable with
+ * <tt>Hashtable</tt> in programs that rely on its thread safety but not on
+ * its synchronization details.
+ *
+ * <p>
+ * Retrieval operations (including <tt>get</tt>) generally do not block, so
+ * may overlap with update operations (including <tt>put</tt> and
+ * <tt>remove</tt>). Retrievals reflect the results of the most recently
+ * <em>completed</em> update operations holding upon their onset. For
+ * aggregate operations such as <tt>putAll</tt> and <tt>clear</tt>,
+ * concurrent retrievals may reflect insertion or removal of only some entries.
+ * Similarly, Iterators and Enumerations return elements reflecting the state of
+ * the hash table at some point at or since the creation of the
+ * iterator/enumeration. They do <em>not</em> throw
+ * {@link ConcurrentModificationException}. However, iterators are designed to
+ * be used by only one thread at a time.
+ *
+ * <p>
+ * The allowed concurrency among update operations is guided by the optional
+ * <tt>concurrencyLevel</tt> constructor argument (default <tt>16</tt>),
+ * which is used as a hint for internal sizing. The table is internally
+ * partitioned to try to permit the indicated number of concurrent updates
+ * without contention. Because placement in hash tables is essentially random,
+ * the actual concurrency will vary. Ideally, you should choose a value to
+ * accommodate as many threads as will ever concurrently modify the table. Using
+ * a significantly higher value than you need can waste space and time, and a
+ * significantly lower value can lead to thread contention. But overestimates
+ * and underestimates within an order of magnitude do not usually have much
+ * noticeable impact. A value of one is appropriate when it is known that only
+ * one thread will modify and all others will only read. Also, resizing this or
+ * any other kind of hash table is a relatively slow operation, so, when
+ * possible, it is a good idea to provide estimates of expected table sizes in
+ * constructors.
+ *
+ * <p>
+ * This class and its views and iterators implement all of the <em>optional</em>
+ * methods of the {@link Map} and {@link Iterator} interfaces.
+ *
+ * <p>
+ * Like {@link Hashtable} but unlike {@link HashMap}, this class does
+ * <em>not</em> allow <tt>null</tt> to be used as a key or value.
+ *
+ * <p>
+ * This class is a member of the <a href="{@docRoot}/../technotes/guides/collections/index.html">
+ * Java Collections Framework</a>.
+ *
+ * @author Doug Lea
+ * @author Jason T. Greene
+ * @param <K> the type of keys maintained by this map
+ * @param <V> the type of mapped values
+ */
+final public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
+		implements java.util.concurrent.ConcurrentMap<K, V>, Serializable {
+	private static final long serialVersionUID = 7249069246763182397L;
+
+	/*
+		 * The basic strategy is to subdivide the table among Segments,
+		 * each of which itself is a concurrently readable hash table.
+		 */
+
+	/**
+	 * An option specifying which Java reference type should be used to refer
+	 * to a key and/or value.
+	 */
+	public static enum ReferenceType {
+		/** Indicates a normal Java strong reference should be used */
+		STRONG,
+		/** Indicates a {@link WeakReference} should be used */
+		WEAK,
+		/** Indicates a {@link SoftReference} should be used */
+		SOFT
+	};
+
+
+	public static enum Option {
+		/** Indicates that referential-equality (== instead of .equals()) should
+		 * be used when locating keys. This offers similar behavior to {@link IdentityHashMap} */
+		IDENTITY_COMPARISONS
+	};
+
+	/* ---------------- Constants -------------- */
+
+	static final ReferenceType DEFAULT_KEY_TYPE = ReferenceType.WEAK;
+
+	static final ReferenceType DEFAULT_VALUE_TYPE = ReferenceType.STRONG;
+
+
+	/**
+	 * The default initial capacity for this table,
+	 * used when not otherwise specified in a constructor.
+	 */
+	static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+	/**
+	 * The default load factor for this table, used when not
+	 * otherwise specified in a constructor.
+	 */
+	static final float DEFAULT_LOAD_FACTOR = 0.75f;
+
+	/**
+	 * The default concurrency level for this table, used when not
+	 * otherwise specified in a constructor.
+	 */
+	static final int DEFAULT_CONCURRENCY_LEVEL = 16;
+
+	/**
+	 * The maximum capacity, used if a higher value is implicitly
+	 * specified by either of the constructors with arguments.  MUST
+	 * be a power of two <= 1<<30 to ensure that entries are indexable
+	 * using ints.
+	 */
+	static final int MAXIMUM_CAPACITY = 1 << 30;
+
+	/**
+	 * The maximum number of segments to allow; used to bound
+	 * constructor arguments.
+	 */
+	static final int MAX_SEGMENTS = 1 << 16; // slightly conservative
+
+	/**
+	 * Number of unsynchronized retries in size and containsValue
+	 * methods before resorting to locking. This is used to avoid
+	 * unbounded retries if tables undergo continuous modification
+	 * which would make it impossible to obtain an accurate result.
+	 */
+	static final int RETRIES_BEFORE_LOCK = 2;
+
+	/* ---------------- Fields -------------- */
+
+	/**
+	 * Mask value for indexing into segments. The upper bits of a
+	 * key's hash code are used to choose the segment.
+	 */
+	final int segmentMask;
+
+	/**
+	 * Shift value for indexing within segments.
+	 */
+	final int segmentShift;
+
+	/**
+	 * The segments, each of which is a specialized hash table
+	 */
+	final Segment<K,V>[] segments;
+
+	boolean identityComparisons;
+
+	transient Set<K> keySet;
+	transient Set<Map.Entry<K,V>> entrySet;
+	transient Collection<V> values;
+
+	/* ---------------- Small Utilities -------------- */
+
+	/**
+	 * Applies a supplemental hash function to a given hashCode, which
+	 * defends against poor quality hash functions.  This is critical
+	 * because ConcurrentReferenceHashMap uses power-of-two length hash tables,
+	 * that otherwise encounter collisions for hashCodes that do not
+	 * differ in lower or upper bits.
+	 */
+	private static int hash(int h) {
+		// Spread bits to regularize both segment and index locations,
+		// using variant of single-word Wang/Jenkins hash.
+		h += (h <<  15) ^ 0xffffcd7d;
+		h ^= (h >>> 10);
+		h += (h <<   3);
+		h ^= (h >>>  6);
+		h += (h <<   2) + (h << 14);
+		return h ^ (h >>> 16);
+	}
+
+	/**
+	 * Returns the segment that should be used for key with given hash
+	 * @param hash the hash code for the key
+	 * @return the segment
+	 */
+	final Segment<K,V> segmentFor(int hash) {
+		return segments[(hash >>> segmentShift) & segmentMask];
+	}
+
+	private int hashOf(Object key) {
+		return hash(identityComparisons ?
+				System.identityHashCode(key) : key.hashCode());
+	}
+
+	/* ---------------- Inner Classes -------------- */
+
+	static interface KeyReference {
+		int keyHash();
+		Object keyRef();
+	}
+
+	/**
+	 * A weak-key reference which stores the key hash needed for reclamation.
+	 */
+	static final class WeakKeyReference<K> extends WeakReference<K>  implements KeyReference {
+		final int hash;
+		WeakKeyReference(K key, int hash, ReferenceQueue<Object> refQueue) {
+			super(key, refQueue);
+			this.hash = hash;
+		}
+		public final int keyHash() {
+			return hash;
+		}
+
+		public final Object keyRef() {
+			return this;
+		}
+	}
+
+	/**
+	 * A soft-key reference which stores the key hash needed for reclamation.
+	 */
+	static final class SoftKeyReference<K> extends SoftReference<K> implements KeyReference {
+		final int hash;
+		SoftKeyReference(K key, int hash, ReferenceQueue<Object> refQueue) {
+			super(key, refQueue);
+			this.hash = hash;
+		}
+		public final int keyHash() {
+			return hash;
+		}
+
+		public final Object keyRef() {
+			return this;
+		}
+	}
+
+	static final class WeakValueReference<V> extends WeakReference<V>  implements KeyReference {
+		final Object keyRef;
+		final int hash;
+		WeakValueReference(V value, Object keyRef, int hash, ReferenceQueue<Object> refQueue) {
+			super(value, refQueue);
+			this.keyRef = keyRef;
+			this.hash = hash;
+		}
+
+		public final int keyHash() {
+			return hash;
+		}
+
+		public final Object keyRef() {
+			return keyRef;
+		}
+	}
+
+	static final class SoftValueReference<V> extends SoftReference<V>  implements KeyReference {
+		final Object keyRef;
+		final int hash;
+		SoftValueReference(V value, Object keyRef, int hash, ReferenceQueue<Object> refQueue) {
+			super(value, refQueue);
+			this.keyRef = keyRef;
+			this.hash = hash;
+		}
+		public final int keyHash() {
+			return hash;
+		}
+
+		public final Object keyRef() {
+			return keyRef;
+		}
+	}
+
+	/**
+	 * ConcurrentReferenceHashMap list entry. Note that this is never exported
+	 * out as a user-visible Map.Entry.
+	 *
+	 * Because the value field is volatile, not final, it is legal wrt
+	 * the Java Memory Model for an unsynchronized reader to see null
+	 * instead of initial value when read via a data race.  Although a
+	 * reordering leading to this is not likely to ever actually
+	 * occur, the Segment.readValueUnderLock method is used as a
+	 * backup in case a null (pre-initialized) value is ever seen in
+	 * an unsynchronized access method.
+	 */
+	static final class HashEntry<K,V> {
+		final Object keyRef;
+		final int hash;
+		volatile Object valueRef;
+		final HashEntry<K,V> next;
+
+		HashEntry(K key, int hash,  HashEntry<K,V> next, V value,
+				  ReferenceType keyType, ReferenceType valueType,
+				  ReferenceQueue<Object> refQueue) {
+			this.hash = hash;
+			this.next = next;
+			this.keyRef = newKeyReference(key, keyType, refQueue);
+			this.valueRef = newValueReference(value, valueType, refQueue);
+		}
+
+		final Object newKeyReference(K key, ReferenceType keyType,
+									 ReferenceQueue<Object> refQueue) {
+			if (keyType == ReferenceType.WEAK)
+				return new WeakKeyReference<K>(key, hash, refQueue);
+			if (keyType == ReferenceType.SOFT)
+				return new SoftKeyReference<K>(key, hash, refQueue);
+
+			return key;
+		}
+
+		final Object newValueReference(V value, ReferenceType valueType,
+									   ReferenceQueue<Object> refQueue) {
+			if (valueType == ReferenceType.WEAK)
+				return new WeakValueReference<V>(value, keyRef, hash, refQueue);
+			if (valueType == ReferenceType.SOFT)
+				return new SoftValueReference<V>(value, keyRef, hash, refQueue);
+
+			return value;
+		}
+
+		@SuppressWarnings("unchecked")
+		final K key() {
+			if (keyRef instanceof KeyReference)
+				return ((Reference<K>)keyRef).get();
+
+			return (K) keyRef;
+		}
+
+		final V value() {
+			return dereferenceValue(valueRef);
+		}
+
+		@SuppressWarnings("unchecked")
+		final V dereferenceValue(Object value) {
+			if (value instanceof KeyReference)
+				return ((Reference<V>)value).get();
+
+			return (V) value;
+		}
+
+		final void setValue(V value, ReferenceType valueType, ReferenceQueue<Object> refQueue) {
+			this.valueRef = newValueReference(value, valueType, refQueue);
+		}
+
+		@SuppressWarnings("unchecked")
+		static final <K,V> HashEntry<K,V>[] newArray(int i) {
+			return new HashEntry[i];
+		}
+	}
+
+	/**
+	 * Segments are specialized versions of hash tables.  This
+	 * subclasses from ReentrantLock opportunistically, just to
+	 * simplify some locking and avoid separate construction.
+	 */
+	static final class Segment<K,V> extends ReentrantLock implements Serializable {
+		/*
+				 * Segments maintain a table of entry lists that are ALWAYS
+				 * kept in a consistent state, so can be read without locking.
+				 * Next fields of nodes are immutable (final).  All list
+				 * additions are performed at the front of each bin. This
+				 * makes it easy to check changes, and also fast to traverse.
+				 * When nodes would otherwise be changed, new nodes are
+				 * created to replace them. This works well for hash tables
+				 * since the bin lists tend to be short. (The average length
+				 * is less than two for the default load factor threshold.)
+				 *
+				 * Read operations can thus proceed without locking, but rely
+				 * on selected uses of volatiles to ensure that completed
+				 * write operations performed by other threads are
+				 * noticed. For most purposes, the "count" field, tracking the
+				 * number of elements, serves as that volatile variable
+				 * ensuring visibility.  This is convenient because this field
+				 * needs to be read in many read operations anyway:
+				 *
+				 *   - All (unsynchronized) read operations must first read the
+				 *     "count" field, and should not look at table entries if
+				 *     it is 0.
+				 *
+				 *   - All (synchronized) write operations should write to
+				 *     the "count" field after structurally changing any bin.
+				 *     The operations must not take any action that could even
+				 *     momentarily cause a concurrent read operation to see
+				 *     inconsistent data. This is made easier by the nature of
+				 *     the read operations in Map. For example, no operation
+				 *     can reveal that the table has grown but the threshold
+				 *     has not yet been updated, so there are no atomicity
+				 *     requirements for this with respect to reads.
+				 *
+				 * As a guide, all critical volatile reads and writes to the
+				 * count field are marked in code comments.
+				 */
+
+		private static final long serialVersionUID = 2249069246763182397L;
+
+		/**
+		 * The number of elements in this segment's region.
+		 */
+		transient volatile int count;
+
+		/**
+		 * Number of updates that alter the size of the table. This is
+		 * used during bulk-read methods to make sure they see a
+		 * consistent snapshot: If modCounts change during a traversal
+		 * of segments computing size or checking containsValue, then
+		 * we might have an inconsistent view of state so (usually)
+		 * must retry.
+		 */
+		transient int modCount;
+
+		/**
+		 * The table is rehashed when its size exceeds this threshold.
+		 * (The value of this field is always <tt>(int)(capacity *
+		 * loadFactor)</tt>.)
+		 */
+		transient int threshold;
+
+		/**
+		 * The per-segment table.
+		 */
+		transient volatile HashEntry<K,V>[] table;
+
+		/**
+		 * The load factor for the hash table.  Even though this value
+		 * is same for all segments, it is replicated to avoid needing
+		 * links to outer object.
+		 * @serial
+		 */
+		final float loadFactor;
+
+		/**
+		 * The collected weak-key reference queue for this segment.
+		 * This should be (re)initialized whenever table is assigned,
+		 */
+		transient volatile ReferenceQueue<Object> refQueue;
+
+		final ReferenceType keyType;
+
+		final ReferenceType valueType;
+
+		final boolean identityComparisons;
+
+		Segment(int initialCapacity, float lf, ReferenceType keyType,
+				ReferenceType valueType, boolean identityComparisons) {
+			loadFactor = lf;
+			this.keyType = keyType;
+			this.valueType = valueType;
+			this.identityComparisons = identityComparisons;
+			setTable(HashEntry.<K,V>newArray(initialCapacity));
+		}
+
+		@SuppressWarnings("unchecked")
+		static final <K,V> Segment<K,V>[] newArray(int i) {
+			return new Segment[i];
+		}
+
+		private boolean keyEq(Object src, Object dest) {
+			return identityComparisons ? src == dest : src.equals(dest);
+		}
+
+		/**
+		 * Sets table to new HashEntry array.
+		 * Call only while holding lock or in constructor.
+		 */
+		void setTable(HashEntry<K,V>[] newTable) {
+			threshold = (int)(newTable.length * loadFactor);
+			table = newTable;
+			refQueue = new ReferenceQueue<Object>();
+		}
+
+		/**
+		 * Returns properly casted first entry of bin for given hash.
+		 */
+		HashEntry<K,V> getFirst(int hash) {
+			HashEntry<K,V>[] tab = table;
+			return tab[hash & (tab.length - 1)];
+		}
+
+		HashEntry<K,V> newHashEntry(K key, int hash, HashEntry<K, V> next, V value) {
+			return new HashEntry<K,V>(key, hash, next, value, keyType, valueType, refQueue);
+		}
+
+		/**
+		 * Reads value field of an entry under lock. Called if value
+		 * field ever appears to be null. This is possible only if a
+		 * compiler happens to reorder a HashEntry initialization with
+		 * its table assignment, which is legal under memory model
+		 * but is not known to ever occur.
+		 */
+		V readValueUnderLock(HashEntry<K,V> e) {
+			lock();
+			try {
+				removeStale();
+				return e.value();
+			} finally {
+				unlock();
+			}
+		}
+
+		/* Specialized implementations of map methods */
+
+		V get(Object key, int hash) {
+			if (count != 0) { // read-volatile
+				HashEntry<K,V> e = getFirst(hash);
+				while (e != null) {
+					if (e.hash == hash && keyEq(key, e.key())) {
+						Object opaque = e.valueRef;
+						if (opaque != null)
+							return e.dereferenceValue(opaque);
+
+						return readValueUnderLock(e);  // recheck
+					}
+					e = e.next;
+				}
+			}
+			return null;
+		}
+
+		boolean containsKey(Object key, int hash) {
+			if (count != 0) { // read-volatile
+				HashEntry<K,V> e = getFirst(hash);
+				while (e != null) {
+					if (e.hash == hash && keyEq(key, e.key()))
+						return true;
+					e = e.next;
+				}
+			}
+			return false;
+		}
+
+		boolean containsValue(Object value) {
+			if (count != 0) { // read-volatile
+				HashEntry<K,V>[] tab = table;
+				int len = tab.length;
+				for (int i = 0 ; i < len; i++) {
+					for (HashEntry<K,V> e = tab[i]; e != null; e = e.next) {
+						Object opaque = e.valueRef;
+						V v;
+
+						if (opaque == null)
+							v = readValueUnderLock(e); // recheck
+						else
+							v = e.dereferenceValue(opaque);
+
+						if (value.equals(v))
+							return true;
+					}
+				}
+			}
+			return false;
+		}
+
+		boolean replace(K key, int hash, V oldValue, V newValue) {
+			lock();
+			try {
+				removeStale();
+				HashEntry<K,V> e = getFirst(hash);
+				while (e != null && (e.hash != hash || !keyEq(key, e.key())))
+					e = e.next;
+
+				boolean replaced = false;
+				if (e != null && oldValue.equals(e.value())) {
+					replaced = true;
+					e.setValue(newValue, valueType, refQueue);
+				}
+				return replaced;
+			} finally {
+				unlock();
+			}
+		}
+
+		V replace(K key, int hash, V newValue) {
+			lock();
+			try {
+				removeStale();
+				HashEntry<K,V> e = getFirst(hash);
+				while (e != null && (e.hash != hash || !keyEq(key, e.key())))
+					e = e.next;
+
+				V oldValue = null;
+				if (e != null) {
+					oldValue = e.value();
+					e.setValue(newValue, valueType, refQueue);
+				}
+				return oldValue;
+			} finally {
+				unlock();
+			}
+		}
+
+
+		V put(K key, int hash, V value, boolean onlyIfAbsent) {
+			lock();
+			try {
+				removeStale();
+				int c = count;
+				if (c++ > threshold) {// ensure capacity
+					int reduced = rehash();
+					if (reduced > 0)  // adjust from possible weak cleanups
+						count = (c -= reduced) - 1; // write-volatile
+				}
+
+				HashEntry<K,V>[] tab = table;
+				int index = hash & (tab.length - 1);
+				HashEntry<K,V> first = tab[index];
+				HashEntry<K,V> e = first;
+				while (e != null && (e.hash != hash || !keyEq(key, e.key())))
+					e = e.next;
+
+				V oldValue;
+				if (e != null) {
+					oldValue = e.value();
+					if (!onlyIfAbsent || oldValue == null) // null = gc AFTER stale removal
+						e.setValue(value, valueType, refQueue);
+				}
+				else {
+					oldValue = null;
+					++modCount;
+					tab[index] = newHashEntry(key, hash, first, value);
+					count = c; // write-volatile
+				}
+				return oldValue;
+			} finally {
+				unlock();
+			}
+		}
+
+		int rehash() {
+			HashEntry<K,V>[] oldTable = table;
+			int oldCapacity = oldTable.length;
+			if (oldCapacity >= MAXIMUM_CAPACITY)
+				return 0;
+
+			/*
+						 * Reclassify nodes in each list to new Map.  Because we are
+						 * using power-of-two expansion, the elements from each bin
+						 * must either stay at same index, or move with a power of two
+						 * offset. We eliminate unnecessary node creation by catching
+						 * cases where old nodes can be reused because their next
+						 * fields won't change. Statistically, at the default
+						 * threshold, only about one-sixth of them need cloning when
+						 * a table doubles. The nodes they replace will be garbage
+						 * collectable as soon as they are no longer referenced by any
+						 * reader thread that may be in the midst of traversing table
+						 * right now.
+						 */
+
+			HashEntry<K,V>[] newTable = HashEntry.newArray(oldCapacity<<1);
+			threshold = (int)(newTable.length * loadFactor);
+			int sizeMask = newTable.length - 1;
+			int reduce = 0;
+			for (int i = 0; i < oldCapacity ; i++) {
+				// We need to guarantee that any existing reads of old Map can
+				//  proceed. So we cannot yet null out each bin.
+				HashEntry<K,V> e = oldTable[i];
+
+				if (e != null) {
+					HashEntry<K,V> next = e.next;
+					int idx = e.hash & sizeMask;
+
+					//  Single node on list
+					if (next == null)
+						newTable[idx] = e;
+
+					else {
+						// Reuse trailing consecutive sequence at same slot
+						HashEntry<K,V> lastRun = e;
+						int lastIdx = idx;
+						for (HashEntry<K,V> last = next;
+							 last != null;
+							 last = last.next) {
+							int k = last.hash & sizeMask;
+							if (k != lastIdx) {
+								lastIdx = k;
+								lastRun = last;
+							}
+						}
+						newTable[lastIdx] = lastRun;
+						// Clone all remaining nodes
+						for (HashEntry<K,V> p = e; p != lastRun; p = p.next) {
+							// Skip GC'd weak refs
+							K key = p.key();
+							if (key == null) {
+								reduce++;
+								continue;
+							}
+							int k = p.hash & sizeMask;
+							HashEntry<K,V> n = newTable[k];
+							newTable[k] = newHashEntry(key, p.hash, n, p.value());
+						}
+					}
+				}
+			}
+			table = newTable;
+			return reduce;
+		}
+
+		/**
+		 * Remove; match on key only if value null, else match both.
+		 */
+		V remove(Object key, int hash, Object value, boolean refRemove) {
+			lock();
+			try {
+				if (!refRemove)
+					removeStale();
+				int c = count - 1;
+				HashEntry<K,V>[] tab = table;
+				int index = hash & (tab.length - 1);
+				HashEntry<K,V> first = tab[index];
+				HashEntry<K,V> e = first;
+				// a ref remove operation compares the Reference instance
+				while (e != null && key != e.keyRef
+						&& (refRemove || hash != e.hash || !keyEq(key, e.key())))
+					e = e.next;
+
+				V oldValue = null;
+				if (e != null) {
+					V v = e.value();
+					if (value == null || value.equals(v)) {
+						oldValue = v;
+						// All entries following removed node can stay
+						// in list, but all preceding ones need to be
+						// cloned.
+						++modCount;
+						HashEntry<K,V> newFirst = e.next;
+						for (HashEntry<K,V> p = first; p != e; p = p.next) {
+							K pKey = p.key();
+							if (pKey == null) { // Skip GC'd keys
+								c--;
+								continue;
+							}
+
+							newFirst = newHashEntry(pKey, p.hash, newFirst, p.value());
+						}
+						tab[index] = newFirst;
+						count = c; // write-volatile
+					}
+				}
+				return oldValue;
+			} finally {
+				unlock();
+			}
+		}
+
+		final void removeStale() {
+			KeyReference ref;
+			while ((ref = (KeyReference) refQueue.poll()) != null) {
+				remove(ref.keyRef(), ref.keyHash(), null, true);
+			}
+		}
+
+		void clear() {
+			if (count != 0) {
+				lock();
+				try {
+					HashEntry<K,V>[] tab = table;
+					for (int i = 0; i < tab.length ; i++)
+						tab[i] = null;
+					++modCount;
+					// replace the reference queue to avoid unnecessary stale cleanups
+					refQueue = new ReferenceQueue<Object>();
+					count = 0; // write-volatile
+				} finally {
+					unlock();
+				}
+			}
+		}
+	}
+
+
+
+	/* ---------------- Public operations -------------- */
+
+	/**
+	 * Creates a new, empty map with the specified initial
+	 * capacity, reference types, load factor and concurrency level.
+	 *
+	 * Behavioral changing options such as {@link Option#IDENTITY_COMPARISONS}
+	 * can also be specified.
+	 *
+	 * @param initialCapacity the initial capacity. The implementation
+	 * performs internal sizing to accommodate this many elements.
+	 * @param loadFactor  the load factor threshold, used to control resizing.
+	 * Resizing may be performed when the average number of elements per
+	 * bin exceeds this threshold.
+	 * @param concurrencyLevel the estimated number of concurrently
+	 * updating threads. The implementation performs internal sizing
+	 * to try to accommodate this many threads.
+	 * @param keyType the reference type to use for keys
+	 * @param valueType the reference type to use for values
+	 * @param options the behavioral options
+	 * @throws IllegalArgumentException if the initial capacity is
+	 * negative or the load factor or concurrencyLevel are
+	 * nonpositive.
+	 */
+	public ConcurrentReferenceHashMap(int initialCapacity,
+									  float loadFactor, int concurrencyLevel,
+									  ReferenceType keyType, ReferenceType valueType,
+									  EnumSet<Option> options) {
+		if (!(loadFactor > 0) || initialCapacity < 0 || concurrencyLevel <= 0)
+			throw new IllegalArgumentException();
+
+		if (concurrencyLevel > MAX_SEGMENTS)
+			concurrencyLevel = MAX_SEGMENTS;
+
+		// Find power-of-two sizes best matching arguments
+		int sshift = 0;
+		int ssize = 1;
+		while (ssize < concurrencyLevel) {
+			++sshift;
+			ssize <<= 1;
+		}
+		segmentShift = 32 - sshift;
+		segmentMask = ssize - 1;
+		this.segments = Segment.newArray(ssize);
+
+		if (initialCapacity > MAXIMUM_CAPACITY)
+			initialCapacity = MAXIMUM_CAPACITY;
+		int c = initialCapacity / ssize;
+		if (c * ssize < initialCapacity)
+			++c;
+		int cap = 1;
+		while (cap < c)
+			cap <<= 1;
+
+		identityComparisons = options != null && options.contains(Option.IDENTITY_COMPARISONS);
+
+		for (int i = 0; i < this.segments.length; ++i)
+			this.segments[i] = new Segment<K,V>(cap, loadFactor,
+					keyType, valueType, identityComparisons);
+	}
+
+	/**
+	 * Creates a new, empty map with the specified initial
+	 * capacity, load factor and concurrency level.
+	 *
+	 * @param initialCapacity the initial capacity. The implementation
+	 * performs internal sizing to accommodate this many elements.
+	 * @param loadFactor  the load factor threshold, used to control resizing.
+	 * Resizing may be performed when the average number of elements per
+	 * bin exceeds this threshold.
+	 * @param concurrencyLevel the estimated number of concurrently
+	 * updating threads. The implementation performs internal sizing
+	 * to try to accommodate this many threads.
+	 * @throws IllegalArgumentException if the initial capacity is
+	 * negative or the load factor or concurrencyLevel are
+	 * nonpositive.
+	 */
+	public ConcurrentReferenceHashMap(int initialCapacity,
+									  float loadFactor, int concurrencyLevel) {
+		this(initialCapacity, loadFactor, concurrencyLevel,
+				DEFAULT_KEY_TYPE, DEFAULT_VALUE_TYPE, null);
+	}
+
+	/**
+	 * Creates a new, empty map with the specified initial capacity
+	 * and load factor and with the default reference types (weak keys,
+	 * strong values), and concurrencyLevel (16).
+	 *
+	 * @param initialCapacity The implementation performs internal
+	 * sizing to accommodate this many elements.
+	 * @param loadFactor  the load factor threshold, used to control resizing.
+	 * Resizing may be performed when the average number of elements per
+	 * bin exceeds this threshold.
+	 * @throws IllegalArgumentException if the initial capacity of
+	 * elements is negative or the load factor is nonpositive
+	 *
+	 * @since 1.6
+	 */
+	public ConcurrentReferenceHashMap(int initialCapacity, float loadFactor) {
+		this(initialCapacity, loadFactor, DEFAULT_CONCURRENCY_LEVEL);
+	}
+
+
+	/**
+	 * Creates a new, empty map with the specified initial capacity,
+	 * reference types and with default load factor (0.75) and concurrencyLevel (16).
+	 *
+	 * @param initialCapacity the initial capacity. The implementation
+	 * performs internal sizing to accommodate this many elements.
+	 * @param keyType the reference type to use for keys
+	 * @param valueType the reference type to use for values
+	 * @throws IllegalArgumentException if the initial capacity of
+	 * elements is negative.
+	 */
+	public ConcurrentReferenceHashMap(int initialCapacity,
+									  ReferenceType keyType, ReferenceType valueType) {
+		this(initialCapacity, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL,
+				keyType, valueType, null);
+	}
+
+	/**
+	 * Creates a new, empty map with the specified initial capacity,
+	 * and with default reference types (weak keys, strong values),
+	 * load factor (0.75) and concurrencyLevel (16).
+	 *
+	 * @param initialCapacity the initial capacity. The implementation
+	 * performs internal sizing to accommodate this many elements.
+	 * @throws IllegalArgumentException if the initial capacity of
+	 * elements is negative.
+	 */
+	public ConcurrentReferenceHashMap(int initialCapacity) {
+		this(initialCapacity, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL);
+	}
+
+	/**
+	 * Creates a new, empty map with a default initial capacity (16),
+	 * reference types (weak keys, strong values), default
+	 * load factor (0.75) and concurrencyLevel (16).
+	 */
+	public ConcurrentReferenceHashMap() {
+		this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL);
+	}
+
+	/**
+	 * Creates a new map with the same mappings as the given map.
+	 * The map is created with a capacity of 1.5 times the number
+	 * of mappings in the given map or 16 (whichever is greater),
+	 * and a default load factor (0.75) and concurrencyLevel (16).
+	 *
+	 * @param m the map
+	 */
+	public ConcurrentReferenceHashMap(Map<? extends K, ? extends V> m) {
+		this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1,
+				DEFAULT_INITIAL_CAPACITY),
+				DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL);
+		putAll(m);
+	}
+
+	/**
+	 * Returns <tt>true</tt> if this map contains no key-value mappings.
+	 *
+	 * @return <tt>true</tt> if this map contains no key-value mappings
+	 */
+	public boolean isEmpty() {
+		final Segment<K,V>[] segments = this.segments;
+		/*
+				 * We keep track of per-segment modCounts to avoid ABA
+				 * problems in which an element in one segment was added and
+				 * in another removed during traversal, in which case the
+				 * table was never actually empty at any point. Note the
+				 * similar use of modCounts in the size() and containsValue()
+				 * methods, which are the only other methods also susceptible
+				 * to ABA problems.
+				 */
+		int[] mc = new int[segments.length];
+		int mcsum = 0;
+		for (int i = 0; i < segments.length; ++i) {
+			if (segments[i].count != 0)
+				return false;
+			else
+				mcsum += mc[i] = segments[i].modCount;
+		}
+		// If mcsum happens to be zero, then we know we got a snapshot
+		// before any modifications at all were made.  This is
+		// probably common enough to bother tracking.
+		if (mcsum != 0) {
+			for (int i = 0; i < segments.length; ++i) {
+				if (segments[i].count != 0 ||
+						mc[i] != segments[i].modCount)
+					return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Returns the number of key-value mappings in this map.  If the
+	 * map contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
+	 * <tt>Integer.MAX_VALUE</tt>.
+	 *
+	 * @return the number of key-value mappings in this map
+	 */
+	public int size() {
+		final Segment<K,V>[] segments = this.segments;
+		long sum = 0;
+		long check = 0;
+		int[] mc = new int[segments.length];
+		// Try a few times to get accurate count. On failure due to
+		// continuous async changes in table, resort to locking.
+		for (int k = 0; k < RETRIES_BEFORE_LOCK; ++k) {
+			check = 0;
+			sum = 0;
+			int mcsum = 0;
+			for (int i = 0; i < segments.length; ++i) {
+				sum += segments[i].count;
+				mcsum += mc[i] = segments[i].modCount;
+			}
+			if (mcsum != 0) {
+				for (int i = 0; i < segments.length; ++i) {
+					check += segments[i].count;
+					if (mc[i] != segments[i].modCount) {
+						check = -1; // force retry
+						break;
+					}
+				}
+			}
+			if (check == sum)
+				break;
+		}
+		if (check != sum) { // Resort to locking all segments
+			sum = 0;
+			for (int i = 0; i < segments.length; ++i)
+				segments[i].lock();
+			for (int i = 0; i < segments.length; ++i)
+				sum += segments[i].count;
+			for (int i = 0; i < segments.length; ++i)
+				segments[i].unlock();
+		}
+		if (sum > Integer.MAX_VALUE)
+			return Integer.MAX_VALUE;
+		else
+			return (int)sum;
+	}
+
+	/**
+	 * Returns the value to which the specified key is mapped,
+	 * or {@code null} if this map contains no mapping for the key.
+	 *
+	 * <p>More formally, if this map contains a mapping from a key
+	 * {@code k} to a value {@code v} such that {@code key.equals(k)},
+	 * then this method returns {@code v}; otherwise it returns
+	 * {@code null}.  (There can be at most one such mapping.)
+	 *
+	 * @throws NullPointerException if the specified key is null
+	 */
+	public V get(Object key) {
+		int hash = hashOf(key);
+		return segmentFor(hash).get(key, hash);
+	}
+
+	/**
+	 * Tests if the specified object is a key in this table.
+	 *
+	 * @param  key   possible key
+	 * @return <tt>true</tt> if and only if the specified object
+	 *         is a key in this table, as determined by the
+	 *         <tt>equals</tt> method; <tt>false</tt> otherwise.
+	 * @throws NullPointerException if the specified key is null
+	 */
+	public boolean containsKey(Object key) {
+		int hash = hashOf(key);
+		return segmentFor(hash).containsKey(key, hash);
+	}
+
+	/**
+	 * Returns <tt>true</tt> if this map maps one or more keys to the
+	 * specified value. Note: This method requires a full internal
+	 * traversal of the hash table, and so is much slower than
+	 * method <tt>containsKey</tt>.
+	 *
+	 * @param value value whose presence in this map is to be tested
+	 * @return <tt>true</tt> if this map maps one or more keys to the
+	 *         specified value
+	 * @throws NullPointerException if the specified value is null
+	 */
+	public boolean containsValue(Object value) {
+		if (value == null)
+			throw new NullPointerException();
+
+		// See explanation of modCount use above
+
+		final Segment<K,V>[] segments = this.segments;
+		int[] mc = new int[segments.length];
+
+		// Try a few times without locking
+		for (int k = 0; k < RETRIES_BEFORE_LOCK; ++k) {
+			int mcsum = 0;
+			for (int i = 0; i < segments.length; ++i) {
+				mcsum += mc[i] = segments[i].modCount;
+				if (segments[i].containsValue(value))
+					return true;
+			}
+			boolean cleanSweep = true;
+			if (mcsum != 0) {
+				for (int i = 0; i < segments.length; ++i) {
+					if (mc[i] != segments[i].modCount) {
+						cleanSweep = false;
+						break;
+					}
+				}
+			}
+			if (cleanSweep)
+				return false;
+		}
+		// Resort to locking all segments
+		for (int i = 0; i < segments.length; ++i)
+			segments[i].lock();
+		boolean found = false;
+		try {
+			for (int i = 0; i < segments.length; ++i) {
+				if (segments[i].containsValue(value)) {
+					found = true;
+					break;
+				}
+			}
+		} finally {
+			for (int i = 0; i < segments.length; ++i)
+				segments[i].unlock();
+		}
+		return found;
+	}
+
+	/**
+	 * Legacy method testing if some key maps into the specified value
+	 * in this table.  This method is identical in functionality to
+	 * {@link #containsValue}, and exists solely to ensure
+	 * full compatibility with class {@link java.util.Hashtable},
+	 * which supported this method prior to introduction of the
+	 * Java Collections framework.
+
+	 * @param  value a value to search for
+	 * @return <tt>true</tt> if and only if some key maps to the
+	 *         <tt>value</tt> argument in this table as
+	 *         determined by the <tt>equals</tt> method;
+	 *         <tt>false</tt> otherwise
+	 * @throws NullPointerException if the specified value is null
+	 */
+	public boolean contains(Object value) {
+		return containsValue(value);
+	}
+
+	/**
+	 * Maps the specified key to the specified value in this table.
+	 * Neither the key nor the value can be null.
+	 *
+	 * <p> The value can be retrieved by calling the <tt>get</tt> method
+	 * with a key that is equal to the original key.
+	 *
+	 * @param key key with which the specified value is to be associated
+	 * @param value value to be associated with the specified key
+	 * @return the previous value associated with <tt>key</tt>, or
+	 *         <tt>null</tt> if there was no mapping for <tt>key</tt>
+	 * @throws NullPointerException if the specified key or value is null
+	 */
+	public V put(K key, V value) {
+		if (value == null)
+			throw new NullPointerException();
+		int hash = hashOf(key);
+		return segmentFor(hash).put(key, hash, value, false);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 *
+	 * @return the previous value associated with the specified key,
+	 *         or <tt>null</tt> if there was no mapping for the key
+	 * @throws NullPointerException if the specified key or value is null
+	 */
+	public V putIfAbsent(K key, V value) {
+		if (value == null)
+			throw new NullPointerException();
+		int hash = hashOf(key);
+		return segmentFor(hash).put(key, hash, value, true);
+	}
+
+	/**
+	 * Copies all of the mappings from the specified map to this one.
+	 * These mappings replace any mappings that this map had for any of the
+	 * keys currently in the specified map.
+	 *
+	 * @param m mappings to be stored in this map
+	 */
+	public void putAll(Map<? extends K, ? extends V> m) {
+		for (Map.Entry<? extends K, ? extends V> e : m.entrySet())
+			put(e.getKey(), e.getValue());
+	}
+
+	/**
+	 * Removes the key (and its corresponding value) from this map.
+	 * This method does nothing if the key is not in the map.
+	 *
+	 * @param  key the key that needs to be removed
+	 * @return the previous value associated with <tt>key</tt>, or
+	 *         <tt>null</tt> if there was no mapping for <tt>key</tt>
+	 * @throws NullPointerException if the specified key is null
+	 */
+	public V remove(Object key) {
+		int hash = hashOf(key);
+		return segmentFor(hash).remove(key, hash, null, false);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 *
+	 * @throws NullPointerException if the specified key is null
+	 */
+	public boolean remove(Object key, Object value) {
+		int hash = hashOf(key);
+		if (value == null)
+			return false;
+		return segmentFor(hash).remove(key, hash, value, false) != null;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 *
+	 * @throws NullPointerException if any of the arguments are null
+	 */
+	public boolean replace(K key, V oldValue, V newValue) {
+		if (oldValue == null || newValue == null)
+			throw new NullPointerException();
+		int hash = hashOf(key);
+		return segmentFor(hash).replace(key, hash, oldValue, newValue);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 *
+	 * @return the previous value associated with the specified key,
+	 *         or <tt>null</tt> if there was no mapping for the key
+	 * @throws NullPointerException if the specified key or value is null
+	 */
+	public V replace(K key, V value) {
+		if (value == null)
+			throw new NullPointerException();
+		int hash = hashOf(key);
+		return segmentFor(hash).replace(key, hash, value);
+	}
+
+	/**
+	 * Removes all of the mappings from this map.
+	 */
+	public void clear() {
+		for (int i = 0; i < segments.length; ++i)
+			segments[i].clear();
+	}
+
+	/**
+	 * Removes any stale entries whose keys have been finalized. Use of this
+	 * method is normally not necessary since stale entries are automatically
+	 * removed lazily, when blocking operations are required. However, there
+	 * are some cases where this operation should be performed eagerly, such
+	 * as cleaning up old references to a ClassLoader in a multi-classloader
+	 * environment.
+	 *
+	 * Note: this method will acquire locks, one at a time, across all segments
+	 * of this table, so if it is to be used, it should be used sparingly.
+	 */
+	public void purgeStaleEntries() {
+		for (int i = 0; i < segments.length; ++i)
+			segments[i].removeStale();
+	}
+
+
+	/**
+	 * Returns a {@link Set} view of the keys contained in this map.
+	 * The set is backed by the map, so changes to the map are
+	 * reflected in the set, and vice-versa.  The set supports element
+	 * removal, which removes the corresponding mapping from this map,
+	 * via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,
+	 * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt>
+	 * operations.  It does not support the <tt>add</tt> or
+	 * <tt>addAll</tt> operations.
+	 *
+	 * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator
+	 * that will never throw {@link ConcurrentModificationException},
+	 * and guarantees to traverse elements as they existed upon
+	 * construction of the iterator, and may (but is not guaranteed to)
+	 * reflect any modifications subsequent to construction.
+	 */
+	public Set<K> keySet() {
+		Set<K> ks = keySet;
+		return (ks != null) ? ks : (keySet = new KeySet());
+	}
+
+	/**
+	 * Returns a {@link Collection} view of the values contained in this map.
+	 * The collection is backed by the map, so changes to the map are
+	 * reflected in the collection, and vice-versa.  The collection
+	 * supports element removal, which removes the corresponding
+	 * mapping from this map, via the <tt>Iterator.remove</tt>,
+	 * <tt>Collection.remove</tt>, <tt>removeAll</tt>,
+	 * <tt>retainAll</tt>, and <tt>clear</tt> operations.  It does not
+	 * support the <tt>add</tt> or <tt>addAll</tt> operations.
+	 *
+	 * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator
+	 * that will never throw {@link ConcurrentModificationException},
+	 * and guarantees to traverse elements as they existed upon
+	 * construction of the iterator, and may (but is not guaranteed to)
+	 * reflect any modifications subsequent to construction.
+	 */
+	public Collection<V> values() {
+		Collection<V> vs = values;
+		return (vs != null) ? vs : (values = new Values());
+	}
+
+	/**
+	 * Returns a {@link Set} view of the mappings contained in this map.
+	 * The set is backed by the map, so changes to the map are
+	 * reflected in the set, and vice-versa.  The set supports element
+	 * removal, which removes the corresponding mapping from the map,
+	 * via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,
+	 * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt>
+	 * operations.  It does not support the <tt>add</tt> or
+	 * <tt>addAll</tt> operations.
+	 *
+	 * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator
+	 * that will never throw {@link ConcurrentModificationException},
+	 * and guarantees to traverse elements as they existed upon
+	 * construction of the iterator, and may (but is not guaranteed to)
+	 * reflect any modifications subsequent to construction.
+	 */
+	public Set<Map.Entry<K,V>> entrySet() {
+		Set<Map.Entry<K,V>> es = entrySet;
+		return (es != null) ? es : (entrySet = new EntrySet());
+	}
+
+	/**
+	 * Returns an enumeration of the keys in this table.
+	 *
+	 * @return an enumeration of the keys in this table
+	 * @see #keySet()
+	 */
+	public Enumeration<K> keys() {
+		return new KeyIterator();
+	}
+
+	/**
+	 * Returns an enumeration of the values in this table.
+	 *
+	 * @return an enumeration of the values in this table
+	 * @see #values()
+	 */
+	public Enumeration<V> elements() {
+		return new ValueIterator();
+	}
+
+	/* ---------------- Iterator Support -------------- */
+
+	abstract class HashIterator {
+		int nextSegmentIndex;
+		int nextTableIndex;
+		HashEntry<K,V>[] currentTable;
+		HashEntry<K, V> nextEntry;
+		HashEntry<K, V> lastReturned;
+		K currentKey; // Strong reference to weak key (prevents gc)
+
+		HashIterator() {
+			nextSegmentIndex = segments.length - 1;
+			nextTableIndex = -1;
+			advance();
+		}
+
+		public boolean hasMoreElements() { return hasNext(); }
+
+		final void advance() {
+			if (nextEntry != null && (nextEntry = nextEntry.next) != null)
+				return;
+
+			while (nextTableIndex >= 0) {
+				if ( (nextEntry = currentTable[nextTableIndex--]) != null)
+					return;
+			}
+
+			while (nextSegmentIndex >= 0) {
+				Segment<K,V> seg = segments[nextSegmentIndex--];
+				if (seg.count != 0) {
+					currentTable = seg.table;
+					for (int j = currentTable.length - 1; j >= 0; --j) {
+						if ( (nextEntry = currentTable[j]) != null) {
+							nextTableIndex = j - 1;
+							return;
+						}
+					}
+				}
+			}
+		}
+
+		public boolean hasNext() {
+			while (nextEntry != null) {
+				if (nextEntry.key() != null)
+					return true;
+				advance();
+			}
+
+			return false;
+		}
+
+		HashEntry<K,V> nextEntry() {
+			do {
+				if (nextEntry == null)
+					throw new NoSuchElementException();
+
+				lastReturned = nextEntry;
+				currentKey = lastReturned.key();
+				advance();
+			} while (currentKey == null); // Skip GC'd keys
+
+			return lastReturned;
+		}
+
+		public void remove() {
+			if (lastReturned == null)
+				throw new IllegalStateException();
+			ConcurrentReferenceHashMap.this.remove(currentKey);
+			lastReturned = null;
+		}
+	}
+
+	final class KeyIterator
+			extends HashIterator
+			implements Iterator<K>, Enumeration<K>
+	{
+		public K next()        { return super.nextEntry().key(); }
+		public K nextElement() { return super.nextEntry().key(); }
+	}
+
+	final class ValueIterator
+			extends HashIterator
+			implements Iterator<V>, Enumeration<V>
+	{
+		public V next()        { return super.nextEntry().value(); }
+		public V nextElement() { return super.nextEntry().value(); }
+	}
+
+	/*
+		  * This class is needed for JDK5 compatibility.
+		  */
+	static class SimpleEntry<K, V> implements Entry<K, V>,
+			java.io.Serializable {
+		private static final long serialVersionUID = -8499721149061103585L;
+
+		private final K key;
+		private V value;
+
+		public SimpleEntry(K key, V value) {
+			this.key = key;
+			this.value = value;
+		}
+
+		public SimpleEntry(Entry<? extends K, ? extends V> entry) {
+			this.key = entry.getKey();
+			this.value = entry.getValue();
+		}
+
+		public K getKey() {
+			return key;
+		}
+
+		public V getValue() {
+			return value;
+		}
+
+		public V setValue(V value) {
+			V oldValue = this.value;
+			this.value = value;
+			return oldValue;
+		}
+
+		public boolean equals(Object o) {
+			if (!(o instanceof Map.Entry))
+				return false;
+			Map.Entry<?,?> e = (Map.Entry<?,?>) o;
+			return eq(key, e.getKey()) && eq(value, e.getValue());
+		}
+
+		public int hashCode() {
+			return (key == null ? 0 : key.hashCode())
+					^ (value == null ? 0 : value.hashCode());
+		}
+
+		public String toString() {
+			return key + "=" + value;
+		}
+
+		private static boolean eq(Object o1, Object o2) {
+			return o1 == null ? o2 == null : o1.equals(o2);
+		}
+	}
+
+
+	/**
+	 * Custom Entry class used by EntryIterator.next(), that relays setValue
+	 * changes to the underlying map.
+	 */
+	final class WriteThroughEntry extends SimpleEntry<K,V>
+	{
+		private static final long serialVersionUID = -7900634345345313646L;
+
+		WriteThroughEntry(K k, V v) {
+			super(k,v);
+		}
+
+		/**
+		 * Set our entry's value and write through to the map. The
+		 * value to return is somewhat arbitrary here. Since a
+		 * WriteThroughEntry does not necessarily track asynchronous
+		 * changes, the most recent "previous" value could be
+		 * different from what we return (or could even have been
+		 * removed in which case the put will re-establish). We do not
+		 * and cannot guarantee more.
+		 */
+		public V setValue(V value) {
+			if (value == null) throw new NullPointerException();
+			V v = super.setValue(value);
+			ConcurrentReferenceHashMap.this.put(getKey(), value);
+			return v;
+		}
+	}
+
+	final class EntryIterator
+			extends HashIterator
+			implements Iterator<Entry<K,V>>
+	{
+		public Map.Entry<K,V> next() {
+			HashEntry<K,V> e = super.nextEntry();
+			return new WriteThroughEntry(e.key(), e.value());
+		}
+	}
+
+	final class KeySet extends AbstractSet<K> {
+		public Iterator<K> iterator() {
+			return new KeyIterator();
+		}
+		public int size() {
+			return ConcurrentReferenceHashMap.this.size();
+		}
+		public boolean isEmpty() {
+			return ConcurrentReferenceHashMap.this.isEmpty();
+		}
+		public boolean contains(Object o) {
+			return ConcurrentReferenceHashMap.this.containsKey(o);
+		}
+		public boolean remove(Object o) {
+			return ConcurrentReferenceHashMap.this.remove(o) != null;
+		}
+		public void clear() {
+			ConcurrentReferenceHashMap.this.clear();
+		}
+	}
+
+	final class Values extends AbstractCollection<V> {
+		public Iterator<V> iterator() {
+			return new ValueIterator();
+		}
+		public int size() {
+			return ConcurrentReferenceHashMap.this.size();
+		}
+		public boolean isEmpty() {
+			return ConcurrentReferenceHashMap.this.isEmpty();
+		}
+		public boolean contains(Object o) {
+			return ConcurrentReferenceHashMap.this.containsValue(o);
+		}
+		public void clear() {
+			ConcurrentReferenceHashMap.this.clear();
+		}
+	}
+
+	final class EntrySet extends AbstractSet<Map.Entry<K,V>> {
+		public Iterator<Map.Entry<K,V>> iterator() {
+			return new EntryIterator();
+		}
+		public boolean contains(Object o) {
+			if (!(o instanceof Map.Entry))
+				return false;
+			Map.Entry<?,?> e = (Map.Entry<?,?>)o;
+			V v = ConcurrentReferenceHashMap.this.get(e.getKey());
+			return v != null && v.equals(e.getValue());
+		}
+		public boolean remove(Object o) {
+			if (!(o instanceof Map.Entry))
+				return false;
+			Map.Entry<?,?> e = (Map.Entry<?,?>)o;
+			return ConcurrentReferenceHashMap.this.remove(e.getKey(), e.getValue());
+		}
+		public int size() {
+			return ConcurrentReferenceHashMap.this.size();
+		}
+		public boolean isEmpty() {
+			return ConcurrentReferenceHashMap.this.isEmpty();
+		}
+		public void clear() {
+			ConcurrentReferenceHashMap.this.clear();
+		}
+	}
+
+	/* ---------------- Serialization Support -------------- */
+
+	/**
+	 * Save the state of the <tt>ConcurrentReferenceHashMap</tt> instance to a
+	 * stream (i.e., serialize it).
+	 * @param s the stream
+	 * @serialData
+	 * the key (Object) and value (Object)
+	 * for each key-value mapping, followed by a null pair.
+	 * The key-value mappings are emitted in no particular order.
+	 */
+	private void writeObject(java.io.ObjectOutputStream s) throws IOException  {
+		s.defaultWriteObject();
+
+		for (int k = 0; k < segments.length; ++k) {
+			Segment<K,V> seg = segments[k];
+			seg.lock();
+			try {
+				HashEntry<K,V>[] tab = seg.table;
+				for (int i = 0; i < tab.length; ++i) {
+					for (HashEntry<K,V> e = tab[i]; e != null; e = e.next) {
+						K key = e.key();
+						if (key == null) // Skip GC'd keys
+							continue;
+
+						s.writeObject(key);
+						s.writeObject(e.value());
+					}
+				}
+			} finally {
+				seg.unlock();
+			}
+		}
+		s.writeObject(null);
+		s.writeObject(null);
+	}
+
+	/**
+	 * Reconstitute the <tt>ConcurrentReferenceHashMap</tt> instance from a
+	 * stream (i.e., deserialize it).
+	 * @param s the stream
+	 */
+	@SuppressWarnings("unchecked")
+	private void readObject(java.io.ObjectInputStream s)
+			throws IOException, ClassNotFoundException  {
+		s.defaultReadObject();
+
+		// Initialize each segment to be minimally sized, and let grow.
+		for (int i = 0; i < segments.length; ++i) {
+			segments[i].setTable(new HashEntry[1]);
+		}
+
+		// Read the keys and values, and put the mappings in the table
+		for (;;) {
+			K key = (K) s.readObject();
+			V value = (V) s.readObject();
+			if (key == null)
+				break;
+			put(key, value);
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/Contracts.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/Contracts.java
new file mode 100644
index 0000000..0adcd1f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/Contracts.java
@@ -0,0 +1,82 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2012 SERLI
+ */
+public final class Contracts {
+
+	private static final Log log = LoggerFactory.make();
+
+	private Contracts() {
+	}
+
+	public static void assertNotNull(Object o) {
+		assertNotNull( o, MESSAGES.mustNotBeNull() );
+	}
+
+	/**
+	 * Asserts that the given object is not {@code null}.
+	 *
+	 * @param o The object to check.
+	 * @param message A message text which will be used as message of the resulting
+	 * exception if the given object is {@code null}.
+	 *
+	 * @throws IllegalArgumentException In case the given object is {@code null}.
+	 */
+	public static void assertNotNull(Object o, String message) {
+		if ( o == null ) {
+			throw log.getIllegalArgumentException( message );
+		}
+	}
+
+	/**
+	 * Asserts that the given object is not {@code null}.
+	 *
+	 * @param o The object to check.
+	 * @param name The name of the value to check. A message of the form
+	 * "<name> must not be null" will be used as message of
+	 * the resulting exception if the given object is {@code null}.
+	 *
+	 * @throws IllegalArgumentException In case the given object is {@code null}.
+	 */
+	public static void assertValueNotNull(Object o, String name) {
+		if ( o == null ) {
+			throw log.getIllegalArgumentException( MESSAGES.mustNotBeNull( name ) );
+		}
+	}
+
+	public static void assertTrue(boolean condition, String message) {
+		if ( !condition ) {
+			throw log.getIllegalArgumentException( message );
+		}
+	}
+
+	public static void assertNotEmpty(String s, String message) {
+		if ( s.length() == 0 ) {
+			throw log.getIllegalArgumentException( message );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/IdentitySet.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/IdentitySet.java
new file mode 100644
index 0000000..3e79829
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/IdentitySet.java
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import java.util.Collection;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Set that compares object by identity rather than equality. Wraps around a <code>IdentityHashMap</code>
+ *
+ * @author Emmanuel Bernard
+ */
+public class IdentitySet implements Set {
+	private Map<Object, Object> map;
+	private Object CONTAINS = new Object();
+
+	public IdentitySet() {
+		this( 10 );
+	}
+
+	public IdentitySet(int size) {
+		this.map = new IdentityHashMap<Object, Object>( size );
+	}
+
+	public int size() {
+		return map.size();
+	}
+
+	public boolean isEmpty() {
+		return map.isEmpty();
+	}
+
+	public boolean contains(Object o) {
+		return map.containsKey( o );
+	}
+
+	public Iterator iterator() {
+		return map.keySet().iterator();
+	}
+
+	public Object[] toArray() {
+		return map.keySet().toArray();
+	}
+
+	public boolean add(Object o) {
+		return map.put( o, CONTAINS ) == null;
+	}
+
+	public boolean remove(Object o) {
+		return map.remove( o ) == CONTAINS;
+	}
+
+	public boolean addAll(Collection c) {
+		boolean doThing = false;
+		for ( Object o : c ) {
+			doThing = doThing || add( o );
+		}
+		return doThing;
+	}
+
+	public void clear() {
+		map.clear();
+	}
+
+	public boolean removeAll(Collection c) {
+		boolean remove = false;
+		for ( Object o : c ) {
+			remove = remove || remove( o );
+		}
+		return remove;
+	}
+
+	public boolean retainAll(Collection c) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean containsAll(Collection c) {
+		for ( Object o : c ) {
+			if ( !contains( o ) ) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public Object[] toArray(Object[] a) {
+		return map.keySet().toArray( a );
+	}
+
+	@Override
+	public String toString() {
+		return "IdentitySet{" +
+				"map=" + map +
+				'}';
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/LazyValidatorFactory.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/LazyValidatorFactory.java
new file mode 100644
index 0000000..adb4c65
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/LazyValidatorFactory.java
@@ -0,0 +1,231 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
+import javax.validation.Configuration;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.Validation;
+import javax.validation.ValidationException;
+import javax.validation.ValidationProviderResolver;
+import javax.validation.Validator;
+import javax.validation.ValidatorContext;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.ValidationProvider;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.internal.util.privilegedactions.GetClassLoader;
+import org.hibernate.validator.internal.util.privilegedactions.LoadClass;
+
+/**
+ * This class lazily initialize the ValidatorFactory on the first usage
+ * One benefit is that no domain class is loaded until the ValidatorFactory is really needed.
+ * Useful to avoid loading classes before JPA is initialized and has enhanced its classes.
+ *
+ * When no {@code Configuration} is passed, the provider is Hibernate Validator.
+ *
+ * This class is used by JBoss AS 6.
+ *
+ * Experimental, not considered a public API
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ *
+ * @deprecated Will be removed in a future release.
+ */
+ at Deprecated
+public class LazyValidatorFactory implements ValidatorFactory {
+	private static final Log log = LoggerFactory.make();
+	private final Configuration<?> configuration;
+	private volatile ValidatorFactory delegate; //use as a barrier
+
+	/**
+	 * Use the default ValidatorFactory creation routine
+	 */
+	public LazyValidatorFactory() {
+		this( null );
+	}
+
+	public LazyValidatorFactory(Configuration<?> configuration) {
+		this.configuration = configuration;
+	}
+
+	private ValidatorFactory getDelegate() {
+		ValidatorFactory result = delegate;
+		if ( result == null ) {
+			synchronized ( this ) {
+				result = delegate;
+				if ( result == null ) {
+					delegate = result = initFactory();
+				}
+			}
+		}
+		return result;
+	}
+
+	public Validator getValidator() {
+		return getDelegate().getValidator();
+	}
+
+	//we can initialize several times that's ok
+
+	private ValidatorFactory initFactory() {
+		if ( configuration == null ) {
+			return Validation
+					.byDefaultProvider()
+					.providerResolver( new HibernateProviderResolver() )
+					.configure()
+					.buildValidatorFactory();
+		}
+		else {
+			return configuration.buildValidatorFactory();
+		}
+	}
+
+	public ValidatorContext usingContext() {
+		return getDelegate().usingContext();
+	}
+
+	public MessageInterpolator getMessageInterpolator() {
+		return getDelegate().getMessageInterpolator();
+	}
+
+	public TraversableResolver getTraversableResolver() {
+		return getDelegate().getTraversableResolver();
+	}
+
+	public ConstraintValidatorFactory getConstraintValidatorFactory() {
+		return getDelegate().getConstraintValidatorFactory();
+	}
+
+	public <T> T unwrap(Class<T> clazz) {
+		return getDelegate().unwrap( clazz );
+	}
+
+	private static class HibernateProviderResolver implements ValidationProviderResolver {
+		//cache per classloader for an appropriate discovery
+		//keep them in a weak hash map to avoid memory leaks and allow proper hot redeployment
+		private static final Map<ClassLoader, List<ValidationProvider<?>>> providersPerClassloader = new WeakHashMap<ClassLoader, List<ValidationProvider<?>>>();
+		private static final String SERVICES_FILE = "META-INF/services/" + ValidationProvider.class.getName();
+		private static final String HIBERNATE_VALIDATOR_PROVIDER_NAME = HibernateValidator.class.getName();
+
+		public List<ValidationProvider<?>> getValidationProviders() {
+			ClassLoader classloader = GetClassLoader.fromContext().run();
+			if ( classloader == null ) {
+				classloader = GetClassLoader.fromClass( HibernateProviderResolver.class ).run();
+			}
+
+			List<ValidationProvider<?>> providers;
+			synchronized ( providersPerClassloader ) {
+				providers = providersPerClassloader.get( classloader );
+			}
+
+			if ( providers == null ) {
+				List<String> providerNames = loadProviderNamesFromServiceFile( classloader );
+				providers = instantiateProviders( providerNames );
+			}
+
+			synchronized ( providersPerClassloader ) {
+				providersPerClassloader.put( classloader, Collections.unmodifiableList( providers ) );
+			}
+
+			return providers;
+		}
+
+		private List<ValidationProvider<?>> instantiateProviders(List<String> providerNames) {
+			List<ValidationProvider<?>> providers = new ArrayList<ValidationProvider<?>>();
+			Class<?> providerClass;
+			for ( String providerName : providerNames ) {
+				try {
+					providerClass = LoadClass.action( providerName, HibernateProviderResolver.class ).run();
+				}
+				catch ( ValidationException e ) {
+					// ignore - we don't want to  fail the whole loading because of a black sheep. Hibernate Validator
+					// will be added either way
+					log.unableToLoadProviderClass( providerName );
+					continue;
+				}
+
+				try {
+					providers.add( (ValidationProvider) providerClass.newInstance() );
+				}
+				catch ( IllegalAccessException e ) {
+					throw log.getUnableToInstantiateBeanValidationProviderException( providerNames, e );
+				}
+				catch ( InstantiationException e ) {
+					throw log.getUnableToInstantiateBeanValidationProviderException( providerNames, e );
+				}
+			}
+			return providers;
+		}
+
+		private List<String> loadProviderNamesFromServiceFile(ClassLoader classloader) {
+			List<String> providerNames = new ArrayList<String>();
+			try {
+				Enumeration<URL> providerDefinitions = classloader.getResources( SERVICES_FILE );
+				while ( providerDefinitions.hasMoreElements() ) {
+					URL url = providerDefinitions.nextElement();
+					InputStream stream = url.openStream();
+					try {
+						BufferedReader reader = new BufferedReader( new InputStreamReader( stream ), 100 );
+						String name = reader.readLine();
+						while ( name != null ) {
+							name = name.trim();
+							if ( !name.startsWith( "#" ) ) {
+								providerNames.add( name );
+							}
+							name = reader.readLine();
+						}
+					}
+					finally {
+						stream.close();
+					}
+				}
+			}
+			catch ( IOException e ) {
+				throw log.getUnableToReadServicesFileException( SERVICES_FILE, e );
+			}
+
+			// we want to make sure that Hibernate Validator is in the list and on the first position. This
+			// way Hibernate Validator will be always the default provider is nothing else is specified
+			int index = providerNames.indexOf( HIBERNATE_VALIDATOR_PROVIDER_NAME );
+			if ( index < 0 ) {
+				providerNames.add( 0, HIBERNATE_VALIDATOR_PROVIDER_NAME );
+			}
+			else if ( index > 0 ) {
+				providerNames.remove( HIBERNATE_VALIDATOR_PROVIDER_NAME );
+				providerNames.add( 0, HIBERNATE_VALIDATOR_PROVIDER_NAME );
+			}
+
+			return providerNames;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/ModUtil.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/ModUtil.java
new file mode 100644
index 0000000..59e26c9
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/ModUtil.java
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import java.util.List;
+
+/**
+ * Helper class for modulo 10/11.
+ *
+ * @author Hardy Ferentschik
+ */
+public final class ModUtil {
+	private ModUtil() {
+	}
+
+	/**
+	 * Check if the input passes the mod11 test
+	 *
+	 * @param digits The digits over which to calculate the mod 11 algorithm
+	 * @param multiplier the multiplier for the modulo algorithm
+	 *
+	 * @return {@code true} if the mod 11 result matches the check digit, {@code false} otherwise
+	 */
+	public static boolean passesMod11Test(final List<Integer> digits, int multiplier) {
+		int modResult = mod11( digits, multiplier );
+		return modResult == 0;
+	}
+
+	/**
+	 * Mod10 (Luhn) algorithm implementation
+	 *
+	 * @param digits The digits over which to calculate the checksum
+	 * @param multiplier Multiplier used in the algorithm
+	 *
+	 * @return {@code true} if the mod 10 result matches the check digit, {@code false} otherwise
+	 */
+	public static boolean passesMod10Test(final List<Integer> digits, final int multiplier) {
+		int modResult = mod10( digits, multiplier );
+		return modResult == 0;
+	}
+
+	/**
+	 * Calculate Mod11
+	 *
+	 * @param digits the digits for which to calculate the checksum
+	 * @param multiplier multiplier for the modulo algorithm
+	 *
+	 * @return the result of the mod11 calculation
+	 */
+	private static int mod11(final List<Integer> digits, final int multiplier) {
+		int sum = 0;
+		int weight = 1;
+
+		for ( int index = digits.size() - 1; index >= 0; index-- ) {
+			sum += digits.get( index ) * weight++;
+			if ( weight > multiplier ) {
+				weight = 2;
+			}
+		}
+		int mod = 11 - ( sum % 11 );
+		return ( mod > 9 ) ? 0 : mod;
+	}
+
+	/**
+	 * Calculate Mod10 (Luhn)
+	 *
+	 * @param digits the digits for which to calculate the checksum
+	 * @param multiplier multiplier for the modulo algorithm
+	 *
+	 * @return the result of the mod10 calculation
+	 */
+	private static int mod10(final List<Integer> digits, final int multiplier) {
+		int sum = 0;
+		boolean even = false;
+		for ( int index = digits.size() - 1; index >= 0; index-- ) {
+			int digit = digits.get( index );
+			if ( even ) {
+				digit *= multiplier;
+			}
+			if ( digit > 9 ) {
+				digit = digit / 10 + digit % 10;
+			}
+			sum += digit;
+			even = !even;
+		}
+		return sum % 10;
+	}
+}
+
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/ReflectionHelper.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/ReflectionHelper.java
new file mode 100644
index 0000000..3420541
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/ReflectionHelper.java
@@ -0,0 +1,787 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util;
+
+import java.beans.Introspector;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.security.AccessController;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.internal.util.privilegedactions.ConstructorInstance;
+import org.hibernate.validator.internal.util.privilegedactions.GetAnnotationParameter;
+import org.hibernate.validator.internal.util.privilegedactions.GetClassLoader;
+import org.hibernate.validator.internal.util.privilegedactions.GetConstructor;
+import org.hibernate.validator.internal.util.privilegedactions.GetDeclaredField;
+import org.hibernate.validator.internal.util.privilegedactions.GetDeclaredFields;
+import org.hibernate.validator.internal.util.privilegedactions.GetDeclaredMethod;
+import org.hibernate.validator.internal.util.privilegedactions.GetDeclaredMethods;
+import org.hibernate.validator.internal.util.privilegedactions.GetMethod;
+import org.hibernate.validator.internal.util.privilegedactions.GetMethodFromPropertyName;
+import org.hibernate.validator.internal.util.privilegedactions.GetMethods;
+import org.hibernate.validator.internal.util.privilegedactions.LoadClass;
+import org.hibernate.validator.internal.util.privilegedactions.NewInstance;
+import org.hibernate.validator.internal.util.privilegedactions.SetAccessibility;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * Some reflection utility methods. Where necessary calls will be performed as {@code PrivilegedAction} which is necessary
+ * for situations where a security manager is in place.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class ReflectionHelper {
+
+	private static final Log log = LoggerFactory.make();
+
+	private static String[] PROPERTY_ACCESSOR_PREFIXES = { "is", "get", "has" };
+
+	private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPES;
+
+	static {
+		Map<Class<?>, Class<?>> temp = newHashMap( 9 );
+
+		temp.put( boolean.class, Boolean.class );
+		temp.put( char.class, Character.class );
+		temp.put( double.class, Double.class );
+		temp.put( float.class, Float.class );
+		temp.put( long.class, Long.class );
+		temp.put( int.class, Integer.class );
+		temp.put( short.class, Short.class );
+		temp.put( byte.class, Byte.class );
+		temp.put( Void.TYPE, Void.TYPE );
+
+		PRIMITIVE_TO_WRAPPER_TYPES = Collections.unmodifiableMap( temp );
+	}
+
+	/**
+	 * Private constructor in order to avoid instantiation.
+	 */
+	private ReflectionHelper() {
+	}
+
+	public static ClassLoader getClassLoaderFromContext() {
+		ClassLoader loader;
+		GetClassLoader action = GetClassLoader.fromContext();
+		if ( System.getSecurityManager() != null ) {
+			loader = AccessController.doPrivileged( action );
+		}
+		else {
+			loader = action.run();
+		}
+		return loader;
+	}
+
+	public static ClassLoader getClassLoaderFromClass(Class<?> clazz) {
+		ClassLoader loader;
+		GetClassLoader action = GetClassLoader.fromClass( clazz );
+		if ( System.getSecurityManager() != null ) {
+			loader = AccessController.doPrivileged( action );
+		}
+		else {
+			loader = action.run();
+		}
+		return loader;
+	}
+
+	public static Class<?> loadClass(String className, Class<?> caller) {
+		LoadClass action = LoadClass.action( className, caller );
+		if ( System.getSecurityManager() != null ) {
+			return AccessController.doPrivileged( action );
+		}
+		else {
+			return action.run();
+		}
+	}
+
+	public static <T> Constructor<T> getConstructor(Class<T> clazz, Class<?>... params) {
+		Constructor<T> constructor;
+		GetConstructor<T> action = GetConstructor.action( clazz, params );
+		if ( System.getSecurityManager() != null ) {
+			constructor = AccessController.doPrivileged( action );
+		}
+		else {
+			constructor = action.run();
+		}
+		return constructor;
+	}
+
+	public static <T> T newInstance(Class<T> clazz, String message) {
+		T instance;
+		NewInstance<T> newInstance = NewInstance.action( clazz, message );
+		if ( System.getSecurityManager() != null ) {
+			instance = AccessController.doPrivileged( newInstance );
+		}
+		else {
+			instance = newInstance.run();
+		}
+		return instance;
+	}
+
+	public static <T> T newConstructorInstance(Constructor<T> constructor, Object... initArgs) {
+		T instance;
+		ConstructorInstance<T> newInstance = ConstructorInstance.action( constructor, initArgs );
+		if ( System.getSecurityManager() != null ) {
+			instance = AccessController.doPrivileged( newInstance );
+		}
+		else {
+			instance = newInstance.run();
+		}
+		return instance;
+	}
+
+	public static <T> T getAnnotationParameter(Annotation annotation, String parameterName, Class<T> type) {
+		T result;
+		GetAnnotationParameter<T> action = GetAnnotationParameter.action( annotation, parameterName, type );
+		if ( System.getSecurityManager() != null ) {
+			result = AccessController.doPrivileged( action );
+		}
+		else {
+			result = action.run();
+		}
+		return result;
+	}
+
+	/**
+	 * Process bean properties getter by applying the JavaBean naming conventions.
+	 *
+	 * @param member the member for which to get the property name.
+	 *
+	 * @return The bean method name with the "is" or "get" prefix stripped off, <code>null</code>
+	 *         the method name id not according to the JavaBeans standard.
+	 */
+	public static String getPropertyName(Member member) {
+		String name = null;
+
+		if ( member instanceof Field ) {
+			name = member.getName();
+		}
+
+		if ( member instanceof Method ) {
+			String methodName = member.getName();
+			for ( String prefix : PROPERTY_ACCESSOR_PREFIXES ) {
+				if ( methodName.startsWith( prefix ) ) {
+					name = Introspector.decapitalize( methodName.substring( prefix.length() ) );
+				}
+			}
+		}
+		return name;
+	}
+
+	/**
+	 * Checks whether the given method is a valid JavaBeans getter method,
+	 * meaning its name starts with "is" or "has" and it has no parameters.
+	 *
+	 * @param method The method of interest.
+	 *
+	 * @return {@code true}, if the given method is a JavaBeans getter method,
+	 *         {@code false} otherwise.
+	 */
+	public static boolean isGetterMethod(Method method) {
+		return getPropertyName( method ) != null && method.getParameterTypes().length == 0;
+	}
+
+	/**
+	 * Checks whether the property with the specified name and type exists on the given class.
+	 *
+	 * @param clazz The class to check for the property. Cannot be {@code null}.
+	 * @param property The property name without 'is', 'get' or 'has'. Cannot be {@code null} or empty.
+	 * @param elementType The element type. Either {@code ElementType.FIELD} or {@code ElementType METHOD}.
+	 *
+	 * @return {@code true} is the property and can be access via the specified type, {@code false} otherwise.
+	 */
+	public static boolean propertyExists(Class<?> clazz, String property, ElementType elementType) {
+		return getMember( clazz, property, elementType ) != null;
+	}
+
+	/**
+	 * Returns the member with the given name and type.
+	 *
+	 * @param clazz The class from which to retrieve the member. Cannot be {@code null}.
+	 * @param property The property name without 'is', 'get' or 'has'. Cannot be {@code null} or empty.
+	 * @param elementType The element type. Either {@code ElementType.FIELD} or {@code ElementType METHOD}.
+	 *
+	 * @return the member which matching the name and type or {@code null} if no such member exists.
+	 */
+	public static Member getMember(Class<?> clazz, String property, ElementType elementType) {
+
+		Contracts.assertNotNull( clazz, MESSAGES.classCannotBeNull() );
+
+		if ( property == null || property.length() == 0 ) {
+			throw log.getPropertyNameCannotBeNullOrEmptyException();
+		}
+
+		if ( !( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) ) {
+			throw log.getElementTypeHasToBeFieldOrMethodException();
+		}
+
+		Member member = null;
+		if ( ElementType.FIELD.equals( elementType ) ) {
+			GetDeclaredField action = GetDeclaredField.action( clazz, property );
+			if ( System.getSecurityManager() != null ) {
+				member = AccessController.doPrivileged( action );
+			}
+			else {
+				member = action.run();
+			}
+		}
+		else {
+			String methodName = property.substring( 0, 1 ).toUpperCase() + property.substring( 1 );
+			for ( String prefix : PROPERTY_ACCESSOR_PREFIXES ) {
+				GetMethod action = GetMethod.action( clazz, prefix + methodName );
+				if ( System.getSecurityManager() != null ) {
+					member = AccessController.doPrivileged( action );
+				}
+				else {
+					member = action.run();
+				}
+				if ( member != null ) {
+					break;
+				}
+			}
+		}
+		return member;
+	}
+
+	/**
+	 * Returns the type of the field of return type of a method.
+	 *
+	 * @param member the member for which to get the type.
+	 *
+	 * @return Returns the type of the field of return type of a method.
+	 */
+	public static Class<?> getType(Member member) {
+		Class<?> type = null;
+		if ( member instanceof Field ) {
+			type = ( (Field) member ).getType();
+		}
+
+		if ( member instanceof Method ) {
+			type = ( (Method) member ).getReturnType();
+		}
+		return type;
+	}
+
+	/**
+	 * @param member The <code>Member</code> instance for which to retrieve the type.
+	 *
+	 * @return Returns the <code>Type</code> of the given <code>Field</code> or <code>Method</code>.
+	 *
+	 * @throws IllegalArgumentException in case <code>member</code> is not a <code>Field</code> or <code>Method</code>.
+	 */
+	public static Type typeOf(Member member) {
+		Type type;
+		if ( member instanceof Field ) {
+			type = ( (Field) member ).getGenericType();
+		}
+		else if ( member instanceof Method ) {
+			type = ( (Method) member ).getGenericReturnType();
+		}
+		else {
+			throw log.getMemberIsNeitherAFieldNorAMethodException( member );
+		}
+		if ( type instanceof TypeVariable ) {
+			type = TypeHelper.getErasedType( type );
+		}
+		return type;
+	}
+
+	/**
+	 * Returns the type of the parameter of the given method with the given parameter index.
+	 *
+	 * @param method The method of interest.
+	 * @param parameterIndex The index of the parameter for which the type should be returned.
+	 *
+	 * @return The erased type.
+	 */
+	public static Type typeOf(Method method, int parameterIndex) {
+
+		Type type = method.getGenericParameterTypes()[parameterIndex];
+
+		if ( type instanceof TypeVariable ) {
+			type = TypeHelper.getErasedType( type );
+		}
+		return type;
+	}
+
+
+	public static Object getValue(Member member, Object object) {
+		Object value = null;
+
+		if ( member instanceof Method ) {
+			Method method = (Method) member;
+			try {
+				value = method.invoke( object );
+			}
+			catch ( IllegalAccessException e ) {
+				throw log.getUnableToAccessMemberException( method.getName(), e );
+			}
+			catch ( InvocationTargetException e ) {
+				throw log.getUnableToAccessMemberException( method.getName(), e );
+			}
+		}
+		else if ( member instanceof Field ) {
+			Field field = (Field) member;
+			try {
+				value = field.get( object );
+			}
+			catch ( IllegalAccessException e ) {
+				throw log.getUnableToAccessMemberException( field.getName(), e );
+			}
+		}
+		return value;
+	}
+
+	public static void setAccessibility(Member member) {
+		SetAccessibility action = SetAccessibility.action( member );
+		if ( System.getSecurityManager() != null ) {
+			AccessController.doPrivileged( action );
+		}
+		else {
+			action.run();
+		}
+	}
+
+	/**
+	 * Determines the type of elements of an <code>Iterable</code>, array or the value of a <code>Map</code>.
+	 *
+	 * @param type the type to inspect
+	 *
+	 * @return Returns the type of elements of an <code>Iterable</code>, array or the value of a <code>Map</code>. <code>
+	 *         null</code> is returned in case the type is not indexable (in the context of JSR 303).
+	 */
+	public static Type getIndexedType(Type type) {
+		Type indexedType = null;
+		if ( isIterable( type ) && type instanceof ParameterizedType ) {
+			ParameterizedType paramType = (ParameterizedType) type;
+			indexedType = paramType.getActualTypeArguments()[0];
+		}
+		else if ( isMap( type ) && type instanceof ParameterizedType ) {
+			ParameterizedType paramType = (ParameterizedType) type;
+			indexedType = paramType.getActualTypeArguments()[1];
+		}
+		else if ( TypeHelper.isArray( type ) ) {
+			indexedType = TypeHelper.getComponentType( type );
+		}
+		return indexedType;
+	}
+
+	/**
+	 * @param type the type to check.
+	 *
+	 * @return Returns <code>true</code> if <code>type</code> is a iterable type, <code>false</code> otherwise.
+	 */
+	public static boolean isIterable(Type type) {
+		if ( type instanceof Class && Iterable.class.isAssignableFrom( (Class<?>) type ) ) {
+			return true;
+		}
+		if ( type instanceof ParameterizedType ) {
+			return isIterable( ( (ParameterizedType) type ).getRawType() );
+		}
+		if ( type instanceof WildcardType ) {
+			Type[] upperBounds = ( (WildcardType) type ).getUpperBounds();
+			return upperBounds.length != 0 && isIterable( upperBounds[0] );
+		}
+		return false;
+	}
+
+	/**
+	 * @param type the type to check.
+	 *
+	 * @return Returns <code>true</code> if <code>type</code> is implementing <code>Map</code>, <code>false</code> otherwise.
+	 */
+	public static boolean isMap(Type type) {
+		if ( type instanceof Class && Map.class.isAssignableFrom( (Class<?>) type ) ) {
+			return true;
+		}
+		if ( type instanceof ParameterizedType ) {
+			return isMap( ( (ParameterizedType) type ).getRawType() );
+		}
+		if ( type instanceof WildcardType ) {
+			Type[] upperBounds = ( (WildcardType) type ).getUpperBounds();
+			return upperBounds.length != 0 && isMap( upperBounds[0] );
+		}
+		return false;
+	}
+
+	/**
+	 * @param type the type to check.
+	 *
+	 * @return Returns <code>true</code> if <code>type</code> is implementing <code>List</code>, <code>false</code> otherwise.
+	 */
+	public static boolean isList(Type type) {
+		if ( type instanceof Class && List.class.isAssignableFrom( (Class<?>) type ) ) {
+			return true;
+		}
+		if ( type instanceof ParameterizedType ) {
+			return isList( ( (ParameterizedType) type ).getRawType() );
+		}
+		if ( type instanceof WildcardType ) {
+			Type[] upperBounds = ( (WildcardType) type ).getUpperBounds();
+			return upperBounds.length != 0 && isList( upperBounds[0] );
+		}
+		return false;
+	}
+
+	/**
+	 * Tries to retrieve the indexed value from the specified object.
+	 *
+	 * @param value The object from which to retrieve the indexed value. The object has to be non <code>null</null> and
+	 * either a collection or array.
+	 * @param index The index. The index does not have to be numerical. <code>value</code> could also be a map in which
+	 * case the index could also be a string key.
+	 *
+	 * @return The indexed value or <code>null</code> if <code>value</code> is <code>null</code> or not a collection or array.
+	 *         <code>null</code> is also returned in case the index does not exist.
+	 */
+	public static Object getIndexedValue(Object value, Integer index) {
+		if ( value == null ) {
+			return null;
+		}
+
+		Iterator<?> iter;
+		Type type = value.getClass();
+		if ( isIterable( type ) ) {
+			iter = ( (Iterable<?>) value ).iterator();
+		}
+		else if ( TypeHelper.isArray( type ) ) {
+			List<?> arrayList = Arrays.asList( (Object) value );
+			iter = arrayList.iterator();
+		}
+		else {
+			return null;
+		}
+
+		int i = 0;
+		Object o;
+		while ( iter.hasNext() ) {
+			o = iter.next();
+			if ( i == index ) {
+				return o;
+			}
+			i++;
+		}
+		return null;
+	}
+
+	/**
+	 * Tries to retrieve the mapped value from the specified object.
+	 *
+	 * @param value The object from which to retrieve the mapped value. The object has to be non {@code null} and
+	 * must implement the  @{code Map} interface.
+	 * @param key The map key. index.
+	 *
+	 * @return The mapped value or {@code null} if {@code value} is {@code null} or not implementing @{code Map}.
+	 */
+	public static Object getMappedValue(Object value, Object key) {
+		if ( !( value instanceof Map ) ) {
+			return null;
+		}
+
+		Map<?, ?> map = (Map<?, ?>) value;
+		//noinspection SuspiciousMethodCalls
+		return map.get( key );
+	}
+
+	/**
+	 * Returns the declared field with the specified name or {@code null} if it does not exist.
+	 *
+	 * @param clazz The class to check.
+	 * @param fieldName The field name.
+	 *
+	 * @return Returns the declared field with the specified name or {@code null} if it does not exist.
+	 */
+	public static Field getDeclaredField(Class<?> clazz, String fieldName) {
+		GetDeclaredField action = GetDeclaredField.action( clazz, fieldName );
+		final Field field;
+		if ( System.getSecurityManager() != null ) {
+			field = AccessController.doPrivileged( action );
+		}
+		else {
+			field = action.run();
+		}
+		return field;
+	}
+
+	/**
+	 * Checks whether the specified class contains a declared field with the given name.
+	 *
+	 * @param clazz The class to check.
+	 * @param fieldName The field name.
+	 *
+	 * @return Returns {@code true} if the field exists, {@code false} otherwise.
+	 */
+	public static boolean containsDeclaredField(Class<?> clazz, String fieldName) {
+		return getDeclaredField( clazz, fieldName ) != null;
+	}
+
+	/**
+	 * Returns the fields of the specified class.
+	 *
+	 * @param clazz The class for which to retrieve the fields.
+	 *
+	 * @return Returns the fields for this class.
+	 */
+	public static Field[] getDeclaredFields(Class<?> clazz) {
+		GetDeclaredFields action = GetDeclaredFields.action( clazz );
+		final Field[] fields;
+		if ( System.getSecurityManager() != null ) {
+			fields = AccessController.doPrivileged( action );
+		}
+		else {
+			fields = action.run();
+		}
+		return fields;
+	}
+
+	/**
+	 * Returns the method with the specified property name or {@code null} if it does not exist. This method will
+	 * prepend  'is' and 'get' to the property name and capitalize the first letter.
+	 *
+	 * @param clazz The class to check.
+	 * @param methodName The property name.
+	 *
+	 * @return Returns the method with the specified property or {@code null} if it does not exist.
+	 */
+	public static Method getMethodFromPropertyName(Class<?> clazz, String methodName) {
+		Method method;
+		GetMethodFromPropertyName action = GetMethodFromPropertyName.action( clazz, methodName );
+		if ( System.getSecurityManager() != null ) {
+			method = AccessController.doPrivileged( action );
+		}
+		else {
+			method = action.run();
+		}
+		return method;
+	}
+
+	/**
+	 * Checks whether the specified class contains a method for the specified property.
+	 *
+	 * @param clazz The class to check.
+	 * @param property The property name.
+	 *
+	 * @return Returns {@code true} if the method exists, {@code false} otherwise.
+	 */
+	public static boolean containsMethodWithPropertyName(Class<?> clazz, String property) {
+		return getMethodFromPropertyName( clazz, property ) != null;
+	}
+
+	/**
+	 * Returns the method with the specified name or {@code null} if it does not exist.
+	 *
+	 * @param clazz The class to check.
+	 * @param methodName The method name.
+	 *
+	 * @return Returns the method with the specified property or {@code null} if it does not exist.
+	 */
+	public static Method getMethod(Class<?> clazz, String methodName) {
+		Method method;
+		GetMethod action = GetMethod.action( clazz, methodName );
+		if ( System.getSecurityManager() != null ) {
+			method = AccessController.doPrivileged( action );
+		}
+		else {
+			method = action.run();
+		}
+		return method;
+	}
+
+	/**
+	 * Returns the declared method with the specified name and parameter types or {@code null} if
+	 * it does not exist.
+	 *
+	 * @param clazz The class to check.
+	 * @param methodName The method name.
+	 * @param parameterTypes The method parameter types.
+	 *
+	 * @return Returns the declared method with the specified name or {@code null} if it does not exist.
+	 */
+	public static Method getDeclaredMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
+		Method method;
+		GetDeclaredMethod action = GetDeclaredMethod.action( clazz, methodName, parameterTypes );
+		if ( System.getSecurityManager() != null ) {
+			method = AccessController.doPrivileged( action );
+		}
+		else {
+			method = action.run();
+		}
+		return method;
+	}
+
+	/**
+	 * Returns the declared methods of the specified class.
+	 *
+	 * @param clazz The class for which to retrieve the methods.
+	 *
+	 * @return Returns the declared methods for this class.
+	 */
+	public static Method[] getDeclaredMethods(Class<?> clazz) {
+		GetDeclaredMethods action = GetDeclaredMethods.action( clazz );
+		final Method[] methods;
+		if ( System.getSecurityManager() != null ) {
+			methods = AccessController.doPrivileged( action );
+		}
+		else {
+			methods = action.run();
+		}
+		return methods;
+	}
+
+	/**
+	 * Returns the methods of the specified class (include inherited methods).
+	 *
+	 * @param clazz The class for which to retrieve the methods.
+	 *
+	 * @return Returns the methods for this class.
+	 */
+	public static Method[] getMethods(Class<?> clazz) {
+		GetMethods action = GetMethods.action( clazz );
+		final Method[] methods;
+		if ( System.getSecurityManager() != null ) {
+			methods = AccessController.doPrivileged( action );
+		}
+		else {
+			methods = action.run();
+		}
+		return methods;
+	}
+
+	/**
+	 * Checks, whether the given methods have the same signature, which is the
+	 * case if they have the same name, parameter count and types.
+	 *
+	 * @param method1 A first method.
+	 * @param method2 A second method.
+	 *
+	 * @return True, if the methods have the same signature, false otherwise.
+	 */
+	public static boolean haveSameSignature(Method method1, Method method2) {
+
+		Contracts.assertValueNotNull( method1, "method1" );
+		Contracts.assertValueNotNull( method2, "method2" );
+
+		return
+				method1.getName().equals( method2.getName() ) &&
+						Arrays.equals( method1.getGenericParameterTypes(), method2.getGenericParameterTypes() );
+	}
+
+	/**
+	 * Returns the auto-boxed type of a primitive type.
+	 *
+	 * @param primitiveType the primitive type
+	 *
+	 * @return the auto-boxed type of a primitive type. In case {@link Void} is
+	 *         passed (which is considered as primitive type by
+	 *         {@link Class#isPrimitive()}), {@link Void} will be returned.
+	 *
+	 * @throws IllegalArgumentException in case the parameter {@code primitiveType} does not
+	 * represent a primitive type.
+	 */
+	public static Class<?> boxedType(Class<?> primitiveType) {
+
+		Class<?> wrapperType = PRIMITIVE_TO_WRAPPER_TYPES.get( primitiveType );
+
+		if ( wrapperType == null ) {
+			throw log.getHasToBeAPrimitiveTypeException( primitiveType.getClass() );
+		}
+
+		return wrapperType;
+	}
+
+	/**
+	 * Get all superclasses and optionally interfaces recursively.
+	 *
+	 * @param clazz The class to start the search with.
+	 * @param includeInterfaces whether or not to include interfaces
+	 *
+	 * @return List of all super classes and interfaces of {@code clazz}. The list contains the class itself! The empty
+	 *         list is returned if {@code clazz} is {@code null}.
+	 */
+	public static List<Class<?>> computeClassHierarchy(Class<?> clazz, boolean includeInterfaces) {
+		List<Class<?>> classes = new ArrayList<Class<?>>();
+		computeClassHierarchy( clazz, classes, includeInterfaces );
+		return classes;
+	}
+
+	/**
+	 * Get all superclasses and interfaces recursively.
+	 *
+	 * @param clazz The class to start the search with
+	 * @param classes List of classes to which to add all found super classes and interfaces
+	 * @param includeInterfaces whether or not to include interfaces
+	 */
+	private static void computeClassHierarchy(Class<?> clazz, List<Class<?>> classes, boolean includeInterfaces) {
+		for ( Class<?> current = clazz; current != null; current = current.getSuperclass() ) {
+			if ( classes.contains( current ) ) {
+				return;
+			}
+			classes.add( current );
+			if ( includeInterfaces ) {
+				for ( Class<?> currentInterface : current.getInterfaces() ) {
+					computeClassHierarchy( currentInterface, classes, includeInterfaces );
+				}
+			}
+		}
+	}
+
+	/**
+	 * Get all interfaces a class directly implements.
+	 *
+	 * @param clazz The class for which to find the interfaces
+	 *
+	 * @return Set of all interfaces {@code clazz} implements. The empty list is returned if {@code clazz} does not
+	 *         implement any interfaces or {@code clazz} is {@code null}
+	 */
+	public static Set<Class<?>> computeAllImplementedInterfaces(Class<?> clazz) {
+		Set<Class<?>> classes = new HashSet<Class<?>>();
+		computeAllImplementedInterfaces( clazz, classes );
+		return classes;
+	}
+
+	private static void computeAllImplementedInterfaces(Class<?> clazz, Set<Class<?>> classes) {
+		if ( clazz == null ) {
+			return;
+		}
+		for ( Class<?> currentInterface : clazz.getInterfaces() ) {
+			classes.add( currentInterface );
+			computeAllImplementedInterfaces( currentInterface, classes );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/TypeHelper.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/TypeHelper.java
new file mode 100644
index 0000000..7639d3f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/TypeHelper.java
@@ -0,0 +1,606 @@
+// code originates from TypeUtils.java in jtype (http://code.google.com/p/jtype/) and has been modified to suite
+// the HV requirements and code style
+/*
+ * Copyright 2009 IIZUKA Software Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Array;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.MalformedParameterizedTypeException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Provides utility methods for working with types.
+ *
+ * @author Mark Hobson
+ * @author Hardy Ferentschik
+ */
+public final class TypeHelper {
+	private static final Map<Class<?>, Set<Class<?>>> SUBTYPES_BY_PRIMITIVE;
+	private static final int VALIDATOR_TYPE_INDEX = 1;
+	private static final Log log = LoggerFactory.make();
+
+	static {
+		Map<Class<?>, Set<Class<?>>> subtypesByPrimitive = new HashMap<Class<?>, Set<Class<?>>>();
+
+		putPrimitiveSubtypes( subtypesByPrimitive, Void.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Boolean.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Byte.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Character.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Short.TYPE, Byte.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Integer.TYPE, Character.TYPE, Short.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Long.TYPE, Integer.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Float.TYPE, Long.TYPE );
+		putPrimitiveSubtypes( subtypesByPrimitive, Double.TYPE, Float.TYPE );
+
+		SUBTYPES_BY_PRIMITIVE = Collections.unmodifiableMap( subtypesByPrimitive );
+	}
+
+	private TypeHelper() {
+		throw new AssertionError();
+	}
+
+	public static boolean isAssignable(Type supertype, Type type) {
+		Contracts.assertNotNull( supertype, "supertype" );
+		Contracts.assertNotNull( type, "type" );
+
+		if ( supertype.equals( type ) ) {
+			return true;
+		}
+
+		if ( supertype instanceof Class<?> ) {
+			if ( type instanceof Class<?> ) {
+				return isClassAssignable( (Class<?>) supertype, (Class<?>) type );
+			}
+
+			if ( type instanceof ParameterizedType ) {
+				return isAssignable( supertype, ( (ParameterizedType) type ).getRawType() );
+			}
+
+			if ( type instanceof TypeVariable<?> ) {
+				return isTypeVariableAssignable( supertype, (TypeVariable<?>) type );
+			}
+
+			if ( type instanceof GenericArrayType ) {
+				if ( ( (Class<?>) supertype ).isArray() ) {
+					return isAssignable( getComponentType( supertype ), getComponentType( type ) );
+				}
+
+				return isArraySupertype( (Class<?>) supertype );
+			}
+
+			if ( type instanceof WildcardType ) {
+				return isClassAssignableToWildcardType( (Class<?>) supertype, (WildcardType) type );
+			}
+
+			return false;
+		}
+
+		if ( supertype instanceof ParameterizedType ) {
+			if ( type instanceof Class<?> ) {
+				return isSuperAssignable( supertype, type );
+			}
+
+			if ( type instanceof ParameterizedType ) {
+				return isParameterizedTypeAssignable( (ParameterizedType) supertype, (ParameterizedType) type );
+			}
+
+			return false;
+		}
+
+		if ( type instanceof TypeVariable<?> ) {
+			return isTypeVariableAssignable( supertype, (TypeVariable<?>) type );
+		}
+
+		if ( supertype instanceof GenericArrayType ) {
+			if ( isArray( type ) ) {
+				return isAssignable( getComponentType( supertype ), getComponentType( type ) );
+			}
+
+			return false;
+		}
+
+		if ( supertype instanceof WildcardType ) {
+			return isWildcardTypeAssignable( (WildcardType) supertype, type );
+		}
+
+		return false;
+	}
+
+	/**
+	 * Gets the erased type of the specified type.
+	 *
+	 * @param type the type to perform erasure on
+	 *
+	 * @return the erased type, never a parameterized type nor a type variable
+	 *
+	 * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.6">4.6 Type Erasure</a>
+	 */
+	public static Type getErasedType(Type type) {
+		// the erasure of a parameterized type G<T1, ... ,Tn> is |G|
+		if ( type instanceof ParameterizedType ) {
+			Type rawType = ( (ParameterizedType) type ).getRawType();
+
+			return getErasedType( rawType );
+		}
+
+		// TODO: the erasure of a nested type T.C is |T|.C
+
+		// the erasure of an array type T[] is |T|[]
+		if ( isArray( type ) ) {
+			Type componentType = getComponentType( type );
+			Type erasedComponentType = getErasedType( componentType );
+
+			return getArrayType( erasedComponentType );
+		}
+
+		// the erasure of a type variable is the erasure of its leftmost bound
+		if ( type instanceof TypeVariable<?> ) {
+			Type[] bounds = ( (TypeVariable<?>) type ).getBounds();
+
+			return getErasedType( bounds[0] );
+		}
+
+		// the erasure of every other type is the type itself
+		return type;
+	}
+
+	private static Class<?> getErasedReferenceType(Type type) {
+		Contracts.assertTrue( isReferenceType( type ), "type is not a reference type: " + type );
+		return (Class<?>) getErasedType( type );
+	}
+
+	public static boolean isArray(Type type) {
+		return ( type instanceof Class<?> && ( (Class<?>) type ).isArray() )
+				|| ( type instanceof GenericArrayType );
+	}
+
+	public static Type getComponentType(Type type) {
+		if ( type instanceof Class<?> ) {
+			Class<?> klass = (Class<?>) type;
+
+			return klass.isArray() ? klass.getComponentType() : null;
+		}
+
+		if ( type instanceof GenericArrayType ) {
+			return ( (GenericArrayType) type ).getGenericComponentType();
+		}
+
+		return null;
+	}
+
+	public static Type getArrayType(Type componentType) {
+		Contracts.assertNotNull( componentType, "componentType" );
+
+		if ( componentType instanceof Class<?> ) {
+			return Array.newInstance( (Class<?>) componentType, 0 ).getClass();
+		}
+
+		return genericArrayType( componentType );
+	}
+
+	/**
+	 * Creates a generic array type for the specified component type.
+	 *
+	 * @param componentType the component type
+	 *
+	 * @return the generic array type
+	 */
+	public static GenericArrayType genericArrayType(final Type componentType) {
+		return new GenericArrayType() {
+
+			public Type getGenericComponentType() {
+				return componentType;
+			}
+		};
+	}
+
+	public static boolean isInstance(Type type, Object object) {
+		return getErasedReferenceType( type ).isInstance( object );
+	}
+
+	/**
+	 * Creates a parameterized type for the specified raw type and actual type arguments.
+	 *
+	 * @param rawType the raw type
+	 * @param actualTypeArguments the actual type arguments
+	 *
+	 * @return the parameterized type
+	 *
+	 * @throws MalformedParameterizedTypeException if the number of actual type arguments differs from those defined on the raw type
+	 */
+	public static ParameterizedType parameterizedType(final Class<?> rawType, final Type... actualTypeArguments) {
+		return new ParameterizedType() {
+			public Type[] getActualTypeArguments() {
+				return actualTypeArguments;
+			}
+
+			public Type getRawType() {
+				return rawType;
+			}
+
+			public Type getOwnerType() {
+				return null;
+			}
+		};
+	}
+
+	private static Type getResolvedSuperclass(Type type) {
+		Contracts.assertNotNull( type, "type" );
+
+		Class<?> rawType = getErasedReferenceType( type );
+		Type supertype = rawType.getGenericSuperclass();
+
+		if ( supertype == null ) {
+			return null;
+		}
+
+		return resolveTypeVariables( supertype, type );
+	}
+
+	public static Type[] getResolvedInterfaces(Type type) {
+		Contracts.assertNotNull( type, "type" );
+
+		Class<?> rawType = getErasedReferenceType( type );
+		Type[] interfaces = rawType.getGenericInterfaces();
+		Type[] resolvedInterfaces = new Type[interfaces.length];
+
+		for ( int i = 0; i < interfaces.length; i++ ) {
+			resolvedInterfaces[i] = resolveTypeVariables( interfaces[i], type );
+		}
+
+		return resolvedInterfaces;
+	}
+
+	/**
+	 * @param validators List of constraint validator classes (for a given constraint).
+	 *
+	 * @return Return a Map<Class, Class<? extends ConstraintValidator>> where the map
+	 *         key is the type the validator accepts and value the validator class itself.
+	 */
+	public static <T extends Annotation> Map<Type, Class<? extends ConstraintValidator<?, ?>>> getValidatorsTypes(
+			List<Class<? extends ConstraintValidator<T, ?>>> validators) {
+		Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorsTypes =
+				new HashMap<Type, Class<? extends ConstraintValidator<?, ?>>>();
+		for ( Class<? extends ConstraintValidator<?, ?>> validator : validators ) {
+			validatorsTypes.put( extractType( validator ), validator );
+		}
+		return validatorsTypes;
+
+	}
+
+	private static Type extractType(Class<? extends ConstraintValidator<?, ?>> validator) {
+		Map<Type, Type> resolvedTypes = new HashMap<Type, Type>();
+		Type constraintValidatorType = resolveTypes( resolvedTypes, validator );
+
+		//we now have all bind from a type to its resolution at one level
+		Type validatorType = ( (ParameterizedType) constraintValidatorType ).getActualTypeArguments()[VALIDATOR_TYPE_INDEX];
+		if ( validatorType == null ) {
+			throw log.getNullIsAnInvalidTypeForAConstraintValidatorException();
+		}
+		else if ( validatorType instanceof GenericArrayType ) {
+			validatorType = TypeHelper.getArrayType( TypeHelper.getComponentType( validatorType ) );
+		}
+
+		while ( resolvedTypes.containsKey( validatorType ) ) {
+			validatorType = resolvedTypes.get( validatorType );
+		}
+		//FIXME raise an exception if validatorType is not a class
+		return validatorType;
+	}
+
+	private static Type resolveTypes(Map<Type, Type> resolvedTypes, Type type) {
+		if ( type == null ) {
+			return null;
+		}
+		else if ( type instanceof Class ) {
+			Class<?> clazz = (Class<?>) type;
+			final Type returnedType = resolveTypeForClassAndHierarchy( resolvedTypes, clazz );
+			if ( returnedType != null ) {
+				return returnedType;
+			}
+		}
+		else if ( type instanceof ParameterizedType ) {
+			ParameterizedType paramType = (ParameterizedType) type;
+			if ( !( paramType.getRawType() instanceof Class ) ) {
+				return null; //don't know what to do here
+			}
+			Class<?> rawType = (Class<?>) paramType.getRawType();
+
+			TypeVariable<?>[] originalTypes = rawType.getTypeParameters();
+			Type[] partiallyResolvedTypes = paramType.getActualTypeArguments();
+			int nbrOfParams = originalTypes.length;
+			for ( int i = 0; i < nbrOfParams; i++ ) {
+				resolvedTypes.put( originalTypes[i], partiallyResolvedTypes[i] );
+			}
+
+			if ( rawType.equals( ConstraintValidator.class ) ) {
+				//we found our baby
+				return type;
+			}
+			else {
+				Type returnedType = resolveTypeForClassAndHierarchy( resolvedTypes, rawType );
+				if ( returnedType != null ) {
+					return returnedType;
+				}
+			}
+		}
+		//else we don't care I think
+		return null;
+	}
+
+	private static Type resolveTypeForClassAndHierarchy(Map<Type, Type> resolvedTypes, Class<?> clazz) {
+		Type returnedType = resolveTypes( resolvedTypes, clazz.getGenericSuperclass() );
+		if ( returnedType != null ) {
+			return returnedType;
+		}
+		for ( Type genericInterface : clazz.getGenericInterfaces() ) {
+			returnedType = resolveTypes( resolvedTypes, genericInterface );
+			if ( returnedType != null ) {
+				return returnedType;
+			}
+		}
+		return null;
+	}
+
+	private static void putPrimitiveSubtypes(Map<Class<?>, Set<Class<?>>> subtypesByPrimitive, Class<?> primitiveType,
+											 Class<?>... directSubtypes) {
+		Set<Class<?>> subtypes = new HashSet<Class<?>>();
+
+		for ( Class<?> directSubtype : directSubtypes ) {
+			subtypes.add( directSubtype );
+			subtypes.addAll( subtypesByPrimitive.get( directSubtype ) );
+		}
+
+		subtypesByPrimitive.put( primitiveType, Collections.unmodifiableSet( subtypes ) );
+	}
+
+	private static boolean isClassAssignable(Class<?> supertype, Class<?> type) {
+		// Class.isAssignableFrom does not perform primitive widening
+		if ( supertype.isPrimitive() && type.isPrimitive() ) {
+			return SUBTYPES_BY_PRIMITIVE.get( supertype ).contains( type );
+		}
+
+		return supertype.isAssignableFrom( type );
+	}
+
+	private static boolean isClassAssignableToWildcardType(Class<?> supertype, WildcardType type) {
+		for ( Type upperBound : type.getUpperBounds() ) {
+			if ( !isAssignable( supertype, upperBound ) ) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	private static boolean isParameterizedTypeAssignable(ParameterizedType supertype, ParameterizedType type) {
+		Type rawSupertype = supertype.getRawType();
+		Type rawType = type.getRawType();
+
+		if ( !rawSupertype.equals( rawType ) ) {
+			// short circuit when class raw types are unassignable
+			if ( rawSupertype instanceof Class<?> && rawType instanceof Class<?>
+					&& !( ( (Class<?>) rawSupertype ).isAssignableFrom( (Class<?>) rawType ) ) ) {
+				return false;
+			}
+
+			return isSuperAssignable( supertype, type );
+		}
+
+		Type[] supertypeArgs = supertype.getActualTypeArguments();
+		Type[] typeArgs = type.getActualTypeArguments();
+
+		if ( supertypeArgs.length != typeArgs.length ) {
+			return false;
+		}
+
+		for ( int i = 0; i < supertypeArgs.length; i++ ) {
+			Type supertypeArg = supertypeArgs[i];
+			Type typeArg = typeArgs[i];
+
+			if ( supertypeArg instanceof WildcardType ) {
+				if ( !isWildcardTypeAssignable( (WildcardType) supertypeArg, typeArg ) ) {
+					return false;
+				}
+			}
+			else if ( !supertypeArg.equals( typeArg ) ) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	private static boolean isTypeVariableAssignable(Type supertype, TypeVariable<?> type) {
+		for ( Type bound : type.getBounds() ) {
+			if ( isAssignable( supertype, bound ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	private static boolean isWildcardTypeAssignable(WildcardType supertype, Type type) {
+		for ( Type upperBound : supertype.getUpperBounds() ) {
+			if ( !isAssignable( upperBound, type ) ) {
+				return false;
+			}
+		}
+
+		for ( Type lowerBound : supertype.getLowerBounds() ) {
+			if ( !isAssignable( type, lowerBound ) ) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	private static boolean isSuperAssignable(Type supertype, Type type) {
+		Type superclass = getResolvedSuperclass( type );
+
+		if ( superclass != null && isAssignable( supertype, superclass ) ) {
+			return true;
+		}
+
+		for ( Type interphace : getResolvedInterfaces( type ) ) {
+			if ( isAssignable( supertype, interphace ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Gets whether the specified type is a <em>reference type</em>.
+	 * <p>
+	 * More specifically, this method returns {@code true} if the specified type is one of the following:
+	 * <ul>
+	 * <li>a class type</li>
+	 * <li>an interface type</li>
+	 * <li>an array type</li>
+	 * <li>a parameterized type</li>
+	 * <li>a type variable</li>
+	 * <li>the null type</li>
+	 * </ul>
+	 *
+	 * @param type the type to check
+	 *
+	 * @return {@code true} if the specified type is a reference type
+	 *
+	 * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.3">4.3 Reference Types and Values</a>
+	 */
+	private static boolean isReferenceType(Type type) {
+		return type == null
+				|| type instanceof Class<?>
+				|| type instanceof ParameterizedType
+				|| type instanceof TypeVariable<?>
+				|| type instanceof GenericArrayType;
+	}
+
+	private static boolean isArraySupertype(Class<?> type) {
+		return Object.class.equals( type )
+				|| Cloneable.class.equals( type )
+				|| Serializable.class.equals( type );
+	}
+
+	private static Type resolveTypeVariables(Type type, Type subtype) {
+		// TODO: need to support other types in future, e.g. T[], etc.
+		if ( !( type instanceof ParameterizedType ) ) {
+			return type;
+		}
+
+		Map<Type, Type> actualTypeArgumentsByParameter = getActualTypeArgumentsByParameter( type, subtype );
+		Class<?> rawType = getErasedReferenceType( type );
+
+		return parameterizeClass( rawType, actualTypeArgumentsByParameter );
+	}
+
+	private static Map<Type, Type> getActualTypeArgumentsByParameter(Type... types) {
+		// TODO: return Map<TypeVariable<Class<?>>, Type> somehow
+
+		Map<Type, Type> actualTypeArgumentsByParameter = new LinkedHashMap<Type, Type>();
+
+		for ( Type type : types ) {
+			actualTypeArgumentsByParameter.putAll( getActualTypeArgumentsByParameterInternal( type ) );
+		}
+
+		return normalize( actualTypeArgumentsByParameter );
+	}
+
+	private static Map<Type, Type> getActualTypeArgumentsByParameterInternal(Type type) {
+		// TODO: look deeply within non-parameterized types when visitors implemented
+		if ( !( type instanceof ParameterizedType ) ) {
+			return Collections.emptyMap();
+		}
+
+		TypeVariable<?>[] typeParameters = getErasedReferenceType( type ).getTypeParameters();
+		Type[] typeArguments = ( (ParameterizedType) type ).getActualTypeArguments();
+
+		if ( typeParameters.length != typeArguments.length ) {
+			throw new MalformedParameterizedTypeException();
+		}
+
+		Map<Type, Type> actualTypeArgumentsByParameter = new LinkedHashMap<Type, Type>();
+
+		for ( int i = 0; i < typeParameters.length; i++ ) {
+			actualTypeArgumentsByParameter.put( typeParameters[i], typeArguments[i] );
+		}
+
+		return actualTypeArgumentsByParameter;
+	}
+
+	private static ParameterizedType parameterizeClass(Class<?> type, Map<Type, Type> actualTypeArgumentsByParameter) {
+		return parameterizeClassCapture( type, actualTypeArgumentsByParameter );
+	}
+
+	private static <T> ParameterizedType parameterizeClassCapture(Class<T> type, Map<Type, Type> actualTypeArgumentsByParameter) {
+		// TODO: actualTypeArgumentsByParameter should be Map<TypeVariable<Class<T>>, Type>
+
+		TypeVariable<Class<T>>[] typeParameters = type.getTypeParameters();
+		Type[] actualTypeArguments = new Type[typeParameters.length];
+
+		for ( int i = 0; i < typeParameters.length; i++ ) {
+			TypeVariable<Class<T>> typeParameter = typeParameters[i];
+			Type actualTypeArgument = actualTypeArgumentsByParameter.get( typeParameter );
+
+			if ( actualTypeArgument == null ) {
+				throw log.getMissingActualTypeArgumentForTypeParameterException( typeParameter );
+			}
+
+			actualTypeArguments[i] = actualTypeArgument;
+		}
+
+		return parameterizedType( getErasedReferenceType( type ), actualTypeArguments );
+	}
+
+	private static <K, V> Map<K, V> normalize(Map<K, V> map) {
+		// TODO: will this cause an infinite loop with recursive bounds?
+
+		for ( Entry<K, V> entry : map.entrySet() ) {
+			K key = entry.getKey();
+			V value = entry.getValue();
+
+			while ( map.containsKey( value ) ) {
+				value = map.get( value );
+			}
+
+			map.put( key, value );
+		}
+
+		return map;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/Version.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/Version.java
new file mode 100644
index 0000000..bafa9a0
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/Version.java
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util;
+
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2012 SERLI
+ */
+public final class Version {
+	static {
+		LoggerFactory.make().version( getVersionString() );
+	}
+
+	public static String getVersionString() {
+		return "[WORKING]";
+	}
+
+	public static void touch() {
+	}
+
+	// helper class should not have a public constructor
+	private Version() {
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationDescriptor.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationDescriptor.java
new file mode 100644
index 0000000..ae34215
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationDescriptor.java
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.annotationfactory;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Encapsulates the data you need to create an annotation. In
+ * particular, it stores the type of an <code>Annotation</code> instance
+ * and the values of its elements.
+ * The "elements" we're talking about are the annotation attributes,
+ * not its targets (the term "element" is used ambiguously
+ * in Java's annotations documentation).
+ *
+ * @author Paolo Perrotta
+ * @author Davide Marchignoli
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class AnnotationDescriptor<T extends Annotation> {
+
+	private final Class<T> type;
+
+	private final Map<String, Object> elements = new HashMap<String, Object>();
+
+	/**
+	 * Returns a new descriptor for the given annotation type.
+	 *
+	 * @param <S> The type of the annotation.
+	 * @param annotationType The annotation's class.
+	 *
+	 * @return A new descriptor for the given annotation type.
+	 */
+	public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType) {
+		return new AnnotationDescriptor<S>( annotationType );
+	}
+
+	/**
+	 * Returns a new descriptor for the given annotation type.
+	 *
+	 * @param <S> The type of the annotation.
+	 * @param annotationType The annotation's class.
+	 * @param elements A map with attribute values for the annotation to be created.
+	 *
+	 * @return A new descriptor for the given annotation type.
+	 */
+	public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType, Map<String, Object> elements) {
+		return new AnnotationDescriptor<S>( annotationType, elements );
+	}
+
+	public AnnotationDescriptor(Class<T> annotationType) {
+		this.type = annotationType;
+	}
+
+	public AnnotationDescriptor(Class<T> annotationType, Map<String, Object> elements) {
+		this.type = annotationType;
+		for ( Map.Entry<String, Object> entry : elements.entrySet() ) {
+			this.elements.put( entry.getKey(), entry.getValue() );
+		}
+	}
+
+	public void setValue(String elementName, Object value) {
+		elements.put( elementName, value );
+	}
+
+	public Object valueOf(String elementName) {
+		return elements.get( elementName );
+	}
+
+	public boolean containsElement(String elementName) {
+		return elements.containsKey( elementName );
+	}
+
+	public int numberOfElements() {
+		return elements.size();
+	}
+
+	/**
+	 * Returns a map with the elements contained in this descriptor keyed by name. This map is a copy
+	 * of the internally used map, so it can safely be modified without altering this descriptor.
+	 *
+	 * @return A map with this descriptor's elements.
+	 */
+	public Map<String, Object> getElements() {
+		return new HashMap<String, Object>( elements );
+	}
+
+	public Class<T> type() {
+		return type;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationFactory.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationFactory.java
new file mode 100644
index 0000000..ce9cd4b
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationFactory.java
@@ -0,0 +1,59 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.annotationfactory;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Proxy;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+/**
+ * Creates live annotations (actually <code>AnnotationProxies</code>) from <code>AnnotationDescriptors</code>.
+ *
+ * @author Paolo Perrotta
+ * @author Davide Marchignoli
+ * @author Hardy Ferentschik
+ * @see AnnotationProxy
+ */
+public class AnnotationFactory {
+
+	@SuppressWarnings("unchecked")
+	public static <T extends Annotation> T create(AnnotationDescriptor<T> descriptor) {
+		ClassLoader classLoader = ReflectionHelper.getClassLoaderFromContext();
+		Class<T> proxyClass = ( Class<T> ) Proxy.getProxyClass( classLoader, descriptor.type() );
+		InvocationHandler handler = new AnnotationProxy( descriptor );
+		try {
+			return getProxyInstance( proxyClass, handler );
+		}
+		catch ( RuntimeException e ) {
+			throw e;
+		}
+		catch ( Exception e ) {
+			throw new RuntimeException( e );
+		}
+	}
+
+	private static <T extends Annotation> T getProxyInstance(Class<T> proxyClass, InvocationHandler handler) throws
+			SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException,
+			IllegalAccessException, InvocationTargetException {
+		final Constructor<T> constructor = ReflectionHelper.getConstructor( proxyClass, InvocationHandler.class );
+		return ReflectionHelper.newConstructorInstance( constructor, handler );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationProxy.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationProxy.java
new file mode 100644
index 0000000..98440c0
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/AnnotationProxy.java
@@ -0,0 +1,133 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.annotationfactory;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * A concrete implementation of <code>Annotation</code> that pretends it is a
+ * "real" source code annotation. It's also an <code>InvocationHandler</code>.
+ * <p/>
+ * When you create an <code>AnnotationProxy</code>, you must initialize it
+ * with an <code>AnnotationDescriptor</code>.
+ * The adapter checks that the provided elements are the same elements defined
+ * in the annotation interface. However, it does <i>not</i> check that their
+ * values are the right type. If you omit an element, the adapter will use the
+ * default value for that element from the annotation interface, if it exists.
+ * If no default exists, it will throw an exception.
+ * <p/>
+ * Warning: this class does not implement <code>hashCode()</code> and
+ * <code>equals()</code> - it just uses the ones it inherits from <code>Object</code>.
+ * This means that an <code>AnnotationProxy</code> does <i>not</i> follow the
+ * recommendations of the <code>Annotation</code> javadoc about these two
+ * methods. That's why you should never mix <code>AnnotationProxies</code>
+ * with "real" annotations. For example, don't put them into the same
+ * <code>Collection</code>.
+ *
+ * @author Paolo Perrotta
+ * @author Davide Marchignoli
+ * @see java.lang.annotation.Annotation
+ */
+public class AnnotationProxy implements Annotation, InvocationHandler, Serializable {
+
+	private static final long serialVersionUID = 6907601010599429454L;
+	private static final Log log = LoggerFactory.make();
+
+	private final Class<? extends Annotation> annotationType;
+	private final Map<String, Object> values;
+
+	public AnnotationProxy(AnnotationDescriptor<?> descriptor) {
+		this.annotationType = descriptor.type();
+		values = getAnnotationValues( descriptor );
+	}
+
+	private Map<String, Object> getAnnotationValues(AnnotationDescriptor<?> descriptor) {
+		Map<String, Object> result = new HashMap<String, Object>();
+		int processedValuesFromDescriptor = 0;
+		final Method[] declaredMethods = ReflectionHelper.getDeclaredMethods( annotationType );
+		for ( Method m : declaredMethods ) {
+			if ( descriptor.containsElement( m.getName() ) ) {
+				result.put( m.getName(), descriptor.valueOf( m.getName() ) );
+				processedValuesFromDescriptor++;
+			}
+			else if ( m.getDefaultValue() != null ) {
+				result.put( m.getName(), m.getDefaultValue() );
+			}
+			else {
+				throw log.getNoValueProvidedForAnnotationParameterException( m.getName() );
+			}
+		}
+		if ( processedValuesFromDescriptor != descriptor.numberOfElements() ) {
+
+			Set<String> unknownParameters = descriptor.getElements().keySet();
+			unknownParameters.removeAll( result.keySet() );
+
+			throw log.getTryingToInstantiateAnnotationWithUnknownParametersException(
+					annotationType,
+					unknownParameters
+			);
+		}
+		return result;
+	}
+
+	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+		if ( values.containsKey( method.getName() ) ) {
+			return values.get( method.getName() );
+		}
+		return method.invoke( this, args );
+	}
+
+	public Class<? extends Annotation> annotationType() {
+		return annotationType;
+	}
+
+	public String toString() {
+		StringBuilder result = new StringBuilder();
+		result.append( '@' ).append( annotationType.getName() ).append( '(' );
+		for ( String s : getRegisteredMethodsInAlphabeticalOrder() ) {
+			result.append( s ).append( '=' ).append( values.get( s ) ).append( ", " );
+		}
+		// remove last separator:
+		if ( values.size() > 0 ) {
+			result.delete( result.length() - 2, result.length() );
+			result.append( ")" );
+		}
+		else {
+			result.delete( result.length() - 1, result.length() );
+		}
+
+		return result.toString();
+	}
+
+	private SortedSet<String> getRegisteredMethodsInAlphabeticalOrder() {
+		SortedSet<String> result = new TreeSet<String>();
+		result.addAll( values.keySet() );
+		return result;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/package.html
new file mode 100644
index 0000000..816f387
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Annotation proxy helper.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Log.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Log.java
new file mode 100644
index 0000000..ed38c29
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Log.java
@@ -0,0 +1,425 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util.logging;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.IllegalFormatException;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.PatternSyntaxException;
+import javax.validation.ConstraintDeclarationException;
+import javax.validation.ConstraintDefinitionException;
+import javax.validation.GroupDefinitionException;
+import javax.validation.UnexpectedTypeException;
+import javax.validation.ValidationException;
+import javax.xml.bind.JAXBException;
+
+import org.jboss.logging.BasicLogger;
+import org.jboss.logging.Cause;
+import org.jboss.logging.LogMessage;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageLogger;
+
+import static org.jboss.logging.Logger.Level.INFO;
+import static org.jboss.logging.Logger.Level.WARN;
+
+/**
+ * The logger interface for JBoss Logging.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2012 SERLI
+ */
+ at MessageLogger(projectCode = "HV")
+public interface Log extends BasicLogger {
+
+	@LogMessage(level = INFO)
+	@Message(id = 1, value = "Hibernate Validator %s")
+	void version(String version);
+
+	@LogMessage(level = INFO)
+	@Message(id = 2, value = "Ignoring XML configuration.")
+	void ignoringXmlConfiguration();
+
+	@LogMessage(level = INFO)
+	@Message(id = 3, value = "Using %s as constraint factory.")
+	void usingConstraintFactory(String constraintFactoryClassName);
+
+	@LogMessage(level = INFO)
+	@Message(id = 4, value = "Using %s as message interpolator.")
+	void usingMessageInterpolator(String messageInterpolatorClassName);
+
+	@LogMessage(level = INFO)
+	@Message(id = 5, value = "Using %s as traversable resolver.")
+	void usingTraversableResolver(String traversableResolverClassName);
+
+	@LogMessage(level = INFO)
+	@Message(id = 6, value = "Using %s as validation provider.")
+	void usingValidationProvider(String validationProviderClassName);
+
+	@LogMessage(level = INFO)
+	@Message(id = 7, value = "%s found. Parsing XML based configuration.")
+	void parsingXMLFile(String fileName);
+
+	@LogMessage(level = WARN)
+	@Message(id = 8, value = "Unable to close input stream.")
+	void unableToCloseInputStream();
+
+	@LogMessage(level = WARN)
+	@Message(id = 9, value = "Unable to load provider class %s.")
+	void unableToLoadProviderClass(String providerName);
+
+	@LogMessage(level = WARN)
+	@Message(id = 10, value = "Unable to close input stream for %s.")
+	void unableToCloseXMLFileInputStream(String fileName);
+
+	@LogMessage(level = WARN)
+	@Message(id = 11, value = "Unable to create schema for %1$s: %2$s")
+	void unableToCreateSchema(String fileName, String message);
+
+	@Message(id = 12, value = "Unable to create annotation for configured constraint: %s.")
+	ValidationException getUnableToCreateAnnotationForConfiguredConstraintException(String message, @Cause RuntimeException e);
+
+	@Message(id = 13, value = "The class %1$s does not have a property '%2$s' with access %3$s.")
+	ValidationException getUnableToFindPropertyWithAccessException(Class<?> beanClass, String property, ElementType elementType);
+
+	@Message(id = 14, value = "Type %1$s doesn't have a method %2$s(%3$s).")
+	IllegalArgumentException getUnableToFindMethodException(Class<?> beanClass, String name, String parametersType);
+
+	@Message(id = 15, value = "A valid parameter index has to be specified for method '%s'")
+	IllegalArgumentException getInvalidMethodParameterIndexException(String methodName);
+
+	@Message(id = 16, value = "%s does not represent a valid BigDecimal format.")
+	IllegalArgumentException getInvalidBigDecimalFormatException(String value, @Cause NumberFormatException e);
+
+	@Message(id = 17, value = "The length of the integer part cannot be negative.")
+	IllegalArgumentException getInvalidLengthForIntegerPartException();
+
+	@Message(id = 18, value = "The length of the fraction part cannot be negative.")
+	IllegalArgumentException getInvalidLengthForFractionPartException();
+
+	@Message(id = 19, value = "The min parameter cannot be negative.")
+	IllegalArgumentException getMinCannotBeNegativeException();
+
+	@Message(id = 20, value = "The max parameter cannot be negative.")
+	IllegalArgumentException getMaxCannotBeNegativeException();
+
+	@Message(id = 21, value = "The length cannot be negative.")
+	IllegalArgumentException getLengthCannotBeNegativeException();
+
+	@Message(id = 22, value = "Invalid regular expression.")
+	IllegalArgumentException getInvalidRegularExpressionException(@Cause PatternSyntaxException e);
+
+	@Message(id = 23, value = "Error during execution of script \"%s\" occurred.")
+	ConstraintDeclarationException getErrorDuringScriptExecutionException(String script, @Cause Exception e);
+
+	@Message(id = 24, value = "Script \"%s\" returned null, but must return either true or false.")
+	ConstraintDeclarationException getScriptMustReturnTrueOrFalseException(String script);
+
+	@Message(id = 25, value = "Script \"%1$s\" returned %2$s (of type %3$s), but must return either true or false.")
+	ConstraintDeclarationException getScriptMustReturnTrueOrFalseException(String script, Object executionResult, String type);
+
+	@Message(id = 26, value = "Assertion error: inconsistent ConfigurationImpl construction.")
+	ValidationException getInconsistentConfigurationException();
+
+	@Message(id = 27, value = "Unable to find provider: %s.")
+	ValidationException getUnableToFindProviderException(Class<?> providerClass);
+
+	@Message(id = 28, value = "Unexpected exception during isValid call.")
+	ValidationException getExceptionDuringIsValidCall(@Cause RuntimeException e);
+
+	@Message(id = 29, value = "Constraint factory returned null when trying to create instance of %s.")
+	ValidationException getConstraintFactoryMustNotReturnNullException(String validatorClassName);
+
+	@Message(id = 30, value = "No validator could be found for type: %s.")
+	UnexpectedTypeException getNoValidatorFoundForTypeException(String className);
+
+	@Message(id = 31,
+			value = "There are multiple validator classes which could validate the type %1$s. The validator classes are: %2$s.")
+	UnexpectedTypeException getMoreThanOneValidatorFoundForTypeException(Type type, String validatorClasses);
+
+	@Message(id = 32, value = "Unable to initialize %s.")
+	ValidationException getUnableToInitializeConstraintValidatorException(String validatorClassName, @Cause RuntimeException e);
+
+	@Message(id = 33, value = "At least one custom message must be created if the default error message gets disabled.")
+	ValidationException getAtLeastOneCustomMessageMustBeCreatedException();
+
+	@Message(id = 34, value = "%s is not a valid Java Identifier.")
+	IllegalArgumentException getInvalidJavaIdentifierException(String identifier);
+
+	@Message(id = 35, value = "Unable to parse property path %s.")
+	IllegalArgumentException getUnableToParsePropertyPathException(String propertyPath);
+
+	@Message(id = 36, value = "Type %s not supported.")
+	ValidationException getTypeNotSupportedException(Class<?> type);
+
+	@Message(id = 37,
+			value = "Inconsistent fail fast configuration. Fail fast enabled via programmatic API, but explicitly disabled via properties.")
+	ValidationException getInconsistentFailFastConfigurationException();
+
+	@Message(id = 38, value = "Invalid property path.")
+	IllegalArgumentException getInvalidPropertyPathException();
+
+	@Message(id = 39, value = "Invalid property path. There is no property %1$s in entity %2$s.")
+	IllegalArgumentException getInvalidPropertyPathException(String propertyName, String beanClassName);
+
+	@Message(id = 40, value = "Property path must provide index or map key.")
+	IllegalArgumentException getPropertyPathMustProvideIndexOrMapKeyException();
+
+	@Message(id = 41, value = "Call to TraversableResolver.isReachable() threw an exception.")
+	ValidationException getErrorDuringCallOfTraversableResolverIsReachableException(@Cause RuntimeException e);
+
+	@Message(id = 42, value = "Call to TraversableResolver.isCascadable() threw an exception.")
+	ValidationException getErrorDuringCallOfTraversableResolverIsCascadableException(@Cause RuntimeException e);
+
+	@Message(id = 43, value = "Unable to expand default group list %1$s into sequence %2$s.")
+	GroupDefinitionException getUnableToExpandDefaultGroupListException(List<?> defaultGroupList, List<?> groupList);
+
+	@Message(id = 44, value = "At least one group has to be specified.")
+	IllegalArgumentException getAtLeastOneGroupHasToBeSpecifiedException();
+
+	@Message(id = 45, value = "A group has to be an interface. %s is not.")
+	ValidationException getGroupHasToBeAnInterfaceException(String className);
+
+	@Message(id = 46, value = "Sequence definitions are not allowed as composing parts of a sequence.")
+	GroupDefinitionException getSequenceDefinitionsNotAllowedException();
+
+	@Message(id = 47, value = "Cyclic dependency in groups definition")
+	GroupDefinitionException getCyclicDependencyInGroupsDefinitionException();
+
+	@Message(id = 48, value = "Unable to expand group sequence.")
+	GroupDefinitionException getUnableToExpandGroupSequenceException();
+
+	@Message(id = 49, value = "The given index must be between %1$s and %2$s.")
+	IndexOutOfBoundsException getInvalidIndexException(String lowerBound, String upperBound);
+
+	@Message(id = 50, value = "Missing format string in template: %s.")
+	ValidationException getMissingFormatStringInTemplateException(String expression);
+
+	@Message(id = 51, value = "Invalid format: %s.")
+	ValidationException throwInvalidFormat(String message, @Cause IllegalFormatException e);
+
+	@Message(id = 52,
+			value = "Default group sequence and default group sequence provider cannot be defined at the same time.")
+	GroupDefinitionException getInvalidDefaultGroupSequenceDefinitionException();
+
+	@Message(id = 53, value = "'Default.class' cannot appear in default group sequence list.")
+	GroupDefinitionException getNoDefaultGroupInGroupSequenceException();
+
+	@Message(id = 54, value = "%s must be part of the redefined default group sequence.")
+	GroupDefinitionException getBeanClassMustBePartOfRedefinedDefaultGroupSequenceException(String beanClassName);
+
+	@Message(id = 55, value = "The default group sequence provider defined for %s has the wrong type")
+	GroupDefinitionException getWrongDefaultGroupSequenceProviderTypeException(String beanClassName);
+
+	@Message(id = 56, value = "Method %1$s doesn't have a parameter with index %2$d.")
+	IllegalArgumentException getInvalidMethodParameterIndexException(String method, int index);
+
+	@Message(id = 57, value = "Unable to find constraints for  %s.")
+	ValidationException getUnableToFindAnnotationConstraintsException(Class<? extends Annotation> annotationClass);
+
+	@Message(id = 58, value = "Unable to read annotation attributes: %s.")
+	ValidationException getUnableToReadAnnotationAttributesException(Class<? extends Annotation> annotationClass, @Cause Exception e);
+
+	@Message(id = 59, value = "Unable to retrieve annotation parameter value.")
+	ValidationException getUnableToRetrieveAnnotationParameterValueException(@Cause Exception e);
+
+	@Message(id = 60, value = "Multiple definitions of default group sequence provider.")
+	GroupDefinitionException getMultipleDefinitionOfDefaultGroupSequenceProviderException();
+
+	@Message(id = 61, value = "Multiple definitions of default group sequence.")
+	GroupDefinitionException getMultipleDefinitionOfDefaultGroupSequenceException();
+
+	@Message(id = 62,
+			value = "Method %1$s has %2$s parameters, but the passed list of parameter meta data has a size of %3$s.")
+	IllegalArgumentException getInvalidLengthOfParameterMetaDataListException(Method method, int nbParameters, int listSize);
+
+	@Message(id = 63, value = "Unable to instantiate %s.")
+	ValidationException getUnableToInstantiateException(String className, @Cause Exception e);
+
+	ValidationException getUnableToInstantiateException(Class<?> clazz, @Cause Exception e);
+
+	@Message(id = 64, value = "Unable to instantiate %1$s: %2$s.")
+	ValidationException getUnableToInstantiateException(String message, Class<?> clazz, @Cause Exception e);
+
+	@Message(id = 65, value = "Unable to load class: %s.")
+	ValidationException getUnableToLoadClassException(String className);
+
+	ValidationException getUnableToLoadClassException(String className, @Cause Exception e);
+
+	@Message(id = 66, value = "Unable to instantiate Bean Validation provider %s.")
+	ValidationException getUnableToInstantiateBeanValidationProviderException(List<String> providerName, @Cause Exception e);
+
+	@Message(id = 67, value = "Unable to read %s.")
+	ValidationException getUnableToReadServicesFileException(String servicesFileName, @Cause Exception e);
+
+	@Message(id = 68, value = "Start index cannot be negative: %d.")
+	IllegalArgumentException getStartIndexCannotBeNegativeException(int startIndex);
+
+	@Message(id = 69, value = "End index cannot be negative: %d.")
+	IllegalArgumentException getEndIndexCannotBeNegativeException(int endIndex);
+
+	@Message(id = 70, value = "Invalid Range: %1$d > %2$d.")
+	IllegalArgumentException getInvalidRangeException(int startIndex, int endIndex);
+
+	@Message(id = 71, value = "A explicitly specified check digit must lie outside the interval: [%1$d, %2$d].")
+	IllegalArgumentException getInvalidCheckDigitException(int startIndex, int endIndex);
+
+	@Message(id = 72, value = "'%c' is not a digit.")
+	NumberFormatException getCharacterIsNotADigitException(char c);
+
+	@Message(id = 73, value = "Parameters starting with 'valid' are not allowed in a constraint.")
+	ConstraintDefinitionException getConstraintParametersCannotStartWithValidException();
+
+	@Message(id = 74, value = "%2$s contains Constraint annotation, but does not contain a %1$s parameter.")
+	ConstraintDefinitionException getConstraintWithoutMandatoryParameterException(String parameterName, String constraintName);
+
+	@Message(id = 75,
+			value = "%s contains Constraint annotation, but the payload parameter default value is not the empty array.")
+	ConstraintDefinitionException getWrongDefaultValueForPayloadParameterException(String constraintName);
+
+	@Message(id = 76, value = "%s contains Constraint annotation, but the payload parameter is of wrong type.")
+	ConstraintDefinitionException getWrongTypeForPayloadParameterException(String constraintName, @Cause ClassCastException e);
+
+	@Message(id = 77,
+			value = "%s contains Constraint annotation, but the groups parameter default value is not the empty array.")
+	ConstraintDefinitionException getWrongDefaultValueForGroupsParameterException(String constraintName);
+
+	@Message(id = 78, value = "%s contains Constraint annotation, but the groups parameter is of wrong type.")
+	ConstraintDefinitionException getWrongTypeForGroupsParameterException(String constraintName, @Cause ClassCastException e);
+
+	@Message(id = 79,
+			value = "%s contains Constraint annotation, but the message parameter is not of type java.lang.String.")
+	ConstraintDefinitionException getWrongTypeForMessageParameterException(String constraintName);
+
+	@Message(id = 80, value = "Overridden constraint does not define an attribute with name %s.")
+	ConstraintDefinitionException getOverriddenConstraintAttributeNotFoundException(String attributeName);
+
+	@Message(id = 81,
+			value = "The overriding type of a composite constraint must be identical to the overridden one. Expected %1$s found %2$s.")
+	ConstraintDefinitionException getWrongAttributeTypeForOverriddenConstraintException(String expectedReturnType, Class<?> currentReturnType);
+
+	@Message(id = 82, value = "Wrong parameter type. Expected: %1$s Actual: %2$s.")
+	ValidationException getWrongParameterTypeException(String expectedType, String currentType);
+
+	@Message(id = 83, value = "The specified annotation defines no parameter '%s'.")
+	ValidationException getUnableToFindAnnotationParameterException(String parameterName, @Cause NoSuchMethodException e);
+
+	@Message(id = 84, value = "Unable to get '%1$s' from %2$s.")
+	ValidationException getUnableToGetAnnotationParameterException(String parameterName, String annotationName, @Cause Exception e);
+
+	@Message(id = 85, value = "No value provided for %s.")
+	IllegalArgumentException getNoValueProvidedForAnnotationParameterException(String parameterName);
+
+	@Message(id = 86, value = "Trying to instantiate %1$s with unknown parameter(s): %2$s.")
+	RuntimeException getTryingToInstantiateAnnotationWithUnknownParametersException(Class<?> annotationType, Set<String> unknownParameters);
+
+	@Message(id = 87, value = "Property name cannot be null or empty.")
+	IllegalArgumentException getPropertyNameCannotBeNullOrEmptyException();
+
+	@Message(id = 88, value = "Element type has to be FIELD or METHOD.")
+	IllegalArgumentException getElementTypeHasToBeFieldOrMethodException();
+
+	@Message(id = 89, value = "Member %s is neither a field nor a method.")
+	IllegalArgumentException getMemberIsNeitherAFieldNorAMethodException(Member member);
+
+	@Message(id = 90, value = "Unable to access %s.")
+	ValidationException getUnableToAccessMemberException(String memberName, @Cause Exception e);
+
+	@Message(id = 91, value = "%s has to be a primitive type.")
+	IllegalArgumentException getHasToBeAPrimitiveTypeException(Class<?> clazz);
+
+	@Message(id = 93, value = "null is an invalid type for a constraint validator.")
+	ValidationException getNullIsAnInvalidTypeForAConstraintValidatorException();
+
+	@Message(id = 94, value = "Missing actual type argument for type parameter: %s.")
+	IllegalArgumentException getMissingActualTypeArgumentForTypeParameterException(TypeVariable<?> typeParameter);
+
+	@Message(id = 95, value = "Unable to instantiate constraint factory class %s.")
+	ValidationException getUnableToInstantiateConstraintFactoryClassException(String constraintFactoryClassName, @Cause ValidationException e);
+
+	@Message(id = 96, value = "Unable to open input stream for mapping file %s.")
+	ValidationException getUnableToOpenInputStreamForMappingFileException(String mappingFileName);
+
+	@Message(id = 97, value = "Unable to instantiate message interpolator class %s.")
+	ValidationException getUnableToInstantiateMessageInterpolatorClassException(String messageInterpolatorClassName, @Cause Exception e);
+
+	@Message(id = 98, value = "Unable to instantiate traversable resolver class %s.")
+	ValidationException getUnableToInstantiateTraversableResolverClassException(String traversableResolverClassName, @Cause Exception e);
+
+	@Message(id = 99, value = "Unable to instantiate validation provider class %s.")
+	ValidationException getUnableToInstantiateValidationProviderClassException(String providerClassName, @Cause Exception e);
+
+	@Message(id = 100, value = "Unable to parse %s.")
+	ValidationException getUnableToParseValidationXmlFileException(String file, @Cause JAXBException e);
+
+	@Message(id = 101, value = "%s is not an annotation.")
+	ValidationException getIsNotAnAnnotationException(String annotationClassName);
+
+	@Message(id = 102, value = "%s is not a constraint validator class.")
+	ValidationException getIsNotAConstraintValidatorClassException(Class<?> validatorClass);
+
+	@Message(id = 103, value = "%s has already be configured in xml.")
+	ValidationException getBeanClassHasAlreadyBeConfiguredInXmlException(String beanClassName);
+
+	@Message(id = 104, value = "%1$s is defined twice in mapping xml for bean %2$s.")
+	ValidationException getIsDefinedTwiceInMappingXmlForBeanException(String name, String beanClassName);
+
+	@Message(id = 105, value = "%1$s does not contain the fieldType %2$s.")
+	ValidationException getBeanDoesNotContainTheFieldException(String beanClassName, String fieldName);
+
+	@Message(id = 106, value = "%1$s does not contain the property %2$s.")
+	ValidationException getBeanDoesNotContainThePropertyException(String beanClassName, String getterName);
+
+	@Message(id = 107, value = "Annotation of type %1$s does not contain a parameter %2$s.")
+	ValidationException getAnnotationDoesNotContainAParameterException(String annotationClassName, String parameterName);
+
+	@Message(id = 108, value = "Attempt to specify an array where single value is expected.")
+	ValidationException getAttemptToSpecifyAnArrayWhereSingleValueIsExpectedException();
+
+	@Message(id = 109, value = "Unexpected parameter value.")
+	ValidationException getUnexpectedParameterValueException();
+
+	ValidationException getUnexpectedParameterValueException(@Cause ClassCastException e);
+
+	@Message(id = 110, value = "Invalid %s format.")
+	ValidationException getInvalidNumberFormatException(String formatName, @Cause NumberFormatException e);
+
+	@Message(id = 111, value = "Invalid char value: %s.")
+	ValidationException getInvalidCharValueException(String value);
+
+	@Message(id = 112, value = "Invalid return type: %s. Should be a enumeration type.")
+	ValidationException getInvalidReturnTypeException(Class<?> returnType, @Cause ClassCastException e);
+
+	@Message(id = 113, value = "%s, %s, %s are reserved parameter names.")
+	ValidationException getReservedParameterNamesException(String messageParameterName, String groupsParameterName, String payloadParameterName);
+
+	@Message(id = 114, value = "Specified payload class %s does not implement javax.validation.Payload")
+	ValidationException getWrongPayloadClassException(String payloadClassName);
+
+	@Message(id = 115, value = "Error parsing mapping file.")
+	ValidationException getErrorParsingMappingFileException(@Cause JAXBException e);
+
+	@Message(id = 116, value = "%s")
+	IllegalArgumentException getIllegalArgumentException(String message);
+
+	@Message(id = 117, value = "Invalid value for property %s: %s")
+	ValidationException getInvalidPropertyValue(String propertyName, String propertyValue, @Cause Exception e);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/LoggerFactory.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/LoggerFactory.java
new file mode 100644
index 0000000..ea2231c
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/LoggerFactory.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util.logging;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2012 SERLI
+ */
+public final class LoggerFactory {
+	public static Log make() {
+		Throwable t = new Throwable();
+		StackTraceElement directCaller = t.getStackTrace()[1];
+		return Logger.getMessageLogger( Log.class, directCaller.getClassName() );
+	}
+
+	// private constructor to avoid instantiation
+	private LoggerFactory(){
+	}
+}
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Messages.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Messages.java
new file mode 100644
index 0000000..36d72ba
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/Messages.java
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util.logging;
+
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at MessageBundle(projectCode = "HV")
+public interface Messages {
+	/**
+	 * The messages.
+	 */
+	Messages MESSAGES = org.jboss.logging.Messages.getBundle( Messages.class );
+
+	@Message(value = "must not be null.")
+	String mustNotBeNull();
+
+	@Message(value = "%s must not be null.")
+	String mustNotBeNull(String parameterName);
+
+	@Message(value = "The parameter \"%s\" must not be null.")
+	String parameterMustNotBeNull(String parameterName);
+
+	@Message(value = "The parameter \"%s\" must not be empty.")
+	String parameterMustNotBeEmpty(String parameterName);
+
+	@Message(value = "The bean type cannot be null.")
+	String beanTypeCannotBeNull();
+
+	@Message(value = "null is not allowed as property path.")
+	String propertyPathCannotBeNull();
+
+	@Message(value = "The property name must not be empty.")
+	String propertyNameMustNotBeEmpty();
+
+	@Message(value = "null passed as group name.")
+	String groupMustNotBeNull();
+
+	@Message(value = "The bean type must not be null when creating a constraint mapping.")
+	String beanTypeMustNotBeNull();
+
+	@Message(value = "The method name must not be null.")
+	String methodNameMustNotBeNull();
+
+	@Message(value = "The object to be validated must not be null.")
+	String validatedObjectMustNotBeNull();
+
+	@Message(value = "The method to be validated must not be null.")
+	String validatedMethodMustNotBeNull();
+
+	@Message(value = "The class cannot be null.")
+	String classCannotBeNull();
+
+	@Message(value = "Class is null.")
+	String classIsNull();
+
+	@Message(value = "No JSR 223 script engine found for language \"%s\".")
+	String unableToFindScriptEngine(String languageName);
+}
+
+
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/package.html
new file mode 100644
index 0000000..33f4f1f
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/logging/package.html
@@ -0,0 +1,24 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Logging classes.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/util/package.html
new file mode 100644
index 0000000..14bd910
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Independent helper classes.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/ConstructorInstance.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/ConstructorInstance.java
new file mode 100644
index 0000000..804c86e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/ConstructorInstance.java
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.security.PrivilegedAction;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Execute instance creation as privileged action.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public final class ConstructorInstance<T> implements PrivilegedAction<T> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final Constructor<T> constructor;
+	private final Object[] initArgs;
+
+	public static <T> ConstructorInstance<T> action(Constructor<T> constructor, Object... initArgs) {
+		return new ConstructorInstance<T>( constructor, initArgs );
+	}
+
+	private ConstructorInstance(Constructor<T> constructor, Object... initArgs) {
+		this.constructor = constructor;
+		this.initArgs = initArgs;
+	}
+
+	public T run() {
+		try {
+			return constructor.newInstance( initArgs );
+		}
+		catch ( InstantiationException e ) {
+			throw log.getUnableToInstantiateException( constructor.getName(), e );
+		}
+		catch ( IllegalAccessException e ) {
+			throw log.getUnableToInstantiateException( constructor.getName(), e );
+		}
+		catch ( InvocationTargetException e ) {
+			throw log.getUnableToInstantiateException( constructor.getName(), e );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getUnableToInstantiateException( constructor.getName(), e );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetAnnotationParameter.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetAnnotationParameter.java
new file mode 100644
index 0000000..708233e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetAnnotationParameter.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.PrivilegedAction;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public final class GetAnnotationParameter<T> implements PrivilegedAction<T> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final Annotation annotation;
+	private final String parameterName;
+	private final Class<T> type;
+
+	public static <T> GetAnnotationParameter<T> action(Annotation annotation, String parameterName, Class<T> type) {
+		return new GetAnnotationParameter<T>( annotation, parameterName, type );
+	}
+
+	private GetAnnotationParameter(Annotation annotation, String parameterName, Class<T> type) {
+		this.annotation = annotation;
+		this.parameterName = parameterName;
+		this.type = type;
+	}
+
+	public T run() {
+		try {
+			Method m = annotation.getClass().getMethod( parameterName );
+			m.setAccessible( true );
+			Object o = m.invoke( annotation );
+			if ( o.getClass().getName().equals( type.getName() ) ) {
+				return (T) o;
+			}
+			else {
+				throw log.getWrongParameterTypeException( type.getName(), o.getClass().getName() );
+			}
+		}
+		catch ( NoSuchMethodException e ) {
+			throw log.getUnableToFindAnnotationParameterException( parameterName, e );
+		}
+		catch ( IllegalAccessException e ) {
+			throw log.getUnableToGetAnnotationParameterException( parameterName, annotation.getClass().getName(), e );
+		}
+		catch ( InvocationTargetException e ) {
+			throw log.getUnableToGetAnnotationParameterException( parameterName, annotation.getClass().getName(), e );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetClassLoader.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetClassLoader.java
new file mode 100644
index 0000000..44a9a42
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetClassLoader.java
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+
+import org.hibernate.validator.internal.util.Contracts;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetClassLoader implements PrivilegedAction<ClassLoader> {
+	private final Class<?> clazz;
+
+	public static GetClassLoader fromContext() {
+		return new GetClassLoader( null );
+	}
+
+	public static GetClassLoader fromClass(Class<?> clazz) {
+		Contracts.assertNotNull( clazz, MESSAGES.classIsNull() );
+		return new GetClassLoader( clazz );
+	}
+
+	private GetClassLoader(Class<?> clazz) {
+		this.clazz = clazz;
+	}
+
+	public ClassLoader run() {
+		if ( clazz != null ) {
+			return clazz.getClassLoader();
+		}
+		else {
+			return Thread.currentThread().getContextClassLoader();
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetConstructor.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetConstructor.java
new file mode 100644
index 0000000..dbca5de
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetConstructor.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Constructor;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetConstructor<T> implements PrivilegedAction<Constructor<T>> {
+	private final Class<T> clazz;
+	private final Class<?>[] params;
+
+	public static <T> GetConstructor<T> action(Class<T> clazz, Class<?>... params) {
+		return new GetConstructor<T>( clazz, params );
+	}
+
+	private GetConstructor(Class<T> clazz, Class<?>... params) {
+		this.clazz = clazz;
+		this.params = params;
+	}
+
+	public Constructor<T> run() {
+		try {
+			return clazz.getConstructor(params);
+		}
+		catch ( NoSuchMethodException e ) {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredField.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredField.java
new file mode 100644
index 0000000..cbc5e4d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredField.java
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Field;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetDeclaredField implements PrivilegedAction<Field> {
+	private final Class<?> clazz;
+	private final String fieldName;
+
+	public static GetDeclaredField action(Class<?> clazz, String fieldName) {
+		return new GetDeclaredField( clazz, fieldName );
+	}
+
+	private GetDeclaredField(Class<?> clazz, String fieldName) {
+		this.clazz = clazz;
+		this.fieldName = fieldName;
+	}
+
+	public Field run() {
+		try {
+			final Field field = clazz.getDeclaredField( fieldName );
+			field.setAccessible( true );
+			return field;
+		}
+		catch ( NoSuchFieldException e ) {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredFields.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredFields.java
new file mode 100644
index 0000000..ff1b233
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredFields.java
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+import java.lang.reflect.Field;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetDeclaredFields implements PrivilegedAction<Field[]> {
+	private final Class<?> clazz;
+
+	public static GetDeclaredFields action(Class<?> clazz) {
+		return new GetDeclaredFields( clazz );
+	}
+
+	private GetDeclaredFields(Class<?> clazz) {
+		this.clazz = clazz;
+	}
+
+	public Field[] run() {
+		return clazz.getDeclaredFields();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethod.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethod.java
new file mode 100644
index 0000000..aa009cc
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethod.java
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Method;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class GetDeclaredMethod implements PrivilegedAction<Method> {
+	private final Class<?> clazz;
+	private final String methodName;
+	private final Class<?>[] parameterTypes;
+
+	public static GetDeclaredMethod action(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
+		return new GetDeclaredMethod( clazz, methodName, parameterTypes );
+	}
+
+	private GetDeclaredMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
+		this.clazz = clazz;
+		this.methodName = methodName;
+		this.parameterTypes = parameterTypes;
+	}
+
+	public Method run() {
+		try {
+			return clazz.getDeclaredMethod( methodName, parameterTypes );
+		}
+		catch ( NoSuchMethodException e ) {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethods.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethods.java
new file mode 100644
index 0000000..309ba22
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetDeclaredMethods.java
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+import java.lang.reflect.Method;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetDeclaredMethods implements PrivilegedAction<Method[]> {
+	private final Class<?> clazz;
+
+	public static GetDeclaredMethods action(Class<?> clazz) {
+		return new GetDeclaredMethods( clazz );
+	}
+
+	private GetDeclaredMethods(Class<?> clazz) {
+		this.clazz = clazz;
+	}
+
+	public Method[] run() {
+		return clazz.getDeclaredMethods();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethod.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethod.java
new file mode 100644
index 0000000..90cbda5
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethod.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Method;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetMethod implements PrivilegedAction<Method> {
+	private final Class<?> clazz;
+	private final String methodName;
+
+	public static GetMethod action(Class<?> clazz, String methodName) {
+		return new GetMethod( clazz, methodName );
+	}
+
+	private GetMethod(Class<?> clazz, String methodName) {
+		this.clazz = clazz;
+		this.methodName = methodName;
+	}
+
+	public Method run() {
+		try {
+			return clazz.getMethod(methodName);
+		}
+		catch ( NoSuchMethodException e ) {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethodFromPropertyName.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethodFromPropertyName.java
new file mode 100644
index 0000000..dbb03c6
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethodFromPropertyName.java
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.Method;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public final class GetMethodFromPropertyName implements PrivilegedAction<Method> {
+	private final Class<?> clazz;
+	private final String property;
+
+	public static GetMethodFromPropertyName action(Class<?> clazz, String property) {
+		return new GetMethodFromPropertyName( clazz, property );
+	}
+
+	private GetMethodFromPropertyName(Class<?> clazz, String property) {
+		this.clazz = clazz;
+		this.property = property;
+	}
+
+	public Method run() {
+		try {
+			char string[] = property.toCharArray();
+			string[0] = Character.toUpperCase( string[0] );
+			String fullMethodName = new String( string );
+			try {
+				return clazz.getMethod( "get" + fullMethodName );
+			}
+			catch ( NoSuchMethodException e ) {
+				return clazz.getMethod( "is" + fullMethodName );
+			}
+		}
+		catch ( NoSuchMethodException e ) {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethods.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethods.java
new file mode 100644
index 0000000..58bc377
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/GetMethods.java
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+import java.lang.reflect.Method;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public final class GetMethods implements PrivilegedAction<Method[]> {
+	private final Class<?> clazz;
+
+	public static GetMethods action(Class<?> clazz) {
+		return new GetMethods( clazz );
+	}
+
+	private GetMethods(Class<?> clazz) {
+		this.clazz = clazz;
+	}
+
+	public Method[] run() {
+		return clazz.getMethods();
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/LoadClass.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/LoadClass.java
new file mode 100644
index 0000000..36068c8
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/LoadClass.java
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class LoadClass implements PrivilegedAction<Class<?>> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private static final String HIBERNATE_VALIDATOR_CLASS_NAME = "org.hibernate.validator";
+
+	private final String className;
+
+	private final Class<?> caller;
+
+	public static LoadClass action(String className, Class<?> caller) {
+		return new LoadClass( className, caller );
+	}
+
+	private LoadClass(String className, Class<?> caller) {
+		this.className = className;
+		this.caller = caller;
+	}
+
+	public Class<?> run() {
+		if ( className.startsWith( HIBERNATE_VALIDATOR_CLASS_NAME ) ) {
+			return loadClassInValidatorNameSpace();
+		}
+		else {
+			return loadNonValidatorClass();
+		}
+	}
+
+	// HV-363 - library internal classes are loaded via Class.forName first
+
+	private Class<?> loadClassInValidatorNameSpace() {
+		try {
+			return Class.forName( className, true, caller.getClassLoader() );
+		}
+		catch ( ClassNotFoundException e ) {
+			//ignore -- try using the class loader of context first
+		}
+		catch ( RuntimeException e ) {
+			// ignore
+		}
+		try {
+			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+			if ( contextClassLoader != null ) {
+				return contextClassLoader.loadClass( className );
+			}
+			else {
+				throw log.getUnableToLoadClassException( className );
+			}
+		}
+		catch ( ClassNotFoundException e ) {
+			throw log.getUnableToLoadClassException( className, e );
+		}
+	}
+
+	private Class<?> loadNonValidatorClass() {
+		try {
+			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+			if ( contextClassLoader != null ) {
+				return contextClassLoader.loadClass( className );
+			}
+		}
+		catch ( ClassNotFoundException e ) {
+			// ignore - try using the classloader of the caller first
+		}
+		catch ( RuntimeException e ) {
+			// ignore
+		}
+		try {
+			return Class.forName( className, true, caller.getClassLoader() );
+		}
+		catch ( ClassNotFoundException e ) {
+			throw log.getUnableToLoadClassException( className, e );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/NewInstance.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/NewInstance.java
new file mode 100644
index 0000000..ad74d63
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/NewInstance.java
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.security.PrivilegedAction;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Execute instance creation as privileged action.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public final class NewInstance<T> implements PrivilegedAction<T> {
+
+	private static final Log log = LoggerFactory.make();
+
+	private final Class<T> clazz;
+	private final String message;
+
+	public static <T> NewInstance<T> action(Class<T> clazz, String message) {
+		return new NewInstance<T>( clazz, message );
+	}
+
+	private NewInstance(Class<T> clazz, String message) {
+		this.clazz = clazz;
+		this.message = message;
+	}
+
+	public T run() {
+		try {
+			return clazz.newInstance();
+		}
+		catch ( InstantiationException e ) {
+			throw log.getUnableToInstantiateException( message, clazz, e );
+		}
+		catch ( IllegalAccessException e ) {
+			throw log.getUnableToInstantiateException( clazz, e );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getUnableToInstantiateException( clazz, e );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/SetAccessibility.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/SetAccessibility.java
new file mode 100644
index 0000000..5588775
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/SetAccessibility.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.privilegedactions;
+
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Member;
+import java.security.PrivilegedAction;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public final class SetAccessibility implements PrivilegedAction<Object> {
+	private final Member member;
+
+	public static SetAccessibility action(Member member) {
+		return new SetAccessibility( member );
+	}
+
+	private SetAccessibility(Member member) {
+		this.member = member;
+	}
+
+	public Object run() {
+		( (AccessibleObject) member ).setAccessible( true );
+		return member;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/package.html
new file mode 100644
index 0000000..850c499
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Implementations of PrivilegedAction in order to execute reflection operations in a security manager.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluator.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluator.java
new file mode 100644
index 0000000..382e1e3
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluator.java
@@ -0,0 +1,81 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.scriptengine;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+
+/**
+ * A wrapper around JSR 223 {@link ScriptEngine}s. This class is thread-safe.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ScriptEvaluator {
+
+	private final ScriptEngine engine;
+
+	/**
+	 * Creates a new script executor.
+	 *
+	 * @param engine The engine to be wrapped.
+	 */
+	public ScriptEvaluator(ScriptEngine engine) {
+		this.engine = engine;
+	}
+
+	/**
+	 * Makes the given object available in then engine-scoped script context and executes the given script.
+	 * The execution of the script happens either synchronized or unsynchronized, depending on the engine's
+	 * threading abilities.
+	 *
+	 * @param script The script to be executed.
+	 * @param obj The object to be put into the context.
+	 * @param objectAlias The name under which the given object shall be put into the context.
+	 *
+	 * @return The script's result.
+	 *
+	 * @throws ScriptException In case of any errors during script execution.
+	 */
+	public Object evaluate(String script, Object obj, String objectAlias) throws ScriptException {
+		if ( engineAllowsParallelAccessFromMultipleThreads() ) {
+			return doEvaluate( script, obj, objectAlias );
+		}
+		else {
+			synchronized ( engine ) {
+				return doEvaluate( script, obj, objectAlias );
+			}
+		}
+	}
+
+	private Object doEvaluate(String script, Object obj, String objectAlias) throws ScriptException {
+		engine.put( objectAlias, obj );
+		return engine.eval( script );
+	}
+
+	/**
+	 * Checks, whether the given engine is thread-safe or not.
+	 *
+	 * @return True, if the given engine is thread-safe, false otherwise.
+	 */
+	private boolean engineAllowsParallelAccessFromMultipleThreads() {
+
+		String threadingType = (String) engine.getFactory().getParameter( "THREADING" );
+
+		return "THREAD-ISOLATED".equals( threadingType ) || "STATELESS".equals( threadingType );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluatorFactory.java b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluatorFactory.java
new file mode 100644
index 0000000..72ca556
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/ScriptEvaluatorFactory.java
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.util.scriptengine;
+
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.logging.Messages.MESSAGES;
+
+
+/**
+ * Factory responsible for the creation of {@link ScriptEvaluator}s. This
+ * class is thread-safe.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ScriptEvaluatorFactory {
+
+	private static final Log log = LoggerFactory.make();
+
+	/**
+	 * A reference with an instance of this factory. Allows the factory to be reused several times, but can be GC'ed if required.
+	 */
+	private static Reference<ScriptEvaluatorFactory> INSTANCE = new SoftReference<ScriptEvaluatorFactory>( new ScriptEvaluatorFactory() );
+
+	/**
+	 * A cache of script executors (keyed by language name).
+	 */
+	private ConcurrentMap<String, ScriptEvaluator> scriptExecutorCache = new ConcurrentHashMap<String, ScriptEvaluator>();
+
+	private ScriptEvaluatorFactory() {
+	}
+
+	/**
+	 * Retrieves an instance of this factory.
+	 *
+	 * @return A script evaluator factory. Never null.
+	 */
+	public static synchronized ScriptEvaluatorFactory getInstance() {
+
+		ScriptEvaluatorFactory theValue = INSTANCE.get();
+
+		if ( theValue == null ) {
+			theValue = new ScriptEvaluatorFactory();
+			INSTANCE = new SoftReference<ScriptEvaluatorFactory>( theValue );
+		}
+
+		return theValue;
+	}
+
+	/**
+	 * Retrieves a script executor for the given language.
+	 *
+	 * @param languageName The name of a scripting language as expected by {@link ScriptEngineManager#getEngineByName(String)}.
+	 *
+	 * @return A script executor for the given language. Never null.
+	 *
+	 * @throws ScriptException In case no JSR 223 compatible engine for the given language could be found.
+	 */
+	public ScriptEvaluator getScriptEvaluatorByLanguageName(String languageName) throws ScriptException {
+
+		if ( !scriptExecutorCache.containsKey( languageName ) ) {
+
+			ScriptEvaluator scriptExecutor = createNewScriptEvaluator( languageName );
+			scriptExecutorCache.putIfAbsent( languageName, scriptExecutor );
+		}
+
+		return scriptExecutorCache.get( languageName );
+	}
+
+	/**
+	 * Creates a new script executor for the given language.
+	 *
+	 * @param languageName A JSR 223 language name.
+	 *
+	 * @return A newly created script executor for the given language.
+	 *
+	 * @throws ScriptException In case no JSR 223 compatible engine for the given language could be found.
+	 */
+	private ScriptEvaluator createNewScriptEvaluator(String languageName) throws ScriptException {
+
+		ScriptEngine engine = new ScriptEngineManager().getEngineByName( languageName );
+
+		if ( engine == null ) {
+			throw new ScriptException( MESSAGES.unableToFindScriptEngine( languageName ) );
+		}
+
+		return new ScriptEvaluator( engine );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/package.html
new file mode 100644
index 0000000..7ad1915
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/util/scriptengine/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Classes related to the evaluation of script with ScriptEngine (JSR-223).</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationBootstrapParameters.java b/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationBootstrapParameters.java
new file mode 100644
index 0000000..f79d9e9
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationBootstrapParameters.java
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.xml;
+
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.spi.ValidationProvider;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ValidationBootstrapParameters {
+	private ConstraintValidatorFactory constraintValidatorFactory;
+	private MessageInterpolator messageInterpolator;
+	private TraversableResolver traversableResolver;
+	private ValidationProvider<?> provider;
+	private Class<? extends ValidationProvider<?>> providerClass = null;
+	private final Map<String, String> configProperties = new HashMap<String, String>();
+	private final Set<InputStream> mappings = new HashSet<InputStream>();
+
+	public final ConstraintValidatorFactory getConstraintValidatorFactory() {
+		return constraintValidatorFactory;
+	}
+
+	public final void setConstraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory) {
+		this.constraintValidatorFactory = constraintValidatorFactory;
+	}
+
+	public final MessageInterpolator getMessageInterpolator() {
+		return messageInterpolator;
+	}
+
+	public final void setMessageInterpolator(MessageInterpolator messageInterpolator) {
+		this.messageInterpolator = messageInterpolator;
+	}
+
+	public final ValidationProvider<?> getProvider() {
+		return provider;
+	}
+
+	public final void setProvider(ValidationProvider<?> provider) {
+		this.provider = provider;
+	}
+
+	public final Class<? extends ValidationProvider<?>> getProviderClass() {
+		return providerClass;
+	}
+
+	public final void setProviderClass(Class<? extends ValidationProvider<?>> providerClass) {
+		this.providerClass = providerClass;
+	}
+
+	public final TraversableResolver getTraversableResolver() {
+		return traversableResolver;
+	}
+
+	public final void setTraversableResolver(TraversableResolver traversableResolver) {
+		this.traversableResolver = traversableResolver;
+	}
+
+	public final void addConfigProperty(String key, String value) {
+		configProperties.put( key, value );
+	}
+
+	public final void addMapping(InputStream in) {
+		mappings.add( in );
+	}
+
+	public final void addAllMappings(Set<InputStream> mappings) {
+		this.mappings.addAll( mappings );
+	}
+
+	public final Set<InputStream> getMappings() {
+		return Collections.unmodifiableSet( mappings );
+	}
+
+	public final Map<String, String> getConfigProperties() {
+		return Collections.unmodifiableMap( configProperties );
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationXmlParser.java b/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationXmlParser.java
new file mode 100644
index 0000000..d8d1cc6
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/xml/ValidationXmlParser.java
@@ -0,0 +1,256 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *       hibernate-validator/src/main/docbook/en-US/modules/integration.xml~
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.internal.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidationException;
+import javax.validation.spi.ValidationProvider;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+import org.xml.sax.SAXException;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * Parser for <i>validation.xml</i> using JAXB.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ValidationXmlParser {
+
+	private static final Log log = LoggerFactory.make();
+	private static final String VALIDATION_XML_FILE = "META-INF/validation.xml";
+	private static final String VALIDATION_CONFIGURATION_XSD = "META-INF/validation-configuration-1.0.xsd";
+
+
+	/**
+	 * Tries to check whether a validation.xml file exists and parses it using JAXB.
+	 *
+	 * @return The parameters parsed out of <i>validation.xml</i> wrapped in an instance of <code>ConfigurationImpl.ValidationBootstrapParameters</code>.
+	 */
+	public final ValidationBootstrapParameters parseValidationXml() {
+		ValidationConfigType config = getValidationConfig();
+		ValidationBootstrapParameters xmlParameters = new ValidationBootstrapParameters();
+		if ( config != null ) {
+			// collect the parameters from the xml file
+			setProviderClassFromXml( config, xmlParameters );
+			setMessageInterpolatorFromXml( config, xmlParameters );
+			setTraversableResolverFromXml( config, xmlParameters );
+			setConstraintFactoryFromXml( config, xmlParameters );
+			setMappingStreamsFromXml( config, xmlParameters );
+			setPropertiesFromXml( config, xmlParameters );
+		}
+		return xmlParameters;
+	}
+
+	private void setConstraintFactoryFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
+		String constraintFactoryClass = config.getConstraintValidatorFactory();
+		if ( constraintFactoryClass != null ) {
+			try {
+				@SuppressWarnings("unchecked")
+				Class<ConstraintValidatorFactory> clazz = (Class<ConstraintValidatorFactory>) ReflectionHelper.loadClass(
+						constraintFactoryClass, this.getClass()
+				);
+				xmlParameters.setConstraintValidatorFactory(
+						ReflectionHelper.newInstance(
+								clazz, "constraint factory class"
+						)
+				);
+				log.usingConstraintFactory( constraintFactoryClass );
+			}
+			catch ( ValidationException e ) {
+				throw log.getUnableToInstantiateConstraintFactoryClassException( constraintFactoryClass, e );
+			}
+		}
+	}
+
+	private void setPropertiesFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
+		for ( PropertyType property : config.getProperty() ) {
+			if ( log.isDebugEnabled() ) {
+				log.debugf(
+						"Found property '%s' with value '%s' in validation.xml.",
+						property.getName(),
+						property.getValue()
+				);
+			}
+			xmlParameters.addConfigProperty( property.getName(), property.getValue() );
+		}
+	}
+
+	private void setMappingStreamsFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
+		for ( String mappingFileName : config.getConstraintMapping() ) {
+			log.debugf( "Trying to open input stream for %s.", mappingFileName);
+
+			InputStream in = getInputStreamForPath( mappingFileName );
+			if ( in == null ) {
+				throw log.getUnableToOpenInputStreamForMappingFileException( mappingFileName );
+			}
+			xmlParameters.addMapping( in );
+		}
+	}
+
+	private void setMessageInterpolatorFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
+		String messageInterpolatorClass = config.getMessageInterpolator();
+		if ( messageInterpolatorClass != null ) {
+			try {
+				@SuppressWarnings("unchecked")
+				Class<MessageInterpolator> clazz = (Class<MessageInterpolator>) ReflectionHelper.loadClass(
+						messageInterpolatorClass, this.getClass()
+				);
+				xmlParameters.setMessageInterpolator( clazz.newInstance() );
+				log.usingMessageInterpolator( messageInterpolatorClass );
+			}
+			catch ( ValidationException e ) {
+				throw log.getUnableToInstantiateMessageInterpolatorClassException( messageInterpolatorClass, e );
+			}
+			catch ( InstantiationException e ) {
+				throw log.getUnableToInstantiateMessageInterpolatorClassException( messageInterpolatorClass, e );
+			}
+			catch ( IllegalAccessException e ) {
+				throw log.getUnableToInstantiateMessageInterpolatorClassException( messageInterpolatorClass, e );
+			}
+		}
+	}
+
+	private void setTraversableResolverFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParameters) {
+		String traversableResolverClass = config.getTraversableResolver();
+		if ( traversableResolverClass != null ) {
+			try {
+				@SuppressWarnings("unchecked")
+				Class<TraversableResolver> clazz = (Class<TraversableResolver>) ReflectionHelper.loadClass(
+						traversableResolverClass, this.getClass()
+				);
+				xmlParameters.setTraversableResolver( clazz.newInstance() );
+				log.usingTraversableResolver( traversableResolverClass );
+			}
+			catch ( ValidationException e ) {
+				throw log.getUnableToInstantiateTraversableResolverClassException( traversableResolverClass, e );
+			}
+			catch ( InstantiationException e ) {
+				throw log.getUnableToInstantiateTraversableResolverClassException( traversableResolverClass, e );
+			}
+			catch ( IllegalAccessException e ) {
+				throw log.getUnableToInstantiateTraversableResolverClassException( traversableResolverClass, e );
+			}
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	private void setProviderClassFromXml(ValidationConfigType config, ValidationBootstrapParameters xmlParamters) {
+		String providerClassName = config.getDefaultProvider();
+		if ( providerClassName != null ) {
+			try {
+				xmlParamters.setProviderClass(
+						(Class<? extends ValidationProvider<?>>) ReflectionHelper.loadClass(
+								providerClassName, this.getClass()
+						)
+				);
+				log.usingValidationProvider( providerClassName );
+			}
+			catch ( Exception e ) {
+				throw log.getUnableToInstantiateValidationProviderClassException( providerClassName, e );
+			}
+		}
+	}
+
+	private ValidationConfigType getValidationConfig() {
+		log.debugf( "Trying to load %s for XML based Validator configuration.", VALIDATION_XML_FILE );
+		InputStream inputStream = getInputStreamForPath( VALIDATION_XML_FILE );
+		if ( inputStream == null ) {
+			log.debugf( "No %s found. Using annotation based configuration only.", VALIDATION_XML_FILE );
+			return null;
+		}
+
+		log.parsingXMLFile( VALIDATION_XML_FILE );
+
+		ValidationConfigType validationConfig;
+		Schema schema = getValidationConfigurationSchema();
+		try {
+			JAXBContext jc = JAXBContext.newInstance( ValidationConfigType.class );
+			Unmarshaller unmarshaller = jc.createUnmarshaller();
+			unmarshaller.setSchema( schema );
+			StreamSource stream = new StreamSource( inputStream );
+			JAXBElement<ValidationConfigType> root = unmarshaller.unmarshal( stream, ValidationConfigType.class );
+			validationConfig = root.getValue();
+		}
+		catch ( JAXBException e ) {
+			throw log.getUnableToParseValidationXmlFileException( VALIDATION_XML_FILE, e );
+		}
+		finally {
+			try {
+				inputStream.close();
+			}
+			catch ( IOException io ) {
+				log.unableToCloseXMLFileInputStream( VALIDATION_XML_FILE );
+			}
+		}
+		return validationConfig;
+	}
+
+	private InputStream getInputStreamForPath(String path) {
+		//TODO not sure if it's the right thing to removing '/'
+		String inputPath = path;
+		if ( inputPath.startsWith( "/" ) ) {
+			inputPath = inputPath.substring( 1 );
+		}
+
+		boolean isContextCL = true;
+		// try the context class loader first
+		ClassLoader loader = ReflectionHelper.getClassLoaderFromContext();
+
+		if ( loader == null ) {
+			log.debug( "No default context class loader, fall back to Bean Validation's loader" );
+			loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
+			isContextCL = false;
+		}
+		InputStream inputStream = loader.getResourceAsStream( inputPath );
+
+		// try the current class loader
+		if ( isContextCL && inputStream == null ) {
+			loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
+			inputStream = loader.getResourceAsStream( inputPath );
+		}
+		return inputStream;
+	}
+
+	private Schema getValidationConfigurationSchema() {
+		ClassLoader loader = ReflectionHelper.getClassLoaderFromClass( ValidationXmlParser.class );
+		URL schemaUrl = loader.getResource( VALIDATION_CONFIGURATION_XSD );
+		SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI );
+		Schema schema = null;
+		try {
+			schema = sf.newSchema( schemaUrl );
+		}
+		catch ( SAXException e ) {
+			log.unableToCreateSchema( VALIDATION_CONFIGURATION_XSD, e.getMessage() );
+		}
+		return schema;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/xml/XmlMappingParser.java b/project/engine/src/main/java/org/hibernate/validator/internal/xml/XmlMappingParser.java
new file mode 100644
index 0000000..48e8f6e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/xml/XmlMappingParser.java
@@ -0,0 +1,650 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.internal.xml;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.Payload;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+import org.xml.sax.SAXException;
+
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.core.MetaConstraint;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.location.BeanConstraintLocation;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class XmlMappingParser {
+
+	private static final Log log = LoggerFactory.make();
+	private static final String VALIDATION_MAPPING_XSD = "META-INF/validation-mapping-1.0.xsd";
+	private static final String MESSAGE_PARAM = "message";
+	private static final String GROUPS_PARAM = "groups";
+	private static final String PAYLOAD_PARAM = "payload";
+	private static final String PACKAGE_SEPARATOR = ".";
+
+	private final Set<Class<?>> processedClasses = newHashSet();
+	private final ConstraintHelper constraintHelper;
+	private final AnnotationProcessingOptions annotationProcessingOptions;
+	private final Map<Class<?>, Set<MetaConstraint<?>>> constraintMap;
+	private final Map<Class<?>, List<Member>> cascadedMembers;
+	private final Map<Class<?>, List<Class<?>>> defaultSequences;
+
+	public XmlMappingParser(ConstraintHelper constraintHelper) {
+		this.constraintHelper = constraintHelper;
+		this.annotationProcessingOptions = new AnnotationProcessingOptions();
+		this.constraintMap = newHashMap();
+		this.cascadedMembers = newHashMap();
+		this.defaultSequences = newHashMap();
+	}
+
+	public final void parse(Set<InputStream> mappingStreams) {
+
+		Schema schema = getMappingSchema();
+
+		try {
+			JAXBContext jc = JAXBContext.newInstance( ConstraintMappingsType.class );
+			Unmarshaller unmarshaller = jc.createUnmarshaller();
+			unmarshaller.setSchema( schema );
+
+			for ( InputStream in : mappingStreams ) {
+				ConstraintMappingsType mapping = getValidationConfig( in, unmarshaller );
+				String defaultPackage = mapping.getDefaultPackage();
+
+				parseConstraintDefinitions( mapping.getConstraintDefinition(), defaultPackage );
+
+				for ( BeanType bean : mapping.getBean() ) {
+					Class<?> beanClass = getClass( bean.getClazz(), defaultPackage );
+					checkClassHasNotBeenProcessed( processedClasses, beanClass );
+					annotationProcessingOptions.ignoreAnnotationConstraintForClass(
+							beanClass,
+							bean.getIgnoreAnnotations()
+					);
+					parseClassLevelOverrides( bean.getClassType(), beanClass, defaultPackage );
+					parseFieldLevelOverrides( bean.getField(), beanClass, defaultPackage );
+					parsePropertyLevelOverrides( bean.getGetter(), beanClass, defaultPackage );
+					processedClasses.add( beanClass );
+				}
+			}
+		}
+		catch ( JAXBException e ) {
+			throw log.getErrorParsingMappingFileException( e );
+		}
+	}
+
+	public final Set<Class<?>> getXmlConfiguredClasses() {
+		return processedClasses;
+	}
+
+	public final AnnotationProcessingOptions getAnnotationProcessingOptions() {
+		return annotationProcessingOptions;
+	}
+
+	public final <T> Set<MetaConstraint<?>> getConstraintsForClass(Class<T> beanClass) {
+
+		Set<MetaConstraint<?>> theValue = constraintMap.get( beanClass );
+
+		return theValue != null ? theValue : Collections.<MetaConstraint<?>>emptySet();
+	}
+
+	public final List<Member> getCascadedMembersForClass(Class<?> beanClass) {
+		if ( cascadedMembers.containsKey( beanClass ) ) {
+			return cascadedMembers.get( beanClass );
+		}
+		else {
+			return Collections.emptyList();
+		}
+	}
+
+	public final List<Class<?>> getDefaultSequenceForClass(Class<?> beanClass) {
+		return defaultSequences.get( beanClass );
+	}
+
+	@SuppressWarnings("unchecked")
+	private void parseConstraintDefinitions(List<ConstraintDefinitionType> constraintDefinitionList, String defaultPackage) {
+		for ( ConstraintDefinitionType constraintDefinition : constraintDefinitionList ) {
+			String annotationClassName = constraintDefinition.getAnnotation();
+
+			Class<?> clazz = getClass( annotationClassName, defaultPackage );
+			if ( !clazz.isAnnotation() ) {
+				throw log.getIsNotAnAnnotationException( annotationClassName );
+			}
+			Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) clazz;
+
+			ValidatedByType validatedByType = constraintDefinition.getValidatedBy();
+			List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorClasses = newArrayList();
+			if ( validatedByType.getIncludeExistingValidators() != null && validatedByType.getIncludeExistingValidators() ) {
+				constraintValidatorClasses.addAll( findConstraintValidatorClasses( annotationClass ) );
+			}
+			for ( String validatorClassName : validatedByType.getValue() ) {
+				Class<? extends ConstraintValidator<?, ?>> validatorClass;
+				validatorClass = (Class<? extends ConstraintValidator<?, ?>>) ReflectionHelper.loadClass(
+						validatorClassName,
+						this.getClass()
+				);
+
+
+				if ( !ConstraintValidator.class.isAssignableFrom( validatorClass ) ) {
+					throw log.getIsNotAConstraintValidatorClassException( validatorClass );
+				}
+
+				constraintValidatorClasses.add( validatorClass );
+			}
+			constraintHelper.addConstraintValidatorDefinition(
+					annotationClass, constraintValidatorClasses
+			);
+		}
+	}
+
+	private List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> findConstraintValidatorClasses(Class<? extends Annotation> annotationType) {
+		List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorDefinitionClasses = newArrayList();
+		if ( constraintHelper.isBuiltinConstraint( annotationType ) ) {
+			constraintValidatorDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
+		}
+		else {
+			Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
+					.getAnnotation( Constraint.class )
+					.validatedBy();
+			constraintValidatorDefinitionClasses.addAll( Arrays.asList( validatedBy ) );
+		}
+		return constraintValidatorDefinitionClasses;
+	}
+
+	private void checkClassHasNotBeenProcessed(Set<Class<?>> processedClasses, Class<?> beanClass) {
+		if ( processedClasses.contains( beanClass ) ) {
+			throw log.getBeanClassHasAlreadyBeConfiguredInXmlException( beanClass.getName() );
+		}
+	}
+
+	private void parseFieldLevelOverrides(List<FieldType> fields, Class<?> beanClass, String defaultPackage) {
+		List<String> fieldNames = newArrayList();
+		for ( FieldType fieldType : fields ) {
+			String fieldName = fieldType.getName();
+			if ( fieldNames.contains( fieldName ) ) {
+				throw log.getIsDefinedTwiceInMappingXmlForBeanException( fieldName, beanClass.getName() );
+			}
+			else {
+				fieldNames.add( fieldName );
+			}
+			final boolean containsField = ReflectionHelper.containsDeclaredField( beanClass, fieldName );
+			if ( !containsField ) {
+				throw log.getBeanDoesNotContainTheFieldException( beanClass.getName(), fieldName );
+			}
+			final Field field = ReflectionHelper.getDeclaredField( beanClass, fieldName );
+
+			// ignore annotations
+			boolean ignoreFieldAnnotation = fieldType.getIgnoreAnnotations() == null ? false : fieldType.getIgnoreAnnotations();
+			if ( ignoreFieldAnnotation ) {
+				annotationProcessingOptions.ignorePropertyLevelConstraintAnnotationsOnMember( field );
+			}
+
+			// valid
+			if ( fieldType.getValid() != null ) {
+				addCascadedMember( beanClass, field );
+			}
+
+			// constraints
+			for ( ConstraintType constraint : fieldType.getConstraint() ) {
+				MetaConstraint<?> metaConstraint = createMetaConstraint(
+						constraint, beanClass, field, defaultPackage
+				);
+				addMetaConstraint( beanClass, metaConstraint );
+			}
+		}
+	}
+
+	private void parsePropertyLevelOverrides(List<GetterType> getters, Class<?> beanClass, String defaultPackage) {
+		List<String> getterNames = newArrayList();
+		for ( GetterType getterType : getters ) {
+			String getterName = getterType.getName();
+			if ( getterNames.contains( getterName ) ) {
+				throw log.getIsDefinedTwiceInMappingXmlForBeanException( getterName, beanClass.getName() );
+			}
+			else {
+				getterNames.add( getterName );
+			}
+			boolean containsMethod = ReflectionHelper.containsMethodWithPropertyName( beanClass, getterName );
+			if ( !containsMethod ) {
+				throw log.getBeanDoesNotContainThePropertyException( beanClass.getName(), getterName );
+			}
+			final Method method = ReflectionHelper.getMethodFromPropertyName( beanClass, getterName );
+
+			// ignore annotations
+			boolean ignoreGetterAnnotation = getterType.getIgnoreAnnotations() == null ? false : getterType.getIgnoreAnnotations();
+			if ( ignoreGetterAnnotation ) {
+				annotationProcessingOptions.ignorePropertyLevelConstraintAnnotationsOnMember( method );
+			}
+
+			// valid
+			if ( getterType.getValid() != null ) {
+				addCascadedMember( beanClass, method );
+			}
+
+			// constraints
+			for ( ConstraintType constraint : getterType.getConstraint() ) {
+				MetaConstraint<?> metaConstraint = createMetaConstraint(
+						constraint, beanClass, method, defaultPackage
+				);
+				addMetaConstraint( beanClass, metaConstraint );
+			}
+		}
+	}
+
+	private void parseClassLevelOverrides(ClassType classType, Class<?> beanClass, String defaultPackage) {
+		if ( classType == null ) {
+			return;
+		}
+
+		// ignore annotation
+		if ( classType.getIgnoreAnnotations() != null ) {
+			annotationProcessingOptions.ignoreClassLevelConstraintAnnotations(
+					beanClass,
+					classType.getIgnoreAnnotations()
+			);
+		}
+
+		// group sequence
+		List<Class<?>> groupSequence = createGroupSequence( classType.getGroupSequence(), defaultPackage );
+		if ( !groupSequence.isEmpty() ) {
+			defaultSequences.put( beanClass, groupSequence );
+		}
+
+		// constraints
+		for ( ConstraintType constraint : classType.getConstraint() ) {
+			MetaConstraint<?> metaConstraint = createMetaConstraint( constraint, beanClass, null, defaultPackage );
+			addMetaConstraint( beanClass, metaConstraint );
+		}
+	}
+
+	private void addMetaConstraint(Class<?> beanClass, MetaConstraint<?> metaConstraint) {
+		if ( constraintMap.containsKey( beanClass ) ) {
+			constraintMap.get( beanClass ).add( metaConstraint );
+		}
+		else {
+			Set<MetaConstraint<?>> constraintList = newHashSet();
+			constraintList.add( metaConstraint );
+			constraintMap.put( beanClass, constraintList );
+		}
+	}
+
+	private void addCascadedMember(Class<?> beanClass, Member member) {
+		if ( cascadedMembers.containsKey( beanClass ) ) {
+			cascadedMembers.get( beanClass ).add( member );
+		}
+		else {
+			List<Member> tmpList = newArrayList();
+			tmpList.add( member );
+			cascadedMembers.put( beanClass, tmpList );
+		}
+	}
+
+	private List<Class<?>> createGroupSequence(GroupSequenceType groupSequenceType, String defaultPackage) {
+		List<Class<?>> groupSequence = newArrayList();
+		if ( groupSequenceType != null ) {
+			for ( String groupName : groupSequenceType.getValue() ) {
+				Class<?> group = getClass( groupName, defaultPackage );
+				groupSequence.add( group );
+			}
+		}
+		return groupSequence;
+	}
+
+	private <A extends Annotation, T> MetaConstraint<?> createMetaConstraint(ConstraintType constraint, Class<T> beanClass, Member member, String defaultPackage) {
+		@SuppressWarnings("unchecked")
+		Class<A> annotationClass = (Class<A>) getClass( constraint.getAnnotation(), defaultPackage );
+		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( annotationClass );
+
+		if ( constraint.getMessage() != null ) {
+			annotationDescriptor.setValue( MESSAGE_PARAM, constraint.getMessage() );
+		}
+		annotationDescriptor.setValue( GROUPS_PARAM, getGroups( constraint.getGroups(), defaultPackage ) );
+		annotationDescriptor.setValue( PAYLOAD_PARAM, getPayload( constraint.getPayload(), defaultPackage ) );
+
+		for ( ElementType elementType : constraint.getElement() ) {
+			String name = elementType.getName();
+			checkNameIsValid( name );
+			Class<?> returnType = getAnnotationParameterType( annotationClass, name );
+			Object elementValue = getElementValue( elementType, returnType );
+			annotationDescriptor.setValue( name, elementValue );
+		}
+
+		A annotation;
+		try {
+			annotation = AnnotationFactory.create( annotationDescriptor );
+		}
+		catch ( RuntimeException e ) {
+			throw log.getUnableToCreateAnnotationForConfiguredConstraintException( e.getMessage(), e );
+		}
+
+		java.lang.annotation.ElementType type = java.lang.annotation.ElementType.TYPE;
+		if ( member instanceof Method ) {
+			type = java.lang.annotation.ElementType.METHOD;
+		}
+		else if ( member instanceof Field ) {
+			type = java.lang.annotation.ElementType.FIELD;
+		}
+
+		// we set initially ConstraintOrigin.DEFINED_LOCALLY for all xml configured constraints
+		// later we will make copies of this constraint descriptor when needed and adjust the ConstraintOrigin
+		ConstraintDescriptorImpl<A> constraintDescriptor = new ConstraintDescriptorImpl<A>(
+				annotation, constraintHelper, type, ConstraintOrigin.DEFINED_LOCALLY
+		);
+
+		return new MetaConstraint<A>( constraintDescriptor, new BeanConstraintLocation( beanClass, member ) );
+	}
+
+	private <A extends Annotation> Class<?> getAnnotationParameterType(Class<A> annotationClass, String name) {
+		Method m = ReflectionHelper.getMethod( annotationClass, name );
+		if ( m == null ) {
+			throw log.getAnnotationDoesNotContainAParameterException( annotationClass.getName(), name );
+		}
+		return m.getReturnType();
+	}
+
+	private Object getElementValue(ElementType elementType, Class<?> returnType) {
+		removeEmptyContentElements( elementType );
+
+		boolean isArray = returnType.isArray();
+		if ( !isArray ) {
+			if ( elementType.getContent().size() != 1 ) {
+				throw log.getAttemptToSpecifyAnArrayWhereSingleValueIsExpectedException();
+			}
+			return getSingleValue( elementType.getContent().get( 0 ), returnType );
+		}
+		else {
+			List<Object> values = newArrayList();
+			for ( Serializable s : elementType.getContent() ) {
+				values.add( getSingleValue( s, returnType.getComponentType() ) );
+			}
+			return values.toArray( (Object[]) Array.newInstance( returnType.getComponentType(), values.size() ) );
+		}
+	}
+
+	private void removeEmptyContentElements(ElementType elementType) {
+		List<Serializable> contentToDelete = newArrayList();
+		for ( Serializable content : elementType.getContent() ) {
+			if ( content instanceof String && ( (String) content ).matches( "[\\n ].*" ) ) {
+				contentToDelete.add( content );
+			}
+		}
+		elementType.getContent().removeAll( contentToDelete );
+	}
+
+	private Object getSingleValue(Serializable serializable, Class<?> returnType) {
+
+		Object returnValue;
+		if ( serializable instanceof String ) {
+			String value = (String) serializable;
+			returnValue = convertStringToReturnType( returnType, value );
+		}
+		else if ( serializable instanceof JAXBElement && ( (JAXBElement<?>) serializable ).getDeclaredType()
+				.equals( String.class ) ) {
+			JAXBElement<?> elem = (JAXBElement<?>) serializable;
+			String value = (String) elem.getValue();
+			returnValue = convertStringToReturnType( returnType, value );
+		}
+		else if ( serializable instanceof JAXBElement && ( (JAXBElement<?>) serializable ).getDeclaredType()
+				.equals( AnnotationType.class ) ) {
+			JAXBElement<?> elem = (JAXBElement<?>) serializable;
+			AnnotationType annotationType = (AnnotationType) elem.getValue();
+			try {
+				@SuppressWarnings("unchecked")
+				Class<Annotation> annotationClass = (Class<Annotation>) returnType;
+				returnValue = createAnnotation( annotationType, annotationClass );
+			}
+			catch ( ClassCastException e ) {
+				throw log.getUnexpectedParameterValueException( e );
+			}
+		}
+		else {
+			throw log.getUnexpectedParameterValueException();
+		}
+		return returnValue;
+
+	}
+
+	private <A extends Annotation> Annotation createAnnotation(AnnotationType annotationType, Class<A> returnType) {
+		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( returnType );
+		for ( ElementType elementType : annotationType.getElement() ) {
+			String name = elementType.getName();
+			Class<?> parameterType = getAnnotationParameterType( returnType, name );
+			Object elementValue = getElementValue( elementType, parameterType );
+			annotationDescriptor.setValue( name, elementValue );
+		}
+		return AnnotationFactory.create( annotationDescriptor );
+	}
+
+	private Object convertStringToReturnType(Class<?> returnType, String value) {
+		Object returnValue;
+		if ( returnType.getName().equals( byte.class.getName() ) ) {
+			try {
+				returnValue = Byte.parseByte( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "byte", e );
+			}
+		}
+		else if ( returnType.getName().equals( short.class.getName() ) ) {
+			try {
+				returnValue = Short.parseShort( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "short", e );
+			}
+		}
+		else if ( returnType.getName().equals( int.class.getName() ) ) {
+			try {
+				returnValue = Integer.parseInt( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "int", e );
+			}
+		}
+		else if ( returnType.getName().equals( long.class.getName() ) ) {
+			try {
+				returnValue = Long.parseLong( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "long", e );
+			}
+		}
+		else if ( returnType.getName().equals( float.class.getName() ) ) {
+			try {
+				returnValue = Float.parseFloat( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "float", e );
+			}
+		}
+		else if ( returnType.getName().equals( double.class.getName() ) ) {
+			try {
+				returnValue = Double.parseDouble( value );
+			}
+			catch ( NumberFormatException e ) {
+				throw log.getInvalidNumberFormatException( "double", e );
+			}
+		}
+		else if ( returnType.getName().equals( boolean.class.getName() ) ) {
+			returnValue = Boolean.parseBoolean( value );
+		}
+		else if ( returnType.getName().equals( char.class.getName() ) ) {
+			if ( value.length() != 1 ) {
+				throw log.getInvalidCharValueException( value );
+			}
+			returnValue = value.charAt( 0 );
+		}
+		else if ( returnType.getName().equals( String.class.getName() ) ) {
+			returnValue = value;
+		}
+		else if ( returnType.getName().equals( Class.class.getName() ) ) {
+			returnValue = ReflectionHelper.loadClass( value, this.getClass() );
+		}
+		else {
+			try {
+				@SuppressWarnings("unchecked")
+				Class<Enum> enumClass = (Class<Enum>) returnType;
+				returnValue = Enum.valueOf( enumClass, value );
+			}
+			catch ( ClassCastException e ) {
+				throw log.getInvalidReturnTypeException( returnType, e );
+			}
+		}
+		return returnValue;
+	}
+
+	private void checkNameIsValid(String name) {
+		if ( MESSAGE_PARAM.equals( name ) || GROUPS_PARAM.equals( name ) ) {
+			throw log.getReservedParameterNamesException( MESSAGE_PARAM, GROUPS_PARAM, PAYLOAD_PARAM );
+		}
+	}
+
+	private Class<?>[] getGroups(GroupsType groupsType, String defaultPackage) {
+		if ( groupsType == null ) {
+			return new Class[] { };
+		}
+
+		List<Class<?>> groupList = newArrayList();
+		for ( String groupClass : groupsType.getValue() ) {
+			groupList.add( getClass( groupClass, defaultPackage ) );
+		}
+		return groupList.toArray( new Class[groupList.size()] );
+	}
+
+	@SuppressWarnings("unchecked")
+	private Class<? extends Payload>[] getPayload(PayloadType payloadType, String defaultPackage) {
+		if ( payloadType == null ) {
+			return new Class[] { };
+		}
+
+		List<Class<? extends Payload>> payloadList = newArrayList();
+		for ( String groupClass : payloadType.getValue() ) {
+			Class<?> payload = getClass( groupClass, defaultPackage );
+			if ( !Payload.class.isAssignableFrom( payload ) ) {
+				throw log.getWrongPayloadClassException( payload.getName() );
+			}
+			else {
+				payloadList.add( (Class<? extends Payload>) payload );
+			}
+		}
+		return payloadList.toArray( new Class[payloadList.size()] );
+	}
+
+	private Class<?> getClass(String clazz, String defaultPackage) {
+		String fullyQualifiedClass;
+		if ( isQualifiedClass( clazz ) ) {
+			fullyQualifiedClass = clazz;
+		}
+		else {
+			fullyQualifiedClass = defaultPackage + PACKAGE_SEPARATOR + clazz;
+		}
+		return ReflectionHelper.loadClass( fullyQualifiedClass, this.getClass() );
+	}
+
+	private boolean isQualifiedClass(String clazz) {
+		return clazz.contains( PACKAGE_SEPARATOR );
+	}
+
+	private Schema getMappingSchema() {
+		ClassLoader loader = ReflectionHelper.getClassLoaderFromClass( XmlMappingParser.class );
+		URL schemaUrl = loader.getResource( VALIDATION_MAPPING_XSD );
+		SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI );
+		Schema schema = null;
+		try {
+			schema = sf.newSchema( schemaUrl );
+		}
+		catch ( SAXException e ) {
+			log.unableToCreateSchema( VALIDATION_MAPPING_XSD, e.getMessage() );
+		}
+		return schema;
+	}
+
+	private ConstraintMappingsType getValidationConfig(InputStream in, Unmarshaller unmarshaller) {
+		ConstraintMappingsType constraintMappings;
+		try {
+			// check whether mark is supported, if so we can reset the stream in order to allow reuse of Configuration
+			boolean markSupported = in.markSupported();
+			if ( markSupported ) {
+				in.mark( Integer.MAX_VALUE );
+			}
+
+			StreamSource stream = new StreamSource( new CloseIgnoringInputStream( in ) );
+			JAXBElement<ConstraintMappingsType> root = unmarshaller.unmarshal( stream, ConstraintMappingsType.class );
+			constraintMappings = root.getValue();
+
+			if ( markSupported ) {
+				try {
+					in.reset();
+				}
+				catch ( IOException e ) {
+					log.debug( "Unable to reset input stream." );
+				}
+			}
+		}
+		catch ( JAXBException e ) {
+			throw log.getErrorParsingMappingFileException( e );
+		}
+		return constraintMappings;
+	}
+
+
+	// JAXB closes the underlying input stream
+	public class CloseIgnoringInputStream extends FilterInputStream {
+		public CloseIgnoringInputStream(InputStream in) {
+			super( in );
+		}
+
+		@Override
+		public void close() {
+			// do nothing
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/internal/xml/package.html b/project/engine/src/main/java/org/hibernate/validator/internal/xml/package.html
new file mode 100644
index 0000000..5390562
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/internal/xml/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Classes used to parse Bean Validation XML configuration files.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java
new file mode 100644
index 0000000..0b9e5ea
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ResourceBundleMessageInterpolator.java
@@ -0,0 +1,322 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.messageinterpolation;
+
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.validation.MessageInterpolator;
+
+import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
+import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
+
+/**
+ * Resource bundle backed message interpolator.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ResourceBundleMessageInterpolator implements MessageInterpolator {
+
+	/**
+	 * The name of the default message bundle.
+	 */
+	public static final String DEFAULT_VALIDATION_MESSAGES = "org.hibernate.validator.ValidationMessages";
+
+	/**
+	 * The name of the user-provided message bundle as defined in the specification.
+	 */
+	public static final String USER_VALIDATION_MESSAGES = "ValidationMessages";
+
+	/**
+	 * Regular expression used to do message interpolation.
+	 */
+	private static final Pattern MESSAGE_PARAMETER_PATTERN = Pattern.compile( "(\\{[^\\}]+?\\})" );
+
+	/**
+	 * The default locale in the current JVM.
+	 */
+	private final Locale defaultLocale;
+
+	/**
+	 * Loads user-specified resource bundles.
+	 */
+	private final ResourceBundleLocator userResourceBundleLocator;
+
+	/**
+	 * Loads built-in resource bundles.
+	 */
+	private final ResourceBundleLocator defaultResourceBundleLocator;
+
+	/**
+	 * Step 1-3 of message interpolation can be cached. We do this in this map.
+	 */
+	private final ConcurrentMap<LocalisedMessage, String> resolvedMessages = new ConcurrentHashMap<LocalisedMessage, String>();
+
+	/**
+	 * Flag indicating whether this interpolator should chance some of the interpolation steps.
+	 */
+	private final boolean cacheMessages;
+
+	public ResourceBundleMessageInterpolator() {
+		this( (ResourceBundleLocator) null );
+	}
+
+	/**
+	 * @deprecated Will be removed in a future release. Use
+	 *             {@link #ResourceBundleMessageInterpolator(ResourceBundleLocator)} instead.
+	 */
+	@Deprecated
+	public ResourceBundleMessageInterpolator(org.hibernate.validator.resourceloading.ResourceBundleLocator userResourceBundleLocator) {
+		this( new Adapter( userResourceBundleLocator ) );
+	}
+
+	public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator) {
+		this( userResourceBundleLocator, true );
+	}
+
+	/**
+	 * @deprecated Will be removed in a future release. Use
+	 *             {@link #ResourceBundleMessageInterpolator(ResourceBundleLocator, boolean)} instead.
+	 */
+	@Deprecated
+	public ResourceBundleMessageInterpolator(org.hibernate.validator.resourceloading.ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
+		this( new Adapter( userResourceBundleLocator ), cacheMessages );
+	}
+
+	public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
+
+		defaultLocale = Locale.getDefault();
+
+		if ( userResourceBundleLocator == null ) {
+			this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
+		}
+		else {
+			this.userResourceBundleLocator = userResourceBundleLocator;
+		}
+
+		this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
+		this.cacheMessages = cacheMessages;
+	}
+
+	public String interpolate(String message, Context context) {
+		// probably no need for caching, but it could be done by parameters since the map
+		// is immutable and uniquely built per Validation definition, the comparison has to be based on == and not equals though
+		return interpolateMessage( message, context.getConstraintDescriptor().getAttributes(), defaultLocale );
+	}
+
+	public String interpolate(String message, Context context, Locale locale) {
+		return interpolateMessage( message, context.getConstraintDescriptor().getAttributes(), locale );
+	}
+
+	/**
+	 * Runs the message interpolation according to algorithm specified in JSR 303.
+	 * <br/>
+	 * Note:
+	 * <br/>
+	 * Look-ups in user bundles is recursive whereas look-ups in default bundle are not!
+	 *
+	 * @param message the message to interpolate
+	 * @param annotationParameters the parameters of the annotation for which to interpolate this message
+	 * @param locale the {@code Locale} to use for the resource bundle.
+	 *
+	 * @return the interpolated message.
+	 */
+	private String interpolateMessage(String message, Map<String, Object> annotationParameters, Locale locale) {
+		LocalisedMessage localisedMessage = new LocalisedMessage( message, locale );
+		String resolvedMessage = null;
+
+		if ( cacheMessages ) {
+			resolvedMessage = resolvedMessages.get( localisedMessage );
+		}
+
+		// if the message is not already in the cache we have to run step 1-3 of the message resolution 
+		if ( resolvedMessage == null ) {
+			ResourceBundle userResourceBundle = userResourceBundleLocator
+					.getResourceBundle( locale );
+			ResourceBundle defaultResourceBundle = defaultResourceBundleLocator
+					.getResourceBundle( locale );
+
+			String userBundleResolvedMessage;
+			resolvedMessage = message;
+			boolean evaluatedDefaultBundleOnce = false;
+			do {
+				// search the user bundle recursive (step1)
+				userBundleResolvedMessage = replaceVariables(
+						resolvedMessage, userResourceBundle, locale, true
+				);
+
+				// exit condition - we have at least tried to validate against the default bundle and there was no
+				// further replacements
+				if ( evaluatedDefaultBundleOnce
+						&& !hasReplacementTakenPlace( userBundleResolvedMessage, resolvedMessage ) ) {
+					break;
+				}
+
+				// search the default bundle non recursive (step2)
+				resolvedMessage = replaceVariables( userBundleResolvedMessage, defaultResourceBundle, locale, false );
+				evaluatedDefaultBundleOnce = true;
+			} while ( true );
+		}
+
+		// cache resolved message
+		if ( cacheMessages ) {
+			String cachedResolvedMessage = resolvedMessages.putIfAbsent( localisedMessage, resolvedMessage );
+			if ( cachedResolvedMessage != null ) {
+				resolvedMessage = cachedResolvedMessage;
+			}
+		}
+
+		// resolve annotation attributes (step 4)
+		resolvedMessage = replaceAnnotationAttributes( resolvedMessage, annotationParameters );
+
+		// last but not least we have to take care of escaped literals
+		resolvedMessage = resolvedMessage.replace( "\\{", "{" );
+		resolvedMessage = resolvedMessage.replace( "\\}", "}" );
+		resolvedMessage = resolvedMessage.replace( "\\\\", "\\" );
+		return resolvedMessage;
+	}
+
+	private boolean hasReplacementTakenPlace(String origMessage, String newMessage) {
+		return !origMessage.equals( newMessage );
+	}
+
+	private String replaceVariables(String message, ResourceBundle bundle, Locale locale, boolean recurse) {
+		Matcher matcher = MESSAGE_PARAMETER_PATTERN.matcher( message );
+		StringBuffer sb = new StringBuffer();
+		String resolvedParameterValue;
+		while ( matcher.find() ) {
+			String parameter = matcher.group( 1 );
+			resolvedParameterValue = resolveParameter(
+					parameter, bundle, locale, recurse
+			);
+
+			matcher.appendReplacement( sb, Matcher.quoteReplacement( resolvedParameterValue ) );
+		}
+		matcher.appendTail( sb );
+		return sb.toString();
+	}
+
+	private String replaceAnnotationAttributes(String message, Map<String, Object> annotationParameters) {
+		Matcher matcher = MESSAGE_PARAMETER_PATTERN.matcher( message );
+		StringBuffer sb = new StringBuffer();
+		while ( matcher.find() ) {
+			String resolvedParameterValue;
+			String parameter = matcher.group( 1 );
+			Object variable = annotationParameters.get( removeCurlyBrace( parameter ) );
+			if ( variable != null ) {
+				if ( variable.getClass().isArray() ) {
+					resolvedParameterValue = Arrays.toString( (Object[]) variable );
+				}
+				else {
+					resolvedParameterValue = variable.toString();
+				}
+			}
+			else {
+				resolvedParameterValue = parameter;
+			}
+			resolvedParameterValue = Matcher.quoteReplacement( resolvedParameterValue );
+			matcher.appendReplacement( sb, resolvedParameterValue );
+		}
+		matcher.appendTail( sb );
+		return sb.toString();
+	}
+
+	private String resolveParameter(String parameterName, ResourceBundle bundle, Locale locale, boolean recurse) {
+		String parameterValue;
+		try {
+			if ( bundle != null ) {
+				parameterValue = bundle.getString( removeCurlyBrace( parameterName ) );
+				if ( recurse ) {
+					parameterValue = replaceVariables( parameterValue, bundle, locale, recurse );
+				}
+			}
+			else {
+				parameterValue = parameterName;
+			}
+		}
+		catch ( MissingResourceException e ) {
+			// return parameter itself
+			parameterValue = parameterName;
+		}
+		return parameterValue;
+	}
+
+	private String removeCurlyBrace(String parameter) {
+		return parameter.substring( 1, parameter.length() - 1 );
+	}
+
+	private static class LocalisedMessage {
+		private final String message;
+		private final Locale locale;
+
+		LocalisedMessage(String message, Locale locale) {
+			this.message = message;
+			this.locale = locale;
+		}
+
+		@Override
+		public boolean equals(Object o) {
+			if ( this == o ) {
+				return true;
+			}
+			if ( o == null || getClass() != o.getClass() ) {
+				return false;
+			}
+
+			LocalisedMessage that = (LocalisedMessage) o;
+
+			if ( locale != null ? !locale.equals( that.locale ) : that.locale != null ) {
+				return false;
+			}
+			if ( message != null ? !message.equals( that.message ) : that.message != null ) {
+				return false;
+			}
+
+			return true;
+		}
+
+		@Override
+		public int hashCode() {
+			int result = message != null ? message.hashCode() : 0;
+			result = 31 * result + ( locale != null ? locale.hashCode() : 0 );
+			return result;
+		}
+	}
+
+	@SuppressWarnings("deprecation")
+	private static class Adapter implements org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+
+		private final org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee;
+
+		public Adapter(org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee) {
+			this.adaptee = adaptee;
+		}
+
+		public ResourceBundle getResourceBundle(Locale locale) {
+			return adaptee.getResourceBundle( locale );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ValueFormatterMessageInterpolator.java b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ValueFormatterMessageInterpolator.java
new file mode 100644
index 0000000..13ca1ff
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/ValueFormatterMessageInterpolator.java
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.messageinterpolation;
+
+import java.util.IllegalFormatException;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.validation.MessageInterpolator;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * A message interpolator which can interpolate the validated value and format this value using the syntax from
+ * {@link java.util.Formatter}. Check the <code>Formatter</code> documentation for formatting syntax and options. If no
+ * formatting string is specified <code>String.valueOf(validatedValue)}</code> is called.
+ * <p/>
+ * To interpolate the validated value add <code>{validatedValue}</code> into the message. To specify a format
+ * pattern use <code>${validatedValue:[format string]}</code>, e.g. <code>${validatedValue:%1$ty}</code>.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ValueFormatterMessageInterpolator implements MessageInterpolator {
+	private static final Log log = LoggerFactory.make();
+
+	public static final String VALIDATED_VALUE_KEYWORD = "validatedValue";
+	public static final String VALIDATED_VALUE_FORMAT_SEPARATOR = ":";
+
+	private static final Pattern VALIDATED_VALUE_START_PATTERN = Pattern.compile( "\\$\\{" + VALIDATED_VALUE_KEYWORD );
+	private final MessageInterpolator delegate;
+	private final Locale defaultLocale;
+
+	public ValueFormatterMessageInterpolator() {
+		this( null );
+	}
+
+	public ValueFormatterMessageInterpolator(MessageInterpolator userMessageInterpolator) {
+		defaultLocale = Locale.getDefault();
+		if ( userMessageInterpolator == null ) {
+			this.delegate = new ResourceBundleMessageInterpolator();
+		}
+		else {
+			this.delegate = userMessageInterpolator;
+		}
+	}
+
+	public String interpolate(String message, Context context) {
+		return interpolate( message, context, defaultLocale );
+	}
+
+	public String interpolate(String message, Context context, Locale locale) {
+		String tmp = delegate.interpolate( message, context, locale );
+		return interpolateMessage( tmp, context.getValidatedValue(), locale );
+	}
+
+	/**
+	 * Interpolate the validated value in the given message.
+	 *
+	 * @param message the message where validated value have to be interpolated
+	 * @param validatedValue the value of the object being validated
+	 * @param locale the {@code Locale} to use for message interpolation
+	 *
+	 * @return the interpolated message
+	 */
+	private String interpolateMessage(String message, Object validatedValue, Locale locale) {
+		String interpolatedMessage = message;
+		Matcher matcher = VALIDATED_VALUE_START_PATTERN.matcher( message );
+
+		while ( matcher.find() ) {
+			int nbOpenCurlyBrace = 1;
+			boolean isDoubleQuoteBloc = false;
+			boolean isSimpleQuoteBloc = false;
+			int lastIndex = matcher.end();
+
+			do {
+				char current = message.charAt( lastIndex );
+
+				if ( current == '\'' ) {
+					if ( !isDoubleQuoteBloc && !isEscaped( message, lastIndex ) ) {
+						isSimpleQuoteBloc = !isSimpleQuoteBloc;
+					}
+				}
+				else if ( current == '"' ) {
+					if ( !isSimpleQuoteBloc && !isEscaped( message, lastIndex ) ) {
+						isDoubleQuoteBloc = !isDoubleQuoteBloc;
+					}
+				}
+				else if ( !isDoubleQuoteBloc && !isSimpleQuoteBloc ) {
+					if ( current == '{' ) {
+						nbOpenCurlyBrace++;
+					}
+					else if ( current == '}' ) {
+						nbOpenCurlyBrace--;
+					}
+				}
+
+				lastIndex++;
+
+			} while ( nbOpenCurlyBrace > 0 && lastIndex < message.length() );
+
+			// The validated value expression seems correct
+			if ( nbOpenCurlyBrace == 0 ) {
+				String expression = message.substring( matcher.start(), lastIndex );
+				String expressionValue = interpolateValidatedValue( expression, validatedValue, locale );
+				interpolatedMessage = interpolatedMessage.replaceFirst(
+						Pattern.quote( expression ), Matcher.quoteReplacement( expressionValue )
+				);
+			}
+		}
+		return interpolatedMessage;
+	}
+
+	/**
+	 * Returns if the character at the given index in the String
+	 * is an escaped character (preceded by a backslash character).
+	 *
+	 * @param enclosingString the string which contain the given character
+	 * @param charIndex the index of the character
+	 *
+	 * @return true if the given character is escaped false otherwise
+	 */
+	private boolean isEscaped(String enclosingString, int charIndex) {
+		if ( charIndex < 0 || charIndex > enclosingString.length() ) {
+			throw log.getInvalidIndexException( "0", "enclosingString.length() - 1" );
+		}
+		return charIndex > 0 && enclosingString.charAt( charIndex - 1 ) == '\\';
+	}
+
+	/**
+	 * Returns the value of the interpolated validated value.
+	 *
+	 * @param expression the expression to interpolate
+	 * @param validatedValue the value of the object being validated
+	 * @param locale the {@code Locale} to be used
+	 *
+	 * @return the interpolated value
+	 */
+	private String interpolateValidatedValue(String expression, Object validatedValue, Locale locale) {
+		String interpolatedValue;
+		int separatorIndex = expression.indexOf( VALIDATED_VALUE_FORMAT_SEPARATOR );
+
+		if ( separatorIndex == -1 ) {
+			interpolatedValue = String.valueOf( validatedValue );
+		}
+		else {
+			String format = expression.substring( separatorIndex + 1, expression.length() - 1 );
+			if ( format.length() == 0 ) {
+				throw log.getMissingFormatStringInTemplateException( expression );
+			}
+			try {
+				interpolatedValue = String.format( locale, format, validatedValue );
+			}
+			catch ( IllegalFormatException e ) {
+				throw log.throwInvalidFormat( e.getMessage(), e );
+			}
+		}
+		return interpolatedValue;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/package.html b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/package.html
new file mode 100644
index 0000000..dd78628
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/messageinterpolation/package.html
@@ -0,0 +1,27 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Implementations of the MessageInterpolator interface in particular ResourceBundleMessageInterpolator which can be used
+by custom implementations of the interface for delegation.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolation.java b/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolation.java
new file mode 100644
index 0000000..31e31a4
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolation.java
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.method;
+
+import java.lang.reflect.Method;
+import javax.validation.ConstraintViolation;
+
+/**
+ * Describes the violation of a method-level constraint by providing access
+ * to the method/parameter hosting the violated constraint etc.
+ *
+ * @author Gunnar Morling
+ * @see MethodValidator
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public interface MethodConstraintViolation<T> extends ConstraintViolation<T> {
+
+	/**
+	 * The kind of a {@link MethodConstraintViolation}.
+	 *
+	 * @author Gunnar Morling
+	 * @deprecated Will by replaced by equivalent functionality defined by the
+	 *             Bean Validation 1.1 API as of Hibernate Validator 5.
+	 */
+	@Deprecated
+	public static enum Kind {
+
+		/**
+		 * Identifies constraint violations occurred during the validation of a
+		 * method's parameter.
+		 */
+		PARAMETER,
+
+		/**
+		 * Identifies constraint violations occurred during the validation of a
+		 * method's return value.
+		 */
+		RETURN_VALUE
+	}
+
+	/**
+	 * Returns the method during which's validation this constraint violation
+	 * occurred.
+	 *
+	 * @return The method during which's validation this constraint violation
+	 *         occurred.
+	 */
+	Method getMethod();
+
+	/**
+	 * Returns the index of the parameter holding the constraint which caused
+	 * this constraint violation.
+	 *
+	 * @return The index of the parameter holding the constraint which caused
+	 *         this constraint violation or null if this constraint violation is
+	 *         not of {@link Kind#PARAMETER}.
+	 */
+	Integer getParameterIndex();
+
+	/**
+	 * <p>
+	 * Returns the name of the parameter holding the constraint which caused
+	 * this constraint violation.
+	 * </p>
+	 * <p>
+	 * Currently a synthetic name following the form <code>"arg" + index</code>
+	 * will be returned, e.g. <code>"arg0"</code>. In future versions it might
+	 * be possible to specify real parameter names, e.g. using an
+	 * annotation-based approach around <code>javax.inject.Named</code>.
+	 * </p>
+	 *
+	 * @return The name of the parameter holding the constraint which caused
+	 *         this constraint violation or null if this constraint violation is
+	 *         not of {@link Kind#PARAMETER}.
+	 */
+	String getParameterName();
+
+	/**
+	 * Returns the kind of this method constraint violation.
+	 *
+	 * @return The kind of this method constraint violation.
+	 */
+	Kind getKind();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolationException.java b/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolationException.java
new file mode 100644
index 0000000..c835353
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/MethodConstraintViolationException.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.method;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.ValidationException;
+
+/**
+ * Exception class to be thrown by integrators of HV's method level validation feature.
+ *
+ * @author Gunnar Morling
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public class MethodConstraintViolationException extends ValidationException {
+
+	private static final long serialVersionUID = 5694703022614920634L;
+
+	private final Set<MethodConstraintViolation<?>> constraintViolations;
+
+	/**
+	 * Creates a new new {@link MethodConstraintViolationException}.
+	 *
+	 * @param constraintViolations A set of constraint violations for which this exception shall be created.
+	 */
+	public MethodConstraintViolationException(
+			Set<? extends MethodConstraintViolation<?>> constraintViolations) {
+
+		super( "The following constraint violations occurred: " + constraintViolations );
+		this.constraintViolations = new HashSet<MethodConstraintViolation<?>>( constraintViolations );
+	}
+
+	/**
+	 * Creates a new new {@link MethodConstraintViolationException}.
+	 *
+	 * @param message The message for the exception to be created.
+	 * @param constraintViolations A set of constraint violations for which this exception shall be created.
+	 */
+	public MethodConstraintViolationException(String message,
+											  Set<? extends MethodConstraintViolation<?>> constraintViolations) {
+
+		super( message );
+		this.constraintViolations = new HashSet<MethodConstraintViolation<?>>( constraintViolations );
+	}
+
+	/**
+	 * Set of constraint violations reported during a validation
+	 *
+	 * @return A set of {@link MethodConstraintViolation} occurred during a method level validation call.
+	 */
+	public Set<MethodConstraintViolation<?>> getConstraintViolations() {
+		return constraintViolations;
+	}
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/MethodValidator.java b/project/engine/src/main/java/org/hibernate/validator/method/MethodValidator.java
new file mode 100644
index 0000000..5a1779e
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/MethodValidator.java
@@ -0,0 +1,199 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.method;
+
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+
+/**
+ * <p>
+ * Provides an API for method-level constraint validation, based on <a
+ * href="http://jcp.org/en/jsr/detail?id=303">JSR 303: Bean Validation</a>,
+ * Appendix C ("Proposal for method-level validation").
+ * </p>
+ * <p>
+ * The purpose of this API is to provide a facility for the <a
+ * href="http://en.wikipedia.org/wiki/Programming_by_contract">Programming by
+ * Contract</a> approach to program design based on the concepts defined by the
+ * Bean Validation API. More specifically this means that any Bean Validation
+ * constraints (built-in as well as custom constraints) can be used to describe
+ * </p>
+ * <ul>
+ * <li>
+ * any preconditions that must be met before a method may legally be invoked (by annotating
+ * method parameters with constraints) and</li>
+ * <li>
+ * any postconditions that are guaranteed after a method invocation returns (by
+ * annotating methods).</li>
+ * </ul>
+ * <p>
+ * These constraints may be declared directly on a method's parameters and/or return values.
+ * Alternatively, by annotating method parameters/return values with the special {@link javax.validation.Valid}
+ * annotation a recursive validation of those parameters/return
+ * values against the constraints defined on their types can be triggered.
+ * Consider for instance the method declaration
+ * </p>
+ * <p/>
+ *
+ * <pre>
+ * @NotNull
+ * @Valid
+ * Customer findCustomerByName(@NotNull @Size(min = 5) String name) {
+ * 	// ...
+ * }
+ * </pre>
+ * <p>
+ * Here, the validation engine will check for the following pre- and postconditions (provided
+ * the method validation is triggered automatically by some integration layer, see below):
+ * </p>
+ * <ul>
+ * <li>The name parameter is guaranteed to be not null and at least 5 characters
+ * long. In particular it is not necessary for the implementor of this method to
+ * perform these checks manually.</li>
+ * <li>It is guaranteed that the call yields a non-null object, which itself is
+ * valid according to all the bean validation constraints declared on its type.
+ * In particular it is not necessary for the caller to perform these
+ * checks manually.</li>
+ * </ul>
+ * <p>
+ * This service only deals with the actual <em>validation</em> of method
+ * parameters/return values itself, but not with the <em>invocation</em> of such
+ * a validation. It is expected that this invocation is triggered by an
+ * integration layer using AOP or similar method interception facilities such as
+ * the JDK's {@link java.lang.reflect.Proxy} API or <a
+ * href="http://jcp.org/en/jsr/detail?id=299">CDI</a> (
+ * "JSR 299: Contexts and Dependency Injection for the Java<sup>TM</sup> EE platform"
+ * ).
+ * </p>
+ * <p>
+ * Such an integration layer would typically intercept each method call to be
+ * validated, validate the call's parameters, proceed with the method invocation
+ * and finally validate the invocation's return value. If any of the validation
+ * steps yields a non-empty set of constraint violations the integration layer
+ * would typically throw a {@link MethodConstraintViolationException} wrapping
+ * these violations which in turn guarantees that the call flow only arrives at
+ * the method's implementation respectively call site if all pre- respectively
+ * postconditions are fulfilled.
+ * </p>
+ * <p>
+ * <code>MethodValidator</code> instances are obtained by
+ * {@link javax.validation.Validator#unwrap(Class) unwrapping} a {@link javax.validation.Validator} object:
+ * </p>
+ *
+ * <pre>
+ * Validator validator = ...;
+ * MethodValidator methodValidator = validator.unwrap(MethodValidator.class);
+ * </pre>
+ * <p/>
+ * Method level validation is (currently) a proprietary feature of Hibernate
+ * Validator (HV), so the unwrapped <code>Validator</code> instance
+ * <em>must</em> be HV's implementation. In case there are multiple Bean
+ * Validation implementations on the classpath, this can be done be explicitly
+ * choosing HV as validation provider:
+ * <p/>
+ *
+ * <pre>
+ * MethodValidator methodValidator = Validation.byProvider(HibernateValidator.class)
+ * 	.configure()
+ * 	.buildValidatorFactory()
+ * 	.getValidator()
+ * 	.unwrap(MethodValidator.class);
+ * </pre>
+ * <p/>
+ * <p>
+ * If not stated otherwise, none of this interface's methods allow
+ * <code>null</code> as parameter value.
+ * </p>
+ *
+ * @author Gunnar Morling
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public interface MethodValidator {
+
+	/**
+	 * Validates a given parameter of a given method.
+	 *
+	 * @param <T> The type hosting the invoked method.
+	 * @param object The object on which the given method was invoked.
+	 * @param method The invoked method for which the given parameter shall be
+	 * validated.
+	 * @param parameterValue The value provided by the caller for the given method.
+	 * @param parameterIndex The index of the parameter to be validated within the given
+	 * method's parameter array.
+	 * @param groups A - potentially empty - number of validation groups for which
+	 * the validation shall be performed. The @link {@link javax.validation.groups.Default}
+	 * group will be validated if no group is given.
+	 *
+	 * @return A set with the constraint violations caused by this validation.
+	 *         Will be empty, of no error occurs, but never null.
+	 */
+	<T> Set<MethodConstraintViolation<T>> validateParameter(T object,
+															Method method,
+															Object parameterValue,
+															int parameterIndex,
+															Class<?>... groups);
+
+	/**
+	 * Validates all parameters of a given method.
+	 *
+	 * @param <T> The type hosting the invoked method.
+	 * @param object The object on which the given method was invoked.
+	 * @param method The invoked method for which the given parameter shall be
+	 * validated.
+	 * @param parameterValues The values provided by the caller for the given method's
+	 * parameters.
+	 * @param groups A - potentially empty - number of validation groups for which
+	 * the validation shall be performed. The @link {@link javax.validation.groups.Default}
+	 * group will be validated if no group is given.
+	 *
+	 * @return A set with the constraint violations caused by this validation.
+	 *         Will be empty, of no error occurs, but never null.
+	 */
+	<T> Set<MethodConstraintViolation<T>> validateAllParameters(T object, Method method, Object[] parameterValues, Class<?>... groups);
+
+	/**
+	 * Validates the return value of a given method.
+	 *
+	 * @param <T> The type hosting the invoked method.
+	 * @param object The object on which the given method was invoked.
+	 * @param method The invoked method for which the given return value shall be
+	 * validated.
+	 * @param returnValue The value returned by the invoked method.
+	 * @param groups A - potentially empty - number of validation groups for which
+	 * the validation shall be performed. The @link {@link javax.validation.groups.Default}
+	 * group will be validated if no group is given.
+	 *
+	 * @return A set with the constraint violations caused by this validation.
+	 *         Will be empty, of no error occurs, but never null.
+	 */
+	<T> Set<MethodConstraintViolation<T>> validateReturnValue(T object,
+															  Method method, Object returnValue, Class<?>... groups);
+
+	/**
+	 * Returns a descriptor providing access to constraint-related meta data for
+	 * the given type.
+	 *
+	 * @param clazz The type of interest.
+	 *
+	 * @return A descriptor for the given type, will never be null.
+	 */
+	TypeDescriptor getConstraintsForType(Class<?> clazz);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/metadata/MethodDescriptor.java b/project/engine/src/main/java/org/hibernate/validator/method/metadata/MethodDescriptor.java
new file mode 100644
index 0000000..99faacf
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/metadata/MethodDescriptor.java
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.method.metadata;
+
+import java.util.List;
+import javax.validation.metadata.ElementDescriptor;
+
+/**
+ * Describes a method and the constraints associated with it.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public interface MethodDescriptor extends ElementDescriptor {
+
+	/**
+	 * Returns the name of the method represented by this descriptor.
+	 *
+	 * @return The name of the method represented by this descriptor.
+	 */
+	String getMethodName();
+
+	/**
+	 * <p>
+	 * Returns a list with descriptors for this method's parameters.
+	 * </p>
+	 * <p>
+	 * The size of this list corresponds with the number of this method's
+	 * parameters.
+	 * </p>
+	 *
+	 * @return A list with descriptors for this method's parameters. An empty
+	 *         list will be returned if this method has no parameters.
+	 */
+	List<ParameterDescriptor> getParameterDescriptors();
+
+	/**
+	 * Whether a cascaded validation for this method's return value shall be
+	 * performed or not. This is the case if this method is marked for a
+	 * cascaded validation (e.g. by annotating it with the {@link javax.validation.Valid}
+	 * annotation) either locally or in the inheritance hierarchy.
+	 *
+	 * @return <code>True</code>, if this method's return value shall be
+	 *         validated recursively, <code>false</code> otherwise.
+	 */
+	boolean isCascaded();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/metadata/ParameterDescriptor.java b/project/engine/src/main/java/org/hibernate/validator/method/metadata/ParameterDescriptor.java
new file mode 100644
index 0000000..4daa32d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/metadata/ParameterDescriptor.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.method.metadata;
+
+import javax.validation.metadata.ElementDescriptor;
+
+/**
+ * Describes a constrained parameter and the constraints associated with it.
+ *
+ * @author Gunnar Morling
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public interface ParameterDescriptor extends ElementDescriptor {
+
+	/**
+	 * Whether cascaded validation for this parameter shall be
+	 * performed or not. This is the case if this parameter is annotated with the
+	 * {@link javax.validation.Valid} annotation either locally or in the inheritance hierarchy.
+	 *
+	 * @return <code>True</code>, if this parameter shall be
+	 *         validated recursively, <code>false</code> otherwise.
+	 */
+	boolean isCascaded();
+
+	/**
+	 * Returns this parameter's index within the parameter array of the
+	 * method holding it.
+	 *
+	 * @return This parameter's index.
+	 */
+	int getIndex();
+
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/metadata/TypeDescriptor.java b/project/engine/src/main/java/org/hibernate/validator/method/metadata/TypeDescriptor.java
new file mode 100644
index 0000000..f0633dd
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/metadata/TypeDescriptor.java
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.method.metadata;
+
+import java.util.Set;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ElementDescriptor;
+
+/**
+ * Describes a constrained Java type and the constraints associated to it.
+ *
+ * @author Gunnar Morling
+ * @deprecated Will by replaced by equivalent functionality defined by the Bean
+ *             Validation 1.1 API as of Hibernate Validator 5.
+ */
+ at Deprecated
+public interface TypeDescriptor extends ElementDescriptor {
+
+	/**
+	 * Whether this type has any class-, property- (field or getter style) or
+	 * method-level constraints or not. This is the case if
+	 * <ul>
+	 * <li>a constraint is hosted at this type itself,</li>
+	 * <li>a constraint is hosted on any of this type's bean properties
+	 * (represented by fields or getter methods),</li>
+	 * <li>any of this type's bean properties (represented by fields or getter
+	 * methods) is marked for cascaded validation with the {@link javax.validation.Valid}
+	 * annotation,</li>
+	 * <li>a constraint is hosted on any of this type's method's parameters,</li>
+	 * <li>any of this type's method's parameters is marked for cascaded
+	 * validation with the {@link javax.validation.Valid} annotation,</li>
+	 * <li>a constraint is hosted on the return value of any of this type's
+	 * methods or</li>
+	 * <li>the return value of any of this type's methods is marked for cascaded
+	 * validation with the {@link javax.validation.Valid} annotation</li>
+	 * </ul>
+	 *
+	 * @return <code>True</code>, if this type has any constraints,
+	 *         <code>false</code>
+	 */
+	boolean isTypeConstrained();
+
+	/**
+	 * Returns a set with the constrained methods of this type.
+	 *
+	 * @return A set with the constrained methods of this type, will be empty if
+	 *         none of this type's methods are constrained.
+	 */
+	Set<MethodDescriptor> getConstrainedMethods();
+
+	/**
+	 * Returns a descriptor for the specified method.
+	 *
+	 * @param methodName The name of the method to retrieve a descriptor for.
+	 * @param parameterTypes The types of the parameters of the method to retrieve a
+	 * descriptor for, in the order as they are defined in the method
+	 * signature.
+	 *
+	 * @return A descriptor for the specified method or <code>null</null>, if no method
+	 *         with the given name and parameter types is declared on the type represented
+	 *         by this descriptor or its super types.
+	 *
+	 * @throws IllegalArgumentException if {@code methodName} is null.
+	 */
+	MethodDescriptor getConstraintsForMethod(String methodName, Class<?>... parameterTypes);
+
+	/**
+	 * Returns a descriptor for the bean related constraints of this type.
+	 *
+	 * @return A bean descriptor. Will never be null, also if this type has no bean properties.
+	 */
+	BeanDescriptor getBeanDescriptor();
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/metadata/package.html b/project/engine/src/main/java/org/hibernate/validator/method/metadata/package.html
new file mode 100644
index 0000000..18f42cb
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/metadata/package.html
@@ -0,0 +1,32 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p><b>Deprecated.</b> <i>Will by replaced by equivalent
+functionality defined by the Bean Validation 1.1 API as of Hibernate
+Validator 5.</i></p>
+<p>This package provides a meta model related to method-level
+constraints and as such is an addition to the package <code>javax.validation.metadata</code>
+provided by the Bean Validation API. This meta model is read-only, all
+of its types are immutable.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/method/package.html b/project/engine/src/main/java/org/hibernate/validator/method/package.html
new file mode 100644
index 0000000..725004d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/method/package.html
@@ -0,0 +1,31 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p><b>Deprecated.</b> <i>Will by replaced by equivalent
+functionality defined by the Bean Validation 1.1 API as of Hibernate
+Validator 5.</i></p>
+<p>This package provides support for method-level constraints based
+on <a href="http://jcp.org/en/jsr/detail?id=303">JSR 303: Bean
+Validation</a>, Appendix C ("Proposal for method-level validation").</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/package.html b/project/engine/src/main/java/org/hibernate/validator/package.html
new file mode 100644
index 0000000..60fd702
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/package.html
@@ -0,0 +1,28 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>Bootstrap classes HibernateValidator and
+HibernateValidatorConfiguration which uniquely identify Hibernate
+Validator and allow to configure it.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java
new file mode 100644
index 0000000..78c33b7
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/AggregateResourceBundleLocator.java
@@ -0,0 +1,215 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.resourceloading;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.hibernate.validator.internal.util.Contracts;
+import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
+
+/**
+ * A {@link ResourceBundleLocator} implementation that provides access
+ * to multiple source {@link ResourceBundle}s by merging them into one
+ * aggregated bundle.
+ *
+ * @author Gunnar Morling
+ */
+public class AggregateResourceBundleLocator extends DelegatingResourceBundleLocator {
+	private final List<String> bundleNames;
+
+	/**
+	 * Creates a locator that delivers a resource bundle merged from the given
+	 * list of source bundles.
+	 *
+	 * @param bundleNames A list with source bundle names. The returned bundle will
+	 * contain all keys from all source bundles. In case a key occurs
+	 * in multiple source bundles, the value will be taken from the
+	 * first bundle containing the key.
+	 * @param delegate A delegate resource bundle locator. The bundle returned by
+	 * this locator will be added to the aggregate bundle after all
+	 * source bundles.
+	 *
+	 * @deprecated Will be removed in a future release. Use
+	 *             {@link #AggregateResourceBundleLocator(List, ResourceBundleLocator)}
+	 *             instead.
+	 */
+	@Deprecated
+	public AggregateResourceBundleLocator(List<String> bundleNames, org.hibernate.validator.resourceloading.ResourceBundleLocator delegate) {
+		this( bundleNames, new Adapter( delegate ) );
+	}
+
+	/**
+	 * Creates a locator that delivers a resource bundle merged from the given
+	 * list of source bundles.
+	 *
+	 * @param bundleNames A list with source bundle names. The returned bundle will
+	 * contain all entries from all source bundles. In case a key occurs
+	 * in multiple source bundles, the value will be taken from the
+	 * first bundle containing the key.
+	 */
+	public AggregateResourceBundleLocator(List<String> bundleNames) {
+		this( bundleNames, (ResourceBundleLocator) null );
+	}
+
+	/**
+	 * Creates a locator that delivers a resource bundle merged from the given
+	 * list of source bundles.
+	 *
+	 * @param bundleNames A list with source bundle names. The returned bundle will
+	 * contain all keys from all source bundles. In case a key occurs
+	 * in multiple source bundles, the value will be taken from the
+	 * first bundle containing the key.
+	 * @param delegate A delegate resource bundle locator. The bundle returned by
+	 * this locator will be added to the aggregate bundle after all
+	 * source bundles.
+	 */
+	public AggregateResourceBundleLocator(List<String> bundleNames, ResourceBundleLocator delegate) {
+		super( delegate );
+
+		Contracts.assertValueNotNull( bundleNames, "bundleNames" );
+
+		List<String> tmpBundleNames = new ArrayList<String>();
+		tmpBundleNames.addAll( bundleNames );
+
+		this.bundleNames = Collections.unmodifiableList( tmpBundleNames );
+	}
+
+	public ResourceBundle getResourceBundle(Locale locale) {
+		List<ResourceBundle> sourceBundles = new ArrayList<ResourceBundle>();
+
+		for ( String oneBundleName : bundleNames ) {
+			ResourceBundleLocator oneLocator =
+					new PlatformResourceBundleLocator( oneBundleName );
+
+			ResourceBundle oneBundle = oneLocator.getResourceBundle( locale );
+
+			if ( oneBundle != null ) {
+				sourceBundles.add( oneBundle );
+			}
+		}
+
+		ResourceBundle bundleFromDelegate = super.getResourceBundle( locale );
+
+		if ( bundleFromDelegate != null ) {
+			sourceBundles.add( bundleFromDelegate );
+		}
+
+		return sourceBundles.isEmpty() ? null : new AggregateBundle( sourceBundles );
+	}
+
+	/**
+	 * A {@link ResourceBundle} whose content is aggregated from multiple source bundles.
+	 * <p/>
+	 * This class is package-private for the sake of testability.
+	 *
+	 * @author Gunnar Morling
+	 */
+	public static class AggregateBundle extends ResourceBundle {
+		private Map<String, Object> contents = new HashMap<String, Object>();
+
+		/**
+		 * Creates a new AggregateBundle.
+		 *
+		 * @param bundles A list of source bundles, which shall be merged into one
+		 * aggregated bundle. The newly created bundle will contain
+		 * all keys from all source bundles. In case a key occurs in
+		 * multiple source bundles, the value will be taken from the
+		 * first bundle containing the key.
+		 */
+		public AggregateBundle(List<ResourceBundle> bundles) {
+			if ( bundles != null ) {
+
+				for ( ResourceBundle bundle : bundles ) {
+					Enumeration<String> keys = bundle.getKeys();
+					while ( keys.hasMoreElements() ) {
+						String oneKey = keys.nextElement();
+						if ( !contents.containsKey( oneKey ) ) {
+							contents.put( oneKey, bundle.getObject( oneKey ) );
+						}
+					}
+				}
+			}
+		}
+
+		@Override
+		public Enumeration<String> getKeys() {
+			return new IteratorEnumeration<String>( contents.keySet().iterator() );
+		}
+
+		@Override
+		protected Object handleGetObject(String key) {
+			return contents.get( key );
+		}
+	}
+
+	/**
+	 * An {@link Enumeration} implementation, that wraps an {@link Iterator}. Can
+	 * be used to integrate older APIs working with enumerations with iterators.
+	 *
+	 * @param <T> The enumerated type.
+	 *
+	 * @author Gunnar Morling
+	 */
+	private static class IteratorEnumeration<T> implements Enumeration<T> {
+
+		private Iterator<T> source;
+
+		/**
+		 * Creates a new IterationEnumeration.
+		 *
+		 * @param source The source iterator. Must not be null.
+		 */
+		public IteratorEnumeration(Iterator<T> source) {
+
+			if ( source == null ) {
+				throw new IllegalArgumentException( "Source must not be null" );
+			}
+
+			this.source = source;
+		}
+
+		public boolean hasMoreElements() {
+			return source.hasNext();
+		}
+
+		public T nextElement() {
+			return source.next();
+		}
+	}
+
+	@SuppressWarnings("deprecation")
+	private static class Adapter implements org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+
+		private final org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee;
+
+		public Adapter(org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee) {
+			this.adaptee = adaptee;
+		}
+
+		public ResourceBundle getResourceBundle(Locale locale) {
+			return adaptee.getResourceBundle( locale );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java
new file mode 100644
index 0000000..aad1d01
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/CachingResourceBundleLocator.java
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.resourceloading;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
+
+/**
+ * A {@link ResourceBundleLocator} implementation that wraps around another
+ * locator and caches values retrieved from that locator.
+ *
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class CachingResourceBundleLocator extends DelegatingResourceBundleLocator {
+
+	private final ConcurrentMap<Locale, ResourceBundle> bundleCache = new ConcurrentHashMap<Locale, ResourceBundle>();
+
+	/**
+	 * Creates a new CachingResourceBundleLocator.
+	 *
+	 * @param delegate The locator from which the values actually will be retrieved.
+	 *
+	 * @deprecated Will be removed in a future release. Use
+	 *             {@link #CachingResourceBundleLocator(ResourceBundleLocator)}
+	 *             instead.
+	 */
+	@Deprecated
+	public CachingResourceBundleLocator(org.hibernate.validator.resourceloading.ResourceBundleLocator delegate) {
+		super( delegate );
+	}
+
+	/**
+	 * Creates a new CachingResourceBundleLocator.
+	 *
+	 * @param delegate The locator from which the values actually will be retrieved.
+	 */
+	public CachingResourceBundleLocator(ResourceBundleLocator delegate) {
+		super( delegate );
+	}
+
+	public ResourceBundle getResourceBundle(Locale locale) {
+		ResourceBundle cachedResourceBundle = bundleCache.get( locale );
+		if ( cachedResourceBundle == null ) {
+			final ResourceBundle bundle = super.getResourceBundle( locale );
+			if ( bundle != null ) {
+				cachedResourceBundle = bundleCache.putIfAbsent( locale, bundle );
+				if ( cachedResourceBundle == null ) {
+					return bundle;
+				}
+			}
+		}
+		return cachedResourceBundle;
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java
new file mode 100644
index 0000000..2db6b78
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/DelegatingResourceBundleLocator.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.resourceloading;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
+
+/**
+ * Abstract base for all {@link ResourceBundleLocator} implementations, that
+ * wish to delegate to some other locator.
+ *
+ * @author Gunnar Morling
+ */
+ at SuppressWarnings("deprecation")
+public abstract class DelegatingResourceBundleLocator
+		implements org.hibernate.validator.resourceloading.ResourceBundleLocator, org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+
+	private final ResourceBundleLocator delegate;
+
+	/**
+	 * Creates a new {@link DelegatingResourceBundleLocator}.
+	 *
+	 * @param delegate The delegate.
+	 *
+	 * @deprecated Will be removed in a future release. Use
+	 *             {@link #DelegatingResourceBundleLocator(org.hibernate.validator.spi.resourceloading.ResourceBundleLocator)}
+	 *             instead.
+	 */
+	@Deprecated
+	public DelegatingResourceBundleLocator(org.hibernate.validator.resourceloading.ResourceBundleLocator delegate) {
+		this.delegate = new Adapter( delegate );
+	}
+
+	/**
+	 * Creates a new {@link DelegatingResourceBundleLocator}.
+	 *
+	 * @param delegate The delegate.
+	 */
+	public DelegatingResourceBundleLocator(org.hibernate.validator.spi.resourceloading.ResourceBundleLocator delegate) {
+		this.delegate = delegate;
+	}
+
+	public ResourceBundle getResourceBundle(Locale locale) {
+		return delegate == null ? null : delegate.getResourceBundle( locale );
+	}
+
+	private static class Adapter implements org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+
+		private final org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee;
+
+		public Adapter(org.hibernate.validator.resourceloading.ResourceBundleLocator adaptee) {
+			this.adaptee = adaptee;
+		}
+
+		public ResourceBundle getResourceBundle(Locale locale) {
+			return adaptee.getResourceBundle( locale );
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java
new file mode 100644
index 0000000..3dbd022
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/PlatformResourceBundleLocator.java
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.resourceloading;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A resource bundle locator, that loads resource bundles by simply
+ * invoking <code>ResourceBundle.loadBundle(...)</code>.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+ at SuppressWarnings("deprecation")
+public class PlatformResourceBundleLocator
+		implements ResourceBundleLocator, org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+	private static final Logger log = Logger.getLogger( PlatformResourceBundleLocator.class.getName() );
+	private String bundleName;
+
+	public PlatformResourceBundleLocator(String bundleName) {
+		this.bundleName = bundleName;
+	}
+
+	/**
+	 * Search current thread classloader for the resource bundle. If not found,
+	 * search validator (this) classloader.
+	 *
+	 * @param locale The locale of the bundle to load.
+	 *
+	 * @return the resource bundle or <code>null</code> if none is found.
+	 */
+	public ResourceBundle getResourceBundle(Locale locale) {
+		ResourceBundle rb = null;
+		ClassLoader classLoader = GetClassLoader.fromContext();
+		if ( classLoader != null ) {
+			rb = loadBundle(
+					classLoader, locale, bundleName
+					+ " not found by thread local classloader"
+			);
+		}
+		if ( rb == null ) {
+			classLoader = GetClassLoader.fromClass( PlatformResourceBundleLocator.class );
+			rb = loadBundle(
+					classLoader, locale, bundleName
+					+ " not found by validator classloader"
+			);
+		}
+		if ( rb != null ) {
+			log.debugf( "%s found.", bundleName );
+		}
+		else {
+			log.debugf( "%s not found.", bundleName );
+		}
+		return rb;
+	}
+
+	private ResourceBundle loadBundle(ClassLoader classLoader, Locale locale, String message) {
+		ResourceBundle rb = null;
+		try {
+			rb = ResourceBundle.getBundle(
+					bundleName, locale,
+					classLoader
+			);
+		}
+		catch ( MissingResourceException e ) {
+			log.trace( message );
+		}
+		return rb;
+	}
+
+	private static class GetClassLoader implements PrivilegedAction<ClassLoader> {
+		private final Class<?> clazz;
+
+		public static ClassLoader fromContext() {
+			final GetClassLoader action = new GetClassLoader( null );
+			if ( System.getSecurityManager() != null ) {
+				return AccessController.doPrivileged( action );
+			}
+			else {
+				return action.run();
+			}
+		}
+
+		public static ClassLoader fromClass(Class<?> clazz) {
+			if ( clazz == null ) {
+				throw new IllegalArgumentException( "Class is null" );
+			}
+			final GetClassLoader action = new GetClassLoader( clazz );
+			if ( System.getSecurityManager() != null ) {
+				return AccessController.doPrivileged( action );
+			}
+			else {
+				return action.run();
+			}
+		}
+
+		private GetClassLoader(Class<?> clazz) {
+			this.clazz = clazz;
+		}
+
+		public ClassLoader run() {
+			if ( clazz != null ) {
+				return clazz.getClassLoader();
+			}
+			else {
+				return Thread.currentThread().getContextClassLoader();
+			}
+		}
+	}
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java
new file mode 100644
index 0000000..1018110
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/ResourceBundleLocator.java
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.resourceloading;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * <p>
+ * Used by {@link org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator} to load resource bundles
+ * containing message texts to be displayed in case of validation errors.
+ * </p>
+ * <p>
+ * The default implementation provides access to the bundle "ValidationMessages"
+ * as described in the BV specification. By providing additional implementations
+ * of this interface, alternative ways of bundle loading can be realized, e.g.
+ * by loading bundles based on XML files or from a database.
+ * </p>
+ * <p>
+ * A {@code ResourceBundleLocator} implementation must be thread-safe.
+ * </p>
+ *
+ * @author Gunnar Morling
+ * @deprecated Will be removed in a future release. Use
+ *             {@link org.hibernate.validator.spi.resourceloading.ResourceBundleLocator}
+ *             instead.
+ */
+ at Deprecated
+public interface ResourceBundleLocator extends org.hibernate.validator.spi.resourceloading.ResourceBundleLocator {
+
+	/**
+	 * Returns a resource bundle for the given locale.
+	 *
+	 * @param locale A locale, for which a resource bundle shall be retrieved. Must
+	 * not be null.
+	 *
+	 * @return A resource bundle for the given locale. May be null, if no such
+	 *         bundle exists.
+	 */
+	ResourceBundle getResourceBundle(Locale locale);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/resourceloading/package.html b/project/engine/src/main/java/org/hibernate/validator/resourceloading/package.html
new file mode 100644
index 0000000..fc2b5ab
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/resourceloading/package.html
@@ -0,0 +1,26 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>ResourceBundleLocator interface and its various implementations.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/spi/group/DefaultGroupSequenceProvider.java b/project/engine/src/main/java/org/hibernate/validator/spi/group/DefaultGroupSequenceProvider.java
new file mode 100644
index 0000000..7e3423a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/spi/group/DefaultGroupSequenceProvider.java
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.spi.group;
+
+import java.util.List;
+
+/**
+ * This class defines the dynamic group sequence provider contract.
+ * <p>
+ * In order to redefine dynamically the default group sequence for a type T, the {@link org.hibernate.validator.group.GroupSequenceProvider} annotation
+ * must be placed on T, specifying as its value a concrete implementation of {@code DefaultGroupSequenceProvider}, which
+ * must be parametrized with the type T.
+ * </p>
+ * <p>
+ * If during the validation process the {@code Default} group is validated for T, the actual validated instance
+ * is passed to the {@code DefaultGroupSequenceProvider} to determine the default group sequence.
+ * </p>
+ * <p>
+ * Note:
+ * <ul>
+ * <li>Implementations must provide a public default constructor.</li>
+ * <li>Implementations must be thread-safe.</li>
+ * </ul>
+ *
+ * @param <T> The type for which an implementation is defined.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ */
+public interface DefaultGroupSequenceProvider<T> {
+
+	/**
+	 * This method returns the default group sequence for the given instance.
+	 * <p>
+	 * The object parameter allows to dynamically compose the default group sequence in function of the validated value state.
+	 * </p>
+	 *
+	 * @param object the instance being validated. This value can be {@code null} in case this method was called as part of
+	 * {@linkplain javax.validation.Validator#validateValue(Class, String, Object, Class[]) Validator#validateValue}.
+	 *
+	 * @return a list of classes specifying the default group sequence. The same constraints to the redefined group list
+	 *         apply as for lists defined via {@code GroupSequence}. In particular the list has to contain the type T.
+	 */
+	List<Class<?>> getValidationGroups(T object);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/spi/group/package.html b/project/engine/src/main/java/org/hibernate/validator/spi/group/package.html
new file mode 100644
index 0000000..0aeba66
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/spi/group/package.html
@@ -0,0 +1,25 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>This package provides support for dynamic default group sequence definition.</p>
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/ResourceBundleLocator.java b/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/ResourceBundleLocator.java
new file mode 100644
index 0000000..1e5102a
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/ResourceBundleLocator.java
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.spi.resourceloading;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * <p>
+ * Used by {@link org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator} to load resource bundles
+ * containing message texts to be displayed in case of validation errors.
+ * </p>
+ * <p>
+ * The default implementation provides access to the bundle "ValidationMessages"
+ * as described in the BV specification. By providing additional implementations
+ * of this interface, alternative ways of bundle loading can be realized, e.g.
+ * by loading bundles based on XML files or from a database.
+ * </p>
+ * <p>
+ * A {@code ResourceBundleLocator} implementation must be thread-safe.
+ * </p>
+ *
+ * @author Gunnar Morling
+ */
+public interface ResourceBundleLocator {
+
+	/**
+	 * Returns a resource bundle for the given locale.
+	 *
+	 * @param locale A locale, for which a resource bundle shall be retrieved. Must
+	 * not be null.
+	 *
+	 * @return A resource bundle for the given locale. May be null, if no such
+	 *         bundle exists.
+	 */
+	ResourceBundle getResourceBundle(Locale locale);
+}
diff --git a/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/package.html b/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/package.html
new file mode 100644
index 0000000..373e28d
--- /dev/null
+++ b/project/engine/src/main/java/org/hibernate/validator/spi/resourceloading/package.html
@@ -0,0 +1,28 @@
+<!--
+  ~
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<p>ResourceBundleLocator interface. Several implementations are
+    provided in the package <code>org.hibernate.validator.resourceloading</code>.</p>
+
+<p>This package is part of the public Hibernate Validator API.</p>
+</body>
+</html>
diff --git a/hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider b/project/engine/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider
similarity index 100%
rename from hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider
rename to project/engine/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties
new file mode 100644
index 0000000..47409f4
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties
@@ -0,0 +1,27 @@
+
+javax.validation.constraints.AssertFalse.message = must be false
+javax.validation.constraints.AssertTrue.message  = must be true
+javax.validation.constraints.DecimalMax.message  = must be less than or equal to {value}
+javax.validation.constraints.DecimalMin.message  = must be greater than or equal to {value}
+javax.validation.constraints.Digits.message      = numeric value out of bounds (<{integer} digits>.<{fraction} digits> expected)
+javax.validation.constraints.Future.message      = must be in the future
+javax.validation.constraints.Max.message         = must be less than or equal to {value}
+javax.validation.constraints.Min.message         = must be greater than or equal to {value}
+javax.validation.constraints.NotNull.message     = may not be null
+javax.validation.constraints.Null.message        = must be null
+javax.validation.constraints.Past.message        = must be in the past
+javax.validation.constraints.Pattern.message     = must match "{regexp}"
+javax.validation.constraints.Size.message        = size must be between {min} and {max}
+
+org.hibernate.validator.constraints.CreditCardNumber.message = invalid credit card number
+org.hibernate.validator.constraints.Email.message            = not a well-formed email address
+org.hibernate.validator.constraints.Length.message           = length must be between {min} and {max}
+org.hibernate.validator.constraints.NotBlank.message         = may not be empty
+org.hibernate.validator.constraints.NotEmpty.message         = may not be empty
+org.hibernate.validator.constraints.Range.message            = must be between {min} and {max}
+org.hibernate.validator.constraints.SafeHtml.message         = may have unsafe html content
+org.hibernate.validator.constraints.ScriptAssert.message     = script expression "{script}" didn't evaluate to true
+org.hibernate.validator.constraints.URL.message              = must be a valid URL
+org.hibernate.validator.constraints.br.CNPJ.message          = invalid Brazilian corporate taxpayer registry number (CNPJ)
+org.hibernate.validator.constraints.br.CPF.message           = invalid Brazilian individual taxpayer registry number (CPF)
+org.hibernate.validator.constraints.br.TituloEleitor.message = invalid Brazilian Voter ID card number
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_cs.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_cs.properties
new file mode 100644
index 0000000..296b0c9
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_cs.properties
@@ -0,0 +1,23 @@
+javax.validation.constraints.AssertFalse.message = mus\u00ed b\u00fdt ne
+javax.validation.constraints.AssertTrue.message  = mus\u00ed b\u00fdt ano
+javax.validation.constraints.DecimalMax.message  = mus\u00ed b\u00fdt men\u0161\u00ed ne\u017e nebo rovno {value}
+javax.validation.constraints.DecimalMin.message  = mus\u00ed b\u00fdt v\u011bt\u0161\u00ed ne\u017e nebo rovno {value}
+javax.validation.constraints.Digits.message      = \u010d\u00edseln\u00e1 hodnota mimo rozsah (o\u010dek\u00e1v\u00e1no <{integer} \u010d\u00edslic>.<{fraction} \u010d\u00edslic>)
+javax.validation.constraints.Future.message      = mus\u00ed b\u00fdt v budoucnosti
+javax.validation.constraints.Max.message         = mus\u00ed b\u00fdt men\u0161\u00ed ne\u017e nebo rovno {value}
+javax.validation.constraints.Min.message         = mus\u00ed b\u00fdt v\u011bt\u0161\u00ed ne\u017e nebo rovno {value}
+javax.validation.constraints.NotNull.message     = nesm\u00ed b\u00fdt null
+javax.validation.constraints.Null.message        = mus\u00ed b\u00fdt null
+javax.validation.constraints.Past.message        = mus\u00ed b\u00fdt v minulosti
+javax.validation.constraints.Pattern.message     = se mus\u00ed shodovat s "{regexp}"
+javax.validation.constraints.Size.message        = velikost mus\u00ed b\u00fdt mezi {min} a {max}
+
+org.hibernate.validator.constraints.CreditCardNumber.message = neplatn\u00e9 \u010d\u00edslo kreditn\u00ed karty
+org.hibernate.validator.constraints.Email.message            = chybn\u00e1 emailov\u00e1 adresa
+org.hibernate.validator.constraints.Length.message           = d\u00e9lka mus\u00ed b\u00fdt mezi {min} a {max}
+org.hibernate.validator.constraints.NotBlank.message         = nem\u016f\u017ee b\u00fdt pr\u00e1zdn\u00fd/\u00e1/\u00e9
+org.hibernate.validator.constraints.NotEmpty.message         = nem\u016f\u017ee b\u00fdt pr\u00e1zdn\u00fd/\u00e1/\u00e9
+org.hibernate.validator.constraints.Range.message            = mus\u00ed b\u00fdt mezi {min} a {max}
+org.hibernate.validator.constraints.SafeHtml.message         = m\u016f\u017ee obsahovat nebezpe\u010dn\u00fd html obsah
+org.hibernate.validator.constraints.ScriptAssert.message     = skriptovac\u00ed v\u00fdraz "{script}" nen\u00ed vyhodnocen na ano
+org.hibernate.validator.constraints.URL.message              = mus\u00ed b\u00fdt platn\u00e9 URL
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties
new file mode 100644
index 0000000..a8fe3d1
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties
@@ -0,0 +1,23 @@
+javax.validation.constraints.AssertFalse.message = muss falsch sein
+javax.validation.constraints.AssertTrue.message  = muss wahr sein
+javax.validation.constraints.DecimalMax.message  = muss kleiner oder gleich {value} sein
+javax.validation.constraints.DecimalMin.message  = muss gr\u00F6\u00DFer oder gleich {value} sein
+javax.validation.constraints.Digits.message      = numerischer Wert au\u00DFerhalb erlaubten Wertebereichs (<{integer} Ziffern>,<{fraction} Ziffern> erwartet)
+javax.validation.constraints.Future.message      = muss in der Zukunft liegen
+javax.validation.constraints.Max.message         = muss kleiner oder gleich {value} sein
+javax.validation.constraints.Min.message         = muss gr\u00F6\u00DFer oder gleich {value} sein
+javax.validation.constraints.NotNull.message     = darf nicht null sein
+javax.validation.constraints.Null.message        = muss null sein
+javax.validation.constraints.Past.message        = muss in der Vergangenheit liegen
+javax.validation.constraints.Pattern.message     = muss auf Ausdruck "{regexp}" passen
+javax.validation.constraints.Size.message        = muss zwischen {min} und {max} liegen
+
+org.hibernate.validator.constraints.CreditCardNumber.message = ung\u00FCltige Kreditkartennummer
+org.hibernate.validator.constraints.Email.message            = keine g\u00FCltige E-Mail-Adresse
+org.hibernate.validator.constraints.Length.message           = muss zwischen {min} und {max} liegen
+org.hibernate.validator.constraints.NotBlank.message         = darf nicht leer sein
+org.hibernate.validator.constraints.NotEmpty.message         = darf nicht leer sein
+org.hibernate.validator.constraints.Range.message            = muss zwischen {min} und {max} liegen
+org.hibernate.validator.constraints.SafeHtml.message         = k\u00F6nnte unsicheren HTML-Inhalt haben
+org.hibernate.validator.constraints.ScriptAssert.message     = Skriptausdruck "{script}" gab nicht true zur\u00FCck
+org.hibernate.validator.constraints.URL.message              = muss eine g\u00FCltige URL sein
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties
new file mode 100644
index 0000000..ccd6679
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_en.properties
@@ -0,0 +1,8 @@
+# This file is intentionally left empty. All calls to this bundle will
+# be delegated to the parent bundle ValidationMessages (which contains 
+# English messages).
+#
+# Not providing this bundle would cause the bundle for the default 
+# locale to take precedence over the base bundle. If the default locale 
+# is not English but one, for which a resource bundle exists (e.g. German),
+# the English texts would never be returned.
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_es.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_es.properties
new file mode 100644
index 0000000..cdad932
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_es.properties
@@ -0,0 +1,23 @@
+javax.validation.constraints.AssertFalse.message = tiene que ser falso
+javax.validation.constraints.AssertTrue.message  = tiene que ser verdadero
+javax.validation.constraints.DecimalMax.message  = tiene que ser menor o igual que {value}
+javax.validation.constraints.DecimalMin.message  = tiene que ser mayor o igual que {value}
+javax.validation.constraints.Digits.message      = valor num\u00E9rico fuera de los l\u00EDmites (se esperaba <{integer} d\u00EDgitos>.<{fraction} d\u00EDgitos)
+javax.validation.constraints.Future.message      = tiene que ser una fecha en el futuro
+javax.validation.constraints.Max.message         = tiene que ser menor o igual que {value}
+javax.validation.constraints.Min.message         = tiene que ser mayor o igual que {value}
+javax.validation.constraints.NotNull.message     = no puede ser null
+javax.validation.constraints.Null.message        = tiene que ser null
+javax.validation.constraints.Past.message        = tiene que ser una fecha en el pasado
+javax.validation.constraints.Pattern.message     = tiene que corresponder a la expresi\u00F3n regular "{regexp}"
+javax.validation.constraints.Size.message        = el tama\u00F1o tiene que estar entre {min} y {max}
+
+org.hibernate.validator.constraints.CreditCardNumber.message = n\u00FAmero de tarjeta inv\u00E1lido
+org.hibernate.validator.constraints.Email.message            = no es una direcci\u00F3n de correo bien formada
+org.hibernate.validator.constraints.Length.message           = la longitud tiene que estar entre {min} y {max}
+org.hibernate.validator.constraints.NotBlank.message         = no puede estar vac\u00EDo
+org.hibernate.validator.constraints.NotEmpty.message         = no puede estar vac\u00EDo
+org.hibernate.validator.constraints.Range.message            = tiene que estar entre {min} y {max}
+org.hibernate.validator.constraints.SafeHtml.message         = puede tener un contenido html inseguro
+org.hibernate.validator.constraints.ScriptAssert.message     = la expresi\u00F3n "{script}" no se ha evaluado a cierto
+org.hibernate.validator.constraints.URL.message              = tiene que ser una URL v\u00E1lida
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties
new file mode 100644
index 0000000..78ec4b4
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_fr.properties
@@ -0,0 +1,22 @@
+javax.validation.constraints.AssertFalse.message = doit \u00EAtre faux
+javax.validation.constraints.AssertTrue.message  = doit \u00EAtre vrai
+javax.validation.constraints.DecimalMax.message  = doit \u00EAtre plus petit que {value}
+javax.validation.constraints.DecimalMin.message  = doit \u00EAtre plus grand que {value}
+javax.validation.constraints.Digits.message      = Valeur num\u00E9rique hors limite (<{integer} chiffres>.<{fraction} chiffres> attendus)
+javax.validation.constraints.Future.message      = doit \u00EAtre dans le futur
+javax.validation.constraints.Max.message         = doit \u00EAtre plus petit que {value}
+javax.validation.constraints.Min.message         = doit \u00EAtre plus grand que {value}
+javax.validation.constraints.NotNull.message     = ne peut pas \u00EAtre nul
+javax.validation.constraints.Null.message        = doit \u00EAtre nul
+javax.validation.constraints.Past.message        = doit \u00EAtre dans le pass\u00E9
+javax.validation.constraints.Pattern.message     = doit suivre "{regexp}"
+javax.validation.constraints.Size.message        = la taille doit \u00EAtre entre {min} et {max}
+
+org.hibernate.validator.constraints.CreditCardNumber.message = Num\u00E9ro de carte de cr\u00E9dit invalide
+org.hibernate.validator.constraints.Email.message            = Adresse email mal form\u00E9e
+org.hibernate.validator.constraints.Length.message           = la taille doit \u00EAtre entre {min} et {max}
+org.hibernate.validator.constraints.NotBlank.message         = ne peut pas \u00EAtre vide
+org.hibernate.validator.constraints.NotEmpty.message         = ne peut pas \u00EAtre vide
+org.hibernate.validator.constraints.Range.message            = doit \u00EAtre entre {min} et {max}
+org.hibernate.validator.constraints.SafeHtml.message         = peut-\u00EAtre dangereux contenu html
+org.hibernate.validator.constraints.URL.message              = URL mal form\u00E9e
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_hu.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_hu.properties
new file mode 100644
index 0000000..db79ce5
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_hu.properties
@@ -0,0 +1,23 @@
+javax.validation.constraints.AssertFalse.message = hamis kell legyen
+javax.validation.constraints.AssertTrue.message  = igaz kell legyen
+javax.validation.constraints.DecimalMax.message  = kisebb vagy egyenl\u0151 kell legyen mint {value}
+javax.validation.constraints.DecimalMin.message  = nagyobb vagy egyenl\u0151 kell legyen mint {value}
+javax.validation.constraints.Digits.message      = a sz\u00E1mform\u00E1tum nem felel meg a k\u00F6vetkez\u0151 form\u00E1nak\: <{integer} sz\u00E1mjegy>.<{fraction} tizedesjegy>
+javax.validation.constraints.Future.message      = a j\u00F6v\u0151ben kell lennie
+javax.validation.constraints.Max.message         = kisebb vagy egyenl\u0151 kell legyen mint {value}
+javax.validation.constraints.Min.message         = nagyobb vagy egyenl\u0151 kell legyen mint {value}
+javax.validation.constraints.NotNull.message     = nem lehet null-\u00E9rt\u00E9k
+javax.validation.constraints.Null.message        = null-\u00E9rt\u00E9knek kell lennie
+javax.validation.constraints.Past.message        = a m\u00FAltban kell lennie
+javax.validation.constraints.Pattern.message     = meg kell felelnie a "{regexp}" regul\u00E1ris kifejez\u00E9snek
+javax.validation.constraints.Size.message        = a m\u00E9retnek {min} \u00E9s {max} k\u00F6z\u00F6tt kell lennie
+
+org.hibernate.validator.constraints.CreditCardNumber.message = hib\u00E1s hitelk\u00E1rtyasz\u00E1m
+org.hibernate.validator.constraints.Email.message            = nem felel meg az email c\u00EDmek form\u00E1tum\u00E1nak
+org.hibernate.validator.constraints.Length.message           = a hossznak {min} \u00E9s {max} k\u00F6z\u00F6tt kell lennie
+org.hibernate.validator.constraints.NotBlank.message         = nem lehet \u00FCres
+org.hibernate.validator.constraints.NotEmpty.message         = nem lehet \u00FCres
+org.hibernate.validator.constraints.Range.message            = az \u00E9rt\u00E9knek {min} \u00E9s {max} k\u00F6z\u00F6tt kell lennie
+org.hibernate.validator.constraints.SafeHtml.message         = Lehet, hogy nem biztons\u00E1gos html tartalom
+org.hibernate.validator.constraints.ScriptAssert.message     = script kifejez\u00E9s "{script}" nem \u00E9rt\u00E9kel\u0151d\u00F6tt ki igazz\u00E1
+org.hibernate.validator.constraints.URL.message              = \u00E9rv\u00E9nyes URL-nek kell lennie
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties
new file mode 100644
index 0000000..1481369
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_mn_MN.properties
@@ -0,0 +1,19 @@
+javax.validation.constraints.AssertFalse.message = \u0425\u0443\u0434\u0430\u043B \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.AssertTrue.message  = \u04AE\u043D\u044D\u043D \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.DecimalMax.message  = {value}-\u0430\u0430\u0441 \u0431\u0430\u0433\u0430 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.DecimalMin.message  = {value}-\u0430\u0430\u0441 \u0438\u0445 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Digits.message      = \u0422\u043E\u043E\u043D \u0445\u044F\u0437\u0433\u0430\u0430\u0440\u0430\u0430\u0441 \u0445\u044D\u0442\u044D\u0440\u0441\u044D\u043D \u0431\u0430\u0439\u043D\u0430 (<{integerDigits} digits>.<{fractionalDigits} digits> \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430)
+javax.validation.constraints.Future.message      = \u0418\u0440\u044D\u044D\u0434\u04AF\u0439\u0434 \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Max.message         = {value}-\u0430\u0430\u0441 \u0431\u0430\u0433\u0430 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Min.message         = {value}-\u0430\u0430\u0441 \u0438\u0445 \u0431\u0443\u044E\u0443 \u0442\u044D\u043D\u0446\u04AF\u04AF \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.NotNull.message     = null \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
+javax.validation.constraints.Null.message        = null \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Past.message        = \u04E8\u043D\u0433\u04E9\u0440\u0441\u04E9\u043D\u0434 \u0431\u0430\u0439\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Pattern.message     = "{regexp}"-\u0434 \u0442\u0430\u0430\u0440\u0430\u0445 \u0451\u0441\u0442\u043E\u0439
+javax.validation.constraints.Size.message        = \u0425\u044D\u043C\u0436\u044D\u044D {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
+
+org.hibernate.validator.constraints.Email.message    = \u0411\u0443\u0440\u0443\u0443 \u0438-\u043C\u044D\u0439\u043B \u0445\u0430\u044F\u0433 \u0431\u0430\u0439\u043D\u0430
+org.hibernate.validator.constraints.Length.message   = \u0422\u044D\u043C\u0434\u044D\u0433\u0442\u0438\u0439\u043D \u0443\u0440\u0442 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
+org.hibernate.validator.constraints.NotBlank.message = \u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
+org.hibernate.validator.constraints.NotEmpty.message = \u0425\u043E\u043E\u0441\u043E\u043D \u0431\u0430\u0439\u0436 \u0431\u043E\u043B\u043E\u0445\u0433\u04AF\u0439
+org.hibernate.validator.constraints.Range.message    = \u0423\u0442\u0433\u0430 {min}-\u0441 {max} \u0445\u043E\u043E\u0440\u043E\u043D\u0434 \u0431\u0430\u0439\u043D\u0430
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_pt_BR.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_pt_BR.properties
new file mode 100644
index 0000000..6126093
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_pt_BR.properties
@@ -0,0 +1,27 @@
+
+javax.validation.constraints.AssertFalse.message = deve ser falso
+javax.validation.constraints.AssertTrue.message  = deve ser verdadeiro
+javax.validation.constraints.DecimalMax.message  = deve ser menor ou igual a {value}
+javax.validation.constraints.DecimalMin.message  = deve ser maior ou igual a {value}
+javax.validation.constraints.Digits.message      = valor num\u00E9rico fora do limite (<{integer} d\u00EDgitos>.<{fraction} d\u00EDgitos> esperado)
+javax.validation.constraints.Future.message      = deve estar no futuro
+javax.validation.constraints.Max.message         = deve ser menor ou igual a {value}
+javax.validation.constraints.Min.message         = deve ser maior ou igual a {value}
+javax.validation.constraints.NotNull.message     = n\u00E3o pode ser nulo
+javax.validation.constraints.Null.message        = deve ser nulo
+javax.validation.constraints.Past.message        = deve estar no passado
+javax.validation.constraints.Pattern.message     = deve corresponder \u00E0 "{regexp}"
+javax.validation.constraints.Size.message        = tamanho deve estar entre {min} e {max}
+
+org.hibernate.validator.constraints.CreditCardNumber.message = n\u00FAmero de Cart\u00E3o de Cr\u00E9dito inv\u00E1lido
+org.hibernate.validator.constraints.Email.message            = n\u00E3o \u00E9 um endere\u00E7o de e-mail
+org.hibernate.validator.constraints.Length.message           = tamanho deve estar entre {min} e {max}
+org.hibernate.validator.constraints.NotBlank.message         = n\u00E3o pode estar vazio
+org.hibernate.validator.constraints.NotEmpty.message         = n\u00E3o pode estar vazio
+org.hibernate.validator.constraints.Range.message            = deve estar entre {min} e {max}
+org.hibernate.validator.constraints.SafeHtml.message         = pode ter um conte\u00FAdo html inseguro
+org.hibernate.validator.constraints.ScriptAssert.message     = express\u00E3o de script "{script}" n\u00E3o retornou verdadeiro
+org.hibernate.validator.constraints.URL.message              = deve ser uma URL v\u00E1lida
+org.hibernate.validator.constraints.br.CNPJ.message          = CNPJ inv\u00E1lido
+org.hibernate.validator.constraints.br.CPF.message           = CPF inv\u00E1lido
+org.hibernate.validator.constraints.br.TituloEleitor.message = t\u00EDtulo eleitoral inv\u00E1lido
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
new file mode 100644
index 0000000..cf1f48f
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
@@ -0,0 +1,20 @@
+javax.validation.constraints.AssertFalse.message = teyit ba\u015Far\u0131s\u0131z
+javax.validation.constraints.AssertTrue.message  = teyit ba\u015Far\u0131s\u0131z
+javax.validation.constraints.DecimalMax.message  = '{value}' de\u011Ferinden k\u00FC\u00E7\u00FCk yada e\u015Fit olmal\u0131
+javax.validation.constraints.DecimalMin.message  = '{value}' de\u011Ferinden b\u00FCy\u00FCk yada e\u015Fit olmal\u0131
+javax.validation.constraints.Digits.message      = s\u0131n\u0131rlar\u0131n d\u0131\u015F\u0131nda say\u0131sal de\u011Fer (beklenen <{integerDigits} basamak>.<{fractionalDigits} basamak>)
+javax.validation.constraints.Future.message      = ileri bir tarih olmal\u0131
+javax.validation.constraints.Max.message         = '{value}' de\u011Ferinden k\u00FC\u00E7\u00FCk yada e\u015Fit olmal\u0131
+javax.validation.constraints.Min.message         = '{value}' de\u011Ferinden b\u00FCy\u00FCk yada e\u015Fit olmal\u0131
+javax.validation.constraints.NotNull.message     = bo\u015F de\u011Fer olamaz
+javax.validation.constraints.Null.message        = bo\u015F de\u011Fer olmal\u0131
+javax.validation.constraints.Past.message        = ge\u00E7mi\u015F bir tarih olmal\u0131
+javax.validation.constraints.Pattern.message     = '{regexp}' ile e\u015Fle\u015Fmeli
+javax.validation.constraints.Size.message        = boyut '{min}' ile '{max}' aras\u0131nda olmal\u0131
+
+org.hibernate.validator.constraints.Email.message    = d\u00FCzg\u00FCn bi\u00E7imli bir e-posta adresi de\u011Fil!
+org.hibernate.validator.constraints.Length.message   = uzunluk '{min}' ile '{max}' aras\u0131nda olmal\u0131
+org.hibernate.validator.constraints.NotBlank.message = bo\u015F de\u011Fer olamaz
+org.hibernate.validator.constraints.NotEmpty.message = bo\u015F de\u011Fer olamaz
+org.hibernate.validator.constraints.Range.message    = {min} ve {max} aras\u0131nda olmal\u0131d\u0131r!
+org.hibernate.validator.constraints.SafeHtml.message = g\u00FCvensiz html i\u00E7erik olabilir
diff --git a/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_zh_CN.properties b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_zh_CN.properties
new file mode 100644
index 0000000..37138bd
--- /dev/null
+++ b/project/engine/src/main/resources/org/hibernate/validator/ValidationMessages_zh_CN.properties
@@ -0,0 +1,23 @@
+javax.validation.constraints.AssertFalse.message = \u53EA\u80FD\u4E3Afalse
+javax.validation.constraints.AssertTrue.message  = \u53EA\u80FD\u4E3Atrue
+javax.validation.constraints.DecimalMax.message  = \u5FC5\u987B\u5C0F\u4E8E\u6216\u7B49\u4E8E{value}
+javax.validation.constraints.DecimalMin.message  = \u5FC5\u987B\u5927\u4E8E\u6216\u7B49\u4E8E{value}
+javax.validation.constraints.Digits.message      = \u6570\u5B57\u7684\u503C\u8D85\u51FA\u4E86\u5141\u8BB8\u8303\u56F4(\u53EA\u5141\u8BB8\u5728{integer}\u4F4D\u6574\u6570\u548C{fraction}\u4F4D\u5C0F\u6570\u8303\u56F4\u5185)
+javax.validation.constraints.Future.message      = \u9700\u8981\u662F\u4E00\u4E2A\u5C06\u6765\u7684\u65F6\u95F4
+javax.validation.constraints.Max.message         = \u6700\u5927\u4E0D\u80FD\u8D85\u8FC7{value}
+javax.validation.constraints.Min.message         = \u6700\u5C0F\u4E0D\u80FD\u5C0F\u4E8E{value}
+javax.validation.constraints.NotNull.message     = \u4E0D\u80FD\u4E3Anull
+javax.validation.constraints.Null.message        = \u5FC5\u987B\u4E3Anull
+javax.validation.constraints.Past.message        = \u9700\u8981\u662F\u4E00\u4E2A\u8FC7\u53BB\u7684\u4E8B\u4EF6
+javax.validation.constraints.Pattern.message     = \u9700\u8981\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F"{regexp}"
+javax.validation.constraints.Size.message        = \u4E2A\u6570\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4
+
+org.hibernate.validator.constraints.CreditCardNumber.message = \u4E0D\u5408\u6CD5\u7684\u4FE1\u7528\u5361\u53F7\u7801
+org.hibernate.validator.constraints.Email.message            = \u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u7684\u7535\u5B50\u90AE\u4EF6\u5730\u5740
+org.hibernate.validator.constraints.Length.message           = \u957F\u5EA6\u9700\u8981\u5728{min}\u548C{max}\u4E4B\u95F4
+org.hibernate.validator.constraints.NotBlank.message         = \u4E0D\u80FD\u4E3A\u7A7A
+org.hibernate.validator.constraints.NotEmpty.message         = \u4E0D\u80FD\u4E3A\u7A7A
+org.hibernate.validator.constraints.Range.message            = \u9700\u8981\u5728{min}\u548C{max}\u4E4B\u95F4
+org.hibernate.validator.constraints.SafeHtml.message         = \u53EF\u80FD\u6709\u4E0D\u5B89\u5168\u7684HTML\u5185\u5BB9
+org.hibernate.validator.constraints.ScriptAssert.message     = \u6267\u884C\u811A\u672C\u8868\u8FBE\u5F0F"{script}"\u6CA1\u6709\u80FD\u591F\u5F97\u5230true
+org.hibernate.validator.constraints.URL.message              = \u9700\u8981\u662F\u4E00\u4E2A\u5408\u6CD5\u7684URL
diff --git a/project/engine/src/main/xjb/binding-customization.xjb b/project/engine/src/main/xjb/binding-customization.xjb
new file mode 100644
index 0000000..5409810
--- /dev/null
+++ b/project/engine/src/main/xjb/binding-customization.xjb
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
+    <jxb:bindings schemaLocation="../xsd/validation-mapping-1.0.xsd" node="/xs:schema">
+        <!-- let jaxb be whitespace tolerant - http://www.highlevelbits.com/2009/08/jaxb-with-maven_16.html -->
+        <jxb:globalBindings>
+            <xjc:javaType name="java.lang.String" xmlType="xs:string"
+                          adapter="javax.xml.bind.annotation.adapters.CollapsedStringAdapter"/>
+        </jxb:globalBindings>
+
+        <jxb:bindings node="//xs:complexType[9]/xs:sequence[1]/xs:element[1]">
+            <jxb:property name="classType"/>
+        </jxb:bindings>
+    </jxb:bindings>
+</jxb:bindings>
diff --git a/hibernate-validator/src/main/xsd/validation-configuration-1.0.xsd b/project/engine/src/main/xsd/validation-configuration-1.0.xsd
similarity index 100%
rename from hibernate-validator/src/main/xsd/validation-configuration-1.0.xsd
rename to project/engine/src/main/xsd/validation-configuration-1.0.xsd
diff --git a/hibernate-validator/src/main/xsd/validation-mapping-1.0.xsd b/project/engine/src/main/xsd/validation-mapping-1.0.xsd
similarity index 100%
rename from hibernate-validator/src/main/xsd/validation-mapping-1.0.xsd
rename to project/engine/src/main/xsd/validation-mapping-1.0.xsd
diff --git a/hibernate-validator/src/site/site.xml b/project/engine/src/site/site.xml
similarity index 100%
rename from hibernate-validator/src/site/site.xml
rename to project/engine/src/site/site.xml
diff --git a/project/engine/src/test/java/org/hibernate/validator/ValidationMessages.java b/project/engine/src/test/java/org/hibernate/validator/ValidationMessages.java
new file mode 100644
index 0000000..a81624e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/ValidationMessages.java
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ValidationMessages extends ResourceBundle {
+
+	private static final Log log = LoggerFactory.make();
+
+	private static final String DEFAULT_PROPERTIES_FILE_NAME = "/org/hibernate/validator/ValidationMessages.properties";
+
+	private Map<String, String> messages = new HashMap<String, String>();
+
+	public ValidationMessages() throws Exception {
+
+		log.info( "For test purposes are we proxying the built-in messages!" );
+		addTestPropertiesToBundle();
+		log.infof( "Adding the following properties to default properties %s", messages );
+
+		loadDefaultValidationProperties();
+	}
+
+	private void addTestPropertiesToBundle() {
+		messages.put( "replace.in.default.bundle1", "{replace.in.default.bundle2}" );
+		messages.put( "replace.in.default.bundle2", "foobar" );
+	}
+
+	private void loadDefaultValidationProperties() throws IOException {
+		InputStream in = this.getClass()
+				.getResourceAsStream( DEFAULT_PROPERTIES_FILE_NAME );
+		PropertyResourceBundle propertyBundle = new PropertyResourceBundle( in );
+		setParent( propertyBundle );
+	}
+
+	protected Object handleGetObject(String key) {
+		return messages.get( key );
+	}
+
+	public Enumeration<String> getKeys() {
+		throw new RuntimeException( "Not needed for testing purposes." );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java b/project/engine/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java
new file mode 100644
index 0000000..8bb7457
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/HibernateValidatorConfigurationTest.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test;
+
+import javax.validation.Validation;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.resourceloading.ResourceBundleLocator;
+
+import static org.testng.Assert.assertNotNull;
+
+/**
+ * Test for {@link org.hibernate.validator.HibernateValidatorConfiguration}.
+ *
+ * @author Gunnar Morling
+ */
+public class HibernateValidatorConfigurationTest {
+
+	@Test
+	public void defaultResourceBundleLocatorCanBeRetrieved() {
+		HibernateValidatorConfiguration configure = Validation.byProvider( HibernateValidator.class ).configure();
+		ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator();
+
+		assertNotNull( defaultResourceBundleLocator );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/CascadingWithConstraintMappingTest.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/CascadingWithConstraintMappingTest.java
new file mode 100644
index 0000000..943c2aa
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/CascadingWithConstraintMappingTest.java
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.cfg;
+
+import java.lang.reflect.Method;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodValidator;
+import org.hibernate.validator.testutil.ValidatorUtil;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+public class CascadingWithConstraintMappingTest {
+	@Test(description = "HV-433")
+	public void testProgrammaticCascadingValidationFieldAccess() {
+		ConstraintMapping newMapping = new ConstraintMapping();
+		newMapping
+				.type( C.class )
+				.property( "string", FIELD )
+				.constraint( new NotNullDef() )
+				.type( A.class )
+				.property( "c", FIELD )
+				.valid();
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( newMapping );
+
+		B b = new B();
+		b.c = new C();
+
+		Set<ConstraintViolation<B>> violations = validator.validate( b );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+	}
+
+	@Test(description = "HV-433")
+	public void testProgrammaticCascadingValidationMethodAccess() {
+		ConstraintMapping newMapping = new ConstraintMapping();
+		newMapping
+				.type( C.class )
+				.property( "string", METHOD )
+				.constraint( new NotNullDef() )
+				.type( A.class )
+				.property( "c", METHOD )
+				.valid();
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( newMapping );
+
+		B b = new B();
+		b.c = new C();
+
+		Set<ConstraintViolation<B>> violations = validator.validate( b );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+	}
+
+	@Test(description = "HV-433")
+	public void testProgrammaticCascadingMethodValidation() {
+		ConstraintMapping newMapping = new ConstraintMapping();
+		newMapping
+				.type( C.class )
+				.property( "string", METHOD )
+				.constraint( new NotNullDef() )
+				.type( A.class )
+				.property( "c", METHOD )
+				.valid();
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( newMapping );
+		MethodValidator methodValidator = validator.unwrap( MethodValidator.class );
+
+		B b = new B();
+		b.c = new C();
+		Method method = ReflectionHelper.getMethod( B.class, "getC" );
+
+		Set<MethodConstraintViolation<B>> violations = methodValidator.validateReturnValue(
+				b, method, b.getC()
+		);
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+	}
+
+	private static class A {
+		protected C c;
+
+		public C getC() {
+			return c;
+		}
+	}
+
+	private static class B extends A {
+	}
+
+	public static class C {
+		private String string;
+
+		public String getString() {
+			return string;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
new file mode 100644
index 0000000..8959ebf
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
@@ -0,0 +1,531 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.lang.annotation.ElementType;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupDefinitionException;
+import javax.validation.GroupSequence;
+import javax.validation.ValidationException;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.GenericConstraintDef;
+import org.hibernate.validator.cfg.defs.AssertTrueDef;
+import org.hibernate.validator.cfg.defs.FutureDef;
+import org.hibernate.validator.cfg.defs.MinDef;
+import org.hibernate.validator.cfg.defs.NotEmptyDef;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.cfg.defs.RangeDef;
+import org.hibernate.validator.cfg.defs.SizeDef;
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.hibernate.validator.internal.cfg.context.ConstraintMappingContext;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertConstraintViolation;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link ConstraintMapping} et al.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ConstraintMappingTest {
+
+	@Test(
+			expectedExceptions = IllegalArgumentException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: The parameter \"mapping\" must not be null."
+	)
+	public void testNullConstraintMapping() {
+		HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		config.addMapping( (ConstraintMapping) null ).buildValidatorFactory();
+	}
+
+	@Test
+	public void testConstraintMappingWithConstraintDefs() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef() )
+				.property( "numberOfHelpers", FIELD )
+				.constraint( new MinDef().value( 1 ) );
+
+		ConstraintMappingContext context = ConstraintMappingContext.getFromMapping( mapping );
+
+		assertTrue( context.getConstraintConfig().containsKey( Marathon.class ) );
+		assertTrue( context.getConstraintConfig().get( Marathon.class ).size() == 1 );
+		assertTrue( context.getMethodConstraintConfig().get( Marathon.class ).size() == 1 );
+	}
+
+	@Test
+	public void testConstraintMappingWithGenericConstraints() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new GenericConstraintDef<NotNull>( NotNull.class ) )
+				.property( "numberOfHelpers", FIELD )
+				.constraint( new GenericConstraintDef<Min>( Min.class ).param( "value", 1 ) );
+
+		ConstraintMappingContext context = ConstraintMappingContext.getFromMapping( mapping );
+
+		assertTrue( context.getConstraintConfig().containsKey( Marathon.class ) );
+		assertTrue( context.getConstraintConfig().get( Marathon.class ).size() == 1 );
+		assertTrue( context.getMethodConstraintConfig().get( Marathon.class ).size() == 1 );
+	}
+
+	@Test
+	public void testDefConstraintFollowedByGenericConstraint() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "numberOfHelpers", FIELD )
+				.constraint( new MinDef().value( 1 ) )
+				.constraint( new GenericConstraintDef<Min>( Min.class ).param( "value", 1 ) );
+
+		ConstraintMappingContext context = ConstraintMappingContext.getFromMapping( mapping );
+
+		assertTrue( context.getConstraintConfig().containsKey( Marathon.class ) );
+		assertTrue( context.getConstraintConfig().get( Marathon.class ).size() == 2 );
+	}
+
+	@Test
+	public void testNoConstraintViolationForUnmappedEntity() {
+		HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( new Marathon() );
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@Test
+	public void testSingleConstraint() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( new Marathon() );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be null" );
+	}
+
+	@Test
+	public void testThatSpecificParameterCanBeSetAfterInvokingMethodFromBaseType() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint(
+						new SizeDef().message( "too short" ).min( 3 )
+				);
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "NY" );
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "too short" );
+	}
+
+	@Test(description = "HV-404: Introducing ConstraintsForType#genericConstraint(Class) allows to set specific parameters on following specific constraints.")
+	public void testThatSpecificParameterCanBeSetAfterAddingGenericConstraintDef() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.constraint(
+						new GenericConstraintDef<MarathonConstraint>( MarathonConstraint.class ).param( "minRunner", 1 )
+				)
+				.property( "name", METHOD )
+				.constraint( new SizeDef().message( "name too short" ).min( 3 ) );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "NY" );
+		marathon.addRunner( new Runner() );
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "name too short" );
+	}
+
+	@Test
+	public void testInheritedConstraint() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef() )
+				.type( Tournament.class )
+				.property( "tournamentDate", METHOD )
+				.constraint( new FutureDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "New York Marathon" );
+		Calendar cal = GregorianCalendar.getInstance();
+		cal.set( Calendar.YEAR, -1 );
+		marathon.setTournamentDate( cal.getTime() );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "must be in the future" );
+	}
+
+	@Test
+	public void testValid() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "runners", METHOD )
+				.valid()
+				.type( Runner.class )
+				.property( "paidEntryFee", FIELD )
+				.constraint( new AssertTrueDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "New York Marathon" );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 0 );
+
+		marathon.addRunner( new Runner() );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "must be true" );
+	}
+
+	@Test(
+			expectedExceptions = ValidationException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: The class class org.hibernate.validator.test.cfg.Marathon does not have a property 'numberOfHelpers' with access METHOD."
+	)
+	public void testSingleConstraintWrongAccessType() throws Throwable {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "numberOfHelpers", METHOD )
+				.constraint( new NotNullDef() );
+	}
+
+	@Test
+	public void testDefaultGroupSequence() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.defaultGroupSequence( Foo.class, Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().groups( Foo.class ) )
+				.property( "runners", METHOD )
+				.constraint( new NotEmptyDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be null" );
+
+		marathon.setName( "Stockholm Marathon" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be empty" );
+	}
+
+	@Test
+	public void testDefaultGroupSequenceProvider() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.defaultGroupSequenceProvider( MarathonDefaultGroupSequenceProvider.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().groups( Foo.class ) )
+				.property( "runners", METHOD )
+				.constraint( new NotEmptyDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be null" );
+
+		marathon.setName( "Stockholm Marathon" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be empty" );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Default group sequence and default group sequence provider cannot be defined at the same time."
+	)
+	public void testProgrammaticDefaultGroupSequenceAndDefaultGroupSequenceProviderDefinedOnSameClass() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.defaultGroupSequence( Foo.class, Marathon.class )
+				.defaultGroupSequenceProvider( MarathonDefaultGroupSequenceProvider.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().groups( Foo.class ) )
+				.property( "runners", METHOD )
+				.constraint( new NotEmptyDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		validator.validate( new Marathon() );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Default group sequence and default group sequence provider cannot be defined at the same time."
+	)
+	public void testProgrammaticDefaultGroupSequenceDefinedOnClassWithGroupProviderAnnotation() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( B.class )
+				.defaultGroupSequence( Foo.class, B.class )
+				.property( "b", FIELD )
+				.constraint( new NotNullDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		validator.validate( new B() );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Default group sequence and default group sequence provider cannot be defined at the same time."
+	)
+	public void testProgrammaticDefaultGroupSequenceProviderDefinedOnClassWithGroupSequenceAnnotation() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( A.class )
+				.defaultGroupSequenceProvider( ADefaultGroupSequenceProvider.class )
+				.property( "a", FIELD )
+				.constraint( new NotNullDef() );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		validator.validate( new A() );
+	}
+
+	@Test
+	public void testMultipleConstraintOfTheSameType() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new SizeDef().min( 5 ) )
+				.constraint( new SizeDef().min( 10 ) );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "Foo" );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 2 );
+
+		marathon.setName( "Foobar" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+
+		marathon.setName( "Stockholm Marathon" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@Test(
+			expectedExceptions = ValidationException.class,
+			expectedExceptionsMessageRegExp = ".*No value provided for minRunner.*"
+	)
+	public void testCustomConstraintTypeMissingParameter() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.constraint( new GenericConstraintDef<MarathonConstraint>( MarathonConstraint.class ) );
+
+		HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		config.addMapping( mapping );
+		config.buildValidatorFactory();
+	}
+
+	@Test
+	public void testCustomConstraintType() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.constraint(
+						new GenericConstraintDef<MarathonConstraint>( MarathonConstraint.class )
+								.param( "minRunner", 100 )
+								.message( "Needs more runners" )
+				);
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "Stockholm Marathon" );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "Needs more runners" );
+
+		for ( int i = 0; i < 100; i++ ) {
+			marathon.addRunner( new Runner() );
+		}
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@Test(
+			expectedExceptions = IllegalArgumentException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: The bean type must not be null when creating a constraint mapping."
+	)
+	public void testNullBean() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( null )
+				.constraint( new GenericConstraintDef<MarathonConstraint>( MarathonConstraint.class ) );
+
+		HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		config.addMapping( mapping ).buildValidatorFactory();
+	}
+
+	@Test(description = "HV-355 (parameter names of RangeDef wrong)")
+	public void testRangeDef() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Runner.class )
+				.property( "age", METHOD )
+				.constraint( new RangeDef().min( 12 ).max( 99 ) );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		Set<ConstraintViolation<Runner>> violations = validator.validate( new Runner() );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "must be between 12 and 99" );
+	}
+
+	@Test(description = "HV-444")
+	public void testDefaultGroupSequenceDefinedOnClassWithNoConstraints() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().groups( Foo.class ) )
+				.property( "runners", METHOD )
+				.constraint( new NotEmptyDef() )
+				.type( ExtendedMarathon.class )
+				.defaultGroupSequence( Foo.class, ExtendedMarathon.class );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		ExtendedMarathon extendedMarathon = new ExtendedMarathon();
+
+		Set<ConstraintViolation<ExtendedMarathon>> violations = validator.validate( extendedMarathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be null" );
+
+		extendedMarathon.setName( "Stockholm Marathon" );
+		violations = validator.validate( extendedMarathon );
+		assertNumberOfViolations( violations, 1 );
+		assertConstraintViolation( violations.iterator().next(), "may not be empty" );
+	}
+
+	@Test
+	public void testProgrammaticAndAnnotationFieldConstraintsAddUp() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( User.class )
+				.property( "firstName", ElementType.FIELD )
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		Set<ConstraintViolation<User>> violations = validator.validateProperty( new User( "", "" ), "firstName" );
+
+		assertCorrectConstraintViolationMessages(
+				violations,
+				"size must be between 1 and 10", "size must be between 2 and 10"
+		);
+	}
+
+	@Test
+	public void testProgrammaticAndAnnotationPropertyConstraintsAddUp() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( User.class )
+				.property( "lastName", ElementType.METHOD )
+				.constraint( new SizeDef().min( 4 ).max( 10 ) );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		Set<ConstraintViolation<User>> violations = validator.validateProperty( new User( "", "" ), "lastName" );
+
+		assertCorrectConstraintViolationMessages(
+				violations,
+				"size must be between 3 and 10", "size must be between 4 and 10"
+		);
+	}
+
+	private interface Foo {
+	}
+
+	@GroupSequence({ Foo.class, A.class })
+	private static class A {
+		@SuppressWarnings("unused")
+		String a;
+	}
+
+	@GroupSequenceProvider(BDefaultGroupSequenceProvider.class)
+	private static class B {
+		@SuppressWarnings("unused")
+		String b;
+	}
+
+	private static class ExtendedMarathon extends Marathon {
+	}
+
+	@SuppressWarnings("unused")
+	private static class User {
+
+		@Size(min = 1, max = 10)
+		private String firstName;
+
+		private String lastName;
+
+		private User(String firstName, String lastName) {
+			this.firstName = firstName;
+			this.lastName = lastName;
+		}
+
+		@Size(min = 3, max = 10)
+		public String getLastName() {
+			return lastName;
+		}
+
+	}
+
+	public static class MarathonDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Marathon> {
+		public List<Class<?>> getValidationGroups(Marathon object) {
+			return Arrays.<Class<?>>asList( Foo.class, Marathon.class );
+		}
+	}
+
+	public static class BDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<B> {
+		public List<Class<?>> getValidationGroups(B object) {
+			return Arrays.<Class<?>>asList( Foo.class, B.class );
+		}
+	}
+
+	public static class ADefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<A> {
+		public List<Class<?>> getValidationGroups(A object) {
+			return Arrays.<Class<?>>asList( Foo.class, A.class );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingWithAnnotationProcessingOptionsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingWithAnnotationProcessingOptionsTest.java
new file mode 100644
index 0000000..22292f7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingWithAnnotationProcessingOptionsTest.java
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.NullDef;
+import org.hibernate.validator.test.constraints.Object;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.testng.Assert.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Unit test for {@link org.hibernate.validator.cfg.ConstraintMapping} et al.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ConstraintMappingWithAnnotationProcessingOptionsTest {
+
+	@Test
+	public void testIgnoreAllAnnotationsOnType() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Foo.class ).ignoreAllAnnotations();
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		assertFalse( validator.getConstraintsForClass( Foo.class ).isBeanConstrained() );
+	}
+
+	@Test
+	public void testIgnoreClassConstraints() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Fu.class ).ignoreAnnotations();
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		assertFalse( validator.getConstraintsForClass( Fu.class ).isBeanConstrained() );
+	}
+
+	@Test
+	public void testIgnoreAnnotationsOnProperty() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Foo.class )
+				.property( "property", FIELD )
+				.ignoreAnnotations();
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		assertFalse( validator.getConstraintsForClass( Foo.class ).isBeanConstrained() );
+	}
+
+	@Test
+	public void testIgnoreAnnotationsRespectsFieldVsGetterAccess() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Foo.class )
+				.property( "property", METHOD )
+				.ignoreAnnotations();
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		assertTrue( validator.getConstraintsForClass( Foo.class ).isBeanConstrained() );
+	}
+
+	@Test
+	public void testConvertNotNullToNull() {
+		Validator validator = ValidatorUtil.getValidator();
+		Set<ConstraintViolation<Bar>> violations = validator.validate( new Bar() );
+		assertCorrectConstraintTypes( violations, NotNull.class );
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Bar.class )
+				.property( "property", FIELD )
+				.ignoreAnnotations()
+				.constraint( new NullDef() );
+
+		validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		violations = validator.validate( new Bar() );
+
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	private static class Foo {
+		@NotNull
+		private String property;
+
+		public String getProperty() {
+			return property;
+		}
+	}
+
+	private static class Bar {
+		@NotNull
+		private String property;
+	}
+
+	@Fighters
+	private static class Fu {
+	}
+
+	@Constraint(validatedBy = { FightersValidator.class })
+	@Target({ TYPE })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface Fighters {
+		public abstract String message() default "fu fighters";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	public class FightersValidator implements ConstraintValidator<Fighters, Object> {
+		public void initialize(Fighters annotation) {
+		}
+
+		public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {
+			return true;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/Marathon.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Marathon.java
new file mode 100644
index 0000000..b079084
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Marathon.java
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Marathon implements Tournament {
+
+	private String name;
+
+	/**
+	 * Intentionally without a getter/setter to test adding a constraint programmatically using field access type
+	 */
+	@SuppressWarnings("unused")
+	private long numberOfHelpers;
+
+	private Date tournamentDate;
+
+	private List<Runner> runners;
+
+	public Marathon() {
+		runners = new ArrayList<Runner>();
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getTournamentDate() {
+		return tournamentDate;
+	}
+
+	public void setTournamentDate(Date tournamentDate) {
+		this.tournamentDate = tournamentDate;
+	}
+
+	public List<Runner> getRunners() {
+		return runners;
+	}
+
+	public void addRunner(Runner runner) {
+		runners.add( runner );
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java
new file mode 100644
index 0000000..37b5b5c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraint.java
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Target({ TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { MarathonConstraintValidator.class })
+public @interface MarathonConstraint {
+	public String message() default "invalid name";
+
+	public Class<?>[] groups() default { };
+
+	public Class<? extends Payload>[] payload() default { };
+
+	public int minRunner();
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java
new file mode 100644
index 0000000..2222855
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MarathonConstraintValidator.java
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MarathonConstraintValidator implements ConstraintValidator<MarathonConstraint, Marathon> {
+	private int minRunners;
+
+	public void initialize(MarathonConstraint constraintAnnotation) {
+		minRunners = constraintAnnotation.minRunner();
+	}
+
+	public boolean isValid(Marathon m, ConstraintValidatorContext context) {
+		return m.getRunners().size() >= minRunners;
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/MethodConstraintMappingTest.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MethodConstraintMappingTest.java
new file mode 100644
index 0000000..dd04458
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MethodConstraintMappingTest.java
@@ -0,0 +1,589 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.lang.annotation.ElementType;
+import java.util.Set;
+import javax.validation.ConstraintDeclarationException;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.GenericConstraintDef;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.cfg.defs.SizeDef;
+import org.hibernate.validator.method.MethodConstraintViolationException;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ValidatorUtil.getMethodValidatorForMapping;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatingProxy;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.fail;
+
+/**
+ * Tests the definition of method constraints with the programmatic API.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class MethodConstraintMappingTest {
+
+	private GreetingService wrappedObject;
+
+	@BeforeClass
+	public void setUp() {
+		wrappedObject = new GreetingServiceImpl();
+	}
+
+	@Test
+	public void testCascadingMethodReturnDefinition() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.returnValue()
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+
+		try {
+			service.greet( new User( "foo" ) );
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertCorrectConstraintViolationMessages( e, "may not be null" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet().message" );
+		}
+	}
+
+	@Test
+	public void testCascadingMethodParameterDefinition() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+
+		try {
+			service.greet( new User( null ) );
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertCorrectConstraintViolationMessages( e, "may not be null" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0).name" );
+		}
+	}
+
+	@Test(
+			expectedExceptions = IllegalArgumentException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Type .*GreetingService doesn't have a method greet().*"
+	)
+	public void testCascadingDefinitionOnMissingMethod() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet" )
+				.returnValue()
+				.valid();
+
+		getMethodValidatorForMapping( mapping );
+	}
+
+	@Test(
+			expectedExceptions = IllegalArgumentException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: A valid parameter index has to be specified for method 'greet'"
+	)
+	public void testCascadingDefinitionOnInvalidMethodParameter() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.parameter( 1 )
+				.valid();
+
+		getMethodValidatorForMapping( mapping );
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = ".* there are parameter constraints defined at all of the following overridden methods: .*"
+	)
+	public void testCascadingMethodParameterRedefinedInHierarchy() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.valid()
+				.type( GreetingServiceImpl.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+
+		service.greet( new User( null ) );
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = ".* The following method itself has no parameter constraints but it is not defined on a sub-type of .*"
+	)
+	public void testCascadingMethodParameterDefinedOnlyOnSubType() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingServiceImpl.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+
+		service.greet( new User( null ) );
+	}
+
+	@Test
+	public void testParameterConstraint() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.constraint( new NotNullDef() );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( (User) null );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages( e, "may not be null" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0)" );
+		}
+	}
+
+	@Test
+	public void testGenericParameterConstraint() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class )
+				.parameter( 0 )
+				.constraint( new GenericConstraintDef<Size>( Size.class ).param( "min", 1 ).param( "max", 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0)" );
+		}
+	}
+
+	@Test
+	public void testMultipleParameterConstraintsAtSameParameter() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class )
+				.parameter( 0 )
+				.constraint( new SizeDef().min( 1 ).max( 10 ) )
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10", "size must be between 2 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0)", "GreetingService#greet(arg0)" );
+		}
+	}
+
+	@Test
+	public void testMultipleParameterConstraintsAtDifferentParameters() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class, String.class )
+				.parameter( 0 )
+				.constraint( new SizeDef().min( 1 ).max( 10 ) )
+				.parameter( 1 )
+				.constraint( new SizeDef().min( 1 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "", "" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10", "size must be between 1 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0)", "GreetingService#greet(arg1)" );
+		}
+	}
+
+	@Test
+	public void testProgrammaticAndAnnotationParameterConstraintsAddUp() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "sayHello", String.class )
+				.parameter( 0 )
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.sayHello( "" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10", "size must be between 2 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#sayHello(arg0)", "GreetingService#sayHello(arg0)" );
+		}
+	}
+
+	@Test
+	public void testConstraintAtCascadedParameter() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", User.class )
+				.parameter( 0 )
+				.constraint( new NotNullDef() )
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+
+		try {
+			service.greet( (User) null );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages( e, "may not be null" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0)" );
+		}
+
+		try {
+			service.greet( new User( null ) );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages( e, "may not be null" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet(arg0).name" );
+		}
+	}
+
+	@Test
+	public void testReturnValueConstraint() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class )
+				.returnValue()
+				.constraint( new SizeDef().min( 1 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "Hello" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages( e, "size must be between 1 and 10" );
+			assertCorrectPropertyPaths( e, "GreetingService#greet()" );
+		}
+	}
+
+	@Test
+	public void testMultipleReturnValueConstraints() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class )
+				.returnValue()
+				.constraint( new SizeDef().min( 1 ).max( 10 ) )
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "Hello" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10", "size must be between 2 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet()", "GreetingService#greet()" );
+		}
+	}
+
+	@Test
+	public void testGenericReturnValueConstraint() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class )
+				.returnValue()
+				.constraint( new GenericConstraintDef<Size>( Size.class ).param( "min", 1 ).param( "max", 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet()" );
+		}
+	}
+
+	@Test
+	public void testProgrammaticAndAnnotationReturnValueConstraintsAddUp() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "greet", String.class, String.class )
+				.returnValue()
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.greet( "Hello", "World" );
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "size must be between 1 and 10", "size must be between 2 and 10"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#greet()", "GreetingService#greet()" );
+		}
+	}
+
+	@Test
+	public void constraintConfiguredOnPropertyIsEvaluatedByMethodValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.property( "hello", ElementType.METHOD )
+				.constraint( new NotNullDef() );
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.getHello();
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "may not be null"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#getHello()" );
+		}
+	}
+
+	@Test
+	public void cascadeConfiguredOnPropertyIsEvaluatedByMethodValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.property( "user", ElementType.METHOD )
+				.valid();
+
+		try {
+			GreetingService service = getValidatingProxy( wrappedObject, mapping );
+			service.getUser();
+
+			fail( "Expected exception wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e, "may not be null"
+			);
+			assertCorrectPropertyPaths( e, "GreetingService#getUser().name" );
+		}
+	}
+
+	@Test
+	public void constraintConfiguredOnFieldIsNotEvaluatedByMethodValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingServiceImpl.class )
+				.property( "hello", ElementType.FIELD )
+				.constraint( new NotNullDef() );
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+		assertNull( service.getHello() );
+	}
+
+	@Test
+	public void cascadeConfiguredOnFieldIsNotEvaluatedByMethodValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingServiceImpl.class )
+				.property( "user", ElementType.FIELD )
+				.valid();
+
+		GreetingService service = getValidatingProxy( wrappedObject, mapping );
+		assertNull( service.getUser().getName() );
+	}
+
+	@Test
+	public void constraintConfiguredOnMethodIsEvaluatedByPropertyValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "getHello" )
+				.returnValue()
+				.constraint( new NotNullDef() );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		Set<ConstraintViolation<GreetingServiceImpl>> violations = validator.validateProperty(
+				new GreetingServiceImpl(), "hello"
+		);
+
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+		assertCorrectPropertyPaths( violations, "hello" );
+	}
+
+	@Test
+	public void cascadeConfiguredOnMethodIsEvaluatedByPropertyValidation() {
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( GreetingService.class )
+				.method( "getUser" )
+				.returnValue()
+				.valid();
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+		Set<ConstraintViolation<GreetingServiceImpl>> violations = validator.validate( new GreetingServiceImpl() );
+
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+		assertCorrectPropertyPaths( violations, "user.name" );
+	}
+
+	public class User {
+
+		@NotNull
+		private String name;
+
+		public User(String name) {
+			this.name = name;
+		}
+
+		public String getName() {
+			return name;
+		}
+	}
+
+	public class Message {
+
+		@SuppressWarnings("unused")
+		@NotNull
+		private String message;
+
+		public Message(String message) {
+			this.message = message;
+		}
+	}
+
+	public interface GreetingService {
+
+		Message greet(User user);
+
+		String greet(String string);
+
+		@Size(min = 1, max = 10)
+		String greet(String string1, String string2);
+
+		Message sayHello(@Size(min = 1, max = 10) String name);
+
+		Message getHello();
+
+		User getUser();
+
+	}
+
+	public class GreetingServiceImpl implements GreetingService {
+
+		@SuppressWarnings("unused")
+		private Message hello;
+
+		@SuppressWarnings("unused")
+		private User user;
+
+		public Message greet(User user) {
+			return new Message( null );
+		}
+
+		public String greet(String string) {
+			return "";
+		}
+
+		public String greet(String string1, String string2) {
+			return "";
+		}
+
+		public Message sayHello(String name) {
+			return null;
+		}
+
+		public Message getHello() {
+			return null;
+		}
+
+		public User getUser() {
+			return new User( null );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/MultipleConstraintMappingsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MultipleConstraintMappingsTest.java
new file mode 100644
index 0000000..b7726f1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/MultipleConstraintMappingsTest.java
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupDefinitionException;
+import javax.validation.Validator;
+import javax.validation.metadata.BeanDescriptor;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link org.hibernate.validator.cfg.ConstraintMapping} et al.
+ *
+ * @author Hardy Ferentschik
+ */
+public class MultipleConstraintMappingsTest {
+	@Test
+	@TestForIssue(jiraKey = "HV-500")
+	public void testMultipleConstraintMappings() {
+		ConstraintMapping marathonMapping = new ConstraintMapping();
+		marathonMapping.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef() );
+
+		ConstraintMapping runnerMapping = new ConstraintMapping();
+		runnerMapping.type( Runner.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef() );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( marathonMapping, runnerMapping );
+
+		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Marathon.class );
+		assertTrue( beanDescriptor.isBeanConstrained(), "There should be constraints defined on the Marathon class" );
+		assertEquals(
+				beanDescriptor.getConstrainedProperties().iterator().next().getPropertyName(),
+				"name",
+				"The property name should be constrained"
+		);
+
+		beanDescriptor = validator.getConstraintsForClass( Runner.class );
+		assertTrue( beanDescriptor.isBeanConstrained(), "There should be constraints defined on the Runner class" );
+		assertEquals(
+				beanDescriptor.getConstrainedProperties().iterator().next().getPropertyName(),
+				"name",
+				"The property name should be constrained"
+		);
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-500")
+	public void testMultipleConstraintMappingsWithSameConfig() {
+		ConstraintMapping marathonMapping1 = new ConstraintMapping();
+		marathonMapping1.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().message( "foo" ) );
+
+		ConstraintMapping marathonMapping2 = new ConstraintMapping();
+		marathonMapping2.type( Marathon.class )
+				.property( "name", METHOD )
+				.constraint( new NotNullDef().message( "bar" ) );
+
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( marathonMapping1, marathonMapping2 );
+
+		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Marathon.class );
+		assertTrue( beanDescriptor.isBeanConstrained(), "There should be constraints defined on the Marathon class" );
+		assertEquals(
+				beanDescriptor.getConstrainedProperties().size(),
+				1,
+				"There should be constraints defined on the Marathon class"
+		);
+
+		Marathon marathon = new Marathon();
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertCorrectConstraintViolationMessages( violations, "foo", "bar" );
+	}
+
+	@TestForIssue(jiraKey = "HV-500")
+	@Test(expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Multiple definitions of default group sequence.")
+	public void testMultipleConstraintMappingsWithGroupSequenceForSameClass() {
+		ConstraintMapping marathonMapping1 = new ConstraintMapping();
+		marathonMapping1.type( Marathon.class )
+				.defaultGroupSequence( Foo.class, Marathon.class );
+
+		ConstraintMapping marathonMapping2 = new ConstraintMapping();
+		marathonMapping2.type( Marathon.class )
+				.defaultGroupSequence( Bar.class, Marathon.class );
+
+
+		ValidatorUtil.getValidatorForProgrammaticMapping( marathonMapping1, marathonMapping2 );
+	}
+
+	@TestForIssue(jiraKey = "HV-500")
+	@Test(expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Multiple definitions of default group sequence provider.")
+	public void testMultipleConstraintMappingsWithGroupSequenceProviderForSameClass() {
+		ConstraintMapping marathonMapping1 = new ConstraintMapping();
+		marathonMapping1.type( Marathon.class )
+				.defaultGroupSequenceProvider( MarathonDefaultGroupSequenceProvider.class );
+
+		ConstraintMapping marathonMapping2 = new ConstraintMapping();
+		marathonMapping2.type( Marathon.class )
+				.defaultGroupSequenceProvider( MarathonDefaultGroupSequenceProvider.class );
+
+		ValidatorUtil.getValidatorForProgrammaticMapping( marathonMapping1, marathonMapping2 );
+	}
+
+	@Test(expectedExceptions = GroupDefinitionException.class)
+	@TestForIssue(jiraKey = "HV-500")
+	public void testMultipleConstraintMappingsWithGroupSequenceProviderAndGroupSequence() {
+		ConstraintMapping marathonMapping1 = new ConstraintMapping();
+		marathonMapping1.type( Marathon.class )
+				.defaultGroupSequence( Foo.class, Marathon.class );
+
+		ConstraintMapping marathonMapping2 = new ConstraintMapping();
+		marathonMapping2.type( Marathon.class )
+				.defaultGroupSequenceProvider( MarathonDefaultGroupSequenceProvider.class );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( marathonMapping1, marathonMapping2 );
+		validator.validate( new Marathon() );
+	}
+
+	private interface Foo {
+	}
+
+	private interface Bar {
+	}
+
+	public static class MarathonDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Marathon> {
+		@SuppressWarnings("unchecked")
+		public List<Class<?>> getValidationGroups(Marathon object) {
+			return Arrays.asList( Foo.class, Marathon.class );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/Runner.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Runner.java
new file mode 100644
index 0000000..d930bdc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Runner.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Runner {
+
+	private String name;
+
+	private boolean paidEntryFee;
+
+	private int age;
+
+	public boolean isPaidEntryFee() {
+		return paidEntryFee;
+	}
+
+	public void setPaidEntryFee(boolean paidEntryFee) {
+		this.paidEntryFee = paidEntryFee;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public int getAge() {
+		return age;
+	}
+
+	public void setAge(int age) {
+		this.age = age;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/cfg/Tournament.java b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
new file mode 100644
index 0000000..37eb91e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.cfg;
+
+import java.util.Date;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface Tournament {
+	Date getTournamentDate();
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java
new file mode 100644
index 0000000..a49d474
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ClassValidatorWithTypeVariableTest.java
@@ -0,0 +1,127 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Valid;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * HV-250
+ */
+public class ClassValidatorWithTypeVariableTest {
+
+	private Validator validator;
+
+	@BeforeClass
+	public void setUp() {
+		validator = ValidatorUtil.getValidator();
+	}
+
+	@Test
+	public void offersNull() {
+		Batch batch = new Batch( null );
+
+		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectPropertyPaths( violations, "offers" );
+		assertCorrectConstraintTypes( violations, NotNull.class );
+	}
+
+	@Test
+	public void offerItemNull() {
+		ItemAOffer offer = new ItemAOffer( null );
+		Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
+		offers.add( offer );
+		Batch batch = new Batch( offers );
+
+		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectPropertyPaths( violations, "offers[].item" );
+		assertCorrectConstraintTypes( violations, NotNull.class );
+	}
+
+	@Test
+	public void offerItemDateNull() {
+		ItemA item = new ItemA( null );
+		ItemOffer<? extends Item> offer = new ItemAOffer( item );
+		Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
+		offers.add( offer );
+		Batch batch = new Batch( offers );
+
+		Set<ConstraintViolation<Batch>> violations = validator.validate( batch );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectPropertyPaths( violations, "offers[].item.date" );
+		assertCorrectConstraintTypes( violations, NotNull.class );
+	}
+
+	private class Batch {
+		@NotNull
+		@Valid
+		private Set<ItemOffer<? extends Item>> offers = new HashSet<ItemOffer<? extends Item>>();
+
+		public Batch(Set<ItemOffer<? extends Item>> offers) {
+			this.offers = offers;
+		}
+	}
+
+	private abstract class Item {
+		@NotNull
+		private Date date;
+
+		public Item(Date date) {
+			this.date = date;
+		}
+	}
+
+	private abstract class ItemOffer<T extends Item> {
+		@NotNull
+		@Valid
+		private T item;
+
+		public ItemOffer(T item) {
+			this.item = item;
+		}
+	}
+
+	private class ItemA extends Item {
+		public ItemA(Date date) {
+			super( date );
+		}
+	}
+
+	private class ItemAOffer extends ItemOffer<ItemA> {
+		public ItemAOffer(ItemA item) {
+			super( item );
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java
new file mode 100644
index 0000000..a9bbe98
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Cloneable.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Constraint(validatedBy = { CloneableConstraintValidator.class })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+public @interface Cloneable {
+	public abstract String message() default "{org.hibernate.validator.constraints.Cloneable.message}";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java
new file mode 100644
index 0000000..7853a99
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/CloneableConstraintValidator.java
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CloneableConstraintValidator implements ConstraintValidator<org.hibernate.validator.test.constraints.Cloneable, java.lang.Cloneable> {
+
+	public void initialize(org.hibernate.validator.test.constraints.Cloneable annotation) {
+	}
+
+	public boolean isValid(java.lang.Cloneable value, ConstraintValidatorContext constraintValidatorContext) {
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java
new file mode 100644
index 0000000..7b70ca4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintTest.java
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertConstraintViolation;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintTest {
+
+	@Test
+	public void testRangeConstraint() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Elevator elevator = new Elevator();
+		elevator.setCurrentFloor( -3 );
+		Set<ConstraintViolation<Elevator>> constraintViolations = validator.validate( elevator );
+
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation( constraintViolations.iterator().next(), "Invalid floor" );
+
+		elevator.setCurrentFloor( -2 );
+		constraintViolations = validator.validate( elevator );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		elevator.setCurrentFloor( 45 );
+		constraintViolations = validator.validate( elevator );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		elevator.setCurrentFloor( 50 );
+		constraintViolations = validator.validate( elevator );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		elevator.setCurrentFloor( 51 );
+		constraintViolations = validator.validate( elevator );
+
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation( constraintViolations.iterator().next(), "Invalid floor" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextImplTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextImplTest.java
new file mode 100644
index 0000000..4c30a18
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextImplTest.java
@@ -0,0 +1,166 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009-2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.util.List;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.ConstraintValidatorContextImpl;
+import org.hibernate.validator.internal.engine.MessageAndPath;
+import org.hibernate.validator.internal.engine.PathImpl;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.pathsAreEqual;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests for the {@link ConstraintValidatorContextImpl}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ConstraintValidatorContextImplTest {
+
+	private static String message = "message";
+
+	@Test
+	public void testIterableIndexed() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( "bar" ).inIterable().atIndex( 3 )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[3].bar" );
+	}
+
+	@Test
+	public void testIterableKeyed() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( null ).inIterable().atKey( "test" )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test]" );
+	}
+
+	@Test
+	public void testIterableWithKeyFollowedBySimpleNodes() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( "bar" ).inIterable().atKey( "test" )
+				.addNode( "fubar" )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar.fubar" );
+	}
+
+	@Test
+	public void testIterableKeyedAndIndexed() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( "bar" ).inIterable().atKey( "test" )
+				.addNode( "fubar" ).inIterable().atIndex( 10 )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar[10].fubar" );
+	}
+
+	@Test
+	public void testMultipleInIterable() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( "bar" ).inIterable().atKey( "test" )
+				.addNode( "fubar" ).inIterable()
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo[test].bar[].fubar" );
+	}
+
+	@Test
+	public void testMultipleSimpleNodes() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "foo" )
+				.addNode( "bar" )
+				.addNode( "test" )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "foo.bar.test" );
+	}
+
+	@Test
+	public void testLongPath() {
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message )
+				.addNode( "a" )
+				.addNode( "b" ).inIterable().atKey( "key1" )
+				.addNode( "c" ).inIterable()
+				.addNode( "d" )
+				.addNode( "e" )
+				.addNode( "f" ).inIterable().atKey( "key2" )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertMessageAndPath( messageAndPathList.get( 0 ), message, "a[key1].b[].c.d.e[key2].f" );
+	}
+
+	@Test
+	public void testMultipleMessages() {
+		String message1 = "message1";
+		String message2 = "message2";
+		ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl();
+		context.buildConstraintViolationWithTemplate( message1 )
+				.addNode( "foo" )
+				.addNode( "bar" ).inIterable().atKey( "key" )
+				.addConstraintViolation();
+		context.buildConstraintViolationWithTemplate( message2 )
+				.addConstraintViolation();
+
+		List<MessageAndPath> messageAndPathList = context.getMessageAndPathList();
+		assertTrue( messageAndPathList.size() == 2 );
+		assertMessageAndPath( messageAndPathList.get( 0 ), message1, "foo[key].bar" );
+		assertMessageAndPath( messageAndPathList.get( 1 ), message2, "" );
+	}
+
+	private ConstraintValidatorContextImpl createEmptyConstraintValidatorContextImpl() {
+		ConstraintValidatorContextImpl context = new ConstraintValidatorContextImpl(
+				PathImpl.createRootPath(), null
+		);
+		context.disableDefaultConstraintViolation();
+		return context;
+	}
+
+	private void assertMessageAndPath(MessageAndPath messageAndPath, String expectedMessage, String expectedPath) {
+		assertTrue(
+				pathsAreEqual( messageAndPath.getPath(), PathImpl.createPathFromString( expectedPath ) ),
+				"Path do not match. Actual: '" + messageAndPath.getPath() + "' Expected: '" + expectedPath + "'"
+		);
+		assertEquals( messageAndPath.getMessage(), expectedMessage, "Wrong message" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java
new file mode 100644
index 0000000..6bf7e6e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ConstraintValidatorContextTest.java
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Retention;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * Tests for the {@link javax.validation.ConstraintValidatorContext} API.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ConstraintValidatorContextTest {
+
+	private Validator validator;
+
+	@BeforeMethod
+	public void setUp() {
+		validator = ValidatorUtil.getValidator();
+	}
+
+	/**
+	 * HV-198
+	 */
+	@Test
+	public void testCorrectSubNodePath() {
+		Item item = new Item();
+		item.interval = new Interval();
+		item.interval.start = 10;
+		item.interval.end = 5;
+
+		Set<ConstraintViolation<Item>> constraintViolations = validator.validate( item );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "interval.start" );
+	}
+
+	/**
+	 * HV-208
+	 */
+	@Test
+	public void testCorrectPath() {
+		Item item = new Item();
+		Interval interval = new Interval();
+		item.interval = interval;
+		item.interval.start = 10;
+		item.interval.end = 5;
+
+		Set<ConstraintViolation<Interval>> constraintViolations = validator.validate( interval );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "start" );
+	}
+
+	@Test
+	public void testValidation() {
+		Set<ConstraintViolation<MyObject>> constraintViolations = validator.validate( new MyObject() );
+
+		assertNumberOfViolations( constraintViolations, 4 );
+		assertCorrectPropertyPaths( constraintViolations, "field1", "field2", "myNode1", "myNode2[key].myNode3" );
+	}
+
+	@MyClassLevelValidation
+	public static class MyObject {
+		@NotNull
+		String field1;
+
+		@NotNull
+		String field2;
+	}
+
+	@Retention(RUNTIME)
+	@Constraint(validatedBy = MyClassLevelValidation.Validator.class)
+	public @interface MyClassLevelValidation {
+		String message() default "failed";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+		public static class Validator implements ConstraintValidator<MyClassLevelValidation, MyObject> {
+			public void initialize(MyClassLevelValidation constraintAnnotation) {
+			}
+
+			public boolean isValid(MyObject value, ConstraintValidatorContext context) {
+				context.disableDefaultConstraintViolation();
+
+				context.buildConstraintViolationWithTemplate( context.getDefaultConstraintMessageTemplate() )
+						.addNode( "myNode1" )
+						.addConstraintViolation();
+
+				context.buildConstraintViolationWithTemplate( context.getDefaultConstraintMessageTemplate() )
+						.addNode( "myNode2" )
+						.addNode( "myNode3" ).inIterable().atKey( "key" )
+						.addConstraintViolation();
+				return false;
+			}
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java
new file mode 100644
index 0000000..6d78876
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Coordinate.java
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+/**
+ * @author Hardy Ferentschik
+ */
+public class Coordinate {
+
+	long longitude;
+	long latitude;
+
+	public Coordinate(long longitude, long latitude) {
+		this.longitude = longitude;
+		this.latitude = latitude;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Elevator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Elevator.java
new file mode 100644
index 0000000..53ccd15
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Elevator.java
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Elevator {
+
+	@Range(min = -2, max = 50, message = "Invalid floor")
+	private int currentFloor;
+
+	public int getCurrentFloor() {
+		return currentFloor;
+	}
+
+	public void setCurrentFloor(int currentFloor) {
+		this.currentFloor = currentFloor;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Interval.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Interval.java
new file mode 100644
index 0000000..b78d474
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Interval.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at StartLessThanEnd 
+class Interval
+{
+  int start;
+  int end;
+} 
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Item.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Item.java
new file mode 100644
index 0000000..5a4a328
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Item.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.Valid;
+
+/**
+ * @author Hardy Ferentschik
+ */
+class Item {
+	@Valid
+	Interval interval;
+} 
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Object.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Object.java
new file mode 100644
index 0000000..0e83234
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Object.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Constraint(validatedBy = { ObjectConstraintValidator.class })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+public @interface Object {
+	String message() default "{org.hibernate.validator.constraints.Object.message}";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java
new file mode 100644
index 0000000..e828766
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ObjectConstraintValidator.java
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ObjectConstraintValidator implements ConstraintValidator<org.hibernate.validator.test.constraints.Object, java.lang.Object> {
+
+	public void initialize(org.hibernate.validator.test.constraints.Object annotation) {
+	}
+
+	public boolean isValid(java.lang.Object value, ConstraintValidatorContext constraintValidatorContext) {
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java
new file mode 100644
index 0000000..9b23f4e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/PostCodeList.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.util.Collection;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * A test constraint which can lead to a error when trying to reslove the validator.
+ *
+ * @author Hardy Ferentschik
+ */
+ at Constraint(validatedBy = {
+		PostCodeList.PostCodeListValidatorForString.class, PostCodeList.PostCodeListValidatorForNumber.class
+})
+ at Documented
+ at Target({ METHOD, FIELD, TYPE })
+ at Retention(RUNTIME)
+public @interface PostCodeList {
+	public abstract String message() default "foobar";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default {};
+
+	public class PostCodeListValidatorForNumber
+			implements ConstraintValidator<PostCodeList, Collection<? extends Number>> {
+		public void initialize(PostCodeList constraintAnnotation) {
+		}
+
+		public boolean isValid(Collection<? extends Number> value, ConstraintValidatorContext constraintValidatorContext) {
+			return true;
+		}
+	}
+
+	public class PostCodeListValidatorForString implements ConstraintValidator<PostCodeList, Collection<String>> {
+		public void initialize(PostCodeList constraintAnnotation) {
+		}
+
+		public boolean isValid(Collection<String> value, ConstraintValidatorContext constraintValidatorContext) {
+			if ( value == null ) {
+				return true;
+			}
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Serializable.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Serializable.java
new file mode 100644
index 0000000..eb972cb
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Serializable.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Constraint(validatedBy = { SerializableConstraintValidator.class })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+public @interface Serializable {
+	public abstract String message() default "{org.hibernate.validator.constraints.Serializable.message}";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java
new file mode 100644
index 0000000..018ade0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SerializableConstraintValidator.java
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SerializableConstraintValidator implements ConstraintValidator<Serializable, java.io.Serializable > {
+
+	public void initialize(Serializable annotation) {
+	}
+
+	public boolean isValid( java.io.Serializable value, ConstraintValidatorContext constraintValidatorContext) {
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java
new file mode 100644
index 0000000..2281ea8
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEnd.java
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+ at Constraint(validatedBy = StartLessThanEndImpl.class)
+public @interface StartLessThanEnd {
+	String message() default "x";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java
new file mode 100644
index 0000000..f0af7dc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/StartLessThanEndImpl.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class StartLessThanEndImpl implements ConstraintValidator<StartLessThanEnd, Interval> {
+
+	public void initialize(StartLessThanEnd constraintAnnotation) {
+	}
+
+	public boolean isValid(Interval value, ConstraintValidatorContext c) {
+		if ( value.start > value.end ) {
+			c.disableDefaultConstraintViolation();
+			c.buildConstraintViolationWithTemplate( c.getDefaultConstraintMessageTemplate() ).addNode( "start" ).addConstraintViolation();
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/SubType.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SubType.java
new file mode 100644
index 0000000..42dba9b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SubType.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SubType extends SuperType {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/Suburb.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Suburb.java
new file mode 100644
index 0000000..eabc19c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/Suburb.java
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Suburb {
+	public enum Facility {
+		SHOPPING_MALL, BUS_TERMINAL
+	}
+
+	@Size(min = 5, max = 10, message = "size must be between {min} and {max}")
+	private String name;
+
+	@Size(min = 2, max = 2, message = "size must be between {min} and {max}")
+	private Map<Facility, Boolean> facilities;
+
+	@Size(min = 2, message = "size must be between {min} and {max}")
+	private Set<String> streetNames;
+
+	@Size(min = 4, max = 1000, message = "size must be between {min} and {max}")
+	private Coordinate[] boundingBox;
+
+	@PostCodeList
+	private Collection<? extends Number> includedPostCodes;
+
+	public void setIncludedPostCodes(Collection<? extends Number> includedPostCodes) {
+		this.includedPostCodes = includedPostCodes;
+	}
+
+	public Collection<? extends Number> getIncludedPostcodes() {
+		return includedPostCodes;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public Map<Facility, Boolean> getFacilities() {
+		return facilities;
+	}
+
+	public void addFacility(Facility f, Boolean exist) {
+		if ( facilities == null ) {
+			facilities = new HashMap<Facility, Boolean>();
+		}
+		facilities.put( f, exist );
+	}
+
+	public Set<String> getStreetNames() {
+		return streetNames;
+	}
+
+	public void addStreetName(String streetName) {
+		if ( streetNames == null ) {
+			streetNames = new HashSet<String>();
+		}
+		streetNames.add( streetName );
+	}
+
+	public Coordinate[] getBoundingBox() {
+		return boundingBox;
+	}
+
+	public void setBoundingBox(Coordinate[] boundingBox) {
+		this.boundingBox = boundingBox;
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperType.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperType.java
new file mode 100644
index 0000000..64c2b46
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperType.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SuperType {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java
new file mode 100644
index 0000000..4681ce9
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArray.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Constraint(validatedBy = { SuperTypeArrayValidator.class })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+public @interface SuperTypeArray {
+	public abstract String message() default "{org.hibernate.validator.constraints.SuperTypeArray.message}";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java
new file mode 100644
index 0000000..9cd6554
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/SuperTypeArrayValidator.java
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SuperTypeArrayValidator implements ConstraintValidator<SuperTypeArray, SuperType[]> {
+
+	public void initialize(SuperTypeArray annotation) {
+	}
+
+	public boolean isValid(SuperType[] value, ConstraintValidatorContext constraintValidatorContext) {
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java
new file mode 100644
index 0000000..252ed12
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/ValidatorResolutionTest.java
@@ -0,0 +1,212 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertConstraintViolation;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ValidatorResolutionTest {
+
+	@Test
+	public void testResolutionOfMultipleSizeValidators() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Suburb suburb = new Suburb();
+
+		List<Integer> postcodes = new ArrayList<Integer>();
+		postcodes.add( 12345 );
+		suburb.setIncludedPostCodes( postcodes );
+
+		// all values are null and should pass
+		Set<ConstraintViolation<Suburb>> constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		suburb.setName( "" );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation(
+				constraintViolations.iterator().next(), "size must be between 5 and 10", Suburb.class, "", "name"
+		);
+
+		suburb.setName( "Hoegsbo" );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		suburb.addFacility( Suburb.Facility.SHOPPING_MALL, false );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation(
+				constraintViolations.iterator().next(),
+				"size must be between 2 and 2",
+				Suburb.class,
+				suburb.getFacilities(),
+				"facilities"
+		);
+
+		suburb.addFacility( Suburb.Facility.BUS_TERMINAL, true );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		suburb.addStreetName( "Sikelsgatan" );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation(
+				constraintViolations.iterator().next(),
+				"size must be between 2 and 2147483647",
+				Suburb.class,
+				suburb.getStreetNames(),
+				"streetNames"
+		);
+
+		suburb.addStreetName( "Marklandsgatan" );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		Coordinate[] boundingBox = new Coordinate[3];
+		boundingBox[0] = new Coordinate( 0l, 0l );
+		boundingBox[1] = new Coordinate( 0l, 1l );
+		boundingBox[2] = new Coordinate( 1l, 0l );
+		suburb.setBoundingBox( boundingBox );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertConstraintViolation(
+				constraintViolations.iterator().next(),
+				"size must be between 4 and 1000",
+				Suburb.class,
+				suburb.getBoundingBox(),
+				"boundingBox"
+		);
+
+		boundingBox = new Coordinate[4];
+		boundingBox[0] = new Coordinate( 0l, 0l );
+		boundingBox[1] = new Coordinate( 0l, 1l );
+		boundingBox[2] = new Coordinate( 1l, 0l );
+		boundingBox[3] = new Coordinate( 1l, 1l );
+		suburb.setBoundingBox( boundingBox );
+		constraintViolations = validator.validate( suburb );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	/**
+	 * HV-233
+	 */
+	@Test
+	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfObject() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Foo testEntity = new Foo( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
+		Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( testEntity );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	/**
+	 * HV-233
+	 */
+	@Test
+	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfClonable() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Bar testEntity = new Bar( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
+		Set<ConstraintViolation<Bar>> constraintViolations = validator.validate( testEntity );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	/**
+	 * HV-233
+	 */
+	@Test
+	public void testObjectArraysAndPrimitiveArraysAreSubtypesOfSerializable() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Fubar testEntity = new Fubar( new org.hibernate.validator.test.constraints.Object[] { }, new int[] { } );
+		Set<ConstraintViolation<Fubar>> constraintViolations = validator.validate( testEntity );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	/**
+	 * HV-233
+	 */
+	@Test
+	public void testSubTypeArrayIsSubtypeOfSuperTypeArray() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		SubTypeEntity testEntity = new SubTypeEntity( new SubType[] { } );
+		Set<ConstraintViolation<SubTypeEntity>> constraintViolations = validator.validate( testEntity );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	public class Foo {
+		@org.hibernate.validator.test.constraints.Object
+		private org.hibernate.validator.test.constraints.Object[] objectArray;
+
+		@org.hibernate.validator.test.constraints.Object
+		private int[] intArray;
+
+		public Foo(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
+			this.objectArray = objectArray;
+			this.intArray = intArray;
+		}
+	}
+
+	public class Bar {
+		@org.hibernate.validator.test.constraints.Cloneable
+		private org.hibernate.validator.test.constraints.Object[] objectArray;
+
+		@org.hibernate.validator.test.constraints.Cloneable
+		private int[] intArray;
+
+		public Bar(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
+			this.objectArray = objectArray;
+			this.intArray = intArray;
+		}
+	}
+
+	public class Fubar {
+		@Serializable
+		private org.hibernate.validator.test.constraints.Object[] objectArray;
+
+		@Serializable
+		private int[] intArray;
+
+		public Fubar(org.hibernate.validator.test.constraints.Object[] objectArray, int[] intArray) {
+			this.objectArray = objectArray;
+			this.intArray = intArray;
+		}
+	}
+
+	public class SubTypeEntity {
+		@SuperTypeArray
+		private SubType[] subTypeArray;
+
+		public SubTypeEntity(SubType[] subTypeArray) {
+			this.subTypeArray = subTypeArray;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/AllowedSSN.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/AllowedSSN.java
new file mode 100644
index 0000000..ec073e2
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/AllowedSSN.java
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.AND;
+
+/**
+ * Checks that a number is an allowed SSN
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at Documented
+ at ConstraintComposition(AND)
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at ValidSSN
+ at Constraint(validatedBy = { })
+ at Blacklist
+public @interface AllowedSSN {
+	public abstract String message() default "Invalid or blacklisted social security number";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Blacklist.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Blacklist.java
new file mode 100644
index 0000000..4089ca7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Blacklist.java
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Pattern.List;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.ALL_FALSE;
+
+/**
+ * Blacklisted SSN numbers
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+
+ at ConstraintComposition(ALL_FALSE)
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at List({
+		@Pattern(regexp = "12345678901"),
+		@Pattern(regexp = "98765678765"),
+		@Pattern(regexp = "55555555555"),
+		@Pattern(regexp = "123456")
+})
+public @interface Blacklist {
+	public abstract String message() default "Blacklisted SSN";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/BoolCompositeConstraintTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/BoolCompositeConstraintTest.java
new file mode 100644
index 0000000..adb7d76
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/BoolCompositeConstraintTest.java
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class BoolCompositeConstraintTest {
+
+	/**
+	 * HV-390
+	 */
+	@Test
+	public void testCorrectAnnotationTypeWithBoolOr() {
+		Validator currentValidator = ValidatorUtil.getValidator();
+
+		Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+				new Person( "K", "G" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 4 );
+		assertCorrectConstraintTypes(
+				constraintViolations, PatternOrSize.class, NotNullAndSize.class, TemporarySSN.class, SSN.class
+		);
+		assertCorrectPropertyPaths( constraintViolations, "name", "name", "ssn", "ssn" );
+
+		constraintViolations = currentValidator.validate(
+				new Person( "G", "Gerhard" )
+		);
+		assertNumberOfViolations( constraintViolations, 3 );
+		assertCorrectConstraintTypes( constraintViolations, PatternOrSize.class, TemporarySSN.class, SSN.class );
+		assertCorrectPropertyPaths( constraintViolations, "nickName", "ssn", "ssn" );
+	}
+
+	/**
+	 * HV-390
+	 */
+	@Test
+	public void testCorrectAnnotationTypeWithBoolAnd() {
+		Validator currentValidator = ValidatorUtil.getValidator();
+
+		Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+				new Person( "G", "K" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 4 );
+		assertCorrectConstraintTypes(
+				constraintViolations, PatternOrSize.class, NotNullAndSize.class, TemporarySSN.class, SSN.class
+		);
+		assertCorrectPropertyPaths( constraintViolations, "name", "nickName", "ssn", "ssn" );
+
+		constraintViolations = currentValidator.validate(
+				new Person( "L", "G" )
+		);
+		assertNumberOfViolations( constraintViolations, 5 );
+		assertCorrectConstraintTypes(
+				constraintViolations,
+				NotNullAndSize.class,
+				PatternOrSize.class,
+				PatternOrSize.class,
+				TemporarySSN.class,
+				SSN.class
+		);
+		assertCorrectPropertyPaths( constraintViolations, "name", "name", "nickName", "ssn", "ssn" );
+	}
+
+	/**
+	 * HV-390
+	 */
+	@Test
+	public void testCorrectAnnotationTypeWithBoolAllFalse() {
+		Validator currentValidator = ValidatorUtil.getValidator();
+		// Uses ALL_FALSE, OR, and AND. Checks that SSN works
+		Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+				new Person( "NickName", "Name", "33333333333" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// Uses ALL_FALSE, OR, and AND. Checks that TemporarySSN works
+		constraintViolations = currentValidator.validate(
+				new Person( "NickName", "Name", "333333" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// Checks that two negations work
+		constraintViolations = currentValidator.validate(
+				new Person( "NickName", "Name", "333333", "12345678901" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintTypes( constraintViolations, Blacklist.class, IsBlank.class );
+		assertCorrectPropertyPaths( constraintViolations, "anotherSsn", "anotherSsn" );
+
+		// Checks that negation on a list works
+		constraintViolations = currentValidator.validate(
+				new Person( "NickName", "Name", "12345678901" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, Blacklist.class );
+		assertCorrectPropertyPaths( constraintViolations, "ssn" );
+
+		// Checks that all parts of an "or" ar reported
+		constraintViolations = currentValidator.validate(
+				new Person( "NickName", "Name", "12345678" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintTypes( constraintViolations, TemporarySSN.class, SSN.class );
+		assertCorrectPropertyPaths( constraintViolations, "ssn", "ssn" );
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/IsBlank.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/IsBlank.java
new file mode 100644
index 0000000..db55393
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/IsBlank.java
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+import org.hibernate.validator.constraints.NotBlank;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.ALL_FALSE;
+
+/**
+ * Negation of NotBlank from the api
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+
+ at Constraint(validatedBy = { })
+ at ConstraintComposition(ALL_FALSE)
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at NotBlank
+public @interface IsBlank {
+	public abstract String message() default "Is Not Blank";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/NotNullAndSize.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/NotNullAndSize.java
new file mode 100644
index 0000000..f1e2bdf
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/NotNullAndSize.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.AND;
+
+/**
+ * Test constraint for HV-390.
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at ConstraintComposition(AND)
+ at NotNull
+ at Size(min = 2, max = 10)
+ at ReportAsSingleViolation
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+public @interface NotNullAndSize {
+	public abstract String message() default "AND";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/PatternOrSize.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/PatternOrSize.java
new file mode 100644
index 0000000..05afb72
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/PatternOrSize.java
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.OR;
+
+/**
+ * Test constraint for HV-390.
+ *
+ * @author Gerhard Petracek
+ * @author Hardy Ferentschik
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+
+ at ConstraintComposition(OR)
+ at Pattern(regexp = "K")
+ at Size(min = 2, max = 10)
+ at ReportAsSingleViolation
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+public @interface PatternOrSize {
+	public abstract String message() default "OR";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Person.java
new file mode 100644
index 0000000..5d92497
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/Person.java
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// $Id: PersonBool.java 19547 2010-05-19 15:40:07Z hardy.ferentschik $
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Person {
+	@PatternOrSize
+	private String nickName;
+
+	@NotNullAndSize
+	@PatternOrSize
+	private String name;
+
+	@AllowedSSN
+	private String ssn = "";
+
+
+	@Blacklist
+	@IsBlank
+	private String anotherSsn = "";
+
+	public Person(String nickName, String name) {
+		this.nickName = nickName;
+		this.name = name;
+	}
+
+	public Person(String nickName, String name, String ssn) {
+		this( nickName, name );
+		this.ssn = ssn;
+	}
+
+	public Person(String nickName, String name, String ssn, String anotherSsn) {
+		this( nickName, name, ssn );
+		this.anotherSsn = anotherSsn;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getSsn() {
+		return ssn;
+	}
+
+	public void setSsn(String ssn) {
+		this.ssn = ssn;
+	}
+
+	public String getAnotherSsn() {
+		return anotherSsn;
+	}
+
+	public void setAnotherSsn(String anotherSsn) {
+		this.anotherSsn = anotherSsn;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/SSN.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/SSN.java
new file mode 100644
index 0000000..53f6d9b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/SSN.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Checks that a number is a norwegian social security number
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at Documented
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at ReportAsSingleViolation
+ at Pattern(regexp = "[0-9]{11}")
+public @interface SSN {
+	public abstract String message() default "{org.hibernate.validator.test.constraints.boolcomposition.Blacklist.message}";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/TemporarySSN.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/TemporarySSN.java
new file mode 100644
index 0000000..816f1e4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/TemporarySSN.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Checks that a number is a norwegian temporary social security number
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at Documented
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+ at Pattern(regexp = "[0-9]{6}")
+ at ReportAsSingleViolation
+public @interface TemporarySSN {
+	public abstract String message() default "Not a temporary social security number";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/ValidSSN.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/ValidSSN.java
new file mode 100644
index 0000000..b417b21
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/ValidSSN.java
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.OR;
+
+/**
+ * Checks that a number is a norwegian temporary or permanent social security number
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at Documented
+ at ConstraintComposition(OR)
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+ at Retention(RUNTIME)
+ at SSN
+ at Constraint(validatedBy = { })
+ at TemporarySSN
+public @interface ValidSSN {
+	public abstract String message() default "Not a valid social security number";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LocalConstrValTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LocalConstrValTest.java
new file mode 100644
index 0000000..4158242
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LocalConstrValTest.java
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.Pattern;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class LocalConstrValTest {
+
+	/**
+	 * HV-390
+	 * Used to test whether boolean composition works with local ConstraintValidators
+	 */
+	@Test
+	public void testCorrectBooleanEvaluation() {
+		Validator currentValidator = ValidatorUtil.getValidator();
+
+		//nothing should fail, the pattern matches on name
+		Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+				new Person( "6chars", "WWWW" )
+		);
+
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		//nickname is too long
+		constraintViolations = currentValidator.validate(
+				new Person(
+						"12characters", "loongstring"
+				)
+		);
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, SmallString.class );
+		assertCorrectPropertyPaths( constraintViolations, "nickName" );
+
+		//nickName fails for violating @Size, but is reported as SingleViolation
+		//name fails for violating both Pattern and the test in LongStringValidator. In a way it is reported 
+		//both as single violation and as multiple violations (weird).
+		constraintViolations = currentValidator.validate(
+				new Person(
+						"exactlyTEN", "tinystr"
+				)
+		);
+		assertNumberOfViolations( constraintViolations, 3 );
+		assertCorrectConstraintTypes( constraintViolations, SmallString.class, Pattern.class, PatternOrLong.class );
+		assertCorrectPropertyPaths( constraintViolations, "nickName", "name", "name" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LongStringValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LongStringValidator.java
new file mode 100644
index 0000000..48bb1a4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/LongStringValidator.java
@@ -0,0 +1,29 @@
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * Test mode for HV-390.
+ *
+ * Copy of SmallStringValidator, but in this case used to validate another annotation type.
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class LongStringValidator implements ConstraintValidator<PatternOrLong, String> {
+
+	public void initialize(PatternOrLong constraintAnnotation) {
+	}
+
+	public boolean isValid(String value, ConstraintValidatorContext context) {
+		boolean pass;
+		if ( value == null ) {
+			pass = true;
+		}
+		else {
+			pass = value.length() > 10;
+		}
+		return pass;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/PatternOrLong.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/PatternOrLong.java
new file mode 100644
index 0000000..cb4aaeb
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/PatternOrLong.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.OR;
+
+/**
+ * Test constraint for HV-390.
+ *
+ * Uses the same constraintValidator as SmallString, but does not negate the result.
+ * Hence it tests that a string is long at least 9 characters (or that it matches the given pattern).
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+
+ at ConstraintComposition(OR)
+ at Pattern(regexp = "W{4}")
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { LongStringValidator.class })
+public @interface PatternOrLong {
+	public abstract String message() default "Both Pattern and LongString failed";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/Person.java
new file mode 100644
index 0000000..60cad87
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/Person.java
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+/**
+ * Test mode for HV-390.
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class Person {
+	@SmallString
+	private String nickName;
+
+	@PatternOrLong
+	private String name;
+
+	public Person(String nickName, String name) {
+		this.nickName = nickName;
+		this.name = name;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallString.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallString.java
new file mode 100644
index 0000000..f4a9e7e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallString.java
@@ -0,0 +1,32 @@
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+import java.lang.annotation.Retention;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.constraints.ConstraintComposition;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.constraints.CompositionType.ALL_FALSE;
+
+/**
+ * Test mode for HV-390.
+ *
+ * Composed annotation with both boolean operators and local constraintValidator.
+ * It checks in a very complicated way whether a string is strictly shorter than 11 chars.
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+ at Constraint(validatedBy = SmallStringValidator.class)
+ at ConstraintComposition(ALL_FALSE)
+ at Size(min = 10, max = 10)
+ at Retention(RUNTIME)
+public @interface SmallString {
+	public abstract String message() default "Not a small string";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallStringValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallStringValidator.java
new file mode 100644
index 0000000..60f215b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallStringValidator.java
@@ -0,0 +1,26 @@
+package org.hibernate.validator.test.constraints.boolcomposition.localconstrval;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * Test mode for HV-390.
+ *
+ * @author Federico Mancini
+ * @author Dag Hovland
+ */
+public class SmallStringValidator implements ConstraintValidator<SmallString, String> {
+	public void initialize(SmallString constraintAnnotation) {
+	}
+
+	public boolean isValid(String value, ConstraintValidatorContext context) {
+		boolean pass;
+		if ( value == null ) {
+			pass = true;
+		}
+		else {
+			pass = value.length() > 10;
+		}
+		return pass;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CNPJValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CNPJValidatorTest.java
new file mode 100644
index 0000000..7d33902
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CNPJValidatorTest.java
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.br;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.br.CNPJ;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+public class CNPJValidatorTest {
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testCorrectFormattedCNPJWithReportAsSingleViolation() {
+		Set<ConstraintViolation<Company>> violations = ValidatorUtil.getValidator().validate(
+				new Company( "91.509.901/0001-69" )
+		);
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testIncorrectFormattedCNPJWithReportAsSingleViolation() {
+		Set<ConstraintViolation<Company>> violations = ValidatorUtil.getValidator().validate(
+				new Company( "ABCDEF" )
+		);
+		assertNumberOfViolations( violations, 1 );
+	}
+
+	public static class Company {
+		@CNPJ
+		private String cnpj;
+
+		public Company(String cnpj) {
+			this.cnpj = cnpj;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CPFValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CPFValidatorTest.java
new file mode 100644
index 0000000..a173f98
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/CPFValidatorTest.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.br;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.br.CPF;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+public class CPFValidatorTest {
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testCorrectFormattedCPFWithReportAsSingleViolation() {
+		Set<ConstraintViolation<Person>> violations = ValidatorUtil.getValidator().validate(
+				new Person( "134.241.313-00" )
+		);
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testCPFBoundaryConditions() {
+		Set<ConstraintViolation<Person>> violations = ValidatorUtil.getValidator().validate(
+				new Person( "000.000.000-00" )
+		);
+		assertNumberOfViolations( violations, 1 );
+
+		violations = ValidatorUtil.getValidator().validate(
+				new Person( "999.999.999-99" )
+		);
+		assertNumberOfViolations( violations, 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testIncorrectFormattedCPFWithReportAsSingleViolation() {
+		Set<ConstraintViolation<Person>> violations = ValidatorUtil.getValidator().validate(
+				new Person( "48255-77" )
+		);
+		assertNumberOfViolations( violations, 1 );
+	}
+
+	public static class Person {
+		@CPF
+		private String cpf;
+
+		public Person(String cpf) {
+			this.cpf = cpf;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/TituloEleitoralValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/TituloEleitoralValidatorTest.java
new file mode 100644
index 0000000..5e4fd91
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/br/TituloEleitoralValidatorTest.java
@@ -0,0 +1,59 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.br;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.br.TituloEleitoral;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+public class TituloEleitoralValidatorTest {
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testCorrectFormattedCPFWithReportAsSingleViolation() {
+		Validator validator = ValidatorUtil.getValidator();
+		assertNumberOfViolations( validator.validate( new Person( "040806680957" ) ), 0 );
+		assertNumberOfViolations( validator.validate( new Person( "038763000914" ) ), 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-491")
+	public void testIncorrectFormattedCPFWithReportAsSingleViolation() {
+		Set<ConstraintViolation<Person>> violations = ValidatorUtil.getValidator().validate( new Person( "48255-77" ) );
+		assertNumberOfViolations( violations, 1 );
+	}
+
+	public static class Person {
+		@TituloEleitoral
+		private String tituloEleitor;
+
+		public Person(String cpf) {
+			this.tituloEleitor = cpf;
+		}
+
+		public String getTituloEleitor() {
+			return tituloEleitor;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java
new file mode 100644
index 0000000..240c8d3
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/CompositeConstraintTest.java
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Gerhard Petracek
+ * @author Hardy Ferentschik
+ */
+public class CompositeConstraintTest {
+
+	/**
+	 * HV-182
+	 */
+	@Test
+	public void testCorrectAnnotationTypeForWithReportAsSingleViolation() {
+
+		Validator currentValidator = ValidatorUtil.getValidator();
+
+		for ( int i = 0; i < 100; i++ ) {
+			Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+					new Person(
+							null, "Gerhard"
+					)
+			);
+
+			assertNumberOfViolations( constraintViolations, 1 );
+			assertCorrectConstraintTypes( constraintViolations, ValidNameSingleViolation.class );
+			assertCorrectConstraintViolationMessages( constraintViolations, "invalid name" );
+
+			constraintViolations = currentValidator.validate(
+					new Person(
+							"G", "Gerhard"
+					)
+			);
+			assertNumberOfViolations( constraintViolations, 1 );
+			assertCorrectConstraintTypes( constraintViolations, ValidNameSingleViolation.class );
+			assertCorrectConstraintViolationMessages( constraintViolations, "invalid name" );
+		}
+	}
+
+	/**
+	 * HV-182
+	 */
+	@Test
+	public void testCorrectAnnotationTypeReportMultipleViolations() {
+
+		Validator currentValidator = ValidatorUtil.getValidator();
+
+		for ( int i = 0; i < 100; i++ ) {
+			Set<ConstraintViolation<Person>> constraintViolations = currentValidator.validate(
+					new Person(
+							"Gerd", null
+					)
+			);
+
+			assertNumberOfViolations( constraintViolations, 1 );
+			assertCorrectConstraintTypes( constraintViolations, NotNull.class );
+			assertCorrectConstraintViolationMessages( constraintViolations, "may not be null" );
+
+			constraintViolations = currentValidator.validate(
+					new Person(
+							"Gerd", "G"
+					)
+			);
+			assertNumberOfViolations( constraintViolations, 1 );
+			assertCorrectConstraintTypes( constraintViolations, Size.class );
+			assertCorrectConstraintViolationMessages( constraintViolations, "size must be between 2 and 10" );
+		}
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java
new file mode 100644
index 0000000..f28ff4e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/Person.java
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition;
+
+/**
+ * Test mode for HV-182.
+ *
+ * @author Gerhard Petracek
+ * @author Hardy Ferentschik
+ */
+
+public class Person {
+	@ValidNameSingleViolation
+	private String nickName;
+
+	@ValidName
+	private String name;
+
+	public Person(String nickName, String name) {
+		this.nickName = nickName;
+		this.name = name;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java
new file mode 100644
index 0000000..4bdd0d7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidName.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * Test constraint for HV-182.
+ *
+ * @author Gerhard Petracek
+ * @author Hardy Ferentschik
+ */
+ at NotNull
+ at Size(min = 2, max = 10)
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+public @interface ValidName {
+	public abstract String message() default "invalid name";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java
new file mode 100644
index 0000000..80980a0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/ValidNameSingleViolation.java
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * Test constraint for HV-182.
+ *
+ * @author Gerhard Petracek
+ * @author Hardy Ferentschik
+ */
+ at NotNull
+ at Size(min = 2, max = 10)
+ at ReportAsSingleViolation
+ at Target({ METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = { })
+public @interface ValidNameSingleViolation {
+	String message() default "invalid name";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/EagerEvaluationOfComposingConstraintsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/EagerEvaluationOfComposingConstraintsTest.java
new file mode 100644
index 0000000..5a0361d
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/EagerEvaluationOfComposingConstraintsTest.java
@@ -0,0 +1,87 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition.lazyevaluation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.Payload;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class EagerEvaluationOfComposingConstraintsTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-639")
+	public void testComposedConstraintWithoutReportAsSingleViolationEvaluatesAllConstraints() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Foo foo = new Foo();
+		validator.validate( foo );
+		assertEquals(
+				InvocationCounter.getInvocationCount( foo ),
+				3,
+				"Each constraint should be evaluated since w/o @ReportAsSingleViolation there might be several violations"
+		);
+	}
+
+	@MyComposedConstraint
+	public class Foo {
+	}
+
+	@Constraint(validatedBy = MyComposedConstraintValidator.class)
+	@Target({ METHOD, FIELD, TYPE })
+	@Retention(RUNTIME)
+	@InvocationCounting.List(value = { @InvocationCounting, @InvocationCounting })
+	public @interface MyComposedConstraint {
+		public abstract String message() default "my composed constraint failed";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class MyComposedConstraintValidator extends InvocationCounter
+			implements ConstraintValidator<MyComposedConstraint, Object> {
+		@Override
+		public void initialize(MyComposedConstraint constraintAnnotation) {
+		}
+
+		@Override
+		public boolean isValid(Object value, ConstraintValidatorContext context) {
+			incrementCount( value );
+			return false;
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounter.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounter.java
new file mode 100644
index 0000000..ed8a76f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounter.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition.lazyevaluation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class InvocationCounter {
+	public static final Map<Object, Integer> countsPerInstance = new HashMap<Object, Integer>();
+
+	public static int getInvocationCount(Object o) {
+		return countsPerInstance.get( o );
+	}
+
+	public synchronized void incrementCount(Object o) {
+		Integer count = countsPerInstance.get( o );
+		if(count == null) {
+			countsPerInstance.put( o, 1 );
+		} else {
+			countsPerInstance.put( o, count + 1 );
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounting.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounting.java
new file mode 100644
index 0000000..a5133a7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCounting.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition.lazyevaluation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Constraint(validatedBy = { InvocationCountingValidator.class })
+ at Target({ METHOD, FIELD, TYPE })
+ at Retention(RUNTIME)
+public @interface InvocationCounting {
+	public abstract String message() default "my custom constraint";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
+	@Retention(RUNTIME)
+	@interface List {
+		InvocationCounting[] value();
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCountingValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCountingValidator.java
new file mode 100644
index 0000000..05b9d39
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/InvocationCountingValidator.java
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition.lazyevaluation;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class InvocationCountingValidator extends InvocationCounter
+		implements ConstraintValidator<InvocationCounting, Object> {
+
+	public void initialize(InvocationCounting parameters) {
+	}
+
+	public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
+		incrementCount( o );
+		return false;
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/LazyEvaluationOfComposingConstraintsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/LazyEvaluationOfComposingConstraintsTest.java
new file mode 100644
index 0000000..52cec94
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/constraints/composition/lazyevaluation/LazyEvaluationOfComposingConstraintsTest.java
@@ -0,0 +1,89 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.constraints.composition.lazyevaluation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LazyEvaluationOfComposingConstraintsTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-639")
+	public void testComposedConstraintWithReportAsSingleViolationStopsEvaluatingOnFirstViolation() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		Foo foo = new Foo();
+		validator.validate( foo );
+		assertEquals(
+				InvocationCounter.getInvocationCount( foo ),
+				1,
+				"There should have been only one single invocation due to @ReportAsSingleViolation"
+		);
+	}
+
+	@MyComposedConstraint
+	public class Foo {
+	}
+
+	@Constraint(validatedBy = { MyComposedConstraintValidator.class })
+	@Target({ METHOD, FIELD, TYPE })
+	@Retention(RUNTIME)
+	@ReportAsSingleViolation
+	@InvocationCounting.List(value = { @InvocationCounting })
+	public @interface MyComposedConstraint {
+		public abstract String message() default "my composed constraint failed";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class MyComposedConstraintValidator extends InvocationCounter
+			implements ConstraintValidator<MyComposedConstraint, Object> {
+		@Override
+		public void initialize(MyComposedConstraint constraintAnnotation) {
+		}
+
+		@Override
+		public boolean isValid(Object value, ConstraintValidatorContext context) {
+			incrementCount( value );
+			return false;
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Customer.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Customer.java
new file mode 100644
index 0000000..42ae2cd
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Customer.java
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.bootstrap;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.Valid;
+
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Customer {
+	@NotEmpty
+	private String firstName;
+	private String middleName;
+	@NotEmpty
+	private String lastName;
+
+	@Valid
+	private Set<Order> orders = new HashSet<Order>();
+
+	public void addOrder(Order order) {
+		orders.add( order );
+	}
+
+	public Set<Order> getOrders() {
+		return orders;
+	}
+
+	public String getFirstName() {
+		return firstName;
+	}
+
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+
+	public String getMiddleName() {
+		return middleName;
+	}
+
+	public void setMiddleName(String middleName) {
+		this.middleName = middleName;
+	}
+
+	public String getLastName() {
+		return lastName;
+	}
+
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Order.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Order.java
new file mode 100644
index 0000000..b50d003
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Order.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.bootstrap;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Order {
+	@NotNull
+	Integer orderNumber;
+
+	public Integer getOrderNumber() {
+		return orderNumber;
+	}
+
+	public void setOrderNumber(Integer orderNumber) {
+		this.orderNumber = orderNumber;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/ValidationTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/ValidationTest.java
new file mode 100644
index 0000000..588b574
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/ValidationTest.java
@@ -0,0 +1,128 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.bootstrap;
+
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.internal.constraintvalidators.NotNullValidator;
+import org.hibernate.validator.internal.engine.ConfigurationImpl;
+import org.hibernate.validator.internal.engine.ConstraintValidatorFactoryImpl;
+import org.hibernate.validator.internal.engine.ValidatorFactoryImpl;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests the Bean Validation bootstrapping.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ValidationTest {
+
+	@Test
+	public void testBootstrapAsServiceWithBuilder() {
+		HibernateValidatorConfiguration configuration = Validation
+				.byProvider( HibernateValidator.class )
+				.configure();
+		assertDefaultBuilderAndFactory( configuration );
+	}
+
+	@Test
+	public void testBootstrapAsServiceDefault() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		assertDefaultFactory( factory );
+	}
+
+	@Test
+	public void testCustomConstraintValidatorFactory() {
+
+		Configuration<?> configuration = Validation.byDefaultProvider().configure();
+		assertDefaultBuilderAndFactory( configuration );
+
+		ValidatorFactory factory = configuration.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		Customer customer = new Customer();
+		customer.setFirstName( "John" );
+
+		Set<ConstraintViolation<Customer>> constraintViolations = validator.validate( customer );
+		assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
+		ConstraintViolation<Customer> constraintViolation = constraintViolations.iterator().next();
+		assertEquals( "may not be empty", constraintViolation.getMessage(), "Wrong message" );
+
+		// get a new factory using a custom configuration
+		configuration = Validation.byDefaultProvider().configure();
+		configuration.constraintValidatorFactory(
+				new ConstraintValidatorFactory() {
+
+					public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
+						if ( key == NotNullValidator.class ) {
+							return (T) new BadlyBehavedNotNullConstraintValidator();
+						}
+						return new ConstraintValidatorFactoryImpl().getInstance( key );
+					}
+				}
+		);
+		factory = configuration.buildValidatorFactory();
+		validator = factory.getValidator();
+		constraintViolations = validator.validate( customer );
+		assertEquals( constraintViolations.size(), 0, "Wrong number of constraints" );
+	}
+
+	/**
+	 * HV-328
+	 */
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNullInputStream() {
+		Configuration<?> configuration = Validation.byDefaultProvider().configure();
+		configuration.addMapping( null );
+		configuration.buildValidatorFactory();
+	}
+
+	private void assertDefaultBuilderAndFactory(Configuration configuration) {
+		assertNotNull( configuration );
+		assertTrue( configuration instanceof ConfigurationImpl );
+
+		ValidatorFactory factory = configuration.buildValidatorFactory();
+		assertDefaultFactory( factory );
+	}
+
+	private void assertDefaultFactory(ValidatorFactory factory) {
+		assertNotNull( factory );
+		assertTrue( factory instanceof ValidatorFactoryImpl );
+	}
+
+	class BadlyBehavedNotNullConstraintValidator extends NotNullValidator {
+		@Override
+		public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
+			return true;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertFalseValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertFalseValidatorTest.java
new file mode 100644
index 0000000..821e0ec
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertFalseValidatorTest.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.AssertFalseValidator;
+
+/**
+ * @author Alaa Nassef
+ */
+public class AssertFalseValidatorTest {
+
+	private static AssertFalseValidator constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new AssertFalseValidator();
+	}
+
+	@Test
+	public void testIsValid() {
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( false, null ) );
+		assertTrue( constraint.isValid( Boolean.FALSE, null ) );
+		assertFalse( constraint.isValid( true, null ) );
+		assertFalse( constraint.isValid( Boolean.TRUE, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertTrueValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertTrueValidatorTest.java
new file mode 100644
index 0000000..6f3270c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/AssertTrueValidatorTest.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.AssertTrueValidator;
+
+/**
+ * @author Alaa Nassef
+ */
+public class AssertTrueValidatorTest {
+
+	private static AssertTrueValidator constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new AssertTrueValidator();
+	}
+
+	@Test
+	public void testIsValid() {
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( true, null ) );
+		assertTrue( constraint.isValid( Boolean.TRUE, null ) );
+		assertFalse( constraint.isValid( false, null ) );
+		assertFalse( constraint.isValid( Boolean.FALSE, null ) );
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/BlankValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/BlankValidatorTest.java
new file mode 100644
index 0000000..ac4f994
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/BlankValidatorTest.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.NotBlank;
+import org.hibernate.validator.internal.constraintvalidators.NotBlankValidator;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class BlankValidatorTest {
+	@Test
+	public void testConstraintValidator() {
+		NotBlankValidator constraintValidator = new NotBlankValidator();
+
+		assertTrue( constraintValidator.isValid( "a", null ) );
+		assertTrue( constraintValidator.isValid( null, null ) );
+		assertFalse( constraintValidator.isValid( "", null ) );
+		assertFalse( constraintValidator.isValid( " ", null ) );
+		assertFalse( constraintValidator.isValid( "\t", null ) );
+		assertFalse( constraintValidator.isValid( "\n", null ) );
+	}
+
+	@Test
+	public void testNotBlank() {
+		Validator validator = getValidator();
+		Foo foo = new Foo();
+
+		Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		foo.name = "";
+		constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		foo.name = " ";
+		constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		foo.name = "\t";
+		constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		foo.name = "\n";
+		constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		foo.name = "john doe";
+		constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	class Foo {
+		@NotBlank
+		String name;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/CreditCardNumberValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/CreditCardNumberValidatorTest.java
new file mode 100644
index 0000000..7d9befe
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/CreditCardNumberValidatorTest.java
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.CreditCardNumber;
+import org.hibernate.validator.testutil.TestForIssue;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CreditCardNumberValidatorTest {
+	private static Validator validator;
+
+	@BeforeClass
+	public static void init() {
+		validator = getValidator();
+	}
+
+	@Test
+	public void testInvalidCreditCardNumber() throws Exception {
+		CreditCard card = new CreditCard();
+		card.setCreditCardNumber( "1234567890123456" );
+		Set<ConstraintViolation<CreditCard>> constraintViolations = validator.validate( card );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testInvalidCreditCardNumberAsCharSequence() throws Exception {
+		CreditCard card = new CreditCard();
+		card.setCreditCardNumberAsCharSequence( new MyCustomStringImpl( "1234567890123456" ) );
+		Set<ConstraintViolation<CreditCard>> constraintViolations = validator.validate( card );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test
+	public void testValidCreditCardNumber() throws Exception {
+		CreditCard card = new CreditCard();
+		card.setCreditCardNumber( "541234567890125" );
+		Set<ConstraintViolation<CreditCard>> constraintViolations = validator.validate( card );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testValidCreditCardNumberAsCharSequence() throws Exception {
+		CreditCard card = new CreditCard();
+		card.setCreditCardNumberAsCharSequence( new MyCustomStringImpl( "541234567890125" ) );
+		Set<ConstraintViolation<CreditCard>> constraintViolations = validator.validate( card );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	@Test
+	public void testNullValue() throws Exception {
+		Set<ConstraintViolation<CreditCard>> constraintViolations = validator.validate( new CreditCard() );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	public static class CreditCard {
+		@CreditCardNumber
+		String creditCardNumber;
+
+		@CreditCardNumber
+		CharSequence creditCardNumberAsCharSequence;
+
+		public void setCreditCardNumber(String creditCardNumber) {
+			this.creditCardNumber = creditCardNumber;
+		}
+
+		public void setCreditCardNumberAsCharSequence(CharSequence creditCardNumberAsCharSequence) {
+			this.creditCardNumberAsCharSequence = creditCardNumberAsCharSequence;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DateHolder.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DateHolder.java
new file mode 100644
index 0000000..1994bfd
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DateHolder.java
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Calendar;
+import java.util.Date;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Past;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DateHolder {
+
+	@Past
+	private Calendar calendarWithPastDate;
+
+	@Future
+	private Calendar calendarWithFutureDate;
+
+	@Past
+	private Date past;
+
+	@Past
+	private Date future;
+
+	public DateHolder() {
+		calendarWithPastDate = Calendar.getInstance();
+		calendarWithPastDate.add( Calendar.YEAR, -1 );
+		past = calendarWithPastDate.getTime();
+
+		calendarWithFutureDate = Calendar.getInstance();
+		calendarWithFutureDate.add( Calendar.YEAR, 1 );
+		future = calendarWithFutureDate.getTime();
+	}
+
+	public Calendar getCalendarWithPastDate() {
+		return calendarWithPastDate;
+	}
+
+	public Calendar getCalendarWithFutureDate() {
+		return calendarWithFutureDate;
+	}
+
+	public Date getPast() {
+		return past;
+	}
+
+	public Date getFuture() {
+		return future;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DecimalMinMaxValidatorBoundaryTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DecimalMinMaxValidatorBoundaryTest.java
new file mode 100644
index 0000000..40e3269
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DecimalMinMaxValidatorBoundaryTest.java
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.DecimalMin;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.DecimalMaxDef;
+import org.hibernate.validator.cfg.defs.DecimalMinDef;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinMaxValidatorBoundaryTest {
+	private Double d;
+
+	@Test
+	public void testDecimalMinValue() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( DecimalMinMaxValidatorBoundaryTest.class )
+				.property( "d", FIELD )
+				.constraint( new DecimalMinDef().value( "0.100000000000000005" ) );
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		this.d = 0.1;
+
+		Set<ConstraintViolation<DecimalMinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, DecimalMin.class );
+	}
+
+	@Test
+	public void testDecimalMaxValue() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( DecimalMinMaxValidatorBoundaryTest.class )
+				.property( "d", FIELD )
+				.constraint( new DecimalMaxDef().value( "0.1" ) );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		this.d = 0.1;
+
+		Set<ConstraintViolation<DecimalMinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+
+	@Test
+	@TestForIssue(jiraKey = "HV-508")
+	public void testDoubleTrouble() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( DecimalMinMaxValidatorBoundaryTest.class )
+				.property( "d", FIELD )
+				.constraint( new DecimalMaxDef().value( "1.2" ) );
+
+		Validator validator = ValidatorUtil.getValidatorForProgrammaticMapping( mapping );
+
+		this.d = 1.0;
+		Set<ConstraintViolation<DecimalMinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		this.d = 1.1;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		this.d = 1.19;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		this.d = 1.20;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		this.d = 1.3;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		this.d = 1.51;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		this.d = 1.9;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		this.d = 2.000000001;
+		constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForNumberTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForNumberTest.java
new file mode 100644
index 0000000..56c03f7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForNumberTest.java
@@ -0,0 +1,124 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import javax.validation.constraints.Digits;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.DigitsValidatorForNumber;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class DigitsValidatorForNumberTest {
+
+	@Test
+	public void testIsValid() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 5 );
+		descriptor.setValue( "fraction", 2 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+		constraint.initialize( p );
+
+
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( Byte.valueOf( "0" ), null ) );
+		assertTrue( constraint.isValid( Double.valueOf( "500.2" ), null ) );
+
+		assertTrue( constraint.isValid( new BigDecimal( "-12345.12" ), null ) );
+		assertFalse( constraint.isValid( new BigDecimal( "-123456.12" ), null ) );
+		assertFalse( constraint.isValid( new BigDecimal( "-123456.123" ), null ) );
+		assertFalse( constraint.isValid( new BigDecimal( "-12345.123" ), null ) );
+		assertFalse( constraint.isValid( new BigDecimal( "12345.123" ), null ) );
+
+		assertTrue( constraint.isValid( Float.valueOf( "-000000000.22" ), null ) );
+		assertFalse( constraint.isValid( Integer.valueOf( "256874" ), null ) );
+		assertFalse( constraint.isValid( Double.valueOf( "12.0001" ), null ) );
+	}
+
+	@Test
+	public void testIsValidZeroLength() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 0 );
+		descriptor.setValue( "fraction", 0 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+		constraint.initialize( p );
+
+
+		assertTrue( constraint.isValid( null, null ) );
+		assertFalse( constraint.isValid( Byte.valueOf( "0" ), null ) );
+		assertFalse( constraint.isValid( Double.valueOf( "500.2" ), null ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeIntegerLength() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", -1 );
+		descriptor.setValue( "fraction", 1 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+		constraint.initialize( p );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeFractionLength() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 1 );
+		descriptor.setValue( "fraction", -1 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+		constraint.initialize( p );
+	}
+
+	@Test
+	public void testTrailingZerosAreTrimmed() {
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 12 );
+		descriptor.setValue( "fraction", 3 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+		constraint.initialize( p );
+
+		assertTrue( constraint.isValid( 0.001d, null ) );
+		assertTrue( constraint.isValid( 0.00100d, null ) );
+		assertFalse( constraint.isValid( 0.0001d, null ) );
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForStringTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForStringTest.java
new file mode 100644
index 0000000..e2d0ea5
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/DigitsValidatorForStringTest.java
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import javax.validation.constraints.Digits;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.internal.constraintvalidators.DigitsValidatorForCharSequence;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Alaa Nassef
+ */
+public class DigitsValidatorForStringTest {
+
+	private static DigitsValidatorForCharSequence constraint;
+
+	@BeforeClass
+	public static void init() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 5 );
+		descriptor.setValue( "fraction", 2 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		constraint = new DigitsValidatorForCharSequence();
+		constraint.initialize( p );
+	}
+
+	@Test
+	public void testIsValid() {
+
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( "0", null ) );
+		assertTrue( constraint.isValid( "500.2", null ) );
+		assertTrue( constraint.isValid( "-12456.22", null ) );
+		assertTrue( constraint.isValid( "-000000000.22", null ) );
+		//should throw number format exception
+		assertFalse( constraint.isValid( "", null ) );
+		assertFalse( constraint.isValid( "256874.0", null ) );
+		assertFalse( constraint.isValid( "12.0001", null ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeIntegerLength() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", -1 );
+		descriptor.setValue( "fraction", 1 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForCharSequence constraint = new DigitsValidatorForCharSequence();
+		constraint.initialize( p );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeFractionLength() {
+
+		AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+		descriptor.setValue( "integer", 1 );
+		descriptor.setValue( "fraction", -1 );
+		descriptor.setValue( "message", "{validator.digits}" );
+		Digits p = AnnotationFactory.create( descriptor );
+
+		DigitsValidatorForCharSequence constraint = new DigitsValidatorForCharSequence();
+		constraint.initialize( p );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testIsValidCharSequence() {
+		assertTrue( constraint.isValid( new MyCustomStringImpl( "500.2" ), null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/EmailValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/EmailValidatorTest.java
new file mode 100644
index 0000000..0923e90
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/EmailValidatorTest.java
@@ -0,0 +1,199 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.EmailDef;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.internal.constraintvalidators.EmailValidator;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getConfiguration;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatorForProgrammaticMapping;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class EmailValidatorTest {
+	// http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word
+	private static final String noOrgEmailAddressRegexp = "^((?!\\.org).)*$";
+	private static EmailValidator validator;
+
+
+	@BeforeClass
+	public static void init() {
+		validator = new EmailValidator();
+	}
+
+	@Test
+	public void testNullAndEmptyString() throws Exception {
+		isValidEmail( "" );
+		isValidEmail( null );
+	}
+
+	@Test
+	public void testValidEmail() throws Exception {
+		isValidEmail( "emmanuel at hibernate.org" );
+		isValidEmail( "emmanuel at hibernate" );
+		isValidEmail( "emma-n_uel at hibernate" );
+		isValidEmail( "emma+nuel at hibernate.org" );
+		isValidEmail( "emma=nuel at hibernate.org" );
+		isValidEmail( "emmanuel@[123.12.2.11]" );
+		isValidEmail( "*@example.net" );
+		isValidEmail( "fred&barny at example.com" );
+		isValidEmail( "--- at example.com" );
+		isValidEmail( "foo-bar at example.net" );
+		isValidEmail( "mailbox.sub1.sub2 at this-domain" );
+	}
+
+	@Test
+	public void testInValidEmail() throws Exception {
+		isInvalidEmail( "emmanuel.hibernate.org" );
+		isInvalidEmail( "emma nuel at hibernate.org" );
+		isInvalidEmail( "emma(nuel at hibernate.org" );
+		isInvalidEmail( "emmanuel@" );
+		isInvalidEmail( "emma\nnuel at hibernate.org" );
+		isInvalidEmail( "emma at nuel@hibernate.org" );
+		isInvalidEmail( "Just a string" );
+		isInvalidEmail( "string" );
+		isInvalidEmail( "me@" );
+		isInvalidEmail( "@example.com" );
+		isInvalidEmail( "me. at example.com" );
+		isInvalidEmail( ".me at example.com" );
+		isInvalidEmail( "me at example..com" );
+		isInvalidEmail( "me\\@example.com" );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-339")
+	public void testAccent() {
+		isValidEmail( "Test^Email at example.com" );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testValidEmailCharSequence() throws Exception {
+		isValidEmail( new MyCustomStringImpl( "emmanuel at hibernate.org" ) );
+		isInvalidEmail( new MyCustomStringImpl( "@example.com" ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-472")
+	public void testMailWithInternationalDomainName() throws Exception {
+		isValidEmail( "myname@östereich.at", "A valid email address with umlaut" );
+		isValidEmail( "θσερ@εχαμπλε.ψομ", "A valid greek email address" );
+		isInvalidEmail( "θσερ.εχαμπλε.ψομ", "Email does not contain an @ character and should be invalid" );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-554")
+	public void testEmailRegExp() {
+		final String email = "hardy at hibernate.org";
+
+		// ensure the plain email is valid
+		isValidEmail( email );
+
+
+		// add additional regexp constraint to email
+		Validator validator = ValidatorUtil.getValidator();
+		EmailContainer container = new EmailContainerAnnotated();
+		container.setEmail( email );
+		Set<ConstraintViolation<EmailContainer>> violations = validator.validate( container );
+		assertOrgAddressesAreNotValid( violations );
+
+		// now the same test with programmatic configuration
+		final HibernateValidatorConfiguration config = getConfiguration( HibernateValidator.class );
+		ConstraintMapping mapping = config.createConstraintMapping();
+		mapping.type( EmailContainerNoAnnotations.class )
+				.property( "email", METHOD )
+				.constraint(
+						new EmailDef().regexp( noOrgEmailAddressRegexp )
+								.message( "ORG addresses are not valid" )
+				);
+		validator = getValidatorForProgrammaticMapping( mapping );
+
+		container = new EmailContainerNoAnnotations();
+		container.setEmail( email );
+		violations = validator.validate( container );
+		assertOrgAddressesAreNotValid( violations );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-591")
+	public void testEmailAddressLength() {
+		isValidEmail( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa at hibernate.org" );
+	}
+
+	private void assertOrgAddressesAreNotValid(Set<ConstraintViolation<EmailContainer>> violations) {
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "ORG addresses are not valid" );
+	}
+
+	private void isValidEmail(CharSequence email, String message) {
+		assertTrue( validator.isValid( email, null ), message );
+	}
+
+	private void isValidEmail(CharSequence email) {
+		isValidEmail( email, "Expected a valid email." );
+	}
+
+	private void isInvalidEmail(CharSequence email, String message) {
+		assertFalse( validator.isValid( email, null ), message );
+	}
+
+	private void isInvalidEmail(CharSequence email) {
+		isInvalidEmail( email, "Expected a invalid email." );
+	}
+
+	@SuppressWarnings("unused")
+	private static abstract class EmailContainer {
+		public String email;
+
+		public void setEmail(String email) {
+			this.email = email;
+		}
+
+		public String getEmail() {
+			return email;
+		}
+	}
+
+	private static class EmailContainerAnnotated extends EmailContainer {
+		@Email(regexp = EmailValidatorTest.noOrgEmailAddressRegexp, message = "ORG addresses are not valid")
+		public String getEmail() {
+			return email;
+		}
+	}
+
+	private static class EmailContainerNoAnnotations extends EmailContainer {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForCalendarTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForCalendarTest.java
new file mode 100644
index 0000000..d7d2b17
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForCalendarTest.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Calendar;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForCalendar;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class FutureValidatorForCalendarTest {
+
+	private static FutureValidatorForCalendar constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new FutureValidatorForCalendar();
+	}
+
+	@Test
+	public void testIsValid() {
+		Calendar futureDate = getFutureDate();
+		Calendar pastDate = getPastDate();
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( futureDate, null ) );
+		assertFalse( constraint.isValid( pastDate, null ) );
+	}
+
+	private Calendar getFutureDate() {
+		Calendar cal = Calendar.getInstance();
+		int year = cal.get( Calendar.YEAR );
+		cal.set( Calendar.YEAR, year + 1 );
+		return cal;
+	}
+
+	private Calendar getPastDate() {
+		Calendar cal = Calendar.getInstance();
+		int year = cal.get( Calendar.YEAR );
+		cal.set( Calendar.YEAR, year - 1 );
+		return cal;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForDateTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForDateTest.java
new file mode 100644
index 0000000..4209409
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForDateTest.java
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Date;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForDate;
+
+public class FutureValidatorForDateTest {
+
+	private static FutureValidatorForDate constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new FutureValidatorForDate();
+	}
+
+	@Test
+	public void testIsValid() {
+		Date futureDate = getFutureDate();
+		Date pastDate = getPastDate();
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( futureDate, null ) );
+		assertFalse( constraint.isValid( pastDate, null ) );
+	}
+
+	private Date getFutureDate() {
+		Date date = new Date();
+		long timeStamp = date.getTime();
+		date.setTime( timeStamp + 31557600000l );
+		return date;
+	}
+
+	private Date getPastDate() {
+		Date date = new Date();
+		long timeStamp = date.getTime();
+		date.setTime( timeStamp - 31557600000l );
+		return date;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadableInstantTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadableInstantTest.java
new file mode 100644
index 0000000..ce63597
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadableInstantTest.java
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.joda.time.DateMidnight;
+import org.joda.time.DateTime;
+import org.joda.time.Instant;
+import org.joda.time.MutableDateTime;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForReadableInstant;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FutureValidatorForReadableInstantTest {
+
+	private static FutureValidatorForReadableInstant validator;
+
+	@BeforeClass
+	public static void init() {
+		validator = new FutureValidatorForReadableInstant();
+	}
+
+	@Test
+	public void testIsValidForInstant() {
+		Instant future = new Instant().plus( 31557600000l );
+		Instant past = new Instant().minus( 31557600000l );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+
+	@Test
+	public void testIsValidForDateTime() {
+		DateTime future = new DateTime().plusYears( 1 );
+		DateTime past = new DateTime().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+
+	@Test
+	public void testIsValidForDateMidnight() {
+		DateMidnight future = new DateMidnight().plusYears( 1 );
+		DateMidnight past = new DateMidnight().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+
+	@Test
+	public void testIsValidForMutableDateTime() {
+		MutableDateTime future = new MutableDateTime();
+		future.addYears( 1 );
+
+		MutableDateTime past = new MutableDateTime();
+		past.addYears( -1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadablePartialTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadablePartialTest.java
new file mode 100644
index 0000000..8347ebe
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorForReadablePartialTest.java
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.hibernate.validator.internal.constraintvalidators.FutureValidatorForReadablePartial;
+
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.joda.time.Partial;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class FutureValidatorForReadablePartialTest {
+
+	private static FutureValidatorForReadablePartial validator;
+
+	@BeforeClass
+	public static void init() {
+		validator = new FutureValidatorForReadablePartial();
+	}
+
+	@Test
+	public void testIsValidForPartial() {
+		Partial future = new Partial( new LocalDate().plusYears( 1 ) );
+		Partial past = new Partial( new LocalDate().minusYears( 1 ) );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+
+	@Test
+	public void testIsValidForLocalDate() {
+		LocalDate future = new LocalDate().plusYears( 1 );
+		LocalDate past = new LocalDate().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+
+	@Test
+	public void testIsValidForLocalDateTime() {
+		LocalDateTime future = new LocalDateTime().plusYears( 1 );
+		LocalDateTime past = new LocalDateTime().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( future, null ) );
+		Assert.assertFalse( validator.isValid( past, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorTest.java
new file mode 100644
index 0000000..e440c1f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/FutureValidatorTest.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class FutureValidatorTest {
+
+	/**
+	 * HV-158
+	 */
+	@Test
+	public void testFutureAndPast() {
+		Validator validator = ValidatorUtil.getValidator();
+		DateHolder dateHolder = new DateHolder();
+		Set<ConstraintViolation<DateHolder>> constraintViolations = validator.validate( dateHolder );
+		assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/LengthValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/LengthValidatorTest.java
new file mode 100644
index 0000000..169d60b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/LengthValidatorTest.java
@@ -0,0 +1,102 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.internal.constraintvalidators.LengthValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests the <code>LengthConstraint</code>.
+ *
+ * @author Hardy Ferentschik
+ */
+public class LengthValidatorTest {
+
+	@Test
+	public void testIsValid() {
+		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
+		descriptor.setValue( "min", 1 );
+		descriptor.setValue( "max", 3 );
+		descriptor.setValue( "message", "{validator.length}" );
+		Length l = AnnotationFactory.create( descriptor );
+		LengthValidator constraint = new LengthValidator();
+		constraint.initialize( l );
+		assertTrue( constraint.isValid( null, null ) );
+		assertFalse( constraint.isValid( "", null ) );
+		assertTrue( constraint.isValid( "f", null ) );
+		assertTrue( constraint.isValid( "fo", null ) );
+		assertTrue( constraint.isValid( "foo", null ) );
+		assertFalse( constraint.isValid( "foobar", null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testIsValidCharSequence() {
+		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
+		descriptor.setValue( "min", 1 );
+		descriptor.setValue( "max", 3 );
+		Length l = AnnotationFactory.create( descriptor );
+		LengthValidator constraint = new LengthValidator();
+		constraint.initialize( l );
+		assertTrue( constraint.isValid( new MyCustomStringImpl( "foo" ), null ) );
+		assertFalse( constraint.isValid( new MyCustomStringImpl( "foobar" ), null ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeMinValue() {
+		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
+		descriptor.setValue( "min", -1 );
+		descriptor.setValue( "max", 1 );
+		descriptor.setValue( "message", "{validator.length}" );
+		Length p = AnnotationFactory.create( descriptor );
+
+		LengthValidator constraint = new LengthValidator();
+		constraint.initialize( p );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeMaxValue() {
+		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
+		descriptor.setValue( "min", 1 );
+		descriptor.setValue( "max", -1 );
+		descriptor.setValue( "message", "{validator.length}" );
+		Length p = AnnotationFactory.create( descriptor );
+
+		LengthValidator constraint = new LengthValidator();
+		constraint.initialize( p );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNegativeLength() {
+		AnnotationDescriptor<Length> descriptor = new AnnotationDescriptor<Length>( Length.class );
+		descriptor.setValue( "min", 5 );
+		descriptor.setValue( "max", 4 );
+		descriptor.setValue( "message", "{validator.length}" );
+		Length p = AnnotationFactory.create( descriptor );
+
+		LengthValidator constraint = new LengthValidator();
+		constraint.initialize( p );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForNumberTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForNumberTest.java
new file mode 100644
index 0000000..3053db0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForNumberTest.java
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.Max;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.DecimalMaxValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.MaxValidatorForNumber;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class MaxValidatorForNumberTest {
+
+	@Test
+	public void testIsValidMax() {
+
+		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
+		descriptor.setValue( "value", 15l );
+		descriptor.setValue( "message", "{validator.max}" );
+		Max m = AnnotationFactory.create( descriptor );
+
+		MaxValidatorForNumber constraint = new MaxValidatorForNumber();
+		constraint.initialize( m );
+		testMaxValidator( constraint );
+	}
+
+	@Test
+	public void testIsValidDecimalMax() {
+
+		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
+		descriptor.setValue( "value", "15.0E0" );
+		descriptor.setValue( "message", "{validator.max}" );
+		DecimalMax m = AnnotationFactory.create( descriptor );
+
+		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
+		constraint.initialize( m );
+		testMaxValidator( constraint );
+	}
+
+	@Test
+	public void testInitializeDecimalMaxWithInvalidValue() {
+
+		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
+		descriptor.setValue( "value", "foobar" );
+		descriptor.setValue( "message", "{validator.max}" );
+		DecimalMax m = AnnotationFactory.create( descriptor );
+
+		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
+		try {
+			constraint.initialize( m );
+			fail();
+		}
+		catch ( IllegalArgumentException e ) {
+			// success
+		}
+	}
+
+	private void testMaxValidator(ConstraintValidator<?, Number> constraint) {
+		byte b = 1;
+		Byte bWrapper = 127;
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( b, null ) );
+		assertTrue( constraint.isValid( 15l, null ) );
+		assertTrue( constraint.isValid( 15, null ) );
+		assertTrue( constraint.isValid( 15.0, null ) );
+		assertTrue( constraint.isValid( BigDecimal.valueOf( -156000000000.0 ), null ) );
+		assertTrue( constraint.isValid( BigInteger.valueOf( -10000000l ), null ) );
+		assertTrue( constraint.isValid( 10, null ) );
+		assertTrue( constraint.isValid( 14.99, null ) );
+		assertTrue( constraint.isValid( -14.99, null ) );
+		assertFalse( constraint.isValid( 20, null ) );
+		assertFalse( constraint.isValid( bWrapper, null ) );
+		assertFalse( constraint.isValid( BigDecimal.valueOf( 156000000000.0 ), null ) );
+		assertFalse( constraint.isValid( BigInteger.valueOf( 10000000l ), null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForStringTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForStringTest.java
new file mode 100644
index 0000000..840b1da
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MaxValidatorForStringTest.java
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.Max;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.DecimalMaxValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMaxValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.MaxValidatorForCharSequence;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MaxValidatorForStringTest {
+
+	@Test
+	public void testIsValidMax() {
+
+		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
+		descriptor.setValue( "value", 15l );
+		descriptor.setValue( "message", "{validator.max}" );
+		Max m = AnnotationFactory.create( descriptor );
+
+		MaxValidatorForCharSequence constraint = new MaxValidatorForCharSequence();
+		constraint.initialize( m );
+		testMaxValidator( constraint );
+	}
+
+	@Test
+	public void testIsValidDecimalMax() {
+
+		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
+		descriptor.setValue( "value", "15.0E0" );
+		descriptor.setValue( "message", "{validator.max}" );
+		DecimalMax m = AnnotationFactory.create( descriptor );
+
+		DecimalMaxValidatorForCharSequence constraint = new DecimalMaxValidatorForCharSequence();
+		constraint.initialize( m );
+		testMaxValidator( constraint );
+	}
+
+	@Test
+	public void testInitializeDecimalMaxWithInvalidValue() {
+
+		AnnotationDescriptor<DecimalMax> descriptor = new AnnotationDescriptor<DecimalMax>( DecimalMax.class );
+		descriptor.setValue( "value", "foobar" );
+		descriptor.setValue( "message", "{validator.max}" );
+		DecimalMax m = AnnotationFactory.create( descriptor );
+
+		DecimalMaxValidatorForNumber constraint = new DecimalMaxValidatorForNumber();
+		try {
+			constraint.initialize( m );
+			fail();
+		}
+		catch ( IllegalArgumentException e ) {
+			// success
+		}
+	}
+
+	private void testMaxValidator(ConstraintValidator<?, CharSequence> constraint) {
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( "15", null ) );
+		assertTrue( constraint.isValid( "15.0", null ) );
+		assertTrue( constraint.isValid( "10", null ) );
+		assertTrue( constraint.isValid( "14.99", null ) );
+		assertTrue( constraint.isValid( "-14.99", null ) );
+		assertFalse( constraint.isValid( "20", null ) );
+
+		// HV-502
+		assertTrue( constraint.isValid( new MyCustomStringImpl( "10" ), null ) );
+
+		//number format exception
+		assertFalse( constraint.isValid( "15l", null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinMaxValidatorBoundaryTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinMaxValidatorBoundaryTest.java
new file mode 100644
index 0000000..f9d24cf
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinMaxValidatorBoundaryTest.java
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * Check correct behavior of {@link org.hibernate.validator.internal.constraintvalidators.MinValidatorForNumber} and
+ * {@link org.hibernate.validator.internal.constraintvalidators.MaxValidatorForNumber} on boundary values.
+ * <p/>
+ * The chosen numbers: 9223372036854775806l and 9223372036854775807l cast to
+ * the same double value.
+ *
+ * @author Carlos Vara
+ * @author Hardy Ferentschik
+ */
+public class MinMaxValidatorBoundaryTest {
+	@Min(value = 9223372036854775807l)
+	public long min;
+
+	@Max(value = 9223372036854775806l)
+	public long max;
+
+	@Test
+	public void testMinBoundaryValue() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		this.min = 9223372036854775806l;
+		this.max = 0l;
+
+		// Current min value is smaller, should fail, but it doesn't
+		Set<ConstraintViolation<MinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, Min.class );
+	}
+
+	@Test
+	public void testMaxBoundaryValue() {
+		Validator validator = ValidatorUtil.getValidator();
+
+		this.min = Long.MAX_VALUE;
+		this.max = 9223372036854775807l;
+
+		// Current max value is bigger, should fail, but it doesn't
+		Set<ConstraintViolation<MinMaxValidatorBoundaryTest>> constraintViolations = validator.validate( this );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, Max.class );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForNumberTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForNumberTest.java
new file mode 100644
index 0000000..ac8b583
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForNumberTest.java
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.validation.ConstraintValidator;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Min;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.DecimalMinValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.MinValidatorForNumber;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class MinValidatorForNumberTest {
+
+	@Test
+	public void testIsValidMinValidator() {
+		AnnotationDescriptor<Min> descriptor = new AnnotationDescriptor<Min>( Min.class );
+		descriptor.setValue( "value", 15l );
+		descriptor.setValue( "message", "{validator.min}" );
+		Min m = AnnotationFactory.create( descriptor );
+
+		MinValidatorForNumber constraint = new MinValidatorForNumber();
+		constraint.initialize( m );
+		testMinValidator( constraint );
+	}
+
+	@Test
+	public void testIsValidDecimalMinValidator() {
+		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
+		descriptor.setValue( "value", "1500E-2" );
+		descriptor.setValue( "message", "{validator.min}" );
+		DecimalMin m = AnnotationFactory.create( descriptor );
+
+		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
+		constraint.initialize( m );
+		testMinValidator( constraint );
+	}
+
+	@Test
+	public void testInitializeDecimalMaxWithInvalidValue() {
+
+		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
+		descriptor.setValue( "value", "foobar" );
+		descriptor.setValue( "message", "{validator.min}" );
+		DecimalMin m = AnnotationFactory.create( descriptor );
+
+		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
+		try {
+			constraint.initialize( m );
+			fail();
+		}
+		catch ( IllegalArgumentException e ) {
+			// success
+		}
+	}
+
+	private void testMinValidator(ConstraintValidator<?, Number> constraint) {
+		byte b = 1;
+		Byte bWrapper = 127;
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( bWrapper, null ) );
+		assertTrue( constraint.isValid( 20, null ) );
+		assertTrue( constraint.isValid( 15l, null ) );
+		assertTrue( constraint.isValid( 15, null ) );
+		assertTrue( constraint.isValid( 15.0, null ) );
+		assertTrue( constraint.isValid( BigDecimal.valueOf( 156000000000.0 ), null ) );
+		assertTrue( constraint.isValid( BigInteger.valueOf( 10000000l ), null ) );
+		assertFalse( constraint.isValid( b, null ) );
+		assertFalse( constraint.isValid( BigDecimal.valueOf( -156000000000.0 ), null ) );
+		assertFalse( constraint.isValid( BigInteger.valueOf( -10000000l ), null ) );
+		assertFalse( constraint.isValid( 10, null ) );
+		assertFalse( constraint.isValid( 14.99, null ) );
+		assertFalse( constraint.isValid( -14.99, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForStringTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForStringTest.java
new file mode 100644
index 0000000..a7a39ca
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MinValidatorForStringTest.java
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Min;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.DecimalMinValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.DecimalMinValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.MinValidatorForCharSequence;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class MinValidatorForStringTest {
+
+	@Test
+	public void testIsValidMinValidator() {
+		AnnotationDescriptor<Min> descriptor = new AnnotationDescriptor<Min>( Min.class );
+		descriptor.setValue( "value", 15l );
+		descriptor.setValue( "message", "{validator.min}" );
+		Min m = AnnotationFactory.create( descriptor );
+
+		MinValidatorForCharSequence constraint = new MinValidatorForCharSequence();
+		constraint.initialize( m );
+		testMinValidator( constraint );
+	}
+
+	@Test
+	public void testIsValidDecimalMinValidator() {
+		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
+		descriptor.setValue( "value", "1500E-2" );
+		descriptor.setValue( "message", "{validator.min}" );
+		DecimalMin m = AnnotationFactory.create( descriptor );
+
+		DecimalMinValidatorForCharSequence constraint = new DecimalMinValidatorForCharSequence();
+		constraint.initialize( m );
+		testMinValidator( constraint );
+	}
+
+	@Test
+	public void testInitializeDecimalMaxWithInvalidValue() {
+
+		AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
+		descriptor.setValue( "value", "foobar" );
+		descriptor.setValue( "message", "{validator.min}" );
+		DecimalMin m = AnnotationFactory.create( descriptor );
+
+		DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
+		try {
+			constraint.initialize( m );
+			fail();
+		}
+		catch ( IllegalArgumentException e ) {
+			// success
+		}
+	}
+
+	private void testMinValidator(ConstraintValidator<?, CharSequence> constraint) {
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( "20", null ) );
+		assertTrue( constraint.isValid( "15", null ) );
+		assertTrue( constraint.isValid( "15.0", null ) );
+		assertFalse( constraint.isValid( "10", null ) );
+		assertFalse( constraint.isValid( "14.99", null ) );
+		assertFalse( constraint.isValid( "-14.99", null ) );
+
+		// HV-502
+		assertTrue( constraint.isValid( new MyCustomStringImpl( "20" ), null ) );
+
+		//number format exception
+		assertFalse( constraint.isValid( "15l", null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ModCheckValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ModCheckValidatorTest.java
new file mode 100644
index 0000000..ded1e3a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ModCheckValidatorTest.java
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.ModCheck;
+import org.hibernate.validator.internal.constraintvalidators.ModCheckValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Tests for the {@code ModCheckValidator}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ModCheckValidatorTest {
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testInvalidStartIndex() {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, -1, Integer.MAX_VALUE, -1, false );
+		validator.initialize( modCheck );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testInvalidEndIndex() {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, -1, -1, false );
+		validator.initialize( modCheck );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testEndIndexLessThanStartIndex() {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 5, 0, -1, false );
+		validator.initialize( modCheck );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testInvalidCheckDigitPosition() {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, 10, 5, false );
+		validator.initialize( modCheck );
+	}
+
+	@Test
+	public void testValidMod10() throws Exception {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, Integer.MAX_VALUE, -1, false );
+		validator.initialize( modCheck );
+
+		assertTrue( validator.isValid( "79927398713", null ) );
+	}
+
+	@Test
+	public void testInvalidMod10() throws Exception {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, Integer.MAX_VALUE, -1, false );
+		validator.initialize( modCheck );
+
+		assertFalse( validator.isValid( new MyCustomStringImpl( "79927398714" ), null ) );
+	}
+
+	@Test
+	public void testFailOnNonNumeric() throws Exception {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, Integer.MAX_VALUE, -1, false );
+		validator.initialize( modCheck );
+
+		assertFalse( validator.isValid( new MyCustomStringImpl( "A79927398713" ), null ) );
+	}
+
+	@Test
+	public void testIgnoreNonNumeric() throws Exception {
+		ModCheckValidator validator = new ModCheckValidator();
+		ModCheck modCheck = createModCheckAnnotation( ModCheck.ModType.MOD10, 2, 0, Integer.MAX_VALUE, -1, true );
+		validator.initialize( modCheck );
+
+		assertTrue( validator.isValid( new MyCustomStringImpl( "A79927398713" ), null ) );
+	}
+
+	private ModCheck createModCheckAnnotation(ModCheck.ModType modType, int multiplier, int start, int end, int checkDigit, boolean ignoreNonDigits) {
+		ModCheckValidator validator = new ModCheckValidator();
+
+		AnnotationDescriptor<ModCheck> descriptor = new AnnotationDescriptor<ModCheck>( ModCheck.class );
+		descriptor.setValue( "modType", modType );
+		descriptor.setValue( "multiplier", multiplier );
+		descriptor.setValue( "startIndex", start );
+		descriptor.setValue( "endIndex", end );
+		descriptor.setValue( "checkDigitPosition", checkDigit );
+		descriptor.setValue( "ignoreNonDigitCharacters", ignoreNonDigits );
+
+		return AnnotationFactory.create( descriptor );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MyCustomStringImpl.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MyCustomStringImpl.java
new file mode 100644
index 0000000..67afb29
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/MyCustomStringImpl.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MyCustomStringImpl implements CharSequence {
+	private final String myString;
+
+	MyCustomStringImpl(String s) {
+		this.myString = s;
+	}
+
+	public int length() {
+		return myString.length();
+	}
+
+	public char charAt(int i) {
+		return myString.charAt( i );
+	}
+
+	public CharSequence subSequence(int i, int j) {
+		return myString.subSequence( i, j );
+	}
+
+	public String toString() {
+		return myString;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NotNullValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NotNullValidatorTest.java
new file mode 100644
index 0000000..a4b3d28
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NotNullValidatorTest.java
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.NotNullValidator;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotNullValidatorTest {
+
+	@Test
+	public void testIsValid() {
+		NotNullValidator constraint = new NotNullValidator();
+
+		assertFalse( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( new Object(), null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NullValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NullValidatorTest.java
new file mode 100644
index 0000000..e870abe
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/NullValidatorTest.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.NullValidator;
+
+/**
+ * @author Alaa Nassef
+ */
+public class NullValidatorTest {
+
+	private static NullValidator constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new NullValidator();
+	}
+
+	@Test
+	public void testIsValid() {
+		assertTrue( constraint.isValid( null, null ) );
+		assertFalse( constraint.isValid( new Object(), null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForCalendarTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForCalendarTest.java
new file mode 100644
index 0000000..80ea5e4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForCalendarTest.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Calendar;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForCalendar;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Ferentschik
+ */
+public class PastValidatorForCalendarTest {
+
+	private static PastValidatorForCalendar constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new PastValidatorForCalendar();
+	}
+
+	@Test
+	public void testIsValid() {
+		Calendar futureDate = getFutureDate();
+		Calendar pastDate = getPastDate();
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( pastDate, null ) );
+		assertFalse( constraint.isValid( futureDate, null ) );
+	}
+
+	private Calendar getFutureDate() {
+		Calendar cal = Calendar.getInstance();
+		int year = cal.get( Calendar.YEAR );
+		cal.set( Calendar.YEAR, year + 1 );
+		return cal;
+	}
+
+	private Calendar getPastDate() {
+		Calendar cal = Calendar.getInstance();
+		int year = cal.get( Calendar.YEAR );
+		cal.set( Calendar.YEAR, year - 1 );
+		return cal;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForDateTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForDateTest.java
new file mode 100644
index 0000000..23f4895
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForDateTest.java
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Date;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForDate;
+
+public class PastValidatorForDateTest {
+
+	private static PastValidatorForDate constraint;
+
+	@BeforeClass
+	public static void init() {
+		constraint = new PastValidatorForDate();
+	}
+
+	@Test
+	public void testIsValid() {
+		Date futureDate = getFutureDate();
+		Date pastDate = getPastDate();
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( pastDate, null ) );
+		assertFalse( constraint.isValid( futureDate, null ) );
+	}
+
+	private Date getFutureDate() {
+		Date date = new Date();
+		long timeStamp = date.getTime();
+		date.setTime( timeStamp + 31557600000l );
+		return date;
+	}
+
+	private Date getPastDate() {
+		Date date = new Date();
+		long timeStamp = date.getTime();
+		date.setTime( timeStamp - 31557600000l );
+		return date;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadableInstantTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadableInstantTest.java
new file mode 100644
index 0000000..b24267b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadableInstantTest.java
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.joda.time.DateMidnight;
+import org.joda.time.DateTime;
+import org.joda.time.Instant;
+import org.joda.time.MutableDateTime;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForReadableInstant;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class PastValidatorForReadableInstantTest {
+
+	private static PastValidatorForReadableInstant validator;
+
+	@BeforeClass
+	public static void init() {
+		validator = new PastValidatorForReadableInstant();
+	}
+
+	@Test
+	public void testIsValidForInstant() {
+		Instant future = new Instant().plus( 31557600000l );
+		Instant past = new Instant().minus( 31557600000l );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+
+	@Test
+	public void testIsValidForDateTime() {
+		DateTime future = new DateTime().plusYears( 1 );
+		DateTime past = new DateTime().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+
+	@Test
+	public void testIsValidForDateMidnight() {
+		DateMidnight future = new DateMidnight().plusYears( 1 );
+		DateMidnight past = new DateMidnight().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+
+	@Test
+	public void testIsValidForMutableDateTime() {
+		MutableDateTime future = new MutableDateTime();
+		future.addYears( 1 );
+
+		MutableDateTime past = new MutableDateTime();
+		past.addYears( -1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadablePartialTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadablePartialTest.java
new file mode 100644
index 0000000..d74fab6
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PastValidatorForReadablePartialTest.java
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.joda.time.Partial;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.PastValidatorForReadablePartial;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class PastValidatorForReadablePartialTest {
+
+	private static PastValidatorForReadablePartial validator;
+
+	@BeforeClass
+	public static void init() {
+		validator = new PastValidatorForReadablePartial();
+	}
+
+	@Test
+	public void testIsValidForPartial() {
+		Partial future = new Partial( new LocalDate().plusYears( 1 ) );
+		Partial past = new Partial( new LocalDate().minusYears( 1 ) );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+
+	@Test
+	public void testIsValidForLocalDate() {
+		LocalDate future = new LocalDate().plusYears( 1 );
+		LocalDate past = new LocalDate().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+
+	@Test
+	public void testIsValidForLocalDateTime() {
+		LocalDateTime future = new LocalDateTime().plusYears( 1 );
+		LocalDateTime past = new LocalDateTime().minusYears( 1 );
+
+		Assert.assertTrue( validator.isValid( null, null ) );
+		Assert.assertTrue( validator.isValid( past, null ) );
+		Assert.assertFalse( validator.isValid( future, null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PatternValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PatternValidatorTest.java
new file mode 100644
index 0000000..5362e32
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/PatternValidatorTest.java
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import javax.validation.constraints.Pattern;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.internal.constraintvalidators.PatternValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PatternValidatorTest {
+
+	@Test
+	public void testIsValid() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		descriptor.setValue( "regexp", "foobar" );
+		descriptor.setValue( "message", "pattern does not match" );
+		Pattern p = AnnotationFactory.create( descriptor );
+
+		PatternValidator constraint = new PatternValidator();
+		constraint.initialize( p );
+
+		assertTrue( constraint.isValid( null, null ) );
+		assertFalse( constraint.isValid( "", null ) );
+		assertFalse( constraint.isValid( "bla bla", null ) );
+		assertFalse( constraint.isValid( "This test is not foobar", null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testIsValidForCharSequence() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		descriptor.setValue( "regexp", "char sequence" );
+		Pattern p = AnnotationFactory.create( descriptor );
+
+		PatternValidator constraint = new PatternValidator();
+		constraint.initialize( p );
+
+		assertTrue( constraint.isValid( new MyCustomStringImpl( "char sequence" ), null ) );
+	}
+
+	@Test
+	public void testIsValidForEmptyStringRegexp() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		descriptor.setValue( "regexp", "|^.*foo$" );
+		descriptor.setValue( "message", "pattern does not match" );
+		Pattern p = AnnotationFactory.create( descriptor );
+
+		PatternValidator constraint = new PatternValidator();
+		constraint.initialize( p );
+
+		assertTrue( constraint.isValid( null, null ) );
+		assertTrue( constraint.isValid( "", null ) );
+		assertFalse( constraint.isValid( "bla bla", null ) );
+		assertTrue( constraint.isValid( "foo", null ) );
+		assertTrue( constraint.isValid( "a b c foo", null ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testInvalidRegularExpression() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		descriptor.setValue( "regexp", "(unbalanced parentheses" );
+		descriptor.setValue( "message", "pattern does not match" );
+		Pattern p = AnnotationFactory.create( descriptor );
+
+		PatternValidator constraint = new PatternValidator();
+		constraint.initialize( p );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SafeHtmlValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SafeHtmlValidatorTest.java
new file mode 100644
index 0000000..e763253
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SafeHtmlValidatorTest.java
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.SafeHtml;
+import org.hibernate.validator.constraints.SafeHtml.WhiteListType;
+import org.hibernate.validator.internal.constraintvalidators.SafeHtmlValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link SafeHtmlValidator}.
+ *
+ * @author George Gastaldi
+ */
+public class SafeHtmlValidatorTest {
+
+	@Test
+	public void testNullValue() throws Exception {
+		AnnotationDescriptor<SafeHtml> descriptor = new AnnotationDescriptor<SafeHtml>( SafeHtml.class );
+		descriptor.setValue( "whitelistType", WhiteListType.BASIC );
+		SafeHtml p = AnnotationFactory.create( descriptor );
+
+		SafeHtmlValidator validator = new SafeHtmlValidator();
+		validator.initialize( p );
+		assertTrue( validator.isValid( null, null ) );
+	}
+
+	@Test
+	public void testInvalidScriptTagIncluded() throws Exception {
+		AnnotationDescriptor<SafeHtml> descriptor = new AnnotationDescriptor<SafeHtml>( SafeHtml.class );
+		descriptor.setValue( "whitelistType", WhiteListType.BASIC );
+		SafeHtml p = AnnotationFactory.create( descriptor );
+
+		SafeHtmlValidator validator = new SafeHtmlValidator();
+		validator.initialize( p );
+		assertFalse( validator.isValid( "Hello<script>alert('Doh')</script>World !", null ) );
+	}
+
+	@Test
+	public void testValid() throws Exception {
+		AnnotationDescriptor<SafeHtml> descriptor = new AnnotationDescriptor<SafeHtml>( SafeHtml.class );
+		descriptor.setValue( "whitelistType", WhiteListType.BASIC );
+		SafeHtml p = AnnotationFactory.create( descriptor );
+
+		SafeHtmlValidator validator = new SafeHtmlValidator();
+		validator.initialize( p );
+		assertTrue( validator.isValid( "<p><a href='http://example.com/'>Link</a></p>", null ) );
+	}
+
+	@Test
+	public void testAdditionalTags() throws Exception {
+		AnnotationDescriptor<SafeHtml> descriptor = new AnnotationDescriptor<SafeHtml>( SafeHtml.class );
+		descriptor.setValue( "additionalTags", new String[] { "script" } );
+		SafeHtml p = AnnotationFactory.create( descriptor );
+
+		SafeHtmlValidator validator = new SafeHtmlValidator();
+		validator.initialize( p );
+		assertTrue( validator.isValid( "Hello<script>alert('Doh')</script>World !", null ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ScriptAssertValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ScriptAssertValidatorTest.java
new file mode 100644
index 0000000..50a7be1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/ScriptAssertValidatorTest.java
@@ -0,0 +1,202 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Date;
+import java.util.GregorianCalendar;
+import javax.validation.ConstraintDeclarationException;
+import javax.validation.ConstraintValidator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.internal.constraintvalidators.ScriptAssertValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link org.hibernate.validator.internal.constraintvalidators.ScriptAssertValidator}.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ */
+public class ScriptAssertValidatorTest {
+
+	@Test
+	public void scriptEvaluatesToTrue() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "groovy", "true" );
+
+		assertTrue( validator.isValid( new Object(), null ) );
+	}
+
+	@Test
+	public void scriptEvaluatesToFalse() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "groovy", "false" );
+
+		assertFalse( validator.isValid( new Object(), null ) );
+	}
+
+	@Test
+	public void scriptExpressionReferencingAnnotatedObject() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
+				"groovy", "_this.startDate.before(_this.endDate)"
+		);
+
+		Date startDate = new GregorianCalendar( 2009, 8, 20 ).getTime();
+		Date endDate = new GregorianCalendar( 2009, 8, 21 ).getTime();
+
+		assertTrue( validator.isValid( new CalendarEvent( startDate, endDate ), null ) );
+		assertFalse( validator.isValid( new CalendarEvent( endDate, startDate ), null ) );
+	}
+
+	@Test
+	public void scriptExpressionUsingCustomizedAlias() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
+				"groovy", "_.startDate.before(_.endDate)", "_"
+		);
+
+		Date startDate = new GregorianCalendar( 2009, 8, 20 ).getTime();
+		Date endDate = new GregorianCalendar( 2009, 8, 21 ).getTime();
+
+		assertFalse( validator.isValid( new CalendarEvent( endDate, startDate ), null ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void emptyLanguageNameRaisesException() throws Exception {
+		getInitializedValidator( "", "script" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void emptyScriptRaisesException() throws Exception {
+		getInitializedValidator( "lang", "" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void emptyAliasRaisesException() throws Exception {
+		getInitializedValidator( "lang", "script", "" );
+	}
+
+	@Test(expectedExceptions = ConstraintDeclarationException.class)
+	public void unknownLanguageNameRaisesException() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "foo", "script" );
+
+		validator.isValid( new Object(), null );
+	}
+
+	@Test(expectedExceptions = ConstraintDeclarationException.class)
+	public void illegalScriptExpressionRaisesException() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "groovy", "foo" );
+
+		validator.isValid( new Object(), null );
+	}
+
+	@Test(expectedExceptions = ConstraintDeclarationException.class)
+	public void scriptExpressionReturningNullRaisesException() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator( "groovy", "null" );
+
+		validator.isValid( new Object(), null );
+	}
+
+	@Test(expectedExceptions = ConstraintDeclarationException.class)
+	public void scriptExpressionReturningNoBooleanRaisesException() throws Exception {
+		ConstraintValidator<ScriptAssert, Object> validator = getInitializedValidator(
+				"groovy", "new java.util.Date()"
+		);
+
+		validator.isValid( new Object(), null );
+	}
+
+	/**
+	 * @param lang the script type
+	 * @param script the actual script
+	 * @param alias the alias name of the this object
+	 *
+	 * @return a {@link org.hibernate.validator.internal.constraintvalidators.ScriptAssertValidator} initialized with a {@link ScriptAssert} with the given values.
+	 */
+	private ConstraintValidator<ScriptAssert, Object> getInitializedValidator(String lang, String script, String alias) {
+
+		ConstraintValidator<ScriptAssert, Object> validator = new ScriptAssertValidator();
+		validator.initialize( getScriptAssert( lang, script, alias ) );
+
+		return validator;
+	}
+
+	/**
+	 * @param lang the script type
+	 * @param script the actual script
+	 *
+	 * @return a {@link ScriptAssertValidator} initialized with a {@link ScriptAssert} with the given values.
+	 */
+	private ConstraintValidator<ScriptAssert, Object> getInitializedValidator(String lang, String script) {
+
+		ConstraintValidator<ScriptAssert, Object> validator = new ScriptAssertValidator();
+		validator.initialize( getScriptAssert( lang, script, null ) );
+
+		return validator;
+	}
+
+	/**
+	 * @param lang the script type
+	 * @param script the actual script
+	 * @param alias the alias name of the this object
+	 *
+	 * @return a {@link ScriptAssert} initialized with the given values.
+	 */
+	private ScriptAssert getScriptAssert(String lang, String script, String alias) {
+
+		AnnotationDescriptor<ScriptAssert> descriptor = AnnotationDescriptor.getInstance( ScriptAssert.class );
+
+		descriptor.setValue( "lang", lang );
+		descriptor.setValue( "script", script );
+		if ( alias != null ) {
+			descriptor.setValue( "alias", alias );
+		}
+
+		return AnnotationFactory.create( descriptor );
+	}
+
+	/**
+	 * An exemplary model class used in tests.
+	 *
+	 * @author Gunnar Morling
+	 */
+	private static class CalendarEvent {
+
+		private Date startDate;
+
+		private Date endDate;
+
+		public CalendarEvent(Date startDate, Date endDate) {
+
+			this.startDate = startDate;
+			this.endDate = endDate;
+		}
+
+		@SuppressWarnings("unused")
+		public Date getStartDate() {
+			return startDate;
+		}
+
+		@SuppressWarnings("unused")
+		public Date getEndDate() {
+			return endDate;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SizeValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SizeValidatorTest.java
new file mode 100644
index 0000000..9d6d49b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/SizeValidatorTest.java
@@ -0,0 +1,213 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ConstraintViolationAssert;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArray;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfBoolean;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfByte;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfChar;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfDouble;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfFloat;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfInt;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfLong;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfShort;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForCharSequence;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForCollection;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForMap;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Alaa Nassef
+ * @author Hardy Feretnschik
+ */
+public class SizeValidatorTest {
+
+	@Test
+	public void testIsValidObjectArray() throws Exception {
+		ConstraintValidator<Size, Object[]> validator = getValidatorMin1Max2( SizeValidatorForArray.class );
+		assertSizes( validator, Object[].class );
+	}
+
+	@Test
+	public void testIsValidBooleanArray() throws Exception {
+		ConstraintValidator<Size, boolean[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfBoolean.class );
+		assertSizes( validator, boolean[].class );
+	}
+
+	@Test
+	public void testIsValidByteArray() throws Exception {
+		ConstraintValidator<Size, byte[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfByte.class );
+		assertSizes( validator, byte[].class );
+	}
+
+	@Test
+	public void testIsValidCharArray() throws Exception {
+		ConstraintValidator<Size, char[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfChar.class );
+		assertSizes( validator, char[].class );
+	}
+
+	@Test
+	public void testIsValidDoubleArray() throws Exception {
+		ConstraintValidator<Size, double[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfDouble.class );
+		assertSizes( validator, double[].class );
+	}
+
+	@Test
+	public void testIsValidFloatArray() throws Exception {
+		ConstraintValidator<Size, float[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfFloat.class );
+		assertSizes( validator, float[].class );
+	}
+
+	@Test
+	public void testIsValidIntArray() throws Exception {
+		ConstraintValidator<Size, int[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfInt.class );
+		assertSizes( validator, int[].class );
+	}
+
+	@Test
+	public void testIsValidLongArray() throws Exception {
+		ConstraintValidator<Size, long[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfLong.class );
+		assertSizes( validator, long[].class );
+	}
+
+	@Test
+	public void testIsValidShortArray() throws Exception {
+		ConstraintValidator<Size, short[]> validator = getValidatorMin1Max2( SizeValidatorForArraysOfShort.class );
+		assertSizes( validator, short[].class );
+	}
+
+	@Test
+	public void testIsValidCollection() throws Exception {
+		ConstraintValidator<Size, Collection> validator = getValidatorMin1Max2( SizeValidatorForCollection.class );
+
+		assertTrue( validator.isValid( null, null ) );
+
+		Collection<String> collection = new ArrayList<String>();
+		assertFalse( validator.isValid( collection, null ) );
+
+		collection.add( "firstItem" );
+		assertTrue( validator.isValid( collection, null ) );
+
+		collection.add( "secondItem" );
+		assertTrue( validator.isValid( collection, null ) );
+
+		collection.add( "thirdItem" );
+		assertFalse( validator.isValid( collection, null ) );
+	}
+
+	@Test
+	public void testIsValidMap() throws Exception {
+		ConstraintValidator<Size, Map> validator = getValidatorMin1Max2( SizeValidatorForMap.class );
+
+		assertTrue( validator.isValid( null, null ) );
+
+		Map<String, String> map = new HashMap<String, String>();
+		assertFalse( validator.isValid( map, null ) );
+
+		map.put( "key1", "firstItem" );
+		assertTrue( validator.isValid( map, null ) );
+
+		map.put( "key3", "secondItem" );
+		assertTrue( validator.isValid( map, null ) );
+
+		map.put( "key2", "thirdItem" );
+		assertFalse( validator.isValid( map, null ) );
+	}
+
+	@Test
+	public void testIsValidString() throws Exception {
+		ConstraintValidator<Size, String> validator = getValidatorMin1Max2( SizeValidatorForCharSequence.class );
+
+		assertTrue( validator.isValid( null, null ) );
+		assertFalse( validator.isValid( "", null ) );
+		assertTrue( validator.isValid( "a", null ) );
+		assertTrue( validator.isValid( "ab", null ) );
+		assertFalse( validator.isValid( "abc", null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testIsValidCharSequence() throws Exception {
+		ConstraintValidator<Size, CharSequence> validator = getValidatorMin1Max2( SizeValidatorForCharSequence.class );
+
+		assertTrue( validator.isValid( new MyCustomStringImpl( "ab" ), null ) );
+		assertFalse( validator.isValid( new MyCustomStringImpl( "abc" ), null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-551")
+	public void testGenericsExtendsFoo() throws Exception {
+		Validator validator = ValidatorUtil.getValidator();
+		Set<ConstraintViolation<Foo>> violations = validator.validate( new Foo() );
+		ConstraintViolationAssert.assertCorrectConstraintViolationMessages( violations, "there can only be one" );
+	}
+
+	private <T> ConstraintValidator<Size, T> getValidatorMin1Max2(Class<?> validatorClass) throws Exception {
+		AnnotationDescriptor<Size> descriptor = new AnnotationDescriptor<Size>( Size.class );
+		descriptor.setValue( "min", 1 );
+		descriptor.setValue( "max", 2 );
+		descriptor.setValue( "message", "{validator.max}" );
+		Size m = AnnotationFactory.create( descriptor );
+		@SuppressWarnings("unchecked")
+		ConstraintValidator<Size, T> validator = (ConstraintValidator<Size, T>) validatorClass.newInstance();
+		validator.initialize( m );
+		return validator;
+	}
+
+	@SuppressWarnings("unchecked")
+	private <T> void assertSizes(ConstraintValidator<Size, T> validator, Class<T> arrayType) {
+		assertTrue( validator.isValid( null, null ) );
+
+		T array = (T) Array.newInstance( arrayType.getComponentType(), 0 );
+		assertFalse( validator.isValid( array, null ) );
+
+		array = (T) Array.newInstance( arrayType.getComponentType(), 1 );
+		assertTrue( validator.isValid( array, null ) );
+
+		array = (T) Array.newInstance( arrayType.getComponentType(), 2 );
+		assertTrue( validator.isValid( array, null ) );
+
+		array = (T) Array.newInstance( arrayType.getComponentType(), 3 );
+		assertFalse( validator.isValid( array, null ) );
+	}
+
+	private class Foo {
+		@Size(min = 1, max = 1, message = "there can only be one")
+		private List<? extends Foo> listOfSubClasses = new ArrayList<Foo>();
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/URLValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/URLValidatorTest.java
new file mode 100644
index 0000000..aac5897
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/constraintvalidators/URLValidatorTest.java
@@ -0,0 +1,245 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.constraintvalidators;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.constraints.Pattern.Flag;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.URLDef;
+import org.hibernate.validator.constraints.URL;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+import org.hibernate.validator.internal.constraintvalidators.URLValidator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatorForProgrammaticMapping;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests the {@code URL} constraint. See HV-229
+ *
+ * @author Hardy Ferentschik
+ */
+public class URLValidatorTest {
+
+	@Test
+	public void testIsValidUrl() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertTrue( validator.isValid( null, null ) );
+		assertFalse( validator.isValid( "http", null ) );
+		assertFalse( validator.isValid( "ftp//abc.de", null ) );
+		assertTrue( validator.isValid( "ftp://abc.de", null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-502")
+	public void testIsValidUrlWithCharSequence() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertFalse( validator.isValid( new MyCustomStringImpl( "ftp//abc.de" ), null ) );
+		assertTrue( validator.isValid( new MyCustomStringImpl( "ftp://abc.de" ), null ) );
+	}
+
+	@Test
+	public void testIsValidUrlWithProtocolSpecified() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "protocol", "http" );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertFalse( validator.isValid( "ftp://abc.de", null ) );
+		assertTrue( validator.isValid( "http://abc.de", null ) );
+
+		descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "protocol", "file" );
+		url = AnnotationFactory.create( descriptor );
+		validator = new URLValidator();
+		validator.initialize( url );
+		assertFalse( validator.isValid( "http://abc.de", null ) );
+		assertTrue( validator.isValid( "file://Users/foobar/tmp", null ) );
+	}
+
+	@Test
+	public void testIsValidUrlWithPortSpecified() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "port", 21 );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertFalse( validator.isValid( "ftp://abc.de", null ) );
+		assertTrue( validator.isValid( "ftp://abc.de:21", null ) );
+	}
+
+	@Test
+	public void testIsValidUrlWithHostSpecified() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "host", "foobar.com" );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertFalse( validator.isValid( "http://fubar.com/this/is/foobar.html", null ) );
+		assertTrue( validator.isValid( "http://foobar.com/this/is/foobar.html", null ) );
+	}
+
+	@Test
+	public void testIsValidUrlWithProtocolHostAndPort() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "protocol", "http" );
+		descriptor.setValue( "host", "www.hibernate.org" );
+		descriptor.setValue( "port", 80 );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertFalse( validator.isValid( "ftp://www#hibernate#org:80", null ) );
+		assertTrue( validator.isValid( "http://www.hibernate.org:80", null ) );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-323")
+	public void testIsValidEmptyString() {
+		AnnotationDescriptor<URL> descriptor = new AnnotationDescriptor<URL>( URL.class );
+		descriptor.setValue( "protocol", "http" );
+		descriptor.setValue( "host", "www.hibernate.org" );
+		descriptor.setValue( "port", 80 );
+		URL url = AnnotationFactory.create( descriptor );
+		URLValidator validator = new URLValidator();
+		validator.initialize( url );
+
+		assertTrue( validator.isValid( "", null ) );
+	}
+
+	@Test
+		 @TestForIssue(jiraKey = "HV-406")
+		 public void testRegExp() {
+		// first run the test with @URL configured via annotations
+		Validator validator = ValidatorUtil.getValidator();
+		URLContainer container = new URLContainerAnnotated();
+		runUrlContainerValidation( validator, container, true );
+
+		// now the same test with programmatic configuration
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( URLContainerNoAnnotations.class )
+				.property( "url", METHOD )
+				.constraint( new URLDef().regexp( "^http://\\S+[\\.htm|\\.html]{1}$" ) );
+		validator = getValidatorForProgrammaticMapping( mapping );
+
+		container = new URLContainerNoAnnotations();
+		runUrlContainerValidation( validator, container, true );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-406")
+	public void testRegExpCaseInsensitive() {
+
+		// first run the test with @URL configured via annotations
+		Validator validator = ValidatorUtil.getValidator();
+		URLContainer container = new CaseInsensitiveURLContainerAnnotated();
+		runUrlContainerValidation( validator, container, false );
+
+		// now the same test with programmatic configuration
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( URLContainerNoAnnotations.class )
+				.property( "url", METHOD )
+				.constraint(
+						new URLDef().regexp( "^http://\\S+[\\.htm|\\.html]{1}$" ).flags( Flag.CASE_INSENSITIVE )
+				);
+		validator = getValidatorForProgrammaticMapping( mapping );
+
+		container = new URLContainerNoAnnotations();
+		runUrlContainerValidation( validator, container, false );
+	}
+
+	private void runUrlContainerValidation(Validator validator, URLContainer container, boolean caseSensitive) {
+		container.setUrl( "http://my.domain.com/index.html" );
+		Set<ConstraintViolation<URLContainer>> violations = validator.validate( container );
+		assertNumberOfViolations( violations, 0 );
+
+		container.setUrl( "http://my.domain.com/index.htm" );
+		violations = validator.validate( container );
+		assertNumberOfViolations( violations, 0 );
+
+		container.setUrl( "http://my.domain.com/index" );
+		violations = validator.validate( container );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "must be a valid URL" );
+
+		container.setUrl( "http://my.domain.com/index.asp" );
+		violations = validator.validate( container );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "must be a valid URL" );
+
+		container.setUrl( "http://my.domain.com/index.HTML" );
+		violations = validator.validate( container );
+		assertNumberOfViolations( violations, caseSensitive ? 1 : 0 );
+		if ( caseSensitive ) {
+			assertCorrectConstraintViolationMessages( violations, "must be a valid URL" );
+		}
+
+	}
+
+	private static abstract class URLContainer {
+		public String url;
+
+		public void setUrl(String url) {
+			this.url = url;
+		}
+
+		@SuppressWarnings("unused")
+		public String getUrl() {
+			return url;
+		}
+	}
+
+	private static class URLContainerAnnotated extends URLContainer {
+		@URL(regexp = "^http://\\S+[\\.htm|\\.html]{1}$")
+		public String getUrl() {
+			return url;
+		}
+	}
+
+	private static class CaseInsensitiveURLContainerAnnotated extends URLContainer {
+
+		@URL(regexp = "^http://\\S+[\\.htm|\\.html]{1}$", flags = Flag.CASE_INSENSITIVE)
+		public String getUrl() {
+			return url;
+		}
+	}
+
+	private static class URLContainerNoAnnotations extends URLContainer {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConfigurationImplTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConfigurationImplTest.java
new file mode 100644
index 0000000..f18d5ce
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConfigurationImplTest.java
@@ -0,0 +1,160 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.ElementType;
+import javax.validation.Configuration;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidationException;
+import javax.validation.ValidatorFactory;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.testutil.TestForIssue;
+
+import static org.hibernate.validator.testutil.ValidatorUtil.getConfiguration;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNotSame;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConfigurationImplTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-563")
+	public void testCallBuildValidatorFactoryMultipleTimes() {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+
+		ValidatorFactory factory1 = configuration.buildValidatorFactory();
+		assertNotNull( factory1 );
+
+		ValidatorFactory factory2 = configuration.buildValidatorFactory();
+		assertNotNull( factory2 );
+
+		assertNotSame( factory1, factory2 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-563")
+	public void testConfigurationReusableAndMutable() {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+
+		ValidatorFactory factory1 = configuration.buildValidatorFactory();
+		assertNotNull( factory1 );
+
+		configuration.traversableResolver( new TestTraversableResolver() );
+		ValidatorFactory factory2 = configuration.buildValidatorFactory();
+		assertNotNull( factory2 );
+
+		assertNotSame( factory1.getTraversableResolver(), factory2.getTraversableResolver() );
+		assertTrue( factory2.getTraversableResolver() instanceof TestTraversableResolver );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-563")
+	public void testReusableConfigurationWithInputStream() throws Exception {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+
+		InputStream mappingStream = ConfigurationImplTest.class.getResourceAsStream( "mapping.xml" );
+
+		try {
+			configuration.addMapping( mappingStream );
+			ValidatorFactory factory1 = configuration.buildValidatorFactory();
+			assertNotNull( factory1 );
+
+			ValidatorFactory factory2 = configuration.buildValidatorFactory();
+			assertNotNull( factory2 );
+
+			assertNotSame( factory1, factory2 );
+		}
+		finally {
+			mappingStream.close();
+		}
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-563")
+	public void testReusableConfigurationWithNonResettableInputStream() throws Exception {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+
+		InputStream mappingStream = ConfigurationImplTest.class.getResourceAsStream( "mapping.xml" );
+
+		try {
+			configuration.addMapping( new NonResettableInputStream( mappingStream ) );
+			ValidatorFactory factory1 = configuration.buildValidatorFactory();
+			assertNotNull( factory1 );
+
+			ValidatorFactory factory2 = configuration.buildValidatorFactory();
+			assertNotNull( factory2 );
+
+			assertNotSame( factory1, factory2 );
+		}
+		finally {
+			mappingStream.close();
+		}
+	}
+
+	@Test(expectedExceptions = ValidationException.class, expectedExceptionsMessageRegExp = "HV000115.*")
+	@TestForIssue(jiraKey = "HV-563")
+	public void testReusableConfigurationWithClosedInputStream() throws Exception {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+
+		InputStream mappingStream = ConfigurationImplTest.class.getResourceAsStream( "mapping.xml" );
+
+		try {
+			configuration.addMapping( mappingStream );
+			ValidatorFactory factory1 = configuration.buildValidatorFactory();
+			assertNotNull( factory1 );
+		}
+		finally {
+			mappingStream.close();
+		}
+
+		configuration.buildValidatorFactory();
+	}
+
+	private static class TestTraversableResolver implements TraversableResolver {
+
+		public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return true;
+		}
+
+		public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return true;
+		}
+	}
+
+	private static class NonResettableInputStream extends InputStream {
+
+		private InputStream delegate;
+
+		public NonResettableInputStream(InputStream delegate) {
+			this.delegate = delegate;
+		}
+
+		@Override
+		public int read() throws IOException {
+			return delegate.read();
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConstraintValidatorCachingTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConstraintValidatorCachingTest.java
new file mode 100644
index 0000000..d58b2b4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ConstraintValidatorCachingTest.java
@@ -0,0 +1,274 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.constraintvalidators.MinValidatorForNumber;
+import org.hibernate.validator.internal.constraintvalidators.NotNullValidator;
+import org.hibernate.validator.internal.constraintvalidators.SizeValidatorForCollection;
+import org.hibernate.validator.internal.engine.ConstraintValidatorFactoryImpl;
+import org.hibernate.validator.testutil.TestForIssue;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getConfiguration;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintValidatorCachingTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-564")
+	public void testConstraintValidatorInstancesAreCached() {
+		Configuration config = getConfiguration();
+		OnceInstanceOnlyConstraintValidatorFactory constraintValidatorFactory = new OnceInstanceOnlyConstraintValidatorFactory();
+
+		config.constraintValidatorFactory( constraintValidatorFactory );
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		Person john = new Person( "John Doe" );
+		john.setAge( 36 );
+		john.addAddress( new Address( "Mysterious Lane", "Mysterious" ) );
+
+		constraintValidatorFactory.assertSize( 0 );
+		Set<ConstraintViolation<Person>> violations = validator.validate( john );
+		assertNumberOfViolations( violations, 0 );
+		constraintValidatorFactory.assertSize( 3 );
+
+		// need to call validate twice to let the cache kick in
+		violations = validator.validate( john );
+		assertNumberOfViolations( violations, 0 );
+		constraintValidatorFactory.assertSize( 3 );
+
+		constraintValidatorFactory.assertKeyExists( SizeValidatorForCollection.class );
+		constraintValidatorFactory.assertKeyExists( MinValidatorForNumber.class );
+		constraintValidatorFactory.assertKeyExists( NotNullValidator.class );
+
+		// getting a new validator from the same factory should have the same instances cached
+		validator = factory.getValidator();
+		constraintValidatorFactory.assertSize( 3 );
+
+		violations = validator.validate( john );
+		assertNumberOfViolations( violations, 0 );
+		constraintValidatorFactory.assertSize( 3 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-564")
+	public void testConstraintValidatorInstancesAreCachedPerConstraintValidatorFactory() {
+		Configuration config = getConfiguration();
+		OnceInstanceOnlyConstraintValidatorFactory constraintValidatorFactory1 = new OnceInstanceOnlyConstraintValidatorFactory();
+		OnceInstanceOnlyConstraintValidatorFactory constraintValidatorFactory2 = new OnceInstanceOnlyConstraintValidatorFactory();
+
+		config.constraintValidatorFactory( constraintValidatorFactory1 );
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		Person john = new Person( "John Doe" );
+		john.setAge( 36 );
+		john.addAddress( new Address( "Mysterious Lane", "Mysterious" ) );
+
+		constraintValidatorFactory1.assertSize( 0 );
+		Set<ConstraintViolation<Person>> violations = validator.validate( john );
+		assertNumberOfViolations( violations, 0 );
+		constraintValidatorFactory1.assertSize( 3 );
+
+		// getting a new validator with a new constraint factory
+		validator = factory.usingContext().constraintValidatorFactory( constraintValidatorFactory2 ).getValidator();
+		constraintValidatorFactory2.assertSize( 0 );
+		violations = validator.validate( john );
+		assertNumberOfViolations( violations, 0 );
+		constraintValidatorFactory2.assertSize( 3 );
+		constraintValidatorFactory1.assertConstraintValidatorInstancesAreNotShared( constraintValidatorFactory2 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-243")
+	public void testConstraintValidatorInstancesAreCachedPerConstraint() {
+		Validator validator = getValidator();
+		Set<ConstraintViolation<Foo>> violations = validator.validate( new Foo() );
+		assertNumberOfViolations( violations, 2 );
+		assertCorrectConstraintViolationMessages( violations, "size 10", "size 20" );
+	}
+
+	public class OnceInstanceOnlyConstraintValidatorFactory implements ConstraintValidatorFactory {
+		ConstraintValidatorFactoryImpl factory = new ConstraintValidatorFactoryImpl();
+		Map<Class<?>, ConstraintValidator<?, ?>> instantiatedConstraintValidatorClasses = newHashMap();
+
+		OnceInstanceOnlyConstraintValidatorFactory() {
+		}
+
+		public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
+			T constraintValidator = factory.getInstance( key );
+			if ( instantiatedConstraintValidatorClasses.containsKey( key ) ) {
+				if ( instantiatedConstraintValidatorClasses.get( key ) != constraintValidator ) {
+					fail( "The ConstraintValidator instance should be cached: " + constraintValidator );
+				}
+			}
+			else {
+				instantiatedConstraintValidatorClasses.put( key, constraintValidator );
+			}
+
+			return constraintValidator;
+		}
+
+		public void assertKeyExists(Class<?> clazz) {
+			assertTrue(
+					instantiatedConstraintValidatorClasses.containsKey( clazz ),
+					"An constraint validator of type " + clazz.getName() + " should exist"
+			);
+		}
+
+		public void assertSize(int size) {
+			assertEquals(
+					size,
+					instantiatedConstraintValidatorClasses.size(),
+					"Wrong number of already cached constraint validator instances"
+			);
+		}
+
+		public void assertConstraintValidatorInstancesAreNotShared(OnceInstanceOnlyConstraintValidatorFactory otherFactory) {
+			for ( ConstraintValidator<?, ?> constraintValidator : instantiatedConstraintValidatorClasses.values() ) {
+				if ( otherFactory.instantiatedConstraintValidatorClasses.containsValue( constraintValidator ) ) {
+					fail( "The two constraint validator factories should not share any ConstraintValidator instances" );
+				}
+			}
+		}
+	}
+
+	class Person {
+		@NotNull
+		String name;
+
+		@Min(1)
+		int age;
+
+		@Size(min = 1, max = 3)
+		List<Address> addresses;
+
+		Person(String name) {
+			this.name = name;
+			this.addresses = new ArrayList<Address>();
+		}
+
+		public int getAge() {
+			return age;
+		}
+
+		public void setAge(int age) {
+			this.age = age;
+		}
+
+		public void addAddress(Address address) {
+			addresses.add( address );
+		}
+
+
+		public List<Address> getAddresses() {
+			return addresses;
+		}
+	}
+
+	class Address {
+		String street;
+		String city;
+
+		Address(String street, String city) {
+			this.street = street;
+			this.city = city;
+		}
+	}
+
+	@Size(max = 20, message = "size 20")
+	@Constraint(validatedBy = { })
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface A {
+		public abstract String message() default "A";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	@Size(max = 10, message = "size 10")
+	@Constraint(validatedBy = { })
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface B {
+		public abstract String message() default "B";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	@A
+	@B
+	@Constraint(validatedBy = { })
+	@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+	@Retention(RUNTIME)
+	@Documented
+	public @interface C {
+		public abstract String message() default "C";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	class Foo {
+		@C
+		String value = "The quick brown fox jumps over the lazy dog";
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/PathImplTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/PathImplTest.java
new file mode 100644
index 0000000..d08eefc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/PathImplTest.java
@@ -0,0 +1,235 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Path;
+import javax.validation.Valid;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.PathImpl;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertNotNull;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class PathImplTest {
+
+	@Test
+	public void testParsing() {
+		String property = "orders[3].deliveryAddress.addressline[1]";
+		Path path = PathImpl.createPathFromString( property );
+		Iterator<Path.Node> propIter = path.iterator();
+
+		assertTrue( propIter.hasNext() );
+		Path.Node elem = propIter.next();
+		assertEquals( elem.getName(), "orders" );
+		assertFalse( elem.isInIterable() );
+
+		assertTrue( propIter.hasNext() );
+		elem = propIter.next();
+		assertEquals( elem.getName(), "deliveryAddress" );
+		assertTrue( elem.isInIterable() );
+		assertEquals( elem.getIndex(), new Integer( 3 ) );
+
+		assertTrue( propIter.hasNext() );
+		elem = propIter.next();
+		assertEquals( elem.getName(), "addressline" );
+		assertFalse( elem.isInIterable() );
+
+		assertTrue( propIter.hasNext() );
+		elem = propIter.next();
+		assertEquals( elem.getName(), null );
+		assertTrue( elem.isInIterable() );
+		assertEquals( elem.getIndex(), new Integer( 1 ) );
+
+		assertFalse( propIter.hasNext() );
+
+		assertEquals( path.toString(), property );
+	}
+
+	@Test
+	public void testParsingPropertyWithCurrencySymbol() {
+		PathImpl path = PathImpl.createPathFromString( "€Amount" );
+		Iterator<Path.Node> it = path.iterator();
+
+		assertEquals( it.next().getName(), "€Amount" );
+	}
+
+	@Test
+	public void testParsingPropertyWithGermanCharacter() {
+		PathImpl path = PathImpl.createPathFromString( "höchstBetrag" );
+		Iterator<Path.Node> it = path.iterator();
+
+		assertEquals( it.next().getName(), "höchstBetrag" );
+	}
+
+	@Test
+	public void testParsingPropertyWithUnicodeCharacter() {
+		PathImpl path = PathImpl.createPathFromString( "höchst\u00f6Betrag" );
+		Iterator<Path.Node> it = path.iterator();
+
+		assertEquals( it.next().getName(), "höchst\u00f6Betrag" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testParsingInvalidJavaProperty() {
+		PathImpl.createPathFromString( "1invalid" );
+	}
+
+	@Test
+	public void testParseMapBasedProperty() {
+		String property = "order[foo].deliveryAddress";
+		Path path = PathImpl.createPathFromString( property );
+		Iterator<Path.Node> propIter = path.iterator();
+
+		assertTrue( propIter.hasNext() );
+		Path.Node elem = propIter.next();
+		assertEquals( "order", elem.getName() );
+		assertFalse( elem.isInIterable() );
+
+		assertTrue( propIter.hasNext() );
+		elem = propIter.next();
+		assertEquals( "deliveryAddress", elem.getName() );
+		assertTrue( elem.isInIterable() );
+		assertEquals( "foo", elem.getKey() );
+
+		assertFalse( propIter.hasNext() );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testNull() {
+		PathImpl.createPathFromString( null );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testUnbalancedBraces() {
+		PathImpl.createPathFromString( "foo[.bar" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testIndexInMiddleOfProperty() {
+		PathImpl.createPathFromString( "f[1]oo.bar" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testTrailingPathSeparator() {
+		PathImpl.createPathFromString( "foo.bar." );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testLeadingPathSeparator() {
+		PathImpl.createPathFromString( ".foo.bar" );
+	}
+
+	@Test
+	public void testEmptyString() {
+		Path path = PathImpl.createPathFromString( "" );
+		assertTrue( path.iterator().hasNext() );
+	}
+
+	@Test
+	public void testNonStringMapKey() {
+		Validator validator = ValidatorUtil.getValidator();
+		Container container = new Container();
+		Key id = new Key();
+		container.addItem( id, new Item( null ) );
+		Set<ConstraintViolation<Container>> constraintViolations = validator.validate( container );
+		assertNumberOfViolations( constraintViolations, 1 );
+		ConstraintViolation<Container> violation = constraintViolations.iterator().next();
+		Path path = violation.getPropertyPath();
+		Iterator<Path.Node> iter = path.iterator();
+		iter.next();
+		Path.Node node = iter.next();
+		assertNotNull( node );
+		assertTrue( node.isInIterable() );
+		assertEquals( node.getKey(), id );
+	}
+
+	@Test
+	public void testCreationOfMethodParameterPath() throws Exception {
+
+		PathImpl methodParameterPath = PathImpl.createPathForMethodParameter(
+				Container.class.getMethod( "addItem", Key.class, Item.class ), "arg0"
+		);
+
+		assertEquals( methodParameterPath.toString(), "Container#addItem(arg0)" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testCreationOfMethodParameterPathFailsDueToMissingParameterIndex() throws Exception {
+
+		PathImpl.createPathForMethodParameter(
+				Container.class.getMethod( "addItem", Key.class, Item.class ), null
+		);
+	}
+
+	@Test
+	public void testCreationOfReturnValuePath() throws Exception {
+
+		PathImpl methodParameterPath = PathImpl.createPathForMethodReturnValue(
+				Container.class.getMethod( "addItem", Key.class, Item.class )
+		);
+
+		assertEquals( methodParameterPath.toString(), "Container#addItem()" );
+	}
+
+	@Test(
+			expectedExceptions = IllegalArgumentException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: A method is required to create a method return value path."
+	)
+	public void creationOfReturnValuePathFailsDueToNullMethod() throws Exception {
+
+		PathImpl.createPathForMethodReturnValue( null );
+	}
+
+	class Container {
+		@Valid
+		Map<Key, Item> store = new HashMap<Key, Item>();
+
+		public void addItem(Key id, Item item) {
+			store.put( id, item );
+		}
+	}
+
+	class Key {
+	}
+
+	class Item {
+		@NotNull
+		String id;
+
+		Item(String id) {
+			this.id = id;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ValidatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ValidatorTest.java
new file mode 100644
index 0000000..660bdfb
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/ValidatorTest.java
@@ -0,0 +1,287 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupSequence;
+import javax.validation.Valid;
+import javax.validation.Validator;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.metadata.BeanDescriptor;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.testutil.CountValidationCalls;
+import org.hibernate.validator.testutil.CountValidationCallsValidator;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintTypes;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class ValidatorTest {
+
+	@Test(description = "HV-429")
+	public void testValidatePropertyWithRedefinedDefaultGroupOnMainEntity() {
+		Validator validator = getValidator();
+		A testInstance = new A();
+		testInstance.c = new C( "aaa" );
+
+		Set<ConstraintViolation<A>> constraintViolations = validator.validateProperty( testInstance, "c.id" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "c.id" );
+	}
+
+	@Test(description = "HV-429")
+	public void testValidatePropertyWithRedefinedDefaultGroupOnSuperClass() {
+		Validator validator = getValidator();
+		A testInstance = new A();
+		testInstance.d = new D( "aa" );
+
+		Set<ConstraintViolation<A>> constraintViolations = validator.validateProperty( testInstance, "d.e" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "d.e" );
+	}
+
+	@Test(description = "HV-429")
+	public void testValidateValueWithRedefinedDefaultGroupOnMainEntity() {
+		Validator validator = getValidator();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validateValue( A.class, "c.id", "aaa" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "c.id" );
+	}
+
+	@Test(description = "HV-429")
+	public void testValidateValueWithRedefinedDefaultGroupOnSuperClass() {
+		Validator validator = getValidator();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validateValue( A.class, "d.e", "aa" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "d.e" );
+	}
+
+	@Test(description = "HV-376")
+	public void testValidatePropertyWithCurrencySymbol() {
+		Validator validator = getValidator();
+		Ticket testInstance = new Ticket();
+		Set<ConstraintViolation<Ticket>> constraintViolations = validator.validateProperty( testInstance, "€price" );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test(description = "HV-376")
+	public void testValidateValueWithCurrencySymbol() {
+		Validator validator = getValidator();
+		Ticket testInstance = new Ticket();
+		Set<ConstraintViolation<Ticket>> constraintViolations = validator.validateValue(
+				Ticket.class, "€price", testInstance.€price
+		);
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test(description = "HV-208")
+	public void testPropertyPathDoesNotStartWithLeadingDot() {
+		Validator validator = getValidator();
+		A testInstance = new A();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "b" );
+	}
+
+	@Test(description = "HV-372")
+	public void testHasBoolean() {
+		Validator validator = getValidator();
+		BeanDescriptor beanDescr = validator.getConstraintsForClass( B.class );
+		assertTrue( beanDescr.isBeanConstrained() );
+	}
+
+	@Test(description = "HV-466")
+	public void testValidateInterfaceConstraintsAreValidatedOneTime() {
+		CountValidationCallsValidator.init();
+		Set<ConstraintViolation<H>> constraintViolations = getValidator().validate( new H() );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+		assertEquals( CountValidationCallsValidator.getNumberOfValidationCall(), 2 );
+	}
+
+	@Test(description = "HV-466")
+	public void testValidatePropertyInterfaceConstraintsAreValidatedOneTime() {
+		CountValidationCallsValidator.init();
+		Set<ConstraintViolation<H>> constraintViolations = getValidator().validateProperty( new H(), "foo" );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+		assertEquals( CountValidationCallsValidator.getNumberOfValidationCall(), 1 );
+	}
+
+	@Test(description = "HV-466")
+	public void testValidateValueInterfaceConstraintsAreValidatedOneTime() {
+		CountValidationCallsValidator.init();
+		Set<ConstraintViolation<H>> constraintViolations = getValidator().validateValue( H.class, "foo", null );
+
+		assertNumberOfViolations( constraintViolations, 0 );
+		assertEquals( CountValidationCallsValidator.getNumberOfValidationCall(), 1 );
+	}
+
+	@Test(description = "HV-468")
+	public void testPropertyPath() {
+		Validator validator = getValidator();
+		Foo foo = new Foo();
+		Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( foo );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "bar[0].alwaysNull" );
+	}
+
+	@Test
+	public void testConstraintDefinedOnEntityNotFollowingBeanNotation() {
+		CountValidationCallsValidator.init();
+		Set<ConstraintViolation<NotFollowingJavaBeanNotation>> constraintViolations = getValidator().validate( new NotFollowingJavaBeanNotation() );
+
+		// validating the whole entity
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, NotNull.class );
+
+		// using validateProperty (which is used by JSF) to validate explicitly
+		constraintViolations = getValidator().validateProperty( new NotFollowingJavaBeanNotation(), "m_foo" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintTypes( constraintViolations, NotNull.class );
+
+	    // using validateProperty (which is used by JSF) to validate explicitly (no violation, because there is no
+		// property foo Validator knows about
+		constraintViolations = getValidator().validateProperty( new NotFollowingJavaBeanNotation(), "foo" );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	class A {
+		@NotNull
+		String b;
+
+		@Valid
+		C c;
+
+		@Valid
+		D d;
+	}
+
+	class B {
+		private boolean b;
+
+		@AssertTrue
+		public boolean hasB() {
+			return b;
+		}
+	}
+
+	@GroupSequence( { TestGroup.class, C.class })
+	class C {
+		@Pattern(regexp = "[0-9]+", groups = TestGroup.class)
+		@Length(min = 2)
+		String id;
+
+		C(String id) {
+			this.id = id;
+		}
+	}
+
+	@GroupSequence( { TestGroup.class, E.class })
+	class E {
+		String e;
+
+		E(String e) {
+			this.e = e;
+		}
+
+		@Pattern(regexp = "[0-9]+", groups = TestGroup.class)
+		public String getE() {
+			return e;
+		}
+	}
+
+	class D extends E {
+		D(String e) {
+			super( e );
+		}
+
+		@Length(min = 2)
+		public String getE() {
+			return super.getE();
+		}
+	}
+
+	class Ticket {
+		@NotNull
+		Float €price;
+	}
+
+	interface TestGroup {
+	}
+
+	interface F {
+		@CountValidationCalls
+		String getFoo();
+
+		@CountValidationCalls
+		String getBar();
+	}
+
+	class G implements F {
+		public String getFoo() {
+			return null;
+		}
+
+		public String getBar() {
+			return null;
+		}
+	}
+
+	class H extends G implements F {
+	}
+
+
+	class Foo {
+		@Valid
+		private Collection<Bar> bar;
+
+		public Foo() {
+			bar = new ArrayList<Bar>();
+			bar.add( new Bar() );
+		}
+	}
+
+	class Bar {
+		@NotNull
+		String alwaysNull;
+	}
+
+	class NotFollowingJavaBeanNotation {
+		@NotNull
+		String m_foo;
+
+		public String getFoo() {
+			return m_foo;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/cascaded/CascadedClassConstraintTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/cascaded/CascadedClassConstraintTest.java
new file mode 100644
index 0000000..596d9a8
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/cascaded/CascadedClassConstraintTest.java
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.cascaded;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Valid;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CascadedClassConstraintTest {
+
+	@Test
+	@TestForIssue( jiraKey = "HV-509")
+	public void testCascadedValidation() {
+		Validator validator = ValidatorUtil.getValidator();
+		Set<ConstraintViolation<Bar>> violations = validator.validate( new Bar() );
+
+		assertCorrectPropertyPaths( violations, "foos[0]", "foos[1]" );
+	}
+
+	@ValidFoo
+	private static class Foo {
+	}
+
+	private static class Bar {
+		@Valid
+		private List<Foo> foos = Arrays.asList( new Foo(), new Foo() );
+	}
+
+	@Constraint(validatedBy = { ValidFooValidator.class })
+	@Target({ TYPE })
+	@Retention(RUNTIME)
+	public @interface ValidFoo {
+		String message() default "{ValidFoo.message}";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class ValidFooValidator implements ConstraintValidator<ValidFoo, Foo> {
+
+		public void initialize(ValidFoo annotation) {
+		}
+
+		public boolean isValid(Foo foo, ConstraintValidatorContext context) {
+			return false;
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/constraintvalidation/ConstraintValidatorResolutionTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/constraintvalidation/ConstraintValidatorResolutionTest.java
new file mode 100644
index 0000000..18c95f5
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/constraintvalidation/ConstraintValidatorResolutionTest.java
@@ -0,0 +1,243 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.constraintvalidation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Validator;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.GenericConstraintDef;
+import org.hibernate.validator.testutil.TestForIssue;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.TYPE;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getConfiguration;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class ConstraintValidatorResolutionTest {
+
+	private HibernateValidatorConfiguration configuration;
+
+	private ConstraintMapping constraintMapping;
+
+	@BeforeMethod
+	public void setupMapping() {
+
+		configuration = getConfiguration();
+
+		constraintMapping = configuration.createConstraintMapping();
+		configuration.addMapping( constraintMapping );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-623")
+	public void validatorForParametrizedTypeIsCorrectlyResolved() {
+
+		//given
+		constraintMapping.type( Value.class )
+				.constraint(
+						new GenericConstraintDef<ConstraintWithParametrizedValidator>(
+								ConstraintWithParametrizedValidator.class
+						)
+				);
+
+		Validator validator = configuration.buildValidatorFactory().getValidator();
+
+		//when
+		Set<ConstraintViolation<Value<Integer>>> constraintViolations = validator.validate( new Value<Integer>() );
+
+		//then
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-623")
+	public void validatorForRawTypeIsCorrectlyResolved() {
+
+		//given
+		constraintMapping.type( Value.class )
+				.constraint( new GenericConstraintDef<ConstraintWithRawValidator>( ConstraintWithRawValidator.class ) );
+
+		Validator validator = configuration.buildValidatorFactory().getValidator();
+
+		//when
+		Set<ConstraintViolation<Value<Integer>>> constraintViolations = validator.validate( new Value<Integer>() );
+
+		//then
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	/**
+	 * As per the JLS, {@code Value<T>} is a sub-type of of the raw type
+	 * {@code Value}. Therefore
+	 * {@link ParametrizedValidatorForConstraintWithRawAndParametrizedValidator}
+	 * is more specific than
+	 * {@link RawValidatorForConstraintWithRawAndParametrizedValidator}.
+	 *
+	 * @see <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.10.2">JLS</a> (subtyping)
+	 * @see <a href="http://beanvalidation.org/1.1/spec/#typevalidatorresolution">BV spec</a> (constraint validator resolution)
+	 */
+	@Test
+	@TestForIssue(jiraKey = "HV-623")
+
+	public void parametrizedValidatorHasPrecedenceOverRawValidator() {
+
+		//given
+		constraintMapping.type( Value.class )
+				.constraint(
+						new GenericConstraintDef<ConstraintWithRawAndParametrizedValidator>(
+								ConstraintWithRawAndParametrizedValidator.class
+						)
+				);
+
+		Validator validator = configuration.buildValidatorFactory().getValidator();
+
+		//when
+		Set<ConstraintViolation<Value<Integer>>> constraintViolations = validator.validate( new Value<Integer>() );
+
+		//then
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations,
+				"ParametrizedValidatorForConstraintWithRawAndParametrizedValidator"
+		);
+	}
+
+	public class Value<T> {
+	}
+
+	@Target({ TYPE, ANNOTATION_TYPE })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = ParametrizedValidator.class)
+	@Documented
+	public @interface ConstraintWithParametrizedValidator {
+		String message() default "foo";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class ParametrizedValidator
+			implements ConstraintValidator<ConstraintWithParametrizedValidator, Value<?>> {
+
+		@Override
+		public void initialize(ConstraintWithParametrizedValidator constraint) {
+			// nothing to initialize
+		}
+
+		@Override
+		public boolean isValid(Value<?> settingValue, ConstraintValidatorContext context) {
+			return false;
+		}
+	}
+
+	@Target({ TYPE, ANNOTATION_TYPE })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = RawValidator.class)
+	@Documented
+	public @interface ConstraintWithRawValidator {
+		String message() default "foo";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+	}
+
+	@SuppressWarnings("rawtypes")
+	public static class RawValidator implements ConstraintValidator<ConstraintWithRawValidator, Value> {
+
+		@Override
+		public void initialize(ConstraintWithRawValidator constraint) {
+			// nothing to initialize
+		}
+
+		@Override
+		public boolean isValid(Value value, ConstraintValidatorContext context) {
+			return false;
+		}
+	}
+
+	@Target({ TYPE, ANNOTATION_TYPE })
+	@Retention(RetentionPolicy.RUNTIME)
+	@Constraint(validatedBy = {
+			RawValidatorForConstraintWithRawAndParametrizedValidator.class,
+			ParametrizedValidatorForConstraintWithRawAndParametrizedValidator.class
+	})
+	@Documented
+	public @interface ConstraintWithRawAndParametrizedValidator {
+		String message() default "foo";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class ParametrizedValidatorForConstraintWithRawAndParametrizedValidator
+			implements ConstraintValidator<ConstraintWithRawAndParametrizedValidator, Value<?>> {
+
+		@Override
+		public void initialize(ConstraintWithRawAndParametrizedValidator constraint) {
+			// nothing to initialize
+		}
+
+		@Override
+		public boolean isValid(Value<?> value, ConstraintValidatorContext context) {
+			context.disableDefaultConstraintViolation();
+			context.buildConstraintViolationWithTemplate(
+					"ParametrizedValidatorForConstraintWithRawAndParametrizedValidator"
+			).addConstraintViolation();
+			return false;
+		}
+	}
+
+	@SuppressWarnings("rawtypes")
+	public static class RawValidatorForConstraintWithRawAndParametrizedValidator
+			implements ConstraintValidator<ConstraintWithRawAndParametrizedValidator, Value> {
+
+		@Override
+		public void initialize(ConstraintWithRawAndParametrizedValidator constraint) {
+			// nothing to initialize
+		}
+
+		@Override
+		public boolean isValid(Value value, ConstraintValidatorContext context) {
+			context.disableDefaultConstraintViolation();
+			context.buildConstraintViolationWithTemplate( "RawValidatorForConstraintWithRawAndParametrizedValidator" )
+					.addConstraintViolation();
+			return false;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/CustomErrorMessageTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/CustomErrorMessageTest.java
new file mode 100644
index 0000000..b4429d4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/CustomErrorMessageTest.java
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.customerror;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CustomErrorMessageTest {
+	/**
+	 * HV-297
+	 *
+	 * @throws Exception in case the test fails.
+	 */
+	@Test
+	public void testReportAsSingleViolationDoesNotInfluenceCustomError() throws Exception {
+		Validator validator = getValidator();
+		DummyTestClass dummyTestClass = new DummyTestClass();
+
+		Set<ConstraintViolation<DummyTestClass>> constraintViolations = validator.validate( dummyTestClass );
+		assertCorrectConstraintViolationMessages( constraintViolations, IsValidValidator.message );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/DummyTestClass.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/DummyTestClass.java
new file mode 100644
index 0000000..81f7178
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/DummyTestClass.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.internal.engine.customerror;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at IsValid
+public class DummyTestClass {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValid.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValid.java
new file mode 100644
index 0000000..bef8599
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValid.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.customerror;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.NotNull;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at NotNull
+ at Target(TYPE)
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = IsValidValidator.class)
+ at ReportAsSingleViolation
+public @interface IsValid {
+	Class<?>[] groups() default { };
+
+	String message() default "Default error message";
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValidValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValidValidator.java
new file mode 100644
index 0000000..5556889
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/customerror/IsValidValidator.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.customerror;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class IsValidValidator implements ConstraintValidator<IsValid, DummyTestClass> {
+
+	public static final String message = "Custom error message";
+
+
+	public void initialize(IsValid isValid) {
+	}
+
+	public boolean isValid(DummyTestClass dummyTestClass, ConstraintValidatorContext constraintValidatorContext) {
+		constraintValidatorContext.disableDefaultConstraintViolation();
+		constraintValidatorContext.buildConstraintViolationWithTemplate( message )
+				.addConstraintViolation();
+		return false;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/failfast/FailFastTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/failfast/FailFastTest.java
new file mode 100644
index 0000000..9f069c1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/failfast/FailFastTest.java
@@ -0,0 +1,386 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.failfast;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Valid;
+import javax.validation.ValidationException;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.HibernateValidatorFactory;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.NotBlank;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+import org.hibernate.validator.method.MethodConstraintViolationException;
+import org.hibernate.validator.method.MethodValidator;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatingProxy;
+import static org.testng.Assert.fail;
+
+/**
+ * Tests for fail fast mode
+ *
+ * @author Emmanuel Bernard
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ */
+public class FailFastTest {
+	private static final Log log = LoggerFactory.make();
+
+	private final A testInstance = new A();
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastDefaultBehaviour() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 2 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastMethodValidationDefaultBehaviour() {
+
+		TestService service = getValidatingProxy( new TestServiceImpl() );
+
+		try {
+			service.testMethod( " ", null );
+			fail();
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertNumberOfViolations( e.getConstraintViolations(), 3 );
+		}
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastSetOnConfiguration() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastMethodValidationOnConfiguration() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+		final MethodValidator methodValidator = validator.unwrap( MethodValidator.class );
+
+		TestService service = getValidatingProxy( new TestServiceImpl(), methodValidator );
+
+		try {
+			service.testMethod( "a", null );
+			fail();
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+		}
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastSetOnValidatorFactory() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.buildValidatorFactory();
+
+		final Validator validator =
+				factory.unwrap( HibernateValidatorFactory.class )
+						.usingContext()
+						.failFast( true )
+						.getValidator();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastMethodValidationSetOnValidatorFactory() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.buildValidatorFactory();
+
+		final Validator validator =
+				factory.unwrap( HibernateValidatorFactory.class )
+						.usingContext()
+						.failFast( true )
+						.getValidator();
+		final MethodValidator methodValidator = validator.unwrap( MethodValidator.class );
+
+		TestService service = getValidatingProxy( new TestServiceImpl(), methodValidator );
+
+		try {
+			service.testMethod( " ", null );
+			fail();
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+		}
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastSetWithProperty() {
+		// with fail fast
+		HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		ValidatorFactory factory = configuration.addProperty( HibernateValidatorConfiguration.FAIL_FAST, "true" )
+				.buildValidatorFactory();
+
+		Validator validator = factory.getValidator();
+
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 1 );
+
+		// without fail fast
+		configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		factory = configuration.addProperty( HibernateValidatorConfiguration.FAIL_FAST, "false" )
+				.buildValidatorFactory();
+
+		validator = factory.getValidator();
+		constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 2 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastMethodValidationSetWithProperty() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.addProperty( HibernateValidatorConfiguration.FAIL_FAST, "true" )
+				.buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+		final MethodValidator methodValidator = validator.unwrap( MethodValidator.class );
+
+		TestService service = getValidatingProxy( new TestServiceImpl(), methodValidator );
+
+		try {
+			service.testMethod( " ", null );
+			fail();
+		}
+		catch ( MethodConstraintViolationException e ) {
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+		}
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastSetWithInvalidProperty() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+
+		//Default fail fast property value is false
+		final ValidatorFactory factory = configuration.addProperty(
+				HibernateValidatorConfiguration.FAIL_FAST, "not correct"
+		).buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+		Set<ConstraintViolation<A>> constraintViolations = validator.validate( testInstance );
+		assertNumberOfViolations( constraintViolations, 2 );
+	}
+
+	@Test(expectedExceptions = ValidationException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Inconsistent fail fast configuration.*")
+	@TestForIssue(jiraKey = "HV-381")
+	public void testFailFastSetWithInconsistentConfiguration() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+
+		//Default fail fast property value is false
+		final ValidatorFactory factory = configuration.addProperty(
+				HibernateValidatorConfiguration.FAIL_FAST, "false"
+		).failFast( true ).buildValidatorFactory();
+
+		factory.getValidator();
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-550")
+	public void testFailFastComposingConstraints() {
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		final ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();
+
+		final Validator validator = factory.getValidator();
+		Set<ConstraintViolation<FooBar>> constraintViolations = validator.validate( new FooBar() );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages( constraintViolations, "Bar constraint failed!" );
+	}
+
+	public void testFailSafePerformance() {
+		final Validator regularValidator = ValidatorUtil.getConfiguration().buildValidatorFactory().getValidator();
+		final Validator failFastValidator = ValidatorUtil.getConfiguration()
+				.buildValidatorFactory()
+				.unwrap( HibernateValidatorFactory.class )
+				.usingContext()
+				.failFast( true )
+				.getValidator();
+
+		final int loopTime = 50000;
+		for ( int i = 0; i < loopTime; i++ ) {
+			validateBatch( regularValidator );
+		}
+
+		for ( int i = 0; i < loopTime; i++ ) {
+			validateBatch( failFastValidator );
+		}
+
+		long start = System.nanoTime();
+		for ( int i = 0; i < loopTime; i++ ) {
+			validateBatch( regularValidator );
+		}
+		long timeOfRegular = System.nanoTime() - start;
+
+		start = System.nanoTime();
+		for ( int i = 0; i < loopTime; i++ ) {
+			validateBatch( failFastValidator );
+		}
+		long timeOfFailFast = System.nanoTime() - start;
+
+		log.debugf( "Regular = %d\n FailFast: %d", timeOfRegular, timeOfFailFast );
+	}
+
+	private void validateBatch(Validator validator) {
+		validator.validate( buildA() );
+	}
+
+	static int i = 0;
+
+	A buildA() {
+		A a = new A();
+		a.b = "bbb" + i++;
+		a.file = "test" + i++ + ".txt";
+		a.bs.add( buildB() );
+		a.bs.add( buildB() );
+		a.bs.add( buildB() );
+		a.bs.add( buildB() );
+		return a;
+	}
+
+	B buildB() {
+		B b = new B();
+		b.size = 45 + i++;
+		return b;
+	}
+
+	class A {
+		@NotNull
+		String b;
+
+		@NotNull
+		@Email
+		String c;
+
+		@Pattern(regexp = ".*\\.txt$")
+		String file;
+
+		@Valid
+		Set<B> bs = new HashSet<B>();
+	}
+
+	class B {
+		@Min(value = 10)
+		@Max(value = 30)
+		@NotNull
+		Integer size;
+	}
+
+	interface TestService {
+		void testMethod(@Min(2) @NotBlank String param1, @NotNull String param2);
+	}
+
+	class TestServiceImpl implements TestService {
+		public void testMethod(String param1, String param2) {
+		}
+	}
+
+	@FooConstraint
+	public class FooBar {
+	}
+
+	@BarConstraint(message = "Bar constraint failed!")
+	@Target({ TYPE })
+	@Retention(RUNTIME)
+	@Constraint(validatedBy = { FooConstraintValidator.class })
+	public @interface FooConstraint {
+		public abstract String message() default "invalid name";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	@Target({ ANNOTATION_TYPE })
+	@Retention(RUNTIME)
+	@Constraint(validatedBy = { BarConstraintValidator.class })
+	public @interface BarConstraint {
+		public abstract String message() default "invalid name";
+
+		public abstract Class<?>[] groups() default { };
+
+		public abstract Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class BarConstraintValidator implements ConstraintValidator<BarConstraint, FooBar> {
+
+		public void initialize(BarConstraint constraintAnnotation) {
+		}
+
+		public boolean isValid(FooBar value, ConstraintValidatorContext context) {
+			return false;
+		}
+	}
+
+	public static class FooConstraintValidator implements ConstraintValidator<FooConstraint, FooBar> {
+
+		public void initialize(FooConstraint constraintAnnotation) {
+		}
+
+		public boolean isValid(FooBar value, ConstraintValidatorContext context) {
+			throw new RuntimeException( "Should not be executed due to fail fast mode" );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DefaultGroupSequenceProviderTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DefaultGroupSequenceProviderTest.java
new file mode 100644
index 0000000..05069d5
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DefaultGroupSequenceProviderTest.java
@@ -0,0 +1,195 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.defaultgroupsequenceprovider;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupDefinitionException;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodValidator;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class DefaultGroupSequenceProviderTest {
+
+	private static Validator validator;
+
+	private static MethodValidator methodValidator;
+
+	@BeforeClass
+	public static void init() {
+		validator = getValidator();
+		methodValidator = validator.unwrap( MethodValidator.class );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = ".* must be part of the redefined default group sequence."
+	)
+	public void testNullProviderDefaultGroupSequence() {
+		validator.validate( new A() );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = ".* must be part of the redefined default group sequence."
+	)
+	public void testNotValidProviderDefaultGroupSequenceDefinition() {
+		validator.validate( new B() );
+	}
+
+	@Test(
+			expectedExceptions = GroupDefinitionException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: The default group sequence provider defined for .* has the wrong type"
+	)
+	public void testDefinitionOfDefaultGroupSequenceProviderWithWrongType() {
+		validator.validate( new D() );
+	}
+
+	@Test
+	public void testValidateUserProviderDefaultGroupSequence() {
+		User user = new User( "$password" );
+		Set<ConstraintViolation<User>> violations = validator.validate( user );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "must match \"\\w+\"" );
+
+		User admin = new User( "short", true );
+		violations = validator.validate( admin );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "length must be between 10 and 20" );
+	}
+
+	@Test
+	public void testValidatePropertyUserProviderDefaultGroupSequence() {
+		User user = new User( "$password" );
+		Set<ConstraintViolation<User>> violations = validator.validateProperty( user, "password" );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "must match \"\\w+\"" );
+
+		User admin = new User( "short", true );
+		violations = validator.validateProperty( admin, "password" );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "length must be between 10 and 20" );
+	}
+
+	@Test
+	public void testValidateValueUserProviderDefaultGroupSequence() {
+		Set<ConstraintViolation<User>> violations = validator.validateValue(
+				User.class, "password", "$password"
+		);
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "must match \"\\w+\"" );
+	}
+
+	@Test
+	public void testValidateReturnValueProviderDefaultGroupSequence() throws NoSuchMethodException {
+		C c = new CImpl();
+		Method fooMethod = C.class.getDeclaredMethod( "foo", String.class );
+
+		Set<MethodConstraintViolation<C>> violations = methodValidator.validateReturnValue(
+				c, fooMethod, c.foo( null )
+		);
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+
+		violations = methodValidator.validateReturnValue( c, fooMethod, c.foo( "foo" ) );
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "length must be between 10 and 20" );
+	}
+
+	@GroupSequenceProvider(NullGroupSequenceProvider.class)
+	private static class A {
+		@NotNull
+		String c;
+
+		@NotNull(groups = TestGroup.class)
+		String d;
+	}
+
+	@GroupSequenceProvider(InvalidGroupSequenceProvider.class)
+	private static class B {
+	}
+
+	private static interface C {
+
+		@NotNull(message = "may not be null")
+		@Length(min = 10, max = 20, groups = TestGroup.class, message = "length must be between {min} and {max}")
+		public String foo(String param);
+	}
+
+	@GroupSequenceProvider(MethodGroupSequenceProvider.class)
+	private static class CImpl implements C {
+
+		public String foo(String param) {
+			return param;
+		}
+	}
+
+	@GroupSequenceProvider(NullGroupSequenceProvider.class)
+	private static class D {
+	}
+
+	private interface TestGroup {
+	}
+
+	public static class MethodGroupSequenceProvider implements DefaultGroupSequenceProvider<CImpl> {
+
+		public List<Class<?>> getValidationGroups(CImpl object) {
+			return Arrays.asList( TestGroup.class, CImpl.class );
+		}
+	}
+
+	public static class NullGroupSequenceProvider implements DefaultGroupSequenceProvider<A> {
+
+		public List<Class<?>> getValidationGroups(A object) {
+			return null;
+		}
+	}
+
+	public static class InvalidGroupSequenceProvider implements DefaultGroupSequenceProvider<B> {
+
+		public List<Class<?>> getValidationGroups(B object) {
+			List<Class<?>> defaultGroupSequence = new ArrayList<Class<?>>();
+			defaultGroupSequence.add( TestGroup.class );
+
+			return defaultGroupSequence;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DynamicGroupSequenceProvider.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DynamicGroupSequenceProvider.java
new file mode 100644
index 0000000..33bc127
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/DynamicGroupSequenceProvider.java
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.defaultgroupsequenceprovider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.validator.group.DefaultGroupSequenceProvider;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class DynamicGroupSequenceProvider implements DefaultGroupSequenceProvider<User> {
+
+	public List<Class<?>> getValidationGroups(User user) {
+		List<Class<?>> defaultGroupSequence = new ArrayList<Class<?>>();
+		defaultGroupSequence.add( User.class );
+
+		if ( user != null && user.isAdmin() ) {
+			defaultGroupSequence.add( StrongCheck.class );
+		}
+
+		return defaultGroupSequence;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/StrongCheck.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/StrongCheck.java
new file mode 100644
index 0000000..b183768
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/StrongCheck.java
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.defaultgroupsequenceprovider;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public interface StrongCheck {
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/User.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/User.java
new file mode 100644
index 0000000..06dcc86
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/User.java
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.defaultgroupsequenceprovider;
+
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+ at GroupSequenceProvider(DynamicGroupSequenceProvider.class)
+public class User {
+
+	private boolean admin;
+
+	//Define message to avoid comparison problem with validation error message
+	//with a different locale than en
+	@Pattern(regexp = "\\w+", message = "must match \"{regexp}\"")
+	@Length(min = 10, max = 20, message = "length must be between {min} and {max}", groups = StrongCheck.class)
+	private String password;
+
+	public User(String password) {
+		this( password, false );
+	}
+
+	public User(String password, boolean admin) {
+		this.password = password;
+		this.admin = admin;
+	}
+
+	public boolean isAdmin() {
+		return admin;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/GroupInheritanceTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/GroupInheritanceTest.java
new file mode 100644
index 0000000..5ed9aee
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/GroupInheritanceTest.java
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.inheritance;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class GroupInheritanceTest {
+
+	/**
+	 * HV-288
+	 */
+	@Test
+	public void testGroupInheritanceWithinGroupSequence() {
+		Validator validator = ValidatorUtil.getValidator();
+		Try tryMe = new Try();
+		tryMe.field2 = "foo";
+		tryMe.field3 = "bar";
+
+		Set<ConstraintViolation<Try>> violations = validator.validate( tryMe, Try.GlobalCheck.class );
+		assertCorrectConstraintViolationMessages( violations, "field1" );
+	}
+
+	/**
+	 * HV-353
+	 */
+	@Test
+	public void testGroupInheritance() {
+		Validator validator = ValidatorUtil.getValidator();
+		Try tryMe = new Try();
+		tryMe.field3 = "foo";
+
+		Set<ConstraintViolation<Try>> violations = validator.validate( tryMe, Try.Component.class );
+		assertNumberOfViolations( violations, 2 );
+		assertCorrectConstraintViolationMessages( violations, "field1", "field2" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/Try.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/Try.java
new file mode 100644
index 0000000..6560aac
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/inheritance/Try.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.inheritance;
+
+import javax.validation.GroupSequence;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Try {
+	@NotNull(message = "field1", groups = BaseComponent.class)
+	public String field1;
+
+	@NotNull(message = "field2", groups = Component.class)
+	public String field2;
+
+	@NotNull(message = "field3", groups = OtherComponent.class)
+	public String field3;
+
+	public interface BaseComponent {
+	}
+
+	public interface Component extends BaseComponent {
+	}
+
+	public interface OtherComponent {
+	}
+
+	@GroupSequence({ Component.class, OtherComponent.class })
+	public interface GlobalCheck {
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Car.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Car.java
new file mode 100644
index 0000000..a59694d
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Car.java
@@ -0,0 +1,112 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import javax.validation.Valid;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * An example entity class enriched with constraint annotations from
+ * the Bean Validation API (<a href="http://jcp.org/en/jsr/detail?id=303">JSR
+ * 303</a>). Have a look at {@link org.hibernate.validator.quickstart.CarTest} to learn, how the Bean Validation
+ * API can be used to validate {@code Car} instances.
+ *
+ * @author Gunnar Morling
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class Car {
+
+	//The definition of the message in the constraints is just for testing purpose.
+	//In a real world scenario you would place your messages into resource bundles.
+
+	/**
+	 * By annotating the field with @NotNull we specify, that null is not a valid
+	 * value.
+	 */
+	@NotNull(message = "may not be null")
+	private String manufacturer;
+
+	/**
+	 * This String field shall not only not allowed to be null, it shall also between
+	 * 2 and 14 characters long.
+	 */
+	@NotNull
+	@Size(min = 2, max = 14, message = "size must be between {min} and {max}")
+	private String licensePlate;
+
+	/**
+	 * This int field shall have a value of at least 2.
+	 */
+	@Min(value = 2, message = "must be greater than or equal to {value}")
+	private int seatCount;
+
+	@AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
+	private boolean passedVehicleInspection;
+
+	@Valid
+	private Driver driver;
+
+	public Car(String manufacturer, String licencePlate, int seatCount) {
+		this.manufacturer = manufacturer;
+		this.licensePlate = licencePlate;
+		this.seatCount = seatCount;
+	}
+
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	public String getLicensePlate() {
+		return licensePlate;
+	}
+
+	public void setLicensePlate(String licensePlate) {
+		this.licensePlate = licensePlate;
+	}
+
+	public int getSeatCount() {
+		return seatCount;
+	}
+
+	public void setSeatCount(int seatCount) {
+		this.seatCount = seatCount;
+	}
+
+	public boolean getPassedVehicleInspection() {
+		return passedVehicleInspection;
+	}
+
+	public void setPassedVehicleInspection(boolean passed) {
+		this.passedVehicleInspection = passed;
+	}
+
+	public Driver getDriver() {
+		return driver;
+	}
+
+	public void setDriver(Driver driver) {
+		this.driver = driver;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/CarChecks.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/CarChecks.java
new file mode 100644
index 0000000..fd008d0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/CarChecks.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface CarChecks {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Driver.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Driver.java
new file mode 100644
index 0000000..aed7b9b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Driver.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Min;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Driver extends Person {
+	@Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class)
+	private int age;
+
+	@AssertTrue(message = "You first have to pass the driving test", groups = DriverChecks.class)
+	private boolean hasDrivingLicense;
+
+	public Driver(String name) {
+		super( name );
+	}
+
+	public void passedDrivingTest(boolean b) {
+		hasDrivingLicense = b;
+	}
+
+	public int getAge() {
+		return age;
+	}
+
+	public void setAge(int age) {
+		this.age = age;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/DriverChecks.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/DriverChecks.java
new file mode 100644
index 0000000..1dba6bf
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/DriverChecks.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface DriverChecks {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/OrderedChecks.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/OrderedChecks.java
new file mode 100644
index 0000000..3a0d18f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/OrderedChecks.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import javax.validation.GroupSequence;
+import javax.validation.groups.Default;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence({ Default.class, CarChecks.class, DriverChecks.class })
+public interface OrderedChecks {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Person.java
new file mode 100644
index 0000000..10c73db
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/Person.java
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Person {
+	@NotNull
+	private String name;
+
+	public Person(String name) {
+		super();
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RedefiningDefaultGroupTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RedefiningDefaultGroupTest.java
new file mode 100644
index 0000000..7550e43
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RedefiningDefaultGroupTest.java
@@ -0,0 +1,384 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupSequence;
+import javax.validation.Validator;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.groups.Default;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectPropertyPaths;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class RedefiningDefaultGroupTest {
+
+	private static Validator validator;
+
+	@BeforeClass
+	public static void setUp() {
+		validator = getValidator();
+	}
+
+	@Test
+	public void testDriveAway() {
+		// create a car and check that everything is ok with it.
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// but has it passed the vehicle inspection?
+		constraintViolations = validator.validate( car, CarChecks.class );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations,
+				"The car has to pass the vehicle inspection first"
+		);
+
+		// let's go to the vehicle inspection
+		car.setPassedVehicleInspection( true );
+		constraintViolations = validator.validate( car );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// now let's add a driver. He is 18, but has not passed the driving test yet
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		car.setDriver( john );
+		constraintViolations = validator.validate( car, DriverChecks.class );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations,
+				"You first have to pass the driving test"
+		);
+
+		// ok, John passes the test
+		john.passedDrivingTest( true );
+		constraintViolations = validator.validate( car, DriverChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// just checking that everything is in order now
+		constraintViolations = validator.validate( car, Default.class, CarChecks.class, DriverChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	@Test
+	public void testValidatePropertyDriveAway() {
+		// create a car and check that everything is ok with it.
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		Set<ConstraintViolation<Car>> constraintViolations = validator.validateProperty( car, "manufacturer" );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		constraintViolations = validator.validateProperty( car, "licensePlate" );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		constraintViolations = validator.validateProperty( car, "seatCount" );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// but has it passed the vehicle inspection?
+		constraintViolations = validator.validateProperty( car, "passedVehicleInspection", CarChecks.class );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations,
+				"The car has to pass the vehicle inspection first"
+		);
+
+		// let's go to the vehicle inspection
+		car.setPassedVehicleInspection( true );
+		constraintViolations = validator.validateProperty( car, "passedVehicleInspection", CarChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		// now let's add a driver. He is 18, but has not passed the driving test yet
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		car.setDriver( john );
+
+		constraintViolations = validator.validateProperty( car, "driver.name", CarChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		constraintViolations = validator.validateProperty( car, "driver.age", CarChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+
+		constraintViolations = validator.validateProperty( car, "driver.hasDrivingLicense", DriverChecks.class );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations,
+				"You first have to pass the driving test"
+		);
+
+		// ok, John passes the test
+		john.passedDrivingTest( true );
+		constraintViolations = validator.validateProperty( car, "driver.hasDrivingLicense", DriverChecks.class );
+		assertNumberOfViolations( constraintViolations, 0 );
+	}
+
+	@Test
+	public void testOrderedChecks() {
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		car.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		car.setDriver( john );
+
+		assertNumberOfViolations( validator.validate( car, OrderedChecks.class ), 0 );
+	}
+
+	@Test
+	public void testValidatePropertyOrderedChecks() {
+		Car car = new Car( "Morris", "DD-AB-123", 2 );
+		car.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		car.setDriver( john );
+
+		assertNumberOfViolations( validator.validateProperty( car, "manufacturer", OrderedChecks.class ), 0 );
+		assertNumberOfViolations( validator.validateProperty( car, "licensePlate", OrderedChecks.class ), 0 );
+		assertNumberOfViolations(
+				validator.validateProperty( car, "passedVehicleInspection", OrderedChecks.class ), 0
+		);
+		assertNumberOfViolations( validator.validateProperty( car, "seatCount", OrderedChecks.class ), 0 );
+		assertNumberOfViolations( validator.validateProperty( car, "driver.name", OrderedChecks.class ), 0 );
+		assertNumberOfViolations( validator.validateProperty( car, "driver.age", OrderedChecks.class ), 0 );
+		assertNumberOfViolations(
+				validator.validateProperty( car, "driver.hasDrivingLicense", OrderedChecks.class ), 0
+		);
+	}
+
+	@Test
+	public void testOrderedChecksWithRedefinedDefault() {
+		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
+		rentalCar.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		rentalCar.setDriver( john );
+
+		assertNumberOfViolations( validator.validate( rentalCar, Default.class, DriverChecks.class ), 0 );
+	}
+
+	@Test
+	public void testValidatePropertyOrderedChecksWithRedefinedDefault() {
+		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 2 );
+		rentalCar.setPassedVehicleInspection( true );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		rentalCar.setDriver( john );
+
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "manufacturer", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "licensePlate", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "passedVehicleInspection", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "seatCount", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "driver.name", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "driver.age", Default.class, DriverChecks.class
+				), 0
+		);
+		assertNumberOfViolations(
+				validator.validateProperty(
+						rentalCar, "driver.hasDrivingLicense", Default.class, DriverChecks.class
+				), 0
+		);
+	}
+
+	@Test
+	public void testOrderedChecksFailsFast() {
+		RentalCar rentalCar = new RentalCar( "Morris", "DD-AB-123", 0 );
+
+		// this should not create a violation exception due to the 0 seat count failing first due to the GroupSequence on RentalCar
+		rentalCar.setPassedVehicleInspection( false );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		rentalCar.setDriver( john );
+
+		Set<ConstraintViolation<RentalCar>> constraintViolations = validator.validate( rentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+
+		rentalCar.setSeatCount( 4 );
+		constraintViolations = validator.validate( rentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "passedVehicleInspection" );
+	}
+
+	@Test
+	public void testValidatePropertyOrderedChecksFailsFast() {
+		BigRentalCar bigRentalCar = new BigRentalCar( "Morris", "DD-AB-123", 0 );
+
+		// this should cause only one constraint violation due to the GroupSequence on BigRentalCar
+		Set<ConstraintViolation<BigRentalCar>> constraintViolations = validator.validateProperty(
+				bigRentalCar, "seatCount"
+		);
+
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+		assertCorrectConstraintViolationMessages( constraintViolations, "must be greater than or equal to 2" );
+	}
+
+	@Test
+	public void testSubclassesInheritGroupSequence() {
+		// our assertion here is based around Item C from Section 3.4.5 of the JSR 303 Validation Spec that class X
+		// (MiniRentalCar) without explicitly defining a Default group would then inherit it's super class "Default"
+		// constraints along with it's own attribute level constraints not explicitly tied to a group other than Default.
+		MiniRentalCar miniRentalCar = new MiniRentalCar( "Morris", "DD-AB-123", 0 );
+
+		// this should not create a violation exception due to the 0 seat count.
+		miniRentalCar.setPassedVehicleInspection( false );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		miniRentalCar.setDriver( john );
+
+		Set<ConstraintViolation<MiniRentalCar>> constraintViolations = validator.validate( miniRentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+
+		miniRentalCar.setSeatCount( 4 );
+		constraintViolations = validator.validate( miniRentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "passedVehicleInspection" );
+	}
+
+	@Test
+	public void testValidatePropertySubclassesInheritGroupSequence() {
+		MiniRentalCar miniRentalCar = new MiniRentalCar( "Morris", "DD-AB-123", 3 );
+		miniRentalCar.setPassedVehicleInspection( false );
+
+		// this should cause a violation exception due to the default group sequence redefined on the Rental car class
+		Set<ConstraintViolation<MiniRentalCar>> constraintViolations = validator.validateProperty(
+				miniRentalCar, "passedVehicleInspection"
+		);
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "passedVehicleInspection" );
+	}
+
+	@Test
+	public void testExplicitGroupSequenceOnSubclass() {
+		// with the testSubclassesInheritGroupSequence test failing, we then try a similar test case whereby we
+		// explicitly set the Default group for this class.
+		AnotherMiniRentalCar anotherMiniRentalCar = new AnotherMiniRentalCar( "Morris", "DD-AB-123", 0 );
+
+		// this should not create a violation exception due to the 0 seat count.
+		anotherMiniRentalCar.setPassedVehicleInspection( false );
+
+		Driver john = new Driver( "John Doe" );
+		john.setAge( 18 );
+		john.passedDrivingTest( true );
+		anotherMiniRentalCar.setDriver( john );
+
+		Set<ConstraintViolation<AnotherMiniRentalCar>> constraintViolations = validator.validate( anotherMiniRentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+
+		anotherMiniRentalCar.setSeatCount( 6 );
+		constraintViolations = validator.validateProperty( anotherMiniRentalCar, "seatCount" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+	}
+
+	@Test
+	public void testValidatePropertyExplicitGroupSequenceOnSubclass() {
+		AnotherMiniRentalCar anotherMiniRentalCar = new AnotherMiniRentalCar( "Morris", "DD-AB-123", 0 );
+
+		// this should cause only one constraint violation due to the default group sequence redefined on the AnotherMiniRentalCar class.
+		Set<ConstraintViolation<AnotherMiniRentalCar>> constraintViolations = validator.validate( anotherMiniRentalCar );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+
+		constraintViolations = validator.validateProperty( anotherMiniRentalCar, "seatCount" );
+		assertNumberOfViolations( constraintViolations, 1 );
+		assertCorrectPropertyPaths( constraintViolations, "seatCount" );
+	}
+
+	private class MiniRentalCar extends RentalCar {
+		MiniRentalCar(String manufacturer, String licencePlate, int seatCount) {
+			super( manufacturer, licencePlate, seatCount );
+		}
+
+		@Override
+		@Max(value = 4)
+		public int getSeatCount() {
+			return super.getSeatCount();
+		}
+	}
+
+	@GroupSequence( { AnotherMiniRentalCar.class, CarChecks.class })
+	private class AnotherMiniRentalCar extends RentalCar {
+		AnotherMiniRentalCar(String manufacturer, String licencePlate, int seatCount) {
+			super( manufacturer, licencePlate, seatCount );
+		}
+
+		@Override
+		@Max(value = 4, groups = CarChecks.class)
+		public int getSeatCount() {
+			return super.getSeatCount();
+		}
+	}
+
+	@GroupSequence( { BigRentalCar.class, CarChecks.class })
+	private class BigRentalCar extends RentalCar {
+		BigRentalCar(String manufacturer, String licencePlate, int seatCount) {
+			super( manufacturer, licencePlate, seatCount );
+		}
+
+		@Override
+		@Min(value = 4, groups = CarChecks.class)
+		public int getSeatCount() {
+			return super.getSeatCount();
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RentalCar.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RentalCar.java
new file mode 100644
index 0000000..a5696ef
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/redefiningdefaultgroup/RentalCar.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.redefiningdefaultgroup;
+
+import javax.validation.GroupSequence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence({ RentalCar.class, CarChecks.class })
+public class RentalCar extends Car {
+	public RentalCar(String manufacturer, String licencePlate, int seatCount) {
+		super( manufacturer, licencePlate, seatCount );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/First.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/First.java
new file mode 100644
index 0000000..c734d29
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/First.java
@@ -0,0 +1,25 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * Group executed first in the validation
+ *
+ * @author Emmanuel Bernard
+ */
+public interface First {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupA.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupA.java
new file mode 100644
index 0000000..5114288
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupA.java
@@ -0,0 +1,9 @@
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * @author Hardy Ferentschik
+ */
+interface GroupA {
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupB.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupB.java
new file mode 100644
index 0000000..3748ec1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/GroupB.java
@@ -0,0 +1,9 @@
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * @author Hardy Ferentschik
+ */
+interface GroupB {
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Last.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Last.java
new file mode 100644
index 0000000..5ddafe2
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Last.java
@@ -0,0 +1,25 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * Group executed Last in the validation
+ *
+ * @author Emmanuel Bernard
+ */
+public interface Last {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Second.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Second.java
new file mode 100644
index 0000000..8eb94b1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/Second.java
@@ -0,0 +1,25 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * Group executed second during the validation
+ *
+ * @author Emmanuel Bernard
+ */
+public interface Second {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/TestSequence.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/TestSequence.java
new file mode 100644
index 0000000..16cc254
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/TestSequence.java
@@ -0,0 +1,9 @@
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+/**
+ * @author Hardy Ferentschik
+ */
+interface TestSequence {
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/ValidationOrderTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/ValidationOrderTest.java
new file mode 100644
index 0000000..f2dba45
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationorder/ValidationOrderTest.java
@@ -0,0 +1,138 @@
+package org.hibernate.validator.test.internal.engine.groups.validationorder;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.validation.GroupDefinitionException;
+import javax.validation.groups.Default;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.groups.DefaultValidationOrder;
+import org.hibernate.validator.internal.engine.groups.Group;
+import org.hibernate.validator.internal.engine.groups.Sequence;
+
+import static org.testng.FileAssert.fail;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ValidationOrderTest {
+	@Test
+	public void testAssertDefaultGroupSequenceIsExpandableWithDefaultAtEndOfSequence() {
+		// create a dummy sequence
+		Group a = new Group( GroupA.class );
+		Group b = new Group( GroupB.class );
+		Group c = new Group( GroupC.class );
+		Group defaultGroup = new Group( Default.class );
+
+		List<Group> sequence = new ArrayList<Group>();
+		sequence.add( a );
+		sequence.add( b );
+		sequence.add( c );
+		sequence.add( defaultGroup );
+
+		DefaultValidationOrder chain = new DefaultValidationOrder();
+		chain.insertSequence( new Sequence( TestSequence.class, sequence ) );
+
+		// create test default sequence
+		List<Class<?>> defaultSequence = new ArrayList<Class<?>>();
+		defaultSequence.add( Default.class );
+		defaultSequence.add( GroupA.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+
+		defaultSequence.clear();
+		defaultSequence.add( GroupA.class );
+		defaultSequence.add( Default.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+
+		defaultSequence.clear();
+		defaultSequence.add( Default.class );
+		defaultSequence.add( GroupC.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+
+		defaultSequence.clear();
+		defaultSequence.add( GroupC.class );
+		defaultSequence.add( Default.class );
+		chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+	}
+
+
+	@Test
+	public void testAssertDefaultGroupSequenceIsExpandableWithDefaultAtBeginningOfSequence() {
+		// create a dummy sequence
+		Group a = new Group( GroupA.class );
+		Group b = new Group( GroupB.class );
+		Group c = new Group( GroupC.class );
+		Group defaultGroup = new Group( Default.class );
+
+		List<Group> sequence = new ArrayList<Group>();
+		sequence.add( defaultGroup );
+		sequence.add( a );
+		sequence.add( b );
+		sequence.add( c );
+
+		DefaultValidationOrder chain = new DefaultValidationOrder();
+		chain.insertSequence( new Sequence( TestSequence.class, sequence ) );
+
+		// create test default sequence
+		List<Class<?>> defaultSequence = new ArrayList<Class<?>>();
+		defaultSequence.add( Default.class );
+		defaultSequence.add( GroupA.class );
+		chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+
+
+		defaultSequence.clear();
+		defaultSequence.add( GroupA.class );
+		defaultSequence.add( Default.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+
+		defaultSequence.clear();
+		defaultSequence.add( Default.class );
+		defaultSequence.add( GroupC.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+
+		defaultSequence.clear();
+		defaultSequence.add( GroupC.class );
+		defaultSequence.add( Default.class );
+		try {
+			chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
+			fail();
+		}
+		catch ( GroupDefinitionException e ) {
+			// success
+		}
+	}
+}
+
+interface GroupC {
+}
\ No newline at end of file
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/Address.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/Address.java
new file mode 100644
index 0000000..e30d0e3
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/Address.java
@@ -0,0 +1,80 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import javax.validation.GroupSequence;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import javax.validation.groups.Default;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at GroupSequence({ Address.class, Address.HighLevelCoherence.class })
+ at ZipCodeCoherenceChecker(groups = Address.HighLevelCoherence.class)
+public class Address {
+	@NotNull
+	@Size(max = 50)
+	private String street;
+
+	@NotNull
+	@Size(max = 5)
+	private String zipcode;
+
+	@NotNull
+	@Size(max = 30)
+	private String city;
+
+	public String getStreet() {
+		return street;
+	}
+
+	public void setStreet(String street) {
+		this.street = street;
+	}
+
+	public String getZipcode() {
+		return zipcode;
+	}
+
+	public void setZipcode(String zipcode) {
+		this.zipcode = zipcode;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	/**
+	 * Check conherence on the overall object
+	 * Needs basic checking to be green first
+	 */
+	public interface HighLevelCoherence {
+	}
+
+	/**
+	 * Check both basic constraints and high level ones.
+	 * High level constraints are not checked if basic constraints fail.
+	 */
+	@GroupSequence(value = { Default.class, HighLevelCoherence.class })
+	public interface Complete {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence.java
new file mode 100644
index 0000000..2173833
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import javax.validation.GroupSequence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence(value = CyclicGroupSequence.class)
+public interface CyclicGroupSequence {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence1.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence1.java
new file mode 100644
index 0000000..261b2c0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence1.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import javax.validation.GroupSequence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence(value = CyclicGroupSequence2.class)
+public interface CyclicGroupSequence1 {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence2.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence2.java
new file mode 100644
index 0000000..ca9853f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/CyclicGroupSequence2.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import javax.validation.GroupSequence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at GroupSequence(value = CyclicGroupSequence1.class)
+public interface CyclicGroupSequence2 {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ValidationOrderGeneratorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ValidationOrderGeneratorTest.java
new file mode 100644
index 0000000..2ddf442
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ValidationOrderGeneratorTest.java
@@ -0,0 +1,178 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.validation.GroupDefinitionException;
+import javax.validation.GroupSequence;
+import javax.validation.ValidationException;
+import javax.validation.groups.Default;
+
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.groups.Group;
+import org.hibernate.validator.internal.engine.groups.ValidationOrder;
+import org.hibernate.validator.internal.engine.groups.ValidationOrderGenerator;
+import org.hibernate.validator.internal.engine.groups.Sequence;
+import org.hibernate.validator.test.internal.engine.groups.validationorder.First;
+import org.hibernate.validator.test.internal.engine.groups.validationorder.Last;
+import org.hibernate.validator.test.internal.engine.groups.validationorder.Second;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ValidationOrderGeneratorTest {
+
+	ValidationOrderGenerator generator;
+
+	@BeforeTest
+	public void init() {
+		generator = new ValidationOrderGenerator();
+	}
+
+	@Test(expectedExceptions = ValidationException.class)
+	public void testValidationOrderForNonInterface() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( String.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testValidationOrderForNull() {
+		generator.getValidationOrder( null );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testValidationOrderForEmptySet() {
+		generator.getValidationOrder( new HashSet<Class<?>>() );
+	}
+
+	@Test(expectedExceptions = ValidationException.class)
+	public void testCyclicGroupSequences() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( CyclicGroupSequence1.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test(expectedExceptions = ValidationException.class)
+	public void testCyclicGroupSequence() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( CyclicGroupSequence.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test
+	public void testGroupDuplicates() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( First.class );
+		groups.add( Second.class );
+		groups.add( Last.class );
+		ValidationOrder chain = generator.getValidationOrder( groups );
+		int count = countGroups( chain );
+		assertEquals( count, 3, "Wrong number of groups" );
+
+		groups.clear();
+		groups.add( First.class );
+		groups.add( First.class );
+		chain = generator.getValidationOrder( groups );
+		count = countGroups( chain );
+		assertEquals( count, 1, "Wrong number of groups" );
+
+		groups.clear();
+		groups.add( First.class );
+		groups.add( Last.class );
+		groups.add( First.class );
+		chain = generator.getValidationOrder( groups );
+		count = countGroups( chain );
+		assertEquals( count, 2, "Wrong number of groups" );
+	}
+
+	@Test(expectedExceptions = GroupDefinitionException.class)
+	public void testGroupDefiningSequencePartOfGroupComposingSequence() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( Sequence1.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test(expectedExceptions = GroupDefinitionException.class)
+	public void testUnexpandableSequence() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( Sequence3.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test
+	public void testExpandableSequenceWithInheritance() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( Sequence4.class );
+		generator.getValidationOrder( groups );
+	}
+
+	@Test
+	public void testSequenceResolution() {
+		Set<Class<?>> groups = new HashSet<Class<?>>();
+		groups.add( Address.Complete.class );
+		ValidationOrder chain = generator.getValidationOrder( groups );
+		Iterator<Sequence> sequences = chain.getSequenceIterator();
+		List<Group> sequence = sequences.next().getComposingGroups();
+
+		assertEquals( sequence.get( 0 ).getDefiningClass(), Default.class, "Wrong group" );
+		assertEquals( sequence.get( 1 ).getDefiningClass(), Address.HighLevelCoherence.class, "Wrong group" );
+	}
+
+	private int countGroups(ValidationOrder chain) {
+		Iterator<Group> groupIterator = chain.getGroupIterator();
+		int count = 0;
+		while ( groupIterator.hasNext() ) {
+			groupIterator.next();
+			count++;
+		}
+		return count;
+	}
+
+
+	interface GroupA extends Default {
+	}
+
+	interface GroupB {
+	}
+
+	interface GroupC extends Sequence2 {
+	}
+
+	@GroupSequence({ GroupA.class, GroupC.class })
+	interface Sequence1 {
+	}
+
+	@GroupSequence({ GroupB.class, GroupA.class })
+	interface Sequence2 {
+	}
+
+	@GroupSequence({ Sequence2.class, GroupB.class })
+	interface Sequence3 {
+	}
+
+	@GroupSequence({ Sequence2.class, GroupA.class })
+	interface Sequence4 {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceChecker.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceChecker.java
new file mode 100644
index 0000000..90ca4b4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceChecker.java
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Target({ TYPE, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+ at Constraint(validatedBy = ZipCodeCoherenceValidator.class)
+public @interface ZipCodeCoherenceChecker {
+	public abstract String message() default "{validator.zipCodeCoherenceChecker}";
+
+	public abstract Class<?>[] groups() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceValidator.java
new file mode 100644
index 0000000..b5499a7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/validationordergenerator/ZipCodeCoherenceValidator.java
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.groups.validationordergenerator;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ZipCodeCoherenceValidator implements ConstraintValidator<ZipCodeCoherenceChecker, Address> {
+
+	public void initialize(ZipCodeCoherenceChecker parameters) {
+	}
+
+	public boolean isValid(Address value, ConstraintValidatorContext constraintValidatorContext) {
+		return false;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationTest.java
new file mode 100644
index 0000000..691a4dc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationTest.java
@@ -0,0 +1,172 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import java.io.ByteArrayInputStream;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+import javax.validation.Configuration;
+import javax.validation.Constraint;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.ConstraintViolation;
+import javax.validation.Payload;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
+import org.hibernate.validator.resourceloading.ResourceBundleLocator;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class MessageInterpolationTest {
+	private Validator validator;
+
+	@BeforeClass
+	public void createValidator() throws Exception {
+		final StringBuilder lines = new StringBuilder();
+		lines.append( "bar=Message is \\\\{escaped\\\\}" ).append( "\r\n" );
+		lines.append( "baz=Message is US$ {value}" ).append( "\r\n" );
+		lines.append( "buz=Message is {values}" ).append( "\r\n" );
+		lines.append( "qux=Message is {missing}" ).append( "\r\n" );
+		lines.append( "escaped=wrong" ).append( "\r\n" );
+		final ResourceBundle bundle = new PropertyResourceBundle(
+				new ByteArrayInputStream( lines.toString().getBytes() )
+		);
+		Configuration<?> config = Validation.byDefaultProvider()
+				.configure()
+				.messageInterpolator(
+						new ResourceBundleMessageInterpolator(
+								new ResourceBundleLocator() {
+
+									public ResourceBundle getResourceBundle(
+											Locale locale) {
+										return bundle;
+									}
+
+								}
+						)
+				);
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		validator = factory.getValidator();
+	}
+
+	@Test(description = "HV-184")
+	public void testCurlyBracesEscapingShouldBeRespected() {
+		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Bar.class ).iterator().next();
+		assertEquals( violation.getMessage(), "Message is {escaped}" );
+	}
+
+	@Test(description = "HV-184")
+	public void testAppendReplacementNeedsToEscapeBackslashAndDollarSign() {
+		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Baz.class ).iterator().next();
+		assertEquals( violation.getMessage(), "Message is US$ 5" );
+	}
+
+	@Test(description = "HV-184")
+	public void testUnknownParametersShouldBePreserved() {
+		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Qux.class ).iterator().next();
+		assertEquals( violation.getMessage(), "Message is {missing}" );
+	}
+
+	@Test(description = "HV-506")
+	public void testInterpolationOfArrayParameter() {
+		final ConstraintViolation<Foo> violation = validator.validate( new Foo(), Buz.class ).iterator().next();
+		assertEquals( violation.getMessage(), "Message is [bar, baz, qux]" );
+	}
+
+	public static interface Bar {
+	}
+
+	public static interface Baz {
+	}
+
+	public static interface Buz {
+	}
+
+	public static interface Qux {
+	}
+
+	@Target(METHOD)
+	@Retention(RUNTIME)
+	@Constraint(validatedBy = AllowedValuesValidator.class)
+	public static @interface AllowedValues {
+		String[] values();
+
+		String message() default "{buz}";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+	}
+
+	public static class AllowedValuesValidator implements ConstraintValidator<AllowedValues, String> {
+
+		private List<String> values;
+
+		public void initialize(AllowedValues values) {
+			this.values = Arrays.asList( values.values() );
+		}
+
+		public boolean isValid(String value, ConstraintValidatorContext context) {
+			if ( value == null ) {
+				return true;
+			}
+			return values.contains( value );
+		}
+	}
+
+	public static class Foo {
+		@NotNull(message = "{bar}", groups = Bar.class)
+		public String getBar() {
+			return null;
+		}
+
+		@Min(value = 5, message = "{baz}", groups = Baz.class)
+		public int getBaz() {
+			return 0;
+		}
+
+		@AllowedValues(values = { "bar", "baz", "qux" }, groups = Buz.class)
+		public String getBuz() {
+			return "buz";
+		}
+
+		@NotNull(message = "{qux}", groups = Qux.class)
+		public String getQux() {
+			return null;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java
new file mode 100644
index 0000000..e3a522c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolationWithDefaultBundleTest.java
@@ -0,0 +1,142 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import java.util.Locale;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * Tests for correct message interpolation for messages from the default bundle.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class MessageInterpolationWithDefaultBundleTest {
+	private Locale defaultLocale;
+
+	@BeforeClass
+	public void storeDefaultLocale() {
+		defaultLocale = Locale.getDefault();
+	}
+
+	@AfterClass
+	public void restoreDefaultLocale() {
+		Locale.setDefault( defaultLocale );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-268")
+	public void testEmailAndRangeMessageEnglishLocale() {
+		Configuration<?> config = ValidatorUtil.getConfiguration( Locale.ENGLISH );
+		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
+		Validator validator = config.buildValidatorFactory().getValidator();
+		User user = new User();
+		user.setEmail( "foo" );
+		user.setAge( 16 );
+		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations, "not a well-formed email address", "must be between 18 and 21"
+		);
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-268")
+	public void testEmailAndRangeMessageGermanLocale() {
+		Configuration<?> config = ValidatorUtil.getConfiguration( Locale.GERMAN );
+		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
+		Validator validator = config.buildValidatorFactory().getValidator();
+		User user = new User();
+		user.setEmail( "foo" );
+		user.setAge( 16 );
+		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations, "keine g\u00FCltige E-Mail-Adresse", "muss zwischen 18 und 21 liegen"
+		);
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-268")
+	public void testEmailAndRangeMessageFrenchLocale() {
+		Configuration<?> config = ValidatorUtil.getConfiguration( Locale.FRENCH );
+		config.messageInterpolator( new ResourceBundleMessageInterpolator() );
+		Validator validator = config.buildValidatorFactory().getValidator();
+		User user = new User();
+		user.setEmail( "foo" );
+		user.setAge( 16 );
+		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations, "Adresse email mal form\u00E9e", "doit \u00EAtre entre 18 et 21"
+		);
+	}
+
+	/**
+	 * HV-306. If English is explicitly set as locale for message interpolation, it
+	 * must take precedence over the system's default locale.
+	 */
+	@Test
+	@TestForIssue(jiraKey = "HV-306")
+	public void testThatExplicitlySetEnglishLocaleHasPrecedenceOverDefaultLocale() {
+		Configuration<?> config = ValidatorUtil.getConfiguration( Locale.FRENCH );
+		config.messageInterpolator( new LocalizedMessageInterpolator( Locale.ENGLISH ) );
+		Validator validator = config.buildValidatorFactory().getValidator();
+		User user = new User();
+		user.setEmail( "foo" );
+		user.setAge( 16 );
+		Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
+		assertNumberOfViolations( constraintViolations, 2 );
+		assertCorrectConstraintViolationMessages(
+				constraintViolations, "not a well-formed email address", "must be between 18 and 21"
+		);
+	}
+
+	/**
+	 * A message interpolator that enforces one given locale to be used for message
+	 * interpolation.
+	 *
+	 * @author Gunnar Morling
+	 */
+	private static class LocalizedMessageInterpolator extends ResourceBundleMessageInterpolator {
+
+		private Locale locale;
+
+		public LocalizedMessageInterpolator(Locale locale) {
+			this.locale = locale;
+		}
+
+		@Override
+		public String interpolate(String messageTemplate, Context context) {
+			return interpolate( messageTemplate, context, this.locale );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolatorContextTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolatorContextTest.java
new file mode 100644
index 0000000..7adb389
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/MessageInterpolatorContextTest.java
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.MessageInterpolator;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.PropertyDescriptor;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.MinDef;
+import org.hibernate.validator.internal.engine.MessageInterpolatorContext;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests for HV-333
+ *
+ * @author Hardy Ferentschik
+ */
+public class MessageInterpolatorContextTest {
+
+	@org.testng.annotations.Test
+	public void testInterpolatorContext() throws Exception {
+		// use programmatic mapping api to configure constraint
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Test.class )
+				.property( "test", FIELD )
+				.constraint( new MinDef().value( 10 ).message( "{foo}" ) );
+
+		// use a easy mock message interpolator to verify the right for verifying that the right MessageInterpolatorContext
+		// will be passed
+		MessageInterpolator mock = createMock( MessageInterpolator.class );
+		HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
+		config.messageInterpolator( mock );
+		config.addMapping( mapping );
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Test.class );
+		PropertyDescriptor propertyDescriptor = beanDescriptor.getConstraintsForProperty( "test" );
+		Set<ConstraintDescriptor<?>> constraintDescriptors = propertyDescriptor.getConstraintDescriptors();
+		assertTrue( constraintDescriptors.size() == 1 );
+
+		// prepare the mock interpolator to expect the right interpolate call
+		String validatedValue = "value";
+		expect(
+				mock.interpolate(
+						"{foo}",
+						new MessageInterpolatorContext( constraintDescriptors.iterator().next(), validatedValue )
+				)
+		).andReturn( "{foo}" );
+		replay( mock );
+
+		Set<ConstraintViolation<Test>> violations = validator.validate( new Test( validatedValue ) );
+		assertNumberOfViolations( violations, 1 );
+
+		// verify that the right validatedValue was passed
+		verify( mock );
+	}
+
+	public static class Test {
+		private String test;
+
+		public Test(String test) {
+			this.test = test;
+		}
+
+		public String getTest() {
+			return test;
+		}
+
+		public void setTest(String test) {
+			this.test = test;
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java
new file mode 100644
index 0000000..75dca67
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ResourceBundleMessageInterpolatorTest.java
@@ -0,0 +1,378 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.ResourceBundle;
+import javax.validation.MessageInterpolator;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.MessageInterpolatorContext;
+import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
+import org.hibernate.validator.internal.metadata.core.ConstraintOrigin;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.resourceloading.ResourceBundleLocator;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * Tests for message interpolation.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ResourceBundleMessageInterpolatorTest {
+
+	private ResourceBundleMessageInterpolator interpolator;
+	private NotNull notNull;
+	private ConstraintDescriptorImpl<NotNull> notNullDescriptor;
+	private Size size;
+	private ConstraintDescriptorImpl<Size> sizeDescriptor;
+
+	@BeforeTest
+	public void setUp() {
+		// Create some annotations for testing using AnnotationProxies
+		AnnotationDescriptor<NotNull> descriptor = new AnnotationDescriptor<NotNull>( NotNull.class );
+		notNull = AnnotationFactory.create( descriptor );
+		notNullDescriptor = new ConstraintDescriptorImpl<NotNull>(
+				notNull,
+				new ConstraintHelper(),
+				java.lang.annotation.ElementType.FIELD,
+				ConstraintOrigin.DEFINED_LOCALLY
+		);
+
+		AnnotationDescriptor<Size> sizeAnnotationDescriptor = new AnnotationDescriptor<Size>( Size.class );
+		size = AnnotationFactory.create( sizeAnnotationDescriptor );
+		sizeDescriptor = new ConstraintDescriptorImpl<Size>(
+				size, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
+		);
+	}
+
+	@Test
+	public void testSuccessfulInterpolation() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+		String expected = "message interpolation successful";
+		String actual = interpolator.interpolate( "{simple.key}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "message interpolation successful message interpolation successful";
+		actual = interpolator.interpolate( "{simple.key} {simple.key}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "The message interpolation successful completed";
+		actual = interpolator.interpolate( "The {simple.key} completed", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "{{simple.key}}";
+		actual = interpolator.interpolate( "{{simple.key}}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testMessageLiterals() {
+
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "{";
+		String actual = interpolator.interpolate( "\\{", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "}";
+		actual = interpolator.interpolate( "\\}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "\\";
+		actual = interpolator.interpolate( "\\", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testUnSuccessfulInterpolation() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "foo";  // missing {}
+		String actual = interpolator.interpolate( "foo", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "#{foo  {}";
+		actual = interpolator.interpolate( "#{foo  {}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testUnknownTokenInterpolation() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "{bar}";  // unknown token {}
+		String actual = interpolator.interpolate( "{bar}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testKeyWithDashes() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "message interpolation successful";  // unknown token {}
+		String actual = interpolator.interpolate( "{key-with-dashes}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testKeyWithSpaces() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "message interpolation successful";  // unknown token {}
+		String actual = interpolator.interpolate( "{key with spaces}", context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testDefaultInterpolation() {
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "may not be null";
+		String actual = interpolator.interpolate( notNull.message(), context );
+		assertEquals( actual, expected, "Wrong substitution" );
+
+		expected = "size must be between 0 and 2147483647";  // unknown token {}
+		context = new MessageInterpolatorContext( sizeDescriptor, null );
+		actual = interpolator.interpolate( size.message(), context );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testMessageInterpolationWithLocale() {
+		interpolator = new ResourceBundleMessageInterpolator();
+
+		String expected = "darf nicht null sein";
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+		String actual = interpolator.interpolate( notNull.message(), context, Locale.GERMAN );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	@Test
+	public void testUserResourceBundle() {
+		interpolator = new ResourceBundleMessageInterpolator();
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "no puede ser null";
+		String actual = interpolator.interpolate( notNull.message(), context, new Locale( "es", "ES" ) );
+		assertEquals( actual, expected, "Wrong substitution" );
+	}
+
+	/**
+	 * HV-102
+	 */
+	@Test
+	public void testRecursiveMessageInterpolation() {
+		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
+		descriptor.setValue( "message", "{replace.in.user.bundle1}" );
+		descriptor.setValue( "value", 10l );
+		Max max = AnnotationFactory.create( descriptor );
+
+
+		ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
+				max, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
+		);
+
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( constraintDescriptor, null );
+
+		String expected = "{replace.in.default.bundle2}";
+		String actual = interpolator.interpolate( max.message(), context );
+		assertEquals(
+				actual, expected, "Within default bundle replacement parameter evaluation should not be recursive!"
+		);
+	}
+
+	/**
+	 * HV-182
+	 */
+	@Test
+	public void testCorrectMessageInterpolationIfParameterCannotBeReplaced() {
+		AnnotationDescriptor<Max> descriptor = new AnnotationDescriptor<Max>( Max.class );
+		String message = "Message should stay unchanged since {fubar} is not replaceable";
+		descriptor.setValue( "message", message );
+		descriptor.setValue( "value", 10l );
+		Max max = AnnotationFactory.create( descriptor );
+
+
+		ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
+				max, new ConstraintHelper(), java.lang.annotation.ElementType.FIELD, ConstraintOrigin.DEFINED_LOCALLY
+		);
+
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator()
+		);
+
+		MessageInterpolator.Context context = new MessageInterpolatorContext( constraintDescriptor, null );
+
+		String actual = interpolator.interpolate( max.message(), context );
+		assertEquals(
+				actual, message, "The message should not have changed."
+		);
+	}
+
+	/**
+	 * HV-330
+	 */
+	@Test
+	public void testMessageCaching() {
+
+		// do the whole tests first with caching enabled
+		TestResourceBundle testBundle = new TestResourceBundle();
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator( testBundle )
+		);
+		MessageInterpolator.Context context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		String expected = "{hv-330}";
+		String actual = interpolator.interpolate( "{hv-330}", context );
+		assertEquals( actual, expected, "The key should not not exist in the bundle." );
+
+		testBundle.addOrUpdateMessage( "hv-330", "success" );
+		expected = "{hv-330}";
+		actual = interpolator.interpolate( "{hv-330}", context );
+		assertEquals(
+				actual,
+				expected,
+				"The message has not changed since per default the ResourceBundleMessageInterpolator caches the messages"
+		);
+
+		// now without caching
+		testBundle = new TestResourceBundle();
+		interpolator = new ResourceBundleMessageInterpolator(
+				new TestResourceBundleLocator( testBundle ), false
+		);
+		context = new MessageInterpolatorContext( notNullDescriptor, null );
+
+		expected = "{hv-330}";
+		actual = interpolator.interpolate( "{hv-330}", context );
+		assertEquals( actual, expected, "The key should not not exist in the bundle." );
+
+		testBundle.addOrUpdateMessage( "hv-330", "success" );
+		expected = "success";
+		actual = interpolator.interpolate( "{hv-330}", context );
+		assertEquals(
+				actual,
+				expected,
+				"The message should change since ResourceBundleMessageInterpolator does not cache"
+		);
+	}
+
+	/**
+	 * A dummy locator always returning a {@link TestResourceBundle}.
+	 */
+	private static class TestResourceBundleLocator implements ResourceBundleLocator {
+
+		private final ResourceBundle resourceBundle;
+
+		public TestResourceBundleLocator() {
+			this( new TestResourceBundle() );
+		}
+
+		public TestResourceBundleLocator(ResourceBundle bundle) {
+			resourceBundle = bundle;
+		}
+
+		public ResourceBundle getResourceBundle(Locale locale) {
+			return resourceBundle;
+		}
+	}
+
+	/**
+	 * A dummy resource bundle which can be passed to the constructor of ResourceBundleMessageInterpolator to replace
+	 * the user specified resource bundle.
+	 */
+	private static class TestResourceBundle extends ResourceBundle implements Enumeration<String> {
+		private Map<String, String> testResources;
+		Iterator<String> iter;
+
+		public TestResourceBundle() {
+			testResources = new HashMap<String, String>();
+			// add some test messages
+			testResources.put( "simple.key", "message interpolation successful" );
+			testResources.put( "key-with-dashes", "message interpolation successful" );
+			testResources.put( "key with spaces", "message interpolation successful" );
+			testResources.put( "replace.in.user.bundle1", "{replace.in.user.bundle2}" );
+			testResources.put( "replace.in.user.bundle2", "{replace.in.default.bundle1}" );
+
+			iter = testResources.keySet().iterator();
+		}
+
+		public Object handleGetObject(String key) {
+			return testResources.get( key );
+		}
+
+		public Enumeration<String> getKeys() {
+			return this;
+		}
+
+		public boolean hasMoreElements() {
+			return iter.hasNext();
+		}
+
+		public String nextElement() {
+			if ( hasMoreElements() ) {
+				return iter.next();
+			}
+			else {
+				throw new NoSuchElementException();
+			}
+		}
+
+		public void addOrUpdateMessage(String key, String message) {
+			testResources.put( key, message );
+			iter = testResources.keySet().iterator();
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/User.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/User.java
new file mode 100644
index 0000000..77f3364
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/User.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class User {
+	@Email
+	private String email;
+
+	@Range(min = 18, max = 21)
+	private int age;
+
+	public int getAge() {
+		return age;
+	}
+
+	public void setAge(int age) {
+		this.age = age;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ValueFormatterMessageInterpolatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ValueFormatterMessageInterpolatorTest.java
new file mode 100644
index 0000000..05b9a0a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/messageinterpolation/ValueFormatterMessageInterpolatorTest.java
@@ -0,0 +1,285 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.internal.engine.messageinterpolation;
+
+import java.util.Date;
+import java.util.Formattable;
+import java.util.Formatter;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.ValidationException;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.DecimalMinDef;
+import org.hibernate.validator.cfg.defs.FutureDef;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.cfg.defs.NullDef;
+import org.hibernate.validator.messageinterpolation.ValueFormatterMessageInterpolator;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * Test for {@link org.hibernate.validator.messageinterpolation.ValueFormatterMessageInterpolator}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ValueFormatterMessageInterpolatorTest {
+	@Test
+	public void testSimpleValidatedValueInterpolation() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "date", FIELD )
+				.constraint( new FutureDef().message( "${validatedValue}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Date past = new Date( System.currentTimeMillis() - 60000 ); // current date minus one minute
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( past ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, past.toString() );
+	}
+
+	@Test
+	public void testMultipleValidatedValuesInMessageTemplate() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "date", FIELD )
+				.constraint( new FutureDef().message( "${validatedValue} ${validatedValue}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Date past = new Date( System.currentTimeMillis() - 60000 ); // current date minus one minute
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( past ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, past.toString() + " " + past.toString() );
+	}
+
+	@Test
+	public void testEscapedCurlyBraces() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "date", FIELD )
+				.constraint( new FutureDef().message( "\\{${validatedValue}\\}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Date past = new Date( System.currentTimeMillis() - 60000 ); // current date minus one minute
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( past ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "{" + past.toString() + "}" );
+	}
+
+	@Test
+	public void testFormattedDate() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "date", FIELD )
+				.constraint( new FutureDef().message( "${validatedValue:%1$ty}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Date past = new Date( System.currentTimeMillis() - 60000 ); // current date minus one minute
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( past ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, String.format( "%1$ty", past ) );
+	}
+
+	@Test
+	public void testNullValueValidation() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "date", FIELD )
+				.constraint( new NotNullDef().message( "${validatedValue}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( (Date) null ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "null" );
+	}
+
+	@Test
+	public void testFormattedDouble() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue: '%1$5f' }" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( 0.1 ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, " '0.100000' " );
+	}
+
+	@Test
+	public void testCurlyBraceInFormat() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue: {%1$5f} }" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( 0.1 ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, " {0.100000} " );
+	}
+
+	@Test
+	public void testColonInFormat() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue::%1$5f:}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( 0.1 ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, ":0.100000:" );
+	}
+
+	@Test
+	public void testValidatedValueAndAdditionalUnknownParameter() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint(
+						new DecimalMinDef().value( "1.0" ).message( "${validatedValue: '%1$5f' } ${foo}" )
+				);
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( 0.1 ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, " '0.100000'  ${foo}" );
+	}
+
+	@Test
+	public void testNoClosingBrace() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue{" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( 0.1 ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, "${validatedValue{" );
+	}
+
+	@Test(
+			expectedExceptions = ValidationException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Missing format string in template:.*"
+	)
+	public void testMissingFormatString() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue:}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+		validator.validate( new TestClass( 0.1 ) );
+	}
+
+	@Test
+	public void testFormattable() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "greeter", FIELD )
+				.constraint( new NullDef().message( "${validatedValue: '%1$s' }" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+
+		Set<ConstraintViolation<TestClass>> violations = validator.validate( new TestClass( new Greeter() ) );
+
+		assertNumberOfViolations( violations, 1 );
+		assertCorrectConstraintViolationMessages( violations, " 'Hello world' " );
+	}
+
+	@Test(
+			expectedExceptions = ValidationException.class,
+			expectedExceptionsMessageRegExp = "HV[0-9]*: Invalid format:.*"
+	)
+	public void testIllegalFormat() {
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( TestClass.class )
+				.property( "doubleValue", FIELD )
+						// z is an unknown format
+				.constraint( new DecimalMinDef().value( "1.0" ).message( "${validatedValue:%1$z}" ) );
+
+		Validator validator = getValidatorUsingConstraintMapping( mapping );
+		validator.validate( new TestClass( 0.1 ) );
+	}
+
+	private Validator getValidatorUsingConstraintMapping(ConstraintMapping mapping) {
+		HibernateValidatorConfiguration config = (HibernateValidatorConfiguration) ValidatorUtil.getConfiguration();
+		config.messageInterpolator( new ValueFormatterMessageInterpolator() );
+
+		// use programmatic mapping
+		config.addMapping( mapping );
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		return factory.getValidator();
+	}
+
+	@SuppressWarnings("unused")
+	class TestClass {
+		private Date date;
+		private Double doubleValue;
+		private Greeter greeter;
+
+		TestClass(Date date) {
+			this.date = date;
+		}
+
+		TestClass(Double doubleValue) {
+			this.doubleValue = doubleValue;
+		}
+
+		TestClass(Greeter greeter) {
+			this.greeter = greeter;
+		}
+	}
+
+	class Greeter implements Formattable {
+		public void formatTo(Formatter formatter, int flags, int width, int precision) {
+			formatter.format( "Hello world" );
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/IllegalMethodParameterConstraintsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/IllegalMethodParameterConstraintsTest.java
new file mode 100644
index 0000000..fe490ae
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/IllegalMethodParameterConstraintsTest.java
@@ -0,0 +1,183 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel;
+
+import java.util.Set;
+import javax.validation.ConstraintDeclarationException;
+import javax.validation.ConstraintViolation;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.ValidatorImpl;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ValidatorUtil.getMethodValidator;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+
+/**
+ * Integration test for {@link ValidatorImpl} and {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl} which
+ * tests that illegal method parameter constraints are handled properly.
+ *
+ * @author Gunnar Morling
+ */
+public class IllegalMethodParameterConstraintsTest {
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = "Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints\\. The following.*"
+	)
+	public void parameterConstraintsAddedInSubTypeCausesDeclarationException() {
+
+		getMethodValidator().validateAllParameters(
+				new FooImpl(), FooImpl.class.getDeclaredMethods()[0], new Object[] { }
+		);
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = "Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints\\. The following.*"
+	)
+	public void atValidAddedInSubTypeCausesDeclarationException() {
+
+		getMethodValidator().validateAllParameters(
+				new ZapImpl(), ZapImpl.class.getDeclaredMethods()[0], new Object[] { }
+		);
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = "Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints, but there are.*"
+	)
+	public void constraintStrengtheningInSubTypeCausesDeclarationException() {
+
+		getMethodValidator().validateAllParameters(
+				new BarImpl(), BarImpl.class.getDeclaredMethods()[0], new Object[] { }
+		);
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = "Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints\\. The following.*"
+	)
+	public void parameterConstraintsInHierarchyWithMultipleRootMethodsCausesDeclarationException() {
+
+		getMethodValidator().validateAllParameters(
+				new BazImpl(), BazImpl.class.getDeclaredMethods()[0], new Object[] { }
+		);
+	}
+
+	@Test(
+			expectedExceptions = ConstraintDeclarationException.class,
+			expectedExceptionsMessageRegExp = "Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints.*"
+	)
+	public void standardBeanValidationCanBePerformedOnTypeWithIllegalMethodParameterConstraints() throws Exception {
+
+		QuxImpl qux = new QuxImpl();
+
+		//validating a property is fine
+		Set<ConstraintViolation<QuxImpl>> violations = getValidator().validate( qux );
+		assertCorrectConstraintViolationMessages( violations, "may not be null" );
+
+		//but method validation fails due to illegal parameter constraints being defined
+		getMethodValidator().validateAllParameters(
+				qux, QuxImpl.class.getDeclaredMethod( "qux", String.class ), new Object[] { }
+		);
+	}
+
+	private static interface Foo {
+
+		void foo(String s);
+	}
+
+	private static class FooImpl implements Foo {
+
+		/**
+		 * Adds constraints to an un-constrained method from a super-type, which is not allowed.
+		 */
+		public void foo(@NotNull String s) {
+		}
+	}
+
+	private static interface Bar {
+
+		void bar(@NotNull String s);
+	}
+
+	private static class BarImpl implements Bar {
+
+		/**
+		 * Adds constraints to a constrained method from a super-type, which is not allowed.
+		 */
+		public void bar(@Size(min = 3) String s) {
+		}
+	}
+
+	private static interface Baz1 {
+
+		void baz(String s);
+	}
+
+	private static interface Baz2 {
+
+		void baz(@Size(min = 3) String s);
+	}
+
+	private static class BazImpl implements Baz1, Baz2 {
+
+		/**
+		 * Implements a method defined by two interfaces (one with parameter constraints), which is not allowed.
+		 */
+		public void baz(String s) {
+		}
+	}
+
+	private static interface Qux {
+
+		@NotNull
+		public String getQux();
+
+		public void qux(String s);
+	}
+
+	private static class QuxImpl implements Qux {
+
+		public String getQux() {
+			return null;
+		}
+
+		public void qux(@NotNull String s) {
+		}
+	}
+
+	private static interface Zap {
+
+		void zap(String s);
+	}
+
+	private static class ZapImpl implements Zap {
+
+		/**
+		 * Adds @Valid to an un-constrained method from a super-type, which is not allowed.
+		 */
+		public void zap(@Valid String s) {
+		}
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationGroupSequenceTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationGroupSequenceTest.java
new file mode 100644
index 0000000..63acf0c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationGroupSequenceTest.java
@@ -0,0 +1,270 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.methodlevel;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodConstraintViolationException;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationGroup1;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationGroup2;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationSequence;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroupImpl;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertConstraintViolation;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatingProxy;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+/**
+ * Integration test for the group sequence processing during method-level validation.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodLevelValidationGroupSequenceTest {
+
+	private CustomerRepositoryWithRedefinedDefaultGroup customerRepository;
+
+	@BeforeMethod
+	public void setUpDefaultMethodValidator() {
+		setUpValidatorForGroups();
+	}
+
+	private void setUpValidatorForGroups(Class<?>... groups) {
+		customerRepository = getValidatingProxy(
+				new CustomerRepositoryWithRedefinedDefaultGroupImpl(), groups
+		);
+	}
+
+	@Test
+	public void validationSucceedsAsNoConstraintInDefaultSequenceIsViolated() {
+		customerRepository.noConstraintInDefaultGroup( null );
+	}
+
+	@Test
+	public void validationFailsAsConstraintInDefaultSequenceIsViolated() {
+
+		try {
+			customerRepository.constraintInDefaultGroup( null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation, "may not be null", CustomerRepositoryWithRedefinedDefaultGroupImpl.class, null
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup1.class
+			);
+		}
+	}
+
+	/**
+	 * Only one constraint violation is expected, as processing should stop after the
+	 * first erroneous group of the default sequence.
+	 */
+	@Test
+	public void processingOfDefaultSequenceStopsAfterFirstErroneousGroup() {
+
+		try {
+			customerRepository.constraintInLaterPartOfDefaultSequence( 1 );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation,
+					"must be greater than or equal to 5",
+					CustomerRepositoryWithRedefinedDefaultGroupImpl.class,
+					1
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup1.class
+			);
+		}
+	}
+
+	/**
+	 * Two constraint violations (originating from different parameters) from ValidationGroup1 expected.
+	 * Third violation from ValidationGroup2 is not expected, as sequence processing stopped after first group.
+	 */
+	@Test
+	public void processingOfDefaultSequenceStopsAfterFirstErroneousGroupWithSeveralParameters() {
+
+		try {
+			customerRepository.constraintInLaterPartOfDefaultSequenceAtDifferentParameters( 1, 2 );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e.getConstraintViolations(),
+					"must be greater than or equal to 5",
+					"must be greater than or equal to 7"
+			);
+		}
+	}
+
+	/**
+	 * Only one constraint violation is expected, as processing should stop after the
+	 * first erroneous group of the validated sequence.
+	 */
+	@Test
+	public void processingOfGroupSequenceStopsAfterFirstErroneousGroup() {
+
+		setUpValidatorForGroups( ValidationSequence.class );
+
+		try {
+			customerRepository.constraintInLaterPartOfGroupSequence( 1 );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation,
+					"must be greater than or equal to 5",
+					CustomerRepositoryWithRedefinedDefaultGroupImpl.class,
+					1
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup2.class
+			);
+		}
+	}
+
+	/**
+	 * Two constraint violations (originating from different parameters) from ValidationGroup2 expected.
+	 * Third violation from ValidationGroup3 is not expected, as sequence processing stopped after first group.
+	 */
+	@Test
+	public void processingOfGroupSequenceStopsAfterFirstErroneousGroupWithSeveralParameters() {
+
+		setUpValidatorForGroups( ValidationSequence.class );
+
+		try {
+			customerRepository.constraintInLaterPartOfGroupSequenceAtDifferentParameters( 1, 2 );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e.getConstraintViolations(),
+					"must be greater than or equal to 5",
+					"must be greater than or equal to 7"
+			);
+		}
+	}
+
+	// Tests for return value validation below
+	// TODO GM: extract to separate test
+
+	@Test
+	public void validationSucceedsAsNoConstraintInDefaultSequenceAtReturnValueIsViolated() {
+		customerRepository.noConstraintInDefaultGroupAtReturnValue();
+	}
+
+	@Test
+	public void validationFailsAsConstraintInDefaultSequenceAtReturnValueIsViolated() {
+
+		try {
+			customerRepository.constraintInDefaultGroupAtReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation, "may not be null", CustomerRepositoryWithRedefinedDefaultGroupImpl.class, null
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup1.class
+			);
+		}
+	}
+
+	/**
+	 * Only one constraint violation is expected, as processing should stop after the
+	 * first erroneous group of the default sequence.
+	 */
+	@Test
+	public void processingOfDefaultSequenceForReturnValueStopsAfterFirstErroneousGroup() {
+
+		try {
+			customerRepository.constraintsInAllPartOfDefaultSequence();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation,
+					"must be greater than or equal to 5",
+					CustomerRepositoryWithRedefinedDefaultGroupImpl.class,
+					1
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup1.class
+			);
+		}
+	}
+
+	/**
+	 * Only one constraint violation is expected, as processing should stop after the
+	 * first erroneous group of the validated sequence.
+	 */
+	@Test
+	public void processingOfGroupSequenceForReturnValueStopsAfterFirstErroneousGroup() {
+
+		setUpValidatorForGroups( ValidationSequence.class );
+
+		try {
+			customerRepository.constraintsInAllPartsOfGroupSequence();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertConstraintViolation(
+					constraintViolation,
+					"must be greater than or equal to 5",
+					CustomerRepositoryWithRedefinedDefaultGroupImpl.class,
+					1
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getGroups().iterator().next(), ValidationGroup2.class
+			);
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationTest.java
new file mode 100644
index 0000000..fa82134
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/MethodLevelValidationTest.java
@@ -0,0 +1,638 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.UnexpectedTypeException;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.ValidatorImpl;
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodConstraintViolation.Kind;
+import org.hibernate.validator.method.MethodConstraintViolationException;
+import org.hibernate.validator.test.internal.engine.methodlevel.model.Address;
+import org.hibernate.validator.test.internal.engine.methodlevel.model.Customer;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepository;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryImpl;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.RepositoryBase;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertConstraintViolation;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidatingProxy;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+/**
+ * Integration test for the method-level validation related features of {@link ValidatorImpl}.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodLevelValidationTest {
+
+	private CustomerRepository customerRepository;
+
+	private RepositoryBase<Customer> repositoryBase;
+
+	@BeforeMethod
+	public void setUpDefaultMethodValidator() {
+		setUpValidator();
+	}
+
+	private void setUpValidator(Integer parameterIndex, Class<?>... groups) {
+		repositoryBase = customerRepository = getValidatingProxy(
+				new CustomerRepositoryImpl(), parameterIndex, groups
+		);
+	}
+
+	private void setUpValidator(Class<?>... groups) {
+		setUpValidator( null, groups );
+	}
+
+	@Test
+	public void methodValidationYieldsConstraintViolation() {
+
+		try {
+			customerRepository.findCustomerByName( null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			Set<MethodConstraintViolation<?>> constraintViolations = e.getConstraintViolations();
+			assertNumberOfViolations( constraintViolations, 1 );
+
+			MethodConstraintViolation<?> constraintViolation = constraintViolations.iterator().next();
+
+			assertConstraintViolation(
+					constraintViolation,
+					"may not be null",
+					CustomerRepositoryImpl.class,
+					null
+			);
+			assertEquals(
+					constraintViolation.getConstraintDescriptor().getAnnotation().annotationType(), NotNull.class
+			);
+			assertEquals( constraintViolation.getMethod().getName(), "findCustomerByName" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(), "CustomerRepository#findCustomerByName(arg0)"
+			);
+			assertEquals( constraintViolation.getLeafBean(), customerRepository );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void validationOfMethodWithMultipleParameters() {
+
+		try {
+			customerRepository.findCustomerByAgeAndName( 30, null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "findCustomerByAgeAndName" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 1 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#findCustomerByAgeAndName(arg1)"
+			);
+		}
+	}
+
+	@Test
+	public void constraintViolationsAtMultipleParameters() {
+
+		try {
+			customerRepository.findCustomerByAgeAndName( 1, null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 2 );
+			assertCorrectConstraintViolationMessages(
+					e.getConstraintViolations(), "may not be null", "must be greater than or equal to 5"
+			);
+		}
+	}
+
+	@Test
+	public void methodValidationWithCascadingParameter() {
+
+		Customer customer = new Customer( null, null );
+
+		try {
+			customerRepository.persistCustomer( customer );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "persistCustomer" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(), "CustomerRepository#persistCustomer(arg0).name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean(), customer );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void methodValidationWithCascadingParameterAndCascadingConstraint() {
+
+		Address address = new Address( null );
+		Customer customer = new Customer( "Bob", address );
+
+		try {
+			customerRepository.persistCustomer( customer );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "persistCustomer" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#persistCustomer(arg0).address.city"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean(), address );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingMapParameter() {
+
+		Map<String, Customer> customers = newHashMap();
+		Customer bob = new Customer( null );
+		customers.put( "Bob", bob );
+
+		try {
+			customerRepository.cascadingMapParameter( customers );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingMapParameter" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingMapParameter(arg0)[Bob].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean(), bob );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingIterableParameter() {
+
+		Customer customer = new Customer( null );
+
+		try {
+			customerRepository.cascadingIterableParameter( Arrays.asList( null, customer ) );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingIterableParameter" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingIterableParameter(arg0)[1].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean(), customer );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingArrayParameter() {
+
+		Customer customer = new Customer( null );
+
+		try {
+			customerRepository.cascadingArrayParameter( null, customer );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingArrayParameter" );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingArrayParameter(arg0)[1].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean(), customer );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void constraintsAtMethodFromBaseClassAreEvaluated() {
+
+		try {
+
+			customerRepository.findById( null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "findById" );
+			assertEquals( constraintViolation.getMethod().getDeclaringClass(), RepositoryBase.class );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+		}
+	}
+
+	@Test
+	public void constraintsAtOverriddenMethodAreEvaluated() {
+
+		try {
+
+			customerRepository.foo( null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "foo" );
+			assertEquals( constraintViolation.getMethod().getDeclaringClass(), CustomerRepository.class );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+		}
+	}
+
+	@Test
+	public void validFromOverriddenMethodIsEvaluated() {
+
+		try {
+
+			customerRepository.bar( new Customer( null, null ) );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "bar" );
+			assertEquals( constraintViolation.getMethod().getDeclaringClass(), CustomerRepository.class );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 0 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getPropertyPath().toString(), "CustomerRepository#bar(arg0).name" );
+		}
+	}
+
+	@Test
+	public void parameterValidationOfParameterlessMethod() {
+		customerRepository.boz();
+	}
+
+	/**
+	 * The constraints at both parameters are violated, but as only the 2nd
+	 * parameter is validated, only one constraint violation is expected.
+	 */
+	@Test
+	public void singleParameterValidation() {
+
+		setUpValidator( 1 );
+
+		try {
+			customerRepository.findCustomerByAgeAndName( 1, null );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "findCustomerByAgeAndName" );
+			assertEquals( constraintViolation.getMethod().getDeclaringClass(), CustomerRepository.class );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 1 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#findCustomerByAgeAndName(arg1)"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+		}
+	}
+
+	@Test
+	public void cascadingSingleParameterValidation() {
+
+		setUpValidator( 1 );
+
+		try {
+			customerRepository.cascadingParameter( null, new Customer( null ) );
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingParameter" );
+			assertEquals( constraintViolation.getMethod().getDeclaringClass(), CustomerRepository.class );
+			assertEquals( constraintViolation.getParameterIndex(), Integer.valueOf( 1 ) );
+			assertEquals( constraintViolation.getKind(), Kind.PARAMETER );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(), "CustomerRepository#cascadingParameter(arg1).name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+		}
+	}
+
+	@Test
+	public void returnValueValidationYieldsConstraintViolation() {
+
+		try {
+			customerRepository.baz();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+
+			assertEquals( constraintViolation.getMessage(), "must be greater than or equal to 10" );
+			assertEquals( constraintViolation.getMethod().getName(), "baz" );
+			assertEquals( constraintViolation.getParameterIndex(), null );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getPropertyPath().toString(), "CustomerRepository#baz()" );
+			assertEquals( constraintViolation.getLeafBean(), customerRepository );
+			assertEquals( constraintViolation.getInvalidValue(), 9 );
+		}
+	}
+
+	@Test
+	public void cascadingReturnValue() {
+
+		try {
+			customerRepository.cascadingReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingReturnValue" );
+			assertEquals( constraintViolation.getParameterIndex(), null );
+			assertEquals( constraintViolation.getParameterName(), null );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(), "CustomerRepository#cascadingReturnValue().name"
+			);
+			assertEquals( constraintViolation.getLeafBean().getClass(), Customer.class );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingReturnValueFromSuperType() {
+
+		try {
+			customerRepository.overriddenMethodWithCascadingReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertNumberOfViolations( e.getConstraintViolations(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "overriddenMethodWithCascadingReturnValue" );
+			assertEquals( constraintViolation.getParameterIndex(), null );
+			assertEquals( constraintViolation.getParameterName(), null );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#overriddenMethodWithCascadingReturnValue().name"
+			);
+			assertEquals( constraintViolation.getLeafBean().getClass(), Customer.class );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingIterableReturnValue() {
+
+		try {
+			customerRepository.cascadingIterableReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingIterableReturnValue" );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingIterableReturnValue()[1].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean().getClass(), Customer.class );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingMapReturnValue() {
+
+		try {
+			customerRepository.cascadingMapReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingMapReturnValue" );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingMapReturnValue()[Bob].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean().getClass(), Customer.class );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void cascadingArrayReturnValue() {
+
+		try {
+			customerRepository.cascadingArrayReturnValue();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertEquals( e.getConstraintViolations().size(), 1 );
+
+			MethodConstraintViolation<?> constraintViolation = e.getConstraintViolations().iterator().next();
+			assertEquals( constraintViolation.getMessage(), "may not be null" );
+			assertEquals( constraintViolation.getMethod().getName(), "cascadingArrayReturnValue" );
+			assertEquals( constraintViolation.getKind(), Kind.RETURN_VALUE );
+			assertEquals(
+					constraintViolation.getPropertyPath().toString(),
+					"CustomerRepository#cascadingArrayReturnValue()[1].name"
+			);
+			assertEquals( constraintViolation.getRootBeanClass(), CustomerRepositoryImpl.class );
+			assertEquals( constraintViolation.getRootBean(), customerRepository );
+			assertEquals( constraintViolation.getLeafBean().getClass(), Customer.class );
+			assertEquals( constraintViolation.getInvalidValue(), null );
+		}
+	}
+
+	@Test
+	public void overridingMethodStrengthensReturnValueConstraint() {
+
+		try {
+			customerRepository.overriddenMethodWithReturnValueConstraint();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e.getConstraintViolations(),
+					"must be greater than or equal to 5",
+					"must be greater than or equal to 10"
+			);
+		}
+	}
+
+	@Test
+	public void runtimeTypeDefinesConstraintsToApply() {
+
+		try {
+			repositoryBase.overriddenMethodWithReturnValueConstraint();
+			fail( "Expected MethodConstraintViolationException wasn't thrown." );
+		}
+		catch ( MethodConstraintViolationException e ) {
+
+			assertCorrectConstraintViolationMessages(
+					e.getConstraintViolations(),
+					"must be greater than or equal to 5",
+					"must be greater than or equal to 10"
+			);
+		}
+	}
+
+	@Test
+	public void methodValidationSucceedsAsNoConstraintOfValidatedGroupAreViolated() {
+		customerRepository.parameterConstraintInGroup( null );
+	}
+
+	@Test(expectedExceptions = MethodConstraintViolationException.class)
+	public void methodValidationFailsAsConstraintOfValidatedGroupIsViolated() {
+		setUpValidator( CustomerRepository.ValidationGroup.class );
+		customerRepository.parameterConstraintInGroup( null );
+	}
+
+	@Test(expectedExceptions = UnexpectedTypeException.class, expectedExceptionsMessageRegExp = "HV000030.*")
+	public void voidMethodWithReturnValueConstraintCausesUnexpectedTypeException() {
+		customerRepository.voidMethodWithIllegalReturnValueConstraint();
+	}
+
+	@Test
+	public void methodValidationSucceeds() {
+		customerRepository.findCustomerByName( "Bob" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Address.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Address.java
new file mode 100644
index 0000000..f944d8b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Address.java
@@ -0,0 +1,39 @@
+// $Id: Address.java 19033 Oct 3, 2010 2:12:45 PM gunnar.morling $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.model;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Gunnar Morling
+ *
+ */
+public class Address {
+
+	private final String city;
+	
+	public Address(String city) {
+		
+		this.city = city; 
+	}
+	
+	@NotNull
+	public String getCity() {
+		return city;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Customer.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Customer.java
new file mode 100644
index 0000000..ed1099a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/model/Customer.java
@@ -0,0 +1,54 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.model;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Gunnar Morling
+ *
+ */
+public class Customer {
+
+	public final String name;
+	
+	private final Address address;
+
+	public Customer(String name) {
+
+		this(name, null);
+	}
+	
+	public Customer(String name, Address address) {
+
+		this.name = name;
+		this.address = address;
+	}
+
+	@NotNull
+	public String getName() {
+		return name;
+	}
+
+	@Valid
+	public Address getAddress() {
+		return address;
+	}
+	
+	
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepository.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepository.java
new file mode 100644
index 0000000..009229e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepository.java
@@ -0,0 +1,81 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.service;
+
+import java.util.List;
+import java.util.Map;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.test.internal.engine.methodlevel.model.Customer;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface CustomerRepository extends RepositoryBase<Customer> {
+
+	@Valid
+	Customer findCustomerByName(@NotNull String name);
+
+	void persistCustomer(@NotNull @Valid Customer customer);
+
+	void cascadingMapParameter(@Valid Map<String, Customer> customer);
+
+	void cascadingIterableParameter(@Valid List<Customer> customer);
+
+	void cascadingArrayParameter(@Valid Customer... customer);
+
+	void findCustomerByAgeAndName(@Min(5) Integer age, @NotNull String name);
+
+	void cascadingParameter(@NotNull @Valid Customer param1, @NotNull @Valid Customer param2);
+
+	void foo(Long id);
+
+	void bar(Customer customer);
+
+	void boz();
+
+	@Min(10)
+	int baz();
+
+	@Valid
+	Customer cascadingReturnValue();
+
+	@Valid
+	List<Customer> cascadingIterableReturnValue();
+
+	@Valid
+	Map<String, Customer> cascadingMapReturnValue();
+
+	@Valid
+	Customer[] cascadingArrayReturnValue();
+
+	Customer overriddenMethodWithCascadingReturnValue();
+
+	void parameterConstraintInGroup(@NotNull(groups = { ValidationGroup.class }) String name);
+
+	@Min(10)
+	int overriddenMethodWithReturnValueConstraint();
+
+	@Min(10)
+	void voidMethodWithIllegalReturnValueConstraint();
+
+	public interface ValidationGroup {
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryImpl.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryImpl.java
new file mode 100644
index 0000000..6e16b10
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryImpl.java
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.service;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.validator.test.internal.engine.methodlevel.model.Customer;
+
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashMap;
+
+/**
+ * @author Gunnar Morling
+ */
+public class CustomerRepositoryImpl implements CustomerRepository {
+
+	public Customer findCustomerByName(String name) {
+		return null;
+	}
+
+	public void persistCustomer(Customer customer) {
+
+	}
+
+	public void cascadingMapParameter(Map<String, Customer> customer) {
+
+	}
+
+	public void cascadingIterableParameter(List<Customer> customer) {
+
+	}
+
+	public void cascadingArrayParameter(Customer... customer) {
+
+	}
+
+	public void findCustomerByAgeAndName(Integer age, String name) {
+
+	}
+
+	public void cascadingParameter(Customer param1, Customer param2) {
+
+	}
+
+	public Customer findById(Long id) {
+		return null;
+	}
+
+	public void foo(Long id) {
+
+	}
+
+	public void bar(Customer customer) {
+
+	}
+
+	public void boz() {
+
+	}
+
+	public int baz() {
+		return 9;
+	}
+
+	public Customer cascadingReturnValue() {
+		return new Customer( null );
+	}
+
+	public List<Customer> cascadingIterableReturnValue() {
+		return Arrays.asList( null, new Customer( null ) );
+	}
+
+	public Map<String, Customer> cascadingMapReturnValue() {
+
+		Map<String, Customer> theValue = newHashMap();
+		theValue.put( "Bob", new Customer( null ) );
+		return theValue;
+	}
+
+	public Customer[] cascadingArrayReturnValue() {
+		return new Customer[] { null, new Customer( null ) };
+	}
+
+	public Customer overriddenMethodWithCascadingReturnValue() {
+		return new Customer( null );
+	}
+
+	public void parameterConstraintInGroup(String name) {
+
+	}
+
+	public int overriddenMethodWithReturnValueConstraint() {
+		return 3;
+	}
+
+	public void voidMethodWithIllegalReturnValueConstraint() {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroup.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroup.java
new file mode 100644
index 0000000..709df99
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroup.java
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.service;
+
+import javax.validation.GroupSequence;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.Min.List;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationGroup1;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationGroup2;
+
+/**
+ * @author Gunnar Morling
+ */
+ at GroupSequence( { ValidationGroup1.class, ValidationGroup2.class, CustomerRepositoryWithRedefinedDefaultGroup.class })
+public interface CustomerRepositoryWithRedefinedDefaultGroup {
+
+	void noConstraintInDefaultGroup(@NotNull(groups = ValidationGroup3.class) String name);
+
+	void constraintInDefaultGroup(@NotNull(groups = ValidationGroup1.class) String name);
+
+	void constraintInLaterPartOfDefaultSequence(@List( {
+			@Min(groups = ValidationGroup1.class, value = 5), @Min(groups = ValidationGroup2.class, value = 10)
+	}) int param);
+
+	void constraintInLaterPartOfDefaultSequenceAtDifferentParameters(@List( {
+			@Min(groups = ValidationGroup1.class, value = 5), @Min(groups = ValidationGroup2.class, value = 10)
+	}) int param1, @Min(groups = ValidationGroup1.class, value = 7) int param2);
+
+
+	void constraintInLaterPartOfGroupSequence(@List( {
+			@Min(groups = ValidationGroup2.class, value = 5), @Min(groups = ValidationGroup3.class, value = 10)
+	}) int param);
+
+	void constraintInLaterPartOfGroupSequenceAtDifferentParameters(@List( {
+			@Min(groups = ValidationGroup2.class, value = 5), @Min(groups = ValidationGroup3.class, value = 10)
+	}) int param1, @Min(groups = ValidationGroup2.class, value = 7) int param2);
+
+	// methods used for return value validation tests
+
+	@NotNull(groups = ValidationGroup3.class)
+	String noConstraintInDefaultGroupAtReturnValue();
+
+	@NotNull(groups = ValidationGroup1.class)
+	String constraintInDefaultGroupAtReturnValue();
+
+	@List( {
+			@Min(groups = ValidationGroup1.class, value = 5), @Min(groups = ValidationGroup2.class, value = 10)
+	})
+	int constraintsInAllPartOfDefaultSequence();
+
+	@List( {
+			@Min(groups = ValidationGroup2.class, value = 5), @Min(groups = ValidationGroup3.class, value = 10)
+	})
+	int constraintsInAllPartsOfGroupSequence();
+
+
+	public static interface ValidationGroup1 {
+	}
+
+	public static interface ValidationGroup2 {
+	}
+
+	public static interface ValidationGroup3 {
+	}
+
+	@GroupSequence( { ValidationGroup2.class, ValidationGroup3.class })
+	public static interface ValidationSequence {
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroupImpl.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroupImpl.java
new file mode 100644
index 0000000..d9f460a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/CustomerRepositoryWithRedefinedDefaultGroupImpl.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.service;
+
+import javax.validation.GroupSequence;
+
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryWithRedefinedDefaultGroup.ValidationGroup1;
+
+/**
+ * @author Gunnar Morling
+ */
+ at GroupSequence( { ValidationGroup1.class, CustomerRepositoryWithRedefinedDefaultGroupImpl.class })
+public class CustomerRepositoryWithRedefinedDefaultGroupImpl implements CustomerRepositoryWithRedefinedDefaultGroup {
+
+	public void noConstraintInDefaultGroup(String name) {
+	}
+
+	public void constraintInDefaultGroup(String name) {
+	}
+
+	public void constraintInLaterPartOfDefaultSequence(int param) {
+	}
+
+	public void constraintInLaterPartOfDefaultSequenceAtDifferentParameters(int param1, int param2) {
+	}
+
+	public void constraintInLaterPartOfGroupSequence(int param) {
+	}
+
+	public void constraintInLaterPartOfGroupSequenceAtDifferentParameters(int param1, int param2) {
+	}
+
+	// methods used for return value validation tests
+
+	public String noConstraintInDefaultGroupAtReturnValue() {
+		return null;
+	}
+
+	public String constraintInDefaultGroupAtReturnValue() {
+		return null;
+	}
+
+	public int constraintsInAllPartOfDefaultSequence() {
+		return 1;
+	}
+
+	public int constraintsInAllPartsOfGroupSequence() {
+		return 1;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/RepositoryBase.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/RepositoryBase.java
new file mode 100644
index 0000000..24ff62a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodlevel/service/RepositoryBase.java
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.methodlevel.service;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.test.internal.engine.methodlevel.model.Customer;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface RepositoryBase<T> {
+
+	/**
+	 * Used to test, that constraints at methods from base interfaces/classes are evaluated.
+	 */
+	T findById(@NotNull Long id);
+
+	/**
+	 * Used to test, that constraints at overridden methods from base interfaces/classes are evaluated.
+	 */
+	void foo(@NotNull Long id);
+
+	void bar(@NotNull @Valid Customer customer);
+
+	/**
+	 * Used to test, that in an inheritance hierarchy multiple return value
+	 * constraints for an overridden method are joined.
+	 */
+	@Min(5)
+	int overriddenMethodWithReturnValueConstraint();
+
+	@Valid
+	Customer overriddenMethodWithCascadingReturnValue();
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/A.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/A.java
new file mode 100644
index 0000000..cfd760d
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/A.java
@@ -0,0 +1,28 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.proxy;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.Size;
+
+interface A {
+	@Min(5)
+	public Integer getInteger();
+
+	@Size(min = 2)
+	public String getString();
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/B.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/B.java
new file mode 100644
index 0000000..67b0917
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/B.java
@@ -0,0 +1,20 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.proxy;
+
+public interface B extends A {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/ProxyTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/ProxyTest.java
new file mode 100644
index 0000000..3a248b9
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/proxy/ProxyTest.java
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.proxy;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * See HV-257
+ *
+ * @author Hardy Ferentschik
+ */
+public class ProxyTest {
+	@Test
+	public void testValidateA() {
+		InvocationHandler handler = new CustomInvocationHandler( "some object" );
+
+		A a = ( A ) Proxy.newProxyInstance( getClass().getClassLoader(), new Class<?>[] { A.class }, handler );
+		assertEquals( Integer.valueOf( 0 ), a.getInteger() );
+
+		Validator validator = ValidatorUtil.getValidator();
+		Set<ConstraintViolation<A>> violations = validator.validate( a );
+		assertNumberOfViolations( violations, 2 );
+	}
+
+	@Test
+	public void testValidateB() {
+		InvocationHandler handler = new CustomInvocationHandler( "some object" );
+
+		B b = ( B ) Proxy.newProxyInstance( getClass().getClassLoader(), new Class<?>[] { B.class }, handler );
+		assertEquals( Integer.valueOf( 0 ), b.getInteger() );
+
+		Validator validator = ValidatorUtil.getValidator();
+		Set<ConstraintViolation<B>> violations = validator.validate( b );
+		assertNumberOfViolations( violations, 2 );
+	}
+
+	private class CustomInvocationHandler implements InvocationHandler {
+		private Object o;
+
+		public CustomInvocationHandler(Object o) {
+			this.o = o;
+		}
+
+		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+			if ( method.getName().equals( "getInteger" ) ) {
+				method.setAccessible( true );
+				return 0;
+			}
+			if ( method.getName().equals( "getString" ) ) {
+				return "a";
+			}
+			return method.invoke( o, args );
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/ConstraintViolationSerializationTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/ConstraintViolationSerializationTest.java
new file mode 100644
index 0000000..541e32c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/ConstraintViolationSerializationTest.java
@@ -0,0 +1,85 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.NotSerializableException;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintViolationSerializationTest {
+
+	/**
+	 * HV-245
+	 */
+	@Test
+	public void testSuccessfulSerialization() throws Exception {
+		Validator validator = ValidatorUtil.getValidator();
+		SerializableClass testInstance = new SerializableClass();
+		Set<ConstraintViolation<SerializableClass>> constraintViolations = validator.validate( testInstance );
+
+		byte[] bytes = serialize( constraintViolations );
+		Set<ConstraintViolation<?>> deserializedViolations = deserialize( bytes );
+		assertNumberOfViolations( deserializedViolations, 1 );
+	}
+
+	/**
+	 * HV-245
+	 */
+	@Test(expectedExceptions = NotSerializableException.class)
+	public void testUnSuccessfulSerialization() throws Exception {
+		Validator validator = ValidatorUtil.getValidator();
+		UnSerializableClass testInstance = new UnSerializableClass();
+		Set<ConstraintViolation<UnSerializableClass>> constraintViolations = validator.validate( testInstance );
+
+		serialize( constraintViolations );
+	}
+
+	private byte[] serialize(Object o) throws Exception {
+		ByteArrayOutputStream stream = new ByteArrayOutputStream();
+		ObjectOutput out = new ObjectOutputStream( stream );
+		out.writeObject( o );
+		out.close();
+		byte[] serialized = stream.toByteArray();
+		stream.close();
+		return serialized;
+
+	}
+
+	private Set<ConstraintViolation<?>> deserialize(byte[] byteData) throws Exception {
+		ByteArrayInputStream byteIn = new ByteArrayInputStream( byteData );
+		ObjectInputStream in = new ObjectInputStream( byteIn );
+		Set<ConstraintViolation<?>> deserializedViolations = ( Set<ConstraintViolation<?>> ) in.readObject();
+		in.close();
+		byteIn.close();
+		return deserializedViolations;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/CustomConstraintSerializableTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/CustomConstraintSerializableTest.java
new file mode 100644
index 0000000..ecd2717
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/CustomConstraintSerializableTest.java
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+
+/**
+ * A <b>sscce</b> (Short, Self Contained, Correct Example) showing that the
+ * simple custom Email validation constraint taken from <a href="http://blog.jteam.nl/2009/08/04/bean-validation-integrating-jsr-303-with-spring/"
+ * >this blog</a> gives a validation result that is not Serializable with
+ * Hibernate Validator 4.0.2.GA with underlying cause that
+ * <p/>
+ * <code>org.hibernate.validator.internal.util.annotationfactory.AnnotationProxy</code>
+ * <p/>
+ * <p/>
+ * Note that Hibernate Validator does not guarantee at all that a
+ * {@link ConstraintViolation} is Serializable because an entity need not be
+ * Serializable, but otherwise there should not be much of a problem (right?).
+ *
+ * @author Henno Vermeulen
+ * @author Hardy Ferentschik
+ */
+public class CustomConstraintSerializableTest {
+
+	@Test
+	public void testSerializeHibernateEmail() throws Exception {
+		Validator validator = ValidatorUtil.getValidator();
+
+		HibernateEmail invalidHibernateEmail = new HibernateEmail();
+		invalidHibernateEmail.email = "test@";
+
+		Set<ConstraintViolation<HibernateEmail>> constraintViolations = validator.validate( invalidHibernateEmail );
+		doSerialize( constraintViolations.iterator().next() );
+	}
+
+	/**
+	 * HV-291
+	 *
+	 * @throws Exception in case the test fails
+	 */
+	@Test
+	public void testSerializeCustomEmail() throws Exception {
+		Validator validator = ValidatorUtil.getValidator();
+
+		CustomEmail invalidCustomEmail = new CustomEmail();
+		invalidCustomEmail.email = "test@";
+		Set<ConstraintViolation<CustomEmail>> constraintViolations = validator.validate( invalidCustomEmail );
+		doSerialize( constraintViolations.iterator().next() );
+	}
+
+	public static byte[] doSerialize(Object obj) throws Exception {
+		ByteArrayOutputStream baos = new ByteArrayOutputStream( 512 );
+		ObjectOutputStream out = new ObjectOutputStream( baos );
+		out.writeObject( obj );
+		out.close();
+		return baos.toByteArray();
+	}
+
+	static class CustomEmail implements Serializable {
+		private static final long serialVersionUID = -9095271389455131159L;
+
+		@Email
+		String email;
+
+	}
+
+	static class HibernateEmail implements Serializable {
+		private static final long serialVersionUID = 7206154160792549270L;
+
+		@org.hibernate.validator.constraints.Email
+		String email;
+	}
+}
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/DummyEmailValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/DummyEmailValidator.java
new file mode 100644
index 0000000..a3a3bf0
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/DummyEmailValidator.java
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DummyEmailValidator implements ConstraintValidator<Email, String> {
+	public void initialize(Email annotation) {
+	}
+
+	public boolean isValid(String value, ConstraintValidatorContext context) {
+		return false;
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/Email.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/Email.java
new file mode 100644
index 0000000..14e8067
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/Email.java
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+
+/**
+ * Denotes that a field should contain a valid email address.
+ * <p/>
+ * <p/>
+ * Taken from <a href="http://blog.jteam.nl/2009/08/04/bean-validation-integrating-jsr-303-with-spring/"
+ * >this blog</a>.
+ *
+ * @author Hardy Ferentschik
+ */
+ at Documented
+ at Constraint(validatedBy = { DummyEmailValidator.class })
+ at Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE })
+ at Retention(RetentionPolicy.RUNTIME)
+ at Pattern(regexp = ".+ at .+\\.[a-z]+")
+ at ReportAsSingleViolation
+public @interface Email {
+
+	public abstract String message() default "{org.hibernate.validator.internal.engine.serialization.Email.message}";
+
+	public abstract Class<?>[] groups() default { };
+
+	public abstract Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/SerializableClass.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/SerializableClass.java
new file mode 100644
index 0000000..076e2fd
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/SerializableClass.java
@@ -0,0 +1,28 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import java.io.Serializable;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SerializableClass implements Serializable {
+	@NotNull
+	private String foo;
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/UnSerializableClass.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/UnSerializableClass.java
new file mode 100644
index 0000000..ce1b586
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/serialization/UnSerializableClass.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.serialization;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class UnSerializableClass {
+	@NotNull
+	private String foo;
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Author.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Author.java
new file mode 100644
index 0000000..36f3366
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Author.java
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.validation.Valid;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Entity
+ at AuthorBusinessRules
+public class Author {
+	@Id
+	public Long id;
+
+	@Valid
+	@OneToMany(mappedBy = "author")
+	public List<Book> books = new ArrayList<Book>();
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/AuthorBusinessRules.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/AuthorBusinessRules.java
new file mode 100644
index 0000000..442958f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/AuthorBusinessRules.java
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+ at Constraint(validatedBy = {})
+ at Documented
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface AuthorBusinessRules {
+	String message() default "";
+
+	Class<?>[] groups() default {};
+
+	Class<? extends Payload>[] payload() default {};
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Book.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Book.java
new file mode 100644
index 0000000..f18964e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Book.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at BookBusinessRules
+ at Entity
+public class Book {
+	@Id
+	public Long id;
+
+	@ManyToOne
+	public Author author;
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/BookBusinessRules.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/BookBusinessRules.java
new file mode 100644
index 0000000..8fe794d
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/BookBusinessRules.java
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+ at Constraint(validatedBy = {})
+ at Documented
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface BookBusinessRules {
+	String message() default "";
+
+	Class<?>[] groups() default {};
+
+	Class<? extends Payload>[] payload() default {};
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/CachedTraversableResolverTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/CachedTraversableResolverTest.java
new file mode 100644
index 0000000..46fb99b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/CachedTraversableResolverTest.java
@@ -0,0 +1,137 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.lang.annotation.ElementType;
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.TraversableResolver;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.Path;
+import javax.validation.groups.Default;
+
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+/**
+ * @author Emmanuel Bernard
+ */
+//this test is specific to Hibernate Validator
+public class CachedTraversableResolverTest {
+	@Test
+	public void testCache() {
+		TraversableResolver resolver = new AskOnceTR();
+		Configuration<?> config = (Configuration<?>) Validation.byDefaultProvider()
+				.configure()
+				.traversableResolver( resolver );
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Suit suit = new Suit();
+		suit.setTrousers( new Trousers() );
+		suit.setJacket( new Jacket() );
+		suit.setSize( 3333 );
+		suit.getTrousers().setLength( 32321 );
+		suit.getJacket().setWidth( 432432 );
+		Validator v = factory.getValidator();
+		try {
+			v.validate( suit, Default.class, Cloth.class );
+		}
+		catch ( IllegalStateException e ) {
+			fail( "Traversable Called several times for a given object" );
+		}
+
+		v = factory.usingContext().traversableResolver( new AskOnceTR() ).getValidator();
+		try {
+			v.validateProperty( suit, "size", Default.class, Cloth.class );
+		}
+		catch ( IllegalStateException e ) {
+			fail( "Traversable Called several times for a given object" );
+		}
+
+		v = factory.usingContext().traversableResolver( new AskOnceTR() ).getValidator();
+		try {
+			v.validateValue( Suit.class, "size", 2, Default.class, Cloth.class );
+		}
+		catch ( IllegalStateException e ) {
+			fail( "Traversable Called several times for a given object" );
+		}
+	}
+
+	private static class AskOnceTR implements TraversableResolver {
+		private Set<Holder> askedReach = new HashSet<Holder>();
+		private Set<Holder> askedCascade = new HashSet<Holder>();
+
+		private boolean isTraversable(Set<Holder> asked, Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			Holder h = new Holder( traversableObject, traversableProperty );
+			if ( asked.contains( h ) ) {
+				throw new IllegalStateException( "Called twice" );
+			}
+			asked.add( h );
+			return true;
+		}
+
+		public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return isTraversable(
+					askedReach,
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+		}
+
+		public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+			return isTraversable(
+					askedCascade,
+					traversableObject,
+					traversableProperty,
+					rootBeanType,
+					pathToTraversableObject,
+					elementType
+			);
+		}
+
+		public static class Holder {
+			Object NULL = new Object();
+			Object to;
+			Path.Node tp;
+
+			public Holder(Object traversableObject, Path.Node traversableProperty) {
+				to = traversableObject == null ? NULL : traversableObject;
+				tp = traversableProperty;
+			}
+
+			@Override
+			public int hashCode() {
+				return to.hashCode() + tp.hashCode();
+			}
+
+			@Override
+			public boolean equals(Object obj) {
+				if ( !( obj instanceof Holder ) ) {
+					return false;
+				}
+				Holder that = ( Holder ) obj;
+
+				return to != NULL && to == that.to && tp.equals( that.tp );
+			}
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Cloth.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Cloth.java
new file mode 100644
index 0000000..e899943
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Cloth.java
@@ -0,0 +1,23 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public interface Cloth {
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Jacket.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Jacket.java
new file mode 100644
index 0000000..791013f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Jacket.java
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import javax.validation.constraints.Max;
+
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Jacket {
+	Integer width;
+
+	@Max(30)
+	public Integer getWidth() {
+		return width;
+	}
+
+	public void setWidth(Integer width) {
+		this.width = width;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/JpaTraversableResolverTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/JpaTraversableResolverTest.java
new file mode 100644
index 0000000..403a956
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/JpaTraversableResolverTest.java
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.testng.Assert.assertTrue;
+
+
+/**
+ * See HV-305
+ *
+ * @author Hardy Ferentschik
+ */
+public class JpaTraversableResolverTest {
+	private Validator validator;
+
+	@BeforeTest
+	public void setUp() {
+		Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.traversableResolver( new DefaultTraversableResolver() );
+		validator = configuration.buildValidatorFactory().getValidator();
+	}
+
+	@Test
+	public void testWithBooks() {
+		Author author = new Author();
+		author.books.add( new Book() );
+		Set<ConstraintViolation<Author>> results = validator.validate( author );
+		assertTrue( results.isEmpty() );
+	}
+
+	@Test
+	public void testWithoutBooks() {
+		Author author = new Author();
+
+		// If the "books" collection is empty, everything works as expected.
+		Set<ConstraintViolation<Author>> results = validator.validate( author );
+		assertTrue( results.isEmpty() );
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Suit.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Suit.java
new file mode 100644
index 0000000..be47fdc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Suit.java
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.Valid;
+import javax.validation.GroupSequence;
+import javax.validation.groups.Default;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at GroupSequence( {Suit.class, Cloth.class })
+public class Suit {
+	@Max(value=50, groups = { Default.class, Cloth.class})
+	@Min(1)
+	private Integer size;
+	@Valid private Trousers trousers;
+	private Jacket jacket;
+
+	public Trousers getTrousers() {
+		return trousers;
+	}
+
+	public void setTrousers(Trousers trousers) {
+		this.trousers = trousers;
+	}
+
+	@Valid
+	public Jacket getJacket() {
+		return jacket;
+	}
+
+	public void setJacket(Jacket jacket) {
+		this.jacket = jacket;
+	}
+
+	public Integer getSize() {
+		return size;
+	}
+
+	public void setSize(Integer size) {
+		this.size = size;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/TraversableResolverTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/TraversableResolverTest.java
new file mode 100644
index 0000000..37400a7
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/TraversableResolverTest.java
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import java.lang.annotation.ElementType;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+import javax.validation.Valid;
+import javax.validation.Validator;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class TraversableResolverTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-524")
+	public void testClassConstraintsAreNotCallingTraversableResolver() {
+		Configuration<HibernateValidatorConfiguration> config = ValidatorUtil.getConfiguration();
+		config.traversableResolver( new ExceptionThrowingTraversableResolver() );
+		Validator validator = config.buildValidatorFactory().getValidator();
+		Set<ConstraintViolation<Bar>> violations = validator.validate( new Bar() );
+
+		assertNumberOfViolations( violations, 0 );
+	}
+
+	@ScriptAssert(lang = "groovy", script = "return true;")
+	private static class Foo {
+	}
+
+	private static class Bar {
+		@Valid
+		private List<Foo> foos = Arrays.asList( new Foo(), new Foo() );
+	}
+
+
+	public static class ExceptionThrowingTraversableResolver implements TraversableResolver {
+		public boolean isReachable(Object traversableObject,
+								   Path.Node traversableProperty,
+								   Class<?> rootBeanType,
+								   Path pathToTraversableObject,
+								   ElementType elementType) {
+
+			if ( ElementType.TYPE.equals( elementType ) ) {
+				throw new IllegalArgumentException( "ElementType.TYPE is not allowed as argument type" );
+			}
+
+			return true;
+		}
+
+		public boolean isCascadable(Object traversableObject,
+									Path.Node traversableProperty,
+									Class<?> rootBeanType,
+									Path pathToTraversableObject,
+									ElementType elementType) {
+
+			if ( ElementType.TYPE.equals( elementType ) ) {
+				throw new IllegalArgumentException( "ElementType.TYPE is not allowed as argument type" );
+			}
+
+			return true;
+		}
+	}
+}
+
+
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Trousers.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Trousers.java
new file mode 100644
index 0000000..3ff0735
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/Trousers.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.engine.traversableresolver;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.Max;
+import javax.validation.groups.Default;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Trousers {
+	@Min(value=70, groups = {Default.class, Cloth.class})
+	@Max(value=220)
+	private Integer length;
+
+	public Integer getLength() {
+		return length;
+	}
+
+	public void setLength(Integer length) {
+		this.length = length;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/BeanMetaDataManagerTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/BeanMetaDataManagerTest.java
new file mode 100644
index 0000000..0720f94
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/BeanMetaDataManagerTest.java
@@ -0,0 +1,137 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.util.logging.Log;
+import org.hibernate.validator.internal.util.logging.LoggerFactory;
+
+import static org.testng.Assert.assertNotSame;
+import static org.testng.Assert.fail;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class BeanMetaDataManagerTest {
+	private static final Log log = LoggerFactory.make();
+	// high enough to force a OutOfMemoryError in case references are not freed
+	private static final int MAX_ENTITY_COUNT = 100000;
+
+	@Test
+	public void testBeanMetaDataCanBeGarbageCollected() throws Exception {
+		BeanMetaDataManager metaDataManager = new BeanMetaDataManager( new ConstraintHelper() );
+
+		Class<?> lastIterationsBean = null;
+		int totalCreatedMetaDataInstances = 0;
+		int cachedBeanMetaDataInstances = 0;
+		for ( int i = 0; i < MAX_ENTITY_COUNT; i++ ) {
+			Class<?> c = new CustomClassLoader( Fubar.class.getName() ).loadClass( Fubar.class.getName() );
+			BeanMetaData meta = metaDataManager.getBeanMetaData( c );
+			assertNotSame( meta.getBeanClass(), lastIterationsBean, "The classes should differ in each iteration" );
+			lastIterationsBean = meta.getBeanClass();
+			totalCreatedMetaDataInstances++;
+			cachedBeanMetaDataInstances = metaDataManager.numberOfCachedBeanMetaDataInstances();
+
+			if ( cachedBeanMetaDataInstances < totalCreatedMetaDataInstances ) {
+				log.debug( "Garbage collection occurred and some metadata instances got garbage collected!" );
+				log.debug( "totalCreatedMetaDataInstances:" + totalCreatedMetaDataInstances );
+				log.debug( "cachedBeanMetaDataInstances:" + cachedBeanMetaDataInstances );
+				break;
+			}
+		}
+
+		if ( cachedBeanMetaDataInstances >= totalCreatedMetaDataInstances ) {
+			fail( "Metadata instances should be garbage collectible" );
+		}
+	}
+
+	@SuppressWarnings("unused")
+	public static class Fubar {
+		@NotNull
+		Object o;
+	}
+
+	public class CustomClassLoader extends ClassLoader {
+		private final String className;
+
+		public CustomClassLoader(String className) {
+			super( CustomClassLoader.class.getClassLoader() );
+			this.className = className;
+		}
+
+		public Class loadClass(String className) throws ClassNotFoundException {
+			if ( this.className.equals( className ) ) {
+				return myLoadClass( className, true );
+			}
+			else {
+				return super.loadClass( className );
+			}
+		}
+
+		protected Class<?> myLoadClass(String name, boolean resolve) throws ClassNotFoundException {
+			// make sure there is no parent delegation, instead call custom findClass
+			Class c = myFindClass( name );
+
+			if ( resolve ) {
+				resolveClass( c );
+			}
+			return c;
+		}
+
+		public Class myFindClass(String className) {
+			byte classByte[];
+			Class result;
+
+			try {
+				String classPath = ClassLoader.getSystemResource(
+						className.replace( '.', File.separatorChar )
+								+ ".class"
+				).getFile();
+				classByte = loadClassData( classPath );
+				result = defineClass( className, classByte, 0, classByte.length, null );
+				return result;
+			}
+			catch ( Exception e ) {
+				return null;
+			}
+		}
+
+		private byte[] loadClassData(String className) throws IOException {
+			File f;
+			f = new File( className );
+			int size = (int) f.length();
+			byte buff[] = new byte[size];
+			FileInputStream fis = new FileInputStream( f );
+			DataInputStream dis = new DataInputStream( fis );
+			dis.readFully( buff );
+			dis.close();
+			return buff;
+		}
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithAtValid.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithAtValid.java
new file mode 100644
index 0000000..285bff4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithAtValid.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.Valid;
+
+
+/**
+ * @author Gunnar Morling
+ */
+public class ChildWithAtValid extends ParentWithoutAtValid {
+
+	@Valid
+	public Order getOrder() {
+		return null;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid.java
new file mode 100644
index 0000000..560898a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+
+/**
+ * @author Gunnar Morling
+ */
+public class ChildWithoutAtValid extends ParentWithAtValid {
+
+	public Order getOrder() {
+		return null;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid2.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid2.java
new file mode 100644
index 0000000..eed32f6
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ChildWithoutAtValid2.java
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * @author Gunnar Morling
+ */
+public class ChildWithoutAtValid2 extends ParentWithoutAtValid {
+
+	@NotNull
+	public Order getOrder() {
+		return null;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Customer.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Customer.java
new file mode 100644
index 0000000..bea54de
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Customer.java
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.validation.Valid;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Customer implements Person {
+
+	private String firstName;
+	private String middleName;
+	private String lastName;
+
+	@Valid
+	private List<Order> orderList = new ArrayList<Order>();
+
+	public void addOrder(Order order) {
+		orderList.add( order );
+	}
+
+	public List<Order> getOrderList() {
+		return orderList;
+	}
+
+	public String getFirstName() {
+		return firstName;
+	}
+
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+
+	public String getMiddleName() {
+		return middleName;
+	}
+
+	public void setMiddleName(String middleName) {
+		this.middleName = middleName;
+	}
+
+	public String getLastName() {
+		return lastName;
+	}
+
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepository.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepository.java
new file mode 100644
index 0000000..8ef1d50
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepository.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+
+/**
+ * @author Gunnar Morling
+ */
+ at ScriptAssert(lang = "javascript", script = "some script")
+public class CustomerRepository {
+
+	public static interface ValidationGroup {
+	}
+
+	public Customer createCustomer(CharSequence firstName, @NotNull String lastName) {
+		return null;
+	}
+
+	public void saveCustomer(@Valid Customer customer) {
+	}
+
+	public void updateCustomer(Customer customer) {
+	}
+
+	@Valid
+	public Customer foo() {
+		return null;
+	}
+
+	@NotNull
+	public Customer bar() {
+		return null;
+	}
+
+	@NotNull(groups = ValidationGroup.class)
+	public int baz() {
+		return 0;
+	}
+
+	public void qux() {
+	}
+
+	public void zap(@Max(1) int i) {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepositoryExt.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepositoryExt.java
new file mode 100644
index 0000000..0e64edc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepositoryExt.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.constraints.Min;
+
+
+/**
+ * @author Gunnar Morling
+ */
+public class CustomerRepositoryExt extends CustomerRepository {
+
+	public static class CustomerExtension extends Customer {
+	}
+
+	public Customer createCustomer(CharSequence firstName, String lastName) {
+		return null;
+	}
+
+	public void saveCustomer(Customer customer) {
+	}
+
+	public void updateCustomer(Customer customer) {
+	}
+
+	public Customer foo() {
+		return null;
+	}
+
+	public CustomerExtension bar() {
+		return null;
+	}
+
+	@Min(0)
+	public int baz() {
+		return 0;
+	}
+
+	public void zap() {
+	}
+
+	@Min(0)
+	public int zip() {
+		return 0;
+	}
+
+	public void zap(@Min(0) int i) {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Engine.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Engine.java
new file mode 100644
index 0000000..0ef2ea5
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Engine.java
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,  
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.constraints.Pattern;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Engine {
+	@Pattern.List({
+			@Pattern(regexp = "^[A-Z0-9-]+$",
+					message = "must contain alphabetical characters only"),
+			@Pattern(regexp = "^....-....-....$", message = "must match ....-....-....")
+	})
+	private String serialNumber;
+
+	public String getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(String serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Order.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Order.java
new file mode 100644
index 0000000..65d8df2
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Order.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Order {
+	@NotNull(message = "Order number must be specified")
+	Integer orderNumber;
+
+	public Integer getOrderNumber() {
+		return orderNumber;
+	}
+
+	public void setOrderNumber(Integer orderNumber) {
+		this.orderNumber = orderNumber;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithAtValid.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithAtValid.java
new file mode 100644
index 0000000..638970d
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithAtValid.java
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import javax.validation.Valid;
+
+/**
+ * @author Gunnar Morling
+ */
+public class ParentWithAtValid {
+
+	@Valid
+	public Order getOrder() {
+		return null;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithoutAtValid.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithoutAtValid.java
new file mode 100644
index 0000000..3f4c6d6
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/ParentWithoutAtValid.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+
+/**
+ * @author Gunnar Morling
+ */
+public class ParentWithoutAtValid {
+
+	public Order getOrder() {
+		return null;
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Person.java
new file mode 100644
index 0000000..d7f75ce
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/Person.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata;
+
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface Person {
+	@NotEmpty(groups = PersonValidation.class)
+	String getFirstName();
+
+	String getMiddleName();
+
+	@NotEmpty
+	String getLastName();
+
+	public interface PersonValidation {
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/AggregatedMethodMetaDataTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/AggregatedMethodMetaDataTest.java
new file mode 100644
index 0000000..c82327b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/AggregatedMethodMetaDataTest.java
@@ -0,0 +1,158 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.aggregated;
+
+import java.lang.reflect.Method;
+import java.util.List;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.aggregated.MethodMetaData;
+import org.hibernate.validator.internal.metadata.aggregated.ParameterMetaData;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertIterableSize;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests creation of {@link MethodMetaData} in {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl}.
+ *
+ * @author Gunnar Morling
+ */
+public class AggregatedMethodMetaDataTest {
+
+	private BeanMetaData<CustomerRepositoryExt> beanMetaData;
+
+	@BeforeMethod
+	public void setupBeanMetaData() {
+
+		beanMetaData = new BeanMetaDataManager( new ConstraintHelper() ).getBeanMetaData( CustomerRepositoryExt.class );
+	}
+
+	@Test
+	public void methodWithConstrainedParameter() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "createCustomer", CharSequence.class, String.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+
+		List<ParameterMetaData> parameterMetaData = methodMetaData.getAllParameterMetaData();
+		assertEquals( parameterMetaData.size(), 2 );
+
+		assertFalse( parameterMetaData.get( 0 ).isConstrained() );
+		assertFalse( parameterMetaData.get( 0 ).isCascading() );
+
+		assertTrue( parameterMetaData.get( 1 ).isConstrained() );
+		assertFalse( parameterMetaData.get( 1 ).isCascading() );
+		assertIterableSize( parameterMetaData.get( 1 ), 1 );
+		assertEquals(
+				parameterMetaData.get( 1 ).iterator().next().getDescriptor().getAnnotation().annotationType(),
+				NotNull.class
+		);
+
+		assertEquals( parameterMetaData.get( 0 ), methodMetaData.getParameterMetaData( 0 ) );
+		assertEquals( parameterMetaData.get( 1 ), methodMetaData.getParameterMetaData( 1 ) );
+	}
+
+	@Test
+	public void methodWithCascadedParameter() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "saveCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+
+		List<ParameterMetaData> parameterMetaData = methodMetaData.getAllParameterMetaData();
+		assertEquals( parameterMetaData.size(), 1 );
+
+		assertTrue( parameterMetaData.get( 0 ).isConstrained() );
+		assertTrue( parameterMetaData.get( 0 ).isCascading() );
+		assertIterableSize( parameterMetaData.get( 0 ), 0 );
+
+		assertEquals( parameterMetaData.get( 0 ), methodMetaData.getParameterMetaData( 0 ) );
+	}
+
+	@Test
+	public void methodWithConstrainedReturnValue() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "bar" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 1 );
+		assertEquals(
+				methodMetaData.iterator().next().getDescriptor().getAnnotation().annotationType(), NotNull.class
+		);
+
+		List<ParameterMetaData> parameterMetaData = methodMetaData.getAllParameterMetaData();
+		assertEquals( parameterMetaData.size(), 0 );
+	}
+
+	@Test
+	public void returnValueConstraintsAddUpInHierarchy() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "baz" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 2 );
+	}
+
+	@Test
+	public void methodWithCascadedReturnValue() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "foo" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertTrue( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+	}
+
+	@Test
+	public void unconstrainedMethod() throws Exception {
+
+		Method method = CustomerRepositoryExt.class.getMethod( "updateCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertFalse( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/BeanMetaDataImplTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/BeanMetaDataImplTest.java
new file mode 100644
index 0000000..fbcf631
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/BeanMetaDataImplTest.java
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.aggregated;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import javax.validation.constraints.Min;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.aggregated.MethodMetaData;
+import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepository;
+import org.hibernate.validator.test.internal.engine.methodlevel.service.CustomerRepositoryImpl;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertIterableSize;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link BeanMetaData}.
+ *
+ * TODO GM: Check, whether these tests are still needed. They seem redundant to
+ * {@link MethodMetaDataTest} and {@link org.hibernate.validator.test.internal.metadata.aggregated.AggregatedMethodMetaDataTest}.
+ *
+ * @author Gunnar Morling
+ */
+public class BeanMetaDataImplTest {
+
+	@Test
+	public void nonCascadingConstraintAtMethodReturnValue() throws Exception {
+
+		BeanMetaData<CustomerRepository> metaData = setupBeanMetaData( CustomerRepository.class );
+
+		Method method = CustomerRepository.class.getMethod( "baz" );
+		MethodMetaData methodMetaData = metaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		ConstraintDescriptorImpl<? extends Annotation> descriptor = methodMetaData.iterator()
+				.next()
+				.getDescriptor();
+		assertEquals( descriptor.getAnnotation().annotationType(), Min.class );
+		assertEquals( descriptor.getAttributes().get( "value" ), 10L );
+	}
+
+	@Test
+	public void constraintFromBaseClass() throws Exception {
+
+		BeanMetaData<CustomerRepositoryImpl> metaData = setupBeanMetaData( CustomerRepositoryImpl.class );
+
+		Method method = CustomerRepositoryImpl.class.getMethod( "baz" );
+		MethodMetaData methodMetaData = metaData.getMetaDataFor( method );
+
+		assertIterableSize( methodMetaData, 1 );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+
+		ConstraintDescriptorImpl<? extends Annotation> descriptor = methodMetaData.iterator()
+				.next()
+				.getDescriptor();
+		assertEquals( descriptor.getAnnotation().annotationType(), Min.class );
+		assertEquals( descriptor.getAttributes().get( "value" ), 10L );
+	}
+
+	@Test
+	public void cascadingConstraintAtMethodReturnValue() throws Exception {
+
+		BeanMetaData<CustomerRepository> metaData = setupBeanMetaData( CustomerRepository.class );
+
+		Method method = CustomerRepository.class.getMethod( "findCustomerByName", String.class );
+		MethodMetaData methodMetaData = metaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertTrue( methodMetaData.isCascading() );
+		assertIterableSize( methodMetaData, 0 );
+	}
+
+	private <T> BeanMetaData<T> setupBeanMetaData(Class<T> clazz) {
+		return new BeanMetaDataManager( new ConstraintHelper() ).getBeanMetaData( clazz );
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/MethodMetaDataTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/MethodMetaDataTest.java
new file mode 100644
index 0000000..daf9550
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/MethodMetaDataTest.java
@@ -0,0 +1,126 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.aggregated;
+
+import java.lang.reflect.Method;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.aggregated.MethodMetaData;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedMethod;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertIterableSize;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests creation of {@link ConstrainedMethod} in {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl}.
+ *
+ * @author Gunnar Morling
+ */
+public class MethodMetaDataTest {
+
+	private BeanMetaData<CustomerRepository> beanMetaData;
+
+	@BeforeMethod
+	public void setupBeanMetaData() {
+
+		beanMetaData = new BeanMetaDataManager( new ConstraintHelper() ).getBeanMetaData( CustomerRepository.class );
+	}
+
+	@Test
+	public void methodWithConstrainedParameter() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "createCustomer", CharSequence.class, String.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getName(), method.getName() );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+		assertEquals( methodMetaData.getAllParameterMetaData().size(), 2 );
+	}
+
+	@Test
+	public void methodWithCascadedParameter() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "saveCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getName(), method.getName() );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+		assertEquals( methodMetaData.getAllParameterMetaData().size(), 1 );
+	}
+
+	@Test
+	public void methodWithConstrainedReturnValue() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "bar" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getName(), method.getName() );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 1 );
+		assertEquals(
+				methodMetaData.iterator().next().getDescriptor().getAnnotation().annotationType(), NotNull.class
+		);
+		assertEquals( methodMetaData.getAllParameterMetaData().size(), 0 );
+	}
+
+	@Test
+	public void methodWithCascadedReturnValue() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "foo" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getName(), method.getName() );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertTrue( methodMetaData.isCascading() );
+		assertTrue( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+		assertEquals( methodMetaData.getAllParameterMetaData().size(), 0 );
+	}
+
+	@Test
+	public void unconstrainedMethod() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "updateCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		assertEquals( methodMetaData.getName(), method.getName() );
+		assertEquals( methodMetaData.getParameterTypes(), method.getParameterTypes() );
+		assertFalse( methodMetaData.isCascading() );
+		assertFalse( methodMetaData.isConstrained() );
+		assertIterableSize( methodMetaData, 0 );
+		assertEquals( methodMetaData.getAllParameterMetaData().size(), 1 );
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/ParameterMetaDataTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/ParameterMetaDataTest.java
new file mode 100644
index 0000000..672db16
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/aggregated/ParameterMetaDataTest.java
@@ -0,0 +1,108 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.aggregated;
+
+import java.lang.reflect.Method;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
+import org.hibernate.validator.internal.metadata.BeanMetaDataManager;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.aggregated.MethodMetaData;
+import org.hibernate.validator.internal.metadata.aggregated.ParameterMetaData;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedParameter;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertIterableSize;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests creation of {@link ConstrainedParameter} in {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl}.
+ *
+ * @author Gunnar Morling
+ */
+public class ParameterMetaDataTest {
+
+	private BeanMetaData<CustomerRepository> beanMetaData;
+
+	@BeforeMethod
+	public void setupBeanMetaData() {
+
+		beanMetaData = new BeanMetaDataManager( new ConstraintHelper() ).getBeanMetaData( CustomerRepository.class );
+	}
+
+	@Test
+	public void constrainedParameterMetaData() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "createCustomer", CharSequence.class, String.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		ParameterMetaData parameterMetaData = methodMetaData.getParameterMetaData( 1 );
+
+		assertFalse( parameterMetaData.isCascading() );
+		assertTrue( parameterMetaData.isConstrained() );
+		assertEquals( parameterMetaData.getIndex(), 1 );
+		assertEquals( parameterMetaData.getName(), "arg1" );
+		assertIterableSize( parameterMetaData, 1 );
+		assertEquals(
+				parameterMetaData.iterator().next().getDescriptor().getAnnotation().annotationType(), NotNull.class
+		);
+	}
+
+	@Test
+	public void cascadingParameterMetaData() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "saveCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		ParameterMetaData parameterMetaData = methodMetaData.getParameterMetaData( 0 );
+
+		assertTrue( parameterMetaData.isCascading() );
+		assertTrue( parameterMetaData.isConstrained() );
+		assertEquals( parameterMetaData.getIndex(), 0 );
+		assertEquals( parameterMetaData.getName(), "arg0" );
+		assertIterableSize( parameterMetaData, 0 );
+	}
+
+	@Test
+	public void unconstrainedParameterMetaData() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "updateCustomer", Customer.class );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		ParameterMetaData parameterMetaData = methodMetaData.getParameterMetaData( 0 );
+
+		assertFalse( parameterMetaData.isCascading() );
+		assertFalse( parameterMetaData.isConstrained() );
+		assertIterableSize( parameterMetaData, 0 );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void illegalParameterIndexCausesException() throws Exception {
+
+		Method method = CustomerRepository.class.getMethod( "foo" );
+		MethodMetaData methodMetaData = beanMetaData.getMetaDataFor( method );
+
+		methodMetaData.getParameterMetaData( 0 );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/core/ConstraintHelperTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/core/ConstraintHelperTest.java
new file mode 100644
index 0000000..f7d6e6b
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/core/ConstraintHelperTest.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.core;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.test.internal.metadata.Engine;
+import org.hibernate.validator.test.internal.metadata.Order;
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintHelperTest {
+
+	private static ConstraintHelper constraintHelper;
+
+	@BeforeClass
+	public static void init() {
+		constraintHelper = new ConstraintHelper();
+	}
+
+	@Test
+	public void testGetMultiValueConstraints() throws Exception {
+		Engine engine = new Engine();
+		Field[] fields = engine.getClass().getDeclaredFields();
+		assertNotNull( fields );
+		assertTrue( fields.length == 1 );
+		ReflectionHelper.setAccessibility( fields[0] );
+
+		Annotation annotation = fields[0].getAnnotation( Pattern.List.class );
+		assertNotNull( annotation );
+		List<Annotation> multiValueConstraintAnnotations = constraintHelper.getMultiValueConstraints( annotation );
+		assertTrue( multiValueConstraintAnnotations.size() == 2, "There should be two constraint annotations" );
+		assertTrue( multiValueConstraintAnnotations.get( 0 ) instanceof Pattern, "Wrong constraint annotation" );
+		assertTrue( multiValueConstraintAnnotations.get( 1 ) instanceof Pattern, "Wrong constraint annotation" );
+
+
+		Order order = new Order();
+		fields = order.getClass().getDeclaredFields();
+		assertNotNull( fields );
+		assertTrue( fields.length == 1 );
+		ReflectionHelper.setAccessibility( fields[0] );
+
+		annotation = fields[0].getAnnotation( NotNull.class );
+		assertNotNull( annotation );
+		multiValueConstraintAnnotations = constraintHelper.getMultiValueConstraints( annotation );
+		assertTrue( multiValueConstraintAnnotations.size() == 0, "There should be no constraint annotations" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ElementDescriptorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ElementDescriptorTest.java
new file mode 100644
index 0000000..a5c9c8a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ElementDescriptorTest.java
@@ -0,0 +1,157 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.descriptor;
+
+import java.lang.annotation.ElementType;
+import java.util.Set;
+import javax.validation.Validator;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.ElementDescriptor;
+import javax.validation.metadata.PropertyDescriptor;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.test.internal.metadata.ChildWithAtValid;
+import org.hibernate.validator.test.internal.metadata.ChildWithoutAtValid;
+import org.hibernate.validator.test.internal.metadata.ChildWithoutAtValid2;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+import org.hibernate.validator.test.internal.metadata.Order;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ValidatorUtil.getValidator;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+
+/**
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class ElementDescriptorTest {
+
+	@Test
+	public void testGetTypeForConstrainedBean() {
+		Validator validator = ValidatorUtil.getValidator();
+		BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Customer.class );
+		assertEquals( beanDescriptor.getElementClass(), Customer.class, "Wrong type." );
+	}
+
+	@Test
+	public void testGetTypeForConstrainedProperty() {
+		ElementDescriptor elementDescriptor = ValidatorUtil.getPropertyDescriptor( Order.class, "orderNumber" );
+		assertEquals( elementDescriptor.getElementClass(), Integer.class, "Wrong type." );
+	}
+
+	@Test
+	public void testThatMethodLevelConstraintsAreNotReflectedByBeanDescriptor() {
+
+		BeanDescriptor beanDescriptor = getValidator().getConstraintsForClass( CustomerRepository.class );
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors = beanDescriptor.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 1, "Only the class-level @ScriptAssert is expected." );
+
+		constraintDescriptors = beanDescriptor.findConstraints()
+				.declaredOn( ElementType.PARAMETER )
+				.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 0 );
+	}
+
+	/**
+	 * HV-95
+	 */
+	@Test
+	public void testElementDescriptorForProperty() {
+		ElementDescriptor elementDescriptor = ValidatorUtil.getPropertyDescriptor( Order.class, "orderNumber" );
+		Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();
+		assertTrue( constraintDescriptors.size() == 1, "There should be a descriptor" );
+	}
+
+	/**
+	 * HV-95
+	 */
+	@Test
+	public void testElementDescriptorImmutable() {
+		ElementDescriptor elementDescriptor = ValidatorUtil.getPropertyDescriptor( Order.class, "orderNumber" );
+		Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();
+
+		try {
+			constraintDescriptors.add( null );
+			fail( "Set should be immutable" );
+		}
+		catch ( UnsupportedOperationException e ) {
+			// success
+		}
+
+		try {
+			constraintDescriptors.remove( null );
+			fail( "Set should be immutable" );
+		}
+		catch ( UnsupportedOperationException e ) {
+			// success
+		}
+	}
+
+	@Test
+	public void testAtValidDefinedInHierarchyForPropertyDescriptor() {
+
+		PropertyDescriptor propertyDescriptor = ValidatorUtil.getPropertyDescriptor(
+				ChildWithoutAtValid.class,
+				"order"
+		);
+		assertTrue(
+				propertyDescriptor.isCascaded(),
+				"@Valid defined on getter in super type should be reflected by PropertyDescriptor."
+		);
+	}
+
+	@Test
+	public void testAtValidDefinedLocallyForPropertyDescriptor() {
+
+		PropertyDescriptor propertyDescriptor = ValidatorUtil.getPropertyDescriptor( ChildWithAtValid.class, "order" );
+		assertTrue(
+				propertyDescriptor.isCascaded(),
+				"@Valid defined on local getter in type hierarchy should be reflected by PropertyDescriptor."
+		);
+	}
+
+	@Test
+	public void testAtValidNotDefinedForPropertyDescriptor() {
+
+		PropertyDescriptor propertyDescriptor = ValidatorUtil.getPropertyDescriptor(
+				ChildWithoutAtValid2.class,
+				"order"
+		);
+		assertFalse(
+				propertyDescriptor.isCascaded(),
+				"@Valid given neither locally nor in hierarchy should be reflected by PropertyDescriptor."
+		);
+	}
+
+	@Test
+	public void testGetNameFromPropertyDescriptor() {
+
+		PropertyDescriptor propertyDescriptor = ValidatorUtil.getPropertyDescriptor(
+				ChildWithoutAtValid2.class,
+				"order"
+		);
+		assertEquals( propertyDescriptor.getPropertyName(), "order" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/MethodDescriptorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/MethodDescriptorTest.java
new file mode 100644
index 0000000..c851f52
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/MethodDescriptorTest.java
@@ -0,0 +1,171 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.descriptor;
+
+import java.util.List;
+import java.util.Set;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.Scope;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository.ValidationGroup;
+import org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt;
+import org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt.CustomerExtension;
+
+import static org.hibernate.validator.internal.util.Contracts.assertNotNull;
+import static org.hibernate.validator.testutil.ValidatorUtil.getMethodDescriptor;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Gunnar Morling
+ */
+public class MethodDescriptorTest {
+
+	@Test
+	public void testGetMethod() throws Exception {
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "foo" );
+		assertEquals( methodDescriptor.getMethodName(), "foo" );
+	}
+
+	@Test
+	public void testIsCascaded() {
+		MethodDescriptor cascadingMethodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "foo" );
+		assertTrue( cascadingMethodDescriptor.isCascaded() );
+
+		MethodDescriptor nonCascadingMethodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "baz" );
+		assertFalse( nonCascadingMethodDescriptor.isCascaded() );
+	}
+
+	@Test
+	public void testHasConstraints() {
+		MethodDescriptor constrainedMethodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "bar" );
+		assertTrue( constrainedMethodDescriptor.hasConstraints() );
+
+		MethodDescriptor unconstrainedMethodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "qux" );
+		assertFalse( unconstrainedMethodDescriptor.hasConstraints() );
+	}
+
+	@Test
+	public void testGetElementClass() {
+		//the return type as defined in the base type
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepository.class, "bar" );
+		assertEquals( methodDescriptor.getElementClass(), Customer.class );
+
+		//the return type is now the one as defined in the derived type (covariant return type)
+		methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "bar" );
+		assertEquals( methodDescriptor.getElementClass(), CustomerExtension.class );
+	}
+
+	@Test
+	public void testGetConstraintDescriptors() {
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "bar" );
+
+		assertEquals( methodDescriptor.getConstraintDescriptors().size(), 1 );
+		assertEquals(
+				methodDescriptor.getConstraintDescriptors().iterator().next().getAnnotation().annotationType(),
+				NotNull.class
+		);
+
+		methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "baz" );
+		assertEquals( methodDescriptor.getConstraintDescriptors().size(), 2 );
+	}
+
+	@Test(description = "HV-443")
+	public void testFindReturnValueConstraintLookingAt() {
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "baz" );
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors = methodDescriptor.findConstraints()
+				.lookingAt( Scope.LOCAL_ELEMENT )
+				.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 1 );
+		assertEquals( constraintDescriptors.iterator().next().getAnnotation().annotationType(), Min.class );
+
+		constraintDescriptors = methodDescriptor.findConstraints()
+				.lookingAt( Scope.HIERARCHY )
+				.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 2 );
+	}
+
+	@Test(description = "HV-443")
+	public void testFindParameterConstraintLookingAt() {
+		ParameterDescriptor parameterDescriptor = getMethodDescriptor(
+				CustomerRepositoryExt.class,
+				"zap",
+				int.class
+		).getParameterDescriptors().get( 0 );
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors = parameterDescriptor.findConstraints()
+				.lookingAt( Scope.LOCAL_ELEMENT )
+				.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 1 );
+		assertEquals( constraintDescriptors.iterator().next().getAnnotation().annotationType(), Min.class );
+
+		constraintDescriptors = parameterDescriptor.findConstraints()
+				.lookingAt( Scope.HIERARCHY )
+				.getConstraintDescriptors();
+		assertEquals( constraintDescriptors.size(), 2 );
+	}
+
+	@Test
+	public void testFindConstraintMatchingGroups() {
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "baz" );
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors = methodDescriptor.findConstraints()
+				.unorderedAndMatchingGroups( ValidationGroup.class )
+				.getConstraintDescriptors();
+
+		assertEquals( constraintDescriptors.size(), 1 );
+		assertEquals( constraintDescriptors.iterator().next().getAnnotation().annotationType(), NotNull.class );
+	}
+
+	@Test
+	public void testGetParameterConstraints() {
+		MethodDescriptor methodDescriptor = getMethodDescriptor(
+				CustomerRepositoryExt.class, "createCustomer", CharSequence.class, String.class
+		);
+
+		List<ParameterDescriptor> parameterConstraints = methodDescriptor.getParameterDescriptors();
+		assertNotNull( parameterConstraints );
+		assertEquals( parameterConstraints.size(), 2 );
+
+		ParameterDescriptor parameterDescriptor1 = parameterConstraints.get( 0 );
+		assertEquals( parameterDescriptor1.getElementClass(), CharSequence.class );
+		assertFalse( parameterDescriptor1.hasConstraints() );
+
+		ParameterDescriptor parameterDescriptor2 = parameterConstraints.get( 1 );
+		assertEquals( parameterDescriptor2.getElementClass(), String.class );
+		assertTrue( parameterDescriptor2.hasConstraints() );
+	}
+
+	@Test
+	public void testGetParameterConstraintsForParameterlessMethod() {
+		MethodDescriptor methodDescriptor = getMethodDescriptor( CustomerRepositoryExt.class, "baz" );
+
+		List<ParameterDescriptor> parameterConstraints = methodDescriptor.getParameterDescriptors();
+		assertNotNull( parameterConstraints );
+		assertEquals( parameterConstraints.size(), 0 );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ParameterDescriptorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ParameterDescriptorTest.java
new file mode 100644
index 0000000..2dffe00
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/ParameterDescriptorTest.java
@@ -0,0 +1,141 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.descriptor;
+
+import java.util.Set;
+import javax.validation.constraints.NotNull;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.Scope;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+import org.hibernate.validator.test.internal.metadata.Customer;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+import org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt;
+
+import static org.hibernate.validator.testutil.ValidatorUtil.getParameterDescriptor;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * @author Gunnar Morling
+ */
+public class ParameterDescriptorTest {
+
+	private ParameterDescriptor createCustomerParameter1;
+	private ParameterDescriptor createCustomerParameter2;
+
+	@BeforeMethod
+	public void setUpDescriptors() {
+
+		createCustomerParameter1 = getParameterDescriptor(
+				CustomerRepositoryExt.class, "createCustomer", new Class<?>[] { CharSequence.class, String.class }, 0
+		);
+		createCustomerParameter2 = getParameterDescriptor(
+				CustomerRepositoryExt.class, "createCustomer", new Class<?>[] { CharSequence.class, String.class }, 1
+		);
+	}
+
+	@Test
+	public void testGetElementClass() {
+
+		assertEquals( createCustomerParameter1.getElementClass(), CharSequence.class );
+		assertEquals( createCustomerParameter2.getElementClass(), String.class );
+	}
+
+	@Test
+	public void testHasConstraints() {
+
+		assertFalse( createCustomerParameter1.hasConstraints() );
+		assertTrue( createCustomerParameter2.hasConstraints() );
+	}
+
+	@Test
+	public void testGetConstraintDescriptors() {
+
+		assertTrue( createCustomerParameter1.getConstraintDescriptors().isEmpty() );
+
+		assertEquals( createCustomerParameter2.getConstraintDescriptors().size(), 1 );
+		assertEquals(
+				createCustomerParameter2.getConstraintDescriptors().iterator().next().getAnnotation().annotationType(),
+				NotNull.class
+		);
+	}
+
+	@Test(enabled = false, description = "Temporarily disabled due to HV-443")
+	public void testFindConstraintLookingAtLocalElement() {
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors =
+				createCustomerParameter2.findConstraints().lookingAt( Scope.LOCAL_ELEMENT ).getConstraintDescriptors();
+
+		assertEquals(
+				constraintDescriptors.size(),
+				0,
+				"No local constraint for CustomerRepositoryExt#createCustomer(), arg1, expected."
+		);
+
+		ParameterDescriptor createCustomerParameter2OnBaseType = getParameterDescriptor(
+				CustomerRepository.class, "createCustomer", new Class<?>[] { CharSequence.class, String.class }, 1
+		);
+
+		constraintDescriptors =
+				createCustomerParameter2OnBaseType.findConstraints()
+						.lookingAt( Scope.LOCAL_ELEMENT )
+						.getConstraintDescriptors();
+
+		assertEquals(
+				constraintDescriptors.size(),
+				1,
+				"One local constraint for CustomerRepository#createCustomer(), arg1, expected."
+		);
+	}
+
+	@Test
+	public void testFindConstraintLookingAtHierarchy() {
+
+		Set<ConstraintDescriptor<?>> constraintDescriptors =
+				createCustomerParameter2.findConstraints().lookingAt( Scope.HIERARCHY ).getConstraintDescriptors();
+
+		assertEquals(
+				constraintDescriptors.size(),
+				1,
+				"One hierarchy constraint for CustomerRepositoryExt#createCustomer(), arg1, expected."
+		);
+	}
+
+	@Test
+	public void testGetIndex() {
+
+		assertEquals( createCustomerParameter1.getIndex(), 0 );
+		assertEquals( createCustomerParameter2.getIndex(), 1 );
+	}
+
+	@Test
+	public void testIsCascaded() {
+
+		assertFalse( createCustomerParameter1.isCascaded() );
+
+		ParameterDescriptor saveCustomerParameter = getParameterDescriptor(
+				CustomerRepositoryExt.class, "saveCustomer", new Class<?>[] { Customer.class }, 0
+		);
+		assertTrue( saveCustomerParameter.isCascaded() );
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/TypeDescriptorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/TypeDescriptorTest.java
new file mode 100644
index 0000000..14ed4d3
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/descriptor/TypeDescriptorTest.java
@@ -0,0 +1,266 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.descriptor;
+
+import java.util.List;
+import java.util.Set;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+import org.hibernate.validator.test.internal.metadata.CustomerRepository;
+import org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt;
+
+import static org.hibernate.validator.testutil.ValidatorUtil.getTypeDescriptor;
+import static org.hibernate.validator.internal.util.CollectionHelper.asSet;
+import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
+import static org.hibernate.validator.internal.util.Contracts.assertNotNull;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Unit test for {@link TypeDescriptor} and its creation.
+ *
+ * @author Gunnar Morling
+ */
+public class TypeDescriptorTest {
+
+	@Test
+	public void testGetElementClass() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		assertEquals( descriptor.getElementClass(), CustomerRepository.class );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForUnconstrainedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( UnconstrainedType.class );
+
+		assertFalse( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForBeanConstrainedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForParameterConstrainedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( ParameterConstrainedType.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForReturnValueConstrainedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( ReturnValueConstrainedType.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForCascadingParameterType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CascadingParameterType.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForCascadingReturnValueType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CascadingReturnValueType.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testIsTypeConstrainedForDerivedConstrainedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( DerivedConstrainedType.class );
+
+		assertTrue( descriptor.isTypeConstrained() );
+	}
+
+	@Test
+	public void testGetConstraintDescriptors() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		Set<ConstraintDescriptor<?>> constraintDescriptors = descriptor.getConstraintDescriptors();
+
+		assertEquals( constraintDescriptors.size(), 1 );
+		assertEquals( constraintDescriptors.iterator().next().getAnnotation().annotationType(), ScriptAssert.class );
+	}
+
+	@Test
+	public void testGetBeanDescriptor() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		BeanDescriptor beanDescriptor = descriptor.getBeanDescriptor();
+
+		assertNotNull( beanDescriptor );
+		assertEquals( beanDescriptor.getElementClass(), CustomerRepository.class );
+	}
+
+	@Test
+	public void testGetConstraintsForMethod() throws Exception {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		MethodDescriptor methodDescriptor = descriptor.getConstraintsForMethod( "foo" );
+
+		assertNotNull( methodDescriptor );
+	}
+
+
+	 // A method descriptor can be retrieved by specifying an overridden method
+	 // from a base type.
+	@Test
+	public void testGetConstraintsForOverriddenMethod() throws Exception {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepositoryExt.class );
+		MethodDescriptor methodDescriptor = descriptor.getConstraintsForMethod( "foo" );
+
+		assertNotNull( methodDescriptor );
+	}
+
+	 // A method descriptor can be retrieved by specifying a method from a base
+	 // type (qux() is not defined on CustomerRepositoryExt, but only on
+	 // CustomerRepository).
+	@Test
+	public void testGetConstraintsForMethodFromBaseType() throws Exception {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepositoryExt.class );
+		MethodDescriptor methodDescriptor = descriptor.getConstraintsForMethod( "qux" );
+
+		assertNotNull( methodDescriptor );
+	}
+
+	@Test
+	public void testGetConstraintsForUnknownMethod() throws Exception {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		assertNull( descriptor.getConstraintsForMethod( "zap" ) );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void testGetConstraintsFailsForNullMethod() throws Exception {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		descriptor.getConstraintsForMethod( null );
+	}
+
+	@Test
+	public void testGetConstrainedMethods() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepository.class );
+		Set<MethodDescriptor> constrainedMethods = descriptor.getConstrainedMethods();
+
+		assertEquals( constrainedMethods.size(), 6 );
+		assertEquals(
+				getMethodNames( constrainedMethods ),
+				asSet( "createCustomer", "saveCustomer", "foo", "bar", "baz", "zap" )
+		);
+	}
+
+	@Test
+	public void testGetConstrainedMethodsForDerivedType() {
+
+		TypeDescriptor descriptor = getTypeDescriptor( CustomerRepositoryExt.class );
+		Set<MethodDescriptor> constrainedMethods = descriptor.getConstrainedMethods();
+
+		assertEquals( constrainedMethods.size(), 7 );
+		assertEquals(
+				getMethodNames( constrainedMethods ),
+				asSet( "createCustomer", "saveCustomer", "foo", "bar", "baz", "zip", "zap" )
+		);
+	}
+
+	private Set<String> getMethodNames(Set<MethodDescriptor> descriptors) {
+
+		Set<String> theValue = newHashSet();
+
+		for ( MethodDescriptor methodDescriptor : descriptors ) {
+			theValue.add( methodDescriptor.getMethodName() );
+		}
+
+		return theValue;
+	}
+
+	private static class UnconstrainedType {
+
+		@SuppressWarnings("unused")
+		public void foo(String foo) {
+
+		}
+	}
+
+	private static class ParameterConstrainedType {
+
+		@SuppressWarnings("unused")
+		public void foo(@NotNull String foo) {
+
+		}
+	}
+
+	private static class CascadingParameterType {
+
+		@SuppressWarnings("unused")
+		public void foo(@Valid List<String> foo) {
+
+		}
+	}
+
+	private static class ReturnValueConstrainedType {
+
+		@NotNull
+		@SuppressWarnings("unused")
+		public String foo(String foo) {
+			return null;
+		}
+	}
+
+	private static class CascadingReturnValueType {
+
+		@Valid
+		@SuppressWarnings("unused")
+		public List<String> foo(String foo) {
+			return null;
+		}
+	}
+
+	private static class DerivedConstrainedType extends ParameterConstrainedType {
+
+		public void foo(String foo) {
+
+		}
+	}
+
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/provider/AnnotationMetaDataProviderTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/provider/AnnotationMetaDataProviderTest.java
new file mode 100644
index 0000000..5e9757f
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/metadata/provider/AnnotationMetaDataProviderTest.java
@@ -0,0 +1,125 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.metadata.provider;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.List;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.metadata.ConstraintDescriptor;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+import org.hibernate.validator.internal.metadata.core.AnnotationProcessingOptions;
+import org.hibernate.validator.internal.metadata.core.ConstraintHelper;
+import org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider;
+import org.hibernate.validator.internal.metadata.raw.BeanConfiguration;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedElement;
+import org.hibernate.validator.internal.metadata.raw.ConstrainedType;
+import org.hibernate.validator.testutil.TestForIssue;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertIterableSize;
+import static org.testng.Assert.assertEquals;
+
+/**
+ * Unit test for {@link AnnotationMetaDataProvider}.
+ *
+ * @author Gunnar Morling
+ */
+public class AnnotationMetaDataProviderTest {
+
+	private AnnotationMetaDataProvider provider;
+
+	@BeforeMethod
+	public void setUpProvider() {
+		provider = new AnnotationMetaDataProvider(
+				new ConstraintHelper(),
+				new AnnotationProcessingOptions()
+		);
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-626")
+	public void onlyLocallyDefinedConstraintsAreConsidered() {
+
+		List<BeanConfiguration<? super Person>> beanConfigurations = provider.getBeanConfigurationForHierarchy( Person.class );
+
+		ConstrainedType personType = findConstrainedType( beanConfigurations, Person.class );
+		assertIterableSize( personType.getConstraints(), 1 );
+		ConstraintDescriptor<?> constraintInSubType = personType.getConstraints()
+				.iterator()
+				.next()
+				.getDescriptor();
+		assertEquals( constraintInSubType.getAnnotation().annotationType(), ScriptAssert.class );
+
+		ConstrainedType personBaseType = findConstrainedType( beanConfigurations, PersonBase.class );
+		assertIterableSize( personBaseType.getConstraints(), 1 );
+
+		ConstraintDescriptor<?> constraintInSuperType = personBaseType.getConstraints()
+				.iterator()
+				.next()
+				.getDescriptor();
+		assertEquals( constraintInSuperType.getAnnotation().annotationType(), ClassLevelConstraint.class );
+	}
+
+	private <T> ConstrainedType findConstrainedType(Iterable<BeanConfiguration<? super T>> beanConfigurations, Class<? super T> type) {
+		for ( BeanConfiguration<?> oneConfiguration : beanConfigurations ) {
+			for ( ConstrainedElement constrainedElement : oneConfiguration.getConstrainedElements() ) {
+				if ( constrainedElement.getLocation().getElementType() == ElementType.TYPE ) {
+					ConstrainedType constrainedType = (ConstrainedType) constrainedElement;
+					if ( constrainedType.getLocation().getBeanClass().equals( type ) ) {
+						return constrainedType;
+					}
+				}
+			}
+		}
+
+		throw new RuntimeException( "Found no constrained element for type " + type );
+	}
+
+	@ClassLevelConstraint("some script")
+	private static class PersonBase {
+	}
+
+	@ScriptAssert(lang = "javascript", script = "some script")
+	private static class Person extends PersonBase {
+	}
+
+	@Target({ TYPE })
+	@Retention(RUNTIME)
+	@Constraint(validatedBy = { })
+	@Documented
+	@Inherited
+	public @interface ClassLevelConstraint {
+
+		String message() default "{ClassLevelConstraint.message}";
+
+		Class<?>[] groups() default { };
+
+		Class<? extends Payload>[] payload() default { };
+
+		String value();
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/BoundariesConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/BoundariesConstraintValidator.java
new file mode 100644
index 0000000..952918a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/BoundariesConstraintValidator.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+import java.lang.annotation.Annotation;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public abstract class BoundariesConstraintValidator<T extends Annotation> implements ConstraintValidator<T, Integer> {
+	private int low;
+	private int high;
+
+	protected void initialize(int low, int high) {
+		this.low = low;
+		this.high = high;
+	}
+
+	public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) {
+		return value >= low && value <= high;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/IdentitySetTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/IdentitySetTest.java
new file mode 100644
index 0000000..add4f02
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/IdentitySetTest.java
@@ -0,0 +1,77 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.IdentitySet;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class IdentitySetTest {
+
+	@SuppressWarnings("unchecked")
+	@Test
+	public void testAddIdenticalInstance() {
+		Set identitySet = new IdentitySet();
+		Set hashSet = new HashSet();
+		assertTrue( identitySet.size() == 0 );
+		assertTrue( hashSet.size() == 0 );
+
+		Object o1 = new Object() {
+			int counter = 0;
+
+			public int hashCode() {
+				return counter++;
+			}
+
+			public boolean equals() {
+				return false;
+			}
+		};
+		identitySet.add( o1 );
+		hashSet.add( o1 );
+		assertTrue( identitySet.size() == 1 );
+		assertTrue( hashSet.size() == 1 );
+
+		identitySet.add( o1 );
+		hashSet.add( o1 );
+		assertTrue( identitySet.size() == 1 );
+		assertTrue( hashSet.size() == 2 );
+
+		Object o2 = new Object() {
+			int counter = 0;
+
+			public int hashCode() {
+				return counter++;
+			}
+
+			public boolean equals() {
+				return false;
+			}
+		};
+		identitySet.add( o2 );
+		hashSet.add( o2 );
+		assertTrue( identitySet.size() == 2 );
+		assertTrue( hashSet.size() == 3 );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/LazyValidatorFactoryTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/LazyValidatorFactoryTest.java
new file mode 100644
index 0000000..ae7df78
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/LazyValidatorFactoryTest.java
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.test.internal.util;
+
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.LazyValidatorFactory;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class LazyValidatorFactoryTest {
+	/**
+	 * Simple test that makes sure this class works.
+	 * The lazy feature is not tested per se
+	 * nor is the fact that the default provider is forced to Hibernate Validator
+	 */
+	@Test
+	public void testLazyValidatorFactory() {
+		LazyValidatorFactory factory = new LazyValidatorFactory();
+		Validator validator = factory.getValidator();
+		assertEquals( 1, validator.validate( new A() ).size() );
+
+		factory = new LazyValidatorFactory( Validation.byDefaultProvider().configure() );
+		validator = factory.getValidator();
+		assertEquals( 1, validator.validate( new A() ).size() );
+	}
+
+	public static class A {
+		@NotNull
+		String b;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ModUtilTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ModUtilTest.java
new file mode 100644
index 0000000..fdf11c9
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ModUtilTest.java
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.ModUtil;
+
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Tests for the {@code ModUtil}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ModUtilTest {
+	@Test
+	public void testPassMod10() throws Exception {
+		List<Integer> digits = Arrays.asList( 7, 3 );
+		assertTrue( ModUtil.passesMod10Test( digits, 1 ) );
+
+		digits = Arrays.asList( 7, 9, 9, 2, 7, 3, 9, 8, 7, 1, 3 );
+		assertTrue( ModUtil.passesMod10Test( digits, 2 ) );
+	}
+
+	@Test
+	public void testFailMod10() throws Exception {
+		List<Integer> digits = Arrays.asList( 7, 2 );
+		assertFalse( ModUtil.passesMod10Test( digits, 1 ) );
+
+		digits = Arrays.asList( 7, 9, 9, 2, 7, 3, 9, 8, 7, 1, 4 );
+		assertFalse( ModUtil.passesMod10Test( digits, 2 ) );
+	}
+
+	@Test
+	public void testPassMod11() throws Exception {
+		List<Integer> digits = Arrays.asList( 2, 7 );
+		assertTrue( ModUtil.passesMod11Test( digits, 11 ) );
+
+		digits = Arrays.asList( 0, 3, 6, 5, 3, 2, 7 );
+		assertTrue( ModUtil.passesMod11Test( digits, 11 ) );
+
+		digits = Arrays.asList( 1, 3, 4, 2, 4, 1, 3, 1, 3, 0 );
+		assertTrue( ModUtil.passesMod11Test( digits, 11 ) );
+	}
+
+	@Test
+	public void testFailMod11() throws Exception {
+		List<Integer> digits = Arrays.asList( 2, 6 );
+		assertFalse( ModUtil.passesMod11Test( digits, 11 ) );
+
+		digits = Arrays.asList( 0, 3, 6, 5, 3, 2, 1 );
+		assertFalse( ModUtil.passesMod11Test( digits, 11 ) );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/Positive.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/Positive.java
new file mode 100644
index 0000000..f632243
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/Positive.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import javax.validation.Constraint;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Constraint( validatedBy = { PositiveConstraintValidator.class })
+ at Target({ METHOD, FIELD, ANNOTATION_TYPE })
+ at Retention(RUNTIME)
+ at Documented
+public @interface Positive {
+	public abstract String message() default "{validation.positive}";
+	public abstract Class<?>[] groups() default {};
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/PositiveConstraintValidator.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/PositiveConstraintValidator.java
new file mode 100644
index 0000000..2145af9
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/PositiveConstraintValidator.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class PositiveConstraintValidator extends BoundariesConstraintValidator<Positive> {
+	public void initialize(Positive constraintAnnotation) {
+		super.initialize( 0, Integer.MAX_VALUE );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ReflectionHelperTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ReflectionHelperTest.java
new file mode 100644
index 0000000..7b2937c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/ReflectionHelperTest.java
@@ -0,0 +1,206 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeSet;
+import javax.validation.Payload;
+import javax.validation.ValidationException;
+import javax.validation.constraints.NotNull;
+import javax.validation.groups.Default;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.ReflectionHelper;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+/**
+ * Tests for the {@code ReflectionHelper}.
+ *
+ * @author Hardy Ferentschik
+ */
+public class ReflectionHelperTest {
+
+	@Test
+	public void testIsIterable() throws Exception {
+		Type type = TestTypes.class.getField( "stringList" ).getGenericType();
+		assertTrue( ReflectionHelper.isIterable( type ) );
+
+		assertTrue( ReflectionHelper.isIterable( TreeSet.class ) );
+
+		assertTrue( ReflectionHelper.isIterable( List.class ) );
+		assertTrue( ReflectionHelper.isIterable( HashSet.class ) );
+		assertTrue( ReflectionHelper.isIterable( Iterable.class ) );
+		assertTrue( ReflectionHelper.isIterable( Collection.class ) );
+
+		assertFalse( ReflectionHelper.isIterable( null ) );
+		assertFalse( ReflectionHelper.isIterable( Object.class ) );
+	}
+
+	@Test
+	public void testIsMap() throws Exception {
+		assertTrue( ReflectionHelper.isMap( Map.class ) );
+		assertTrue( ReflectionHelper.isMap( SortedMap.class ) );
+
+		Type type = TestTypes.class.getField( "objectMap" ).getGenericType();
+		assertTrue( ReflectionHelper.isMap( type ) );
+
+		assertFalse( ReflectionHelper.isMap( null ) );
+		assertFalse( ReflectionHelper.isMap( Object.class ) );
+	}
+
+	@Test
+	public void testGetIndexedType() throws Exception {
+		Type type = TestTypes.class.getField( "stringList" ).getGenericType();
+		assertEquals( String.class, ReflectionHelper.getIndexedType( type ) );
+
+		type = TestTypes.class.getField( "objectMap" ).getGenericType();
+		assertEquals( Object.class, ReflectionHelper.getIndexedType( type ) );
+
+		type = TestTypes.class.getField( "stringArray" ).getGenericType();
+		assertEquals( String.class, ReflectionHelper.getIndexedType( type ) );
+	}
+
+	@Test
+	public void testGetIndexedValueForMap() {
+		Map<String, Object> map = new HashMap<String, Object>();
+		Object testObject = new Object();
+		String key = "key";
+		map.put( key, testObject );
+
+		Object value = ReflectionHelper.getMappedValue( map, key );
+		assertEquals( value, testObject, "We should be able to retrieve the indexed object" );
+
+		value = ReflectionHelper.getMappedValue( map, "foo" );
+		assertNull( value, "A non existent index should return the null value" );
+
+		value = ReflectionHelper.getMappedValue( map, "2" );
+		assertNull( value, "A non existent index should return the null value" );
+	}
+
+	@Test
+	public void testGetIndexedValueForList() {
+		List<Object> list = new ArrayList<Object>();
+		Object testObject = new Object();
+		list.add( testObject );
+
+		Object value = ReflectionHelper.getIndexedValue( list, 0 );
+		assertEquals( value, testObject, "We should be able to retrieve the indexed object" );
+
+		value = ReflectionHelper.getIndexedValue( list, 2 );
+		assertNull( value, "A non existent index should return the null value" );
+	}
+
+	@Test
+	public void testGetIndexedValueForNull() {
+		Object value = ReflectionHelper.getIndexedValue( null, 0 );
+		assertNull( value );
+	}
+
+	@Test
+	public void testGetMessageParameter() {
+		NotNull testAnnotation = new NotNull() {
+			public String message() {
+				return "test";
+			}
+
+			public Class<?>[] groups() {
+				return new Class<?>[] { Default.class };
+			}
+
+			public Class<? extends Payload>[] payload() {
+				@SuppressWarnings("unchecked")
+				Class<? extends Payload>[] classes = new Class[] { };
+				return classes;
+			}
+
+			public Class<? extends Annotation> annotationType() {
+				return this.getClass();
+			}
+		};
+		String message = ReflectionHelper.getAnnotationParameter( testAnnotation, "message", String.class );
+		assertEquals( "test", message, "Wrong message" );
+
+		Class<?>[] group = ReflectionHelper.getAnnotationParameter( testAnnotation, "groups", Class[].class );
+		assertEquals( group[0], Default.class, "Wrong message" );
+
+		try {
+			ReflectionHelper.getAnnotationParameter( testAnnotation, "message", Integer.class );
+			fail();
+		}
+		catch ( ValidationException e ) {
+			assertTrue( e.getMessage().contains( "Wrong parameter type." ), "Wrong exception message" );
+		}
+
+		try {
+			ReflectionHelper.getAnnotationParameter( testAnnotation, "foo", Integer.class );
+			fail();
+		}
+		catch ( ValidationException e ) {
+			assertTrue(
+					e.getMessage().contains( "The specified annotation defines no parameter" ),
+					"Wrong exception message"
+			);
+		}
+	}
+
+	@Test
+	public void testPropertyExists() {
+		assertTrue( ReflectionHelper.propertyExists( Foo.class, "foo", FIELD ) );
+		assertFalse( ReflectionHelper.propertyExists( Foo.class, "foo", METHOD ) );
+		assertFalse( ReflectionHelper.propertyExists( Foo.class, "bar", FIELD ) );
+		assertTrue( ReflectionHelper.propertyExists( Foo.class, "bar", METHOD ) );
+
+		try {
+			assertTrue( ReflectionHelper.propertyExists( Foo.class, "bar", TYPE ) );
+			fail();
+		}
+		catch ( IllegalArgumentException e ) {
+			// success
+		}
+	}
+
+	public class TestTypes {
+		public List<String> stringList;
+		public Map<String, Object> objectMap;
+		public String[] stringArray;
+	}
+
+	public class Foo {
+		String foo;
+
+		public String getBar() {
+			return "bar";
+		}
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/TypeHelperTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/TypeHelperTest.java
new file mode 100644
index 0000000..a505122
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/TypeHelperTest.java
@@ -0,0 +1,928 @@
+// code originates from TypeUtilsTest.java in jtype (http://code.google.com/p/jtype/) and has been modified to suite
+// the HV requirements and code style
+/*
+ * Copyright 2009 IIZUKA Software Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.test.internal.util;
+
+import java.io.Serializable;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.TypeHelper;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Tests {@code TypeUtils}.
+ *
+ * @author Mark Hobson
+ * @see org.hibernate.validator.internal.util.TypeHelper
+ */
+public class TypeHelperTest {
+	private static final Type[] DEFAULT_UPPER_BOUNDS = new Type[] { Object.class };
+	private static final Type[] DEFAULT_LOWER_BOUNDS = new Type[0];
+	private GenericDeclaration declaration;
+
+	private static class IntegerArrayList extends ArrayList<Integer> {
+		// simple subclass to fix generics
+	}
+
+	private static class IntegerKeyHashMap<V> extends HashMap<Integer, V> {
+		// simple subclass to fix generics
+	}
+
+	private static class StringsByIntegerHashMap extends IntegerKeyHashMap<String> {
+		// simple subclass to fix generics
+	}
+
+	@BeforeClass
+	public void beforeClass() throws Exception {
+		declaration = getClass().getConstructor();
+	}
+
+	@Test
+	public void isAssignableWithPrimitiveDouble() {
+		assertAssignable( Double.TYPE, Double.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Float.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Long.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Integer.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Character.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Short.TYPE );
+		assertAsymmetricallyAssignable( Double.TYPE, Byte.TYPE );
+	}
+
+	@Test
+	public void isAssignableWithPrimitiveFloat() {
+		assertAssignable( Float.TYPE, Float.TYPE );
+		assertAsymmetricallyAssignable( Float.TYPE, Long.TYPE );
+		assertAsymmetricallyAssignable( Float.TYPE, Integer.TYPE );
+		assertAsymmetricallyAssignable( Float.TYPE, Character.TYPE );
+		assertAsymmetricallyAssignable( Float.TYPE, Short.TYPE );
+		assertAsymmetricallyAssignable( Float.TYPE, Byte.TYPE );
+	}
+
+	@Test
+	public void isAssignableWithPrimitiveLong() {
+		assertAssignable( Long.TYPE, Long.TYPE );
+		assertAsymmetricallyAssignable( Long.TYPE, Integer.TYPE );
+		assertAsymmetricallyAssignable( Long.TYPE, Character.TYPE );
+		assertAsymmetricallyAssignable( Long.TYPE, Short.TYPE );
+		assertAsymmetricallyAssignable( Long.TYPE, Byte.TYPE );
+	}
+
+	@Test
+	public void isAssignableWithPrimitiveInt() {
+		assertAssignable( Integer.TYPE, Integer.TYPE );
+		assertAsymmetricallyAssignable( Integer.TYPE, Character.TYPE );
+		assertAsymmetricallyAssignable( Integer.TYPE, Short.TYPE );
+		assertAsymmetricallyAssignable( Integer.TYPE, Byte.TYPE );
+	}
+
+	@Test
+	public void isAssignableWithPrimitiveShort() {
+		assertAssignable( Short.TYPE, Short.TYPE );
+		assertAsymmetricallyAssignable( Short.TYPE, Byte.TYPE );
+	}
+
+	// JLS 4.10.2 Subtyping among Class and Interface Types
+
+	/**
+	 * The direct superclasses of C.
+	 */
+	@Test
+	public void isAssignableWithDirectSuperclassFromParameterizedType() {
+		assertAssignable( AbstractList.class, TypeHelper.parameterizedType( ArrayList.class, Integer.class ) );
+	}
+
+	/**
+	 * The direct superinterfaces of C.
+	 */
+	@Test
+	public void isAssignableWithDirectSuperinterfaceFromParameterizedType() {
+		assertAssignable( Collection.class, TypeHelper.parameterizedType( List.class, Integer.class ) );
+	}
+
+	/**
+	 * The type Object, if C is an interface type with no direct superinterfaces.
+	 */
+	@Test
+	public void isAssignableWithObjectFromInterface() {
+		assertAssignable( Object.class, Iterable.class );
+	}
+
+	/**
+	 * The raw type C.
+	 */
+	@Test
+	public void isAssignableWithRawTypeFromParameterizedType() {
+		assertAssignable( List.class, TypeHelper.parameterizedType( List.class, Integer.class ) );
+	}
+
+	// TODO: finish 4.10.2
+
+	// JLS 4.10.3 Subtyping among Array Types
+
+	/**
+	 * If S and T are both reference types, then S[] >1 T[] iff S >1 T.
+	 */
+	@Test
+	public void isAssignableWithArrayClassFromDirectSubtypeArrayClass() {
+		assertAsymmetricallyAssignable( Number[].class, Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithArrayClassFromIndirectSubtypeArrayClass() {
+		assertAsymmetricallyAssignable( Object[].class, Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithArrayClassFromGenericArrayType() {
+		assertAssignable( Integer[].class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	@Test
+	public void isAssignableWithArrayClassFromDirectSubtypeGenericArrayType() {
+		assertAsymmetricallyAssignable( Number[].class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	@Test
+	public void isAssignableWithArrayClassFromIndirectSubtypeGenericArrayType() {
+		assertAsymmetricallyAssignable( Object[].class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	@Test
+	public void isAssignableWithGenericArrayTypeFromDirectSubtypeGenericArrayType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.genericArrayType( Number.class ),
+				TypeHelper.genericArrayType( Integer.class )
+		);
+	}
+
+	@Test
+	public void isAssignableWithGenericArrayTypeFromIndirectSubtypeGenericArrayType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.genericArrayType( Object.class ),
+				TypeHelper.genericArrayType( Integer.class )
+		);
+	}
+
+	@Test
+	public void isAssignableWithGenericArrayTypeFromArrayClass() {
+		assertAssignable( TypeHelper.genericArrayType( Integer.class ), Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithGenericArrayTypeFromDirectSubtypeArrayClass() {
+		assertAsymmetricallyAssignable( TypeHelper.genericArrayType( Number.class ), Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithGenericArrayTypeFromIndirectSubtypeArrayClass() {
+		assertAsymmetricallyAssignable( TypeHelper.genericArrayType( Object.class ), Integer[].class );
+	}
+
+	/**
+	 * Object >1 Object[].
+	 */
+	@Test
+	public void isAssignableWithObjectFromObjectArrayClass() {
+		assertAsymmetricallyAssignable( Object.class, Object[].class );
+	}
+
+	@Test
+	public void isAssignableWithObjectFromArrayClass() {
+		assertAsymmetricallyAssignable( Object.class, Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithObjectFromObjectGenericArrayType() {
+		assertAsymmetricallyAssignable( Object.class, TypeHelper.genericArrayType( Object.class ) );
+	}
+
+	@Test
+	public void isAssignableWithObjectFromGenericArrayType() {
+		assertAsymmetricallyAssignable( Object.class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	/**
+	 * Cloneable >1 Object[].
+	 */
+	@Test
+	public void isAssignableWithCloneableFromObjectArrayClass() {
+		assertAsymmetricallyAssignable( Cloneable.class, Object[].class );
+	}
+
+	@Test
+	public void isAssignableWithCloneableFromArrayClass() {
+		assertAsymmetricallyAssignable( Cloneable.class, Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithCloneableFromObjectGenericArrayType() {
+		assertAsymmetricallyAssignable( Cloneable.class, TypeHelper.genericArrayType( Object.class ) );
+	}
+
+	@Test
+	public void isAssignableWithCloneableFromGenericArrayType() {
+		assertAsymmetricallyAssignable( Cloneable.class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	/**
+	 * java.io.Serializable >1 Object[].
+	 */
+	@Test
+	public void isAssignableWithSerializableFromObjectArrayClass() {
+		assertAsymmetricallyAssignable( Serializable.class, Object[].class );
+	}
+
+	@Test
+	public void isAssignableWithSerializableFromArrayClass() {
+		assertAsymmetricallyAssignable( Serializable.class, Integer[].class );
+	}
+
+	@Test
+	public void isAssignableWithSerializableFromObjectGenericArrayType() {
+		assertAsymmetricallyAssignable( Serializable.class, TypeHelper.genericArrayType( Object.class ) );
+	}
+
+	@Test
+	public void isAssignableWithSerializableFromGenericArrayType() {
+		assertAsymmetricallyAssignable( Serializable.class, TypeHelper.genericArrayType( Integer.class ) );
+	}
+
+	/**
+	 * If p is a primitive type, then Object >1 p[].
+	 */
+	@Test
+	public void isAssignableWithObjectFromPrimitiveArray() {
+		assertAsymmetricallyAssignable( Object.class, int[].class );
+	}
+
+	/**
+	 * If p is a primitive type, then Cloneable >1 p[].
+	 */
+	@Test
+	public void isAssignableWithCloneableFromPrimitiveArray() {
+		assertAsymmetricallyAssignable( Cloneable.class, int[].class );
+	}
+
+	/**
+	 * If p is a primitive type, then java.io.Serializable >1 p[].
+	 */
+	@Test
+	public void isAssignableWithSerializableFromPrimitiveArray() {
+		assertAsymmetricallyAssignable( Serializable.class, int[].class );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void isAssignableWithNullSupertype() {
+		assertAssignable( null, Integer.class );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void isAssignableWithNullType() {
+		assertAssignable( Integer.class, null );
+	}
+
+	/**
+	 * Tests that classes are assignable to their direct superclasses.
+	 *
+	 * {@literal Number <: Integer}
+	 */
+	@Test
+	public void isAssignableWithClassFromDirectSubclass() {
+		assertAsymmetricallyAssignable( Number.class, Integer.class );
+	}
+
+	/**
+	 * Tests that classes are assignable to their indirect superclasses.
+	 *
+	 * {@literal Object <: Integer}
+	 */
+	@Test
+	public void isAssignableWithClassFromIndirectSubclass() {
+		assertAsymmetricallyAssignable( Object.class, Integer.class );
+	}
+
+	/**
+	 * Tests that parameterized types are assignable to their raw types.
+	 *
+	 * {@literal List <: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithClassFromParameterizedType() {
+		assertAsymmetricallyAssignable( List.class, TypeHelper.parameterizedType( List.class, Integer.class ) );
+	}
+
+	/**
+	 * Tests that parameterized types are assignable if their raw types are directly assignable.
+	 *
+	 * {@literal Collection<Integer> <: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithDirectlyAssignableParameterizedTypeRawTypes() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( Collection.class, Integer.class ),
+				TypeHelper.parameterizedType( List.class, Integer.class )
+		);
+	}
+
+	/**
+	 * Tests that parameterized types are assignable if their raw types are indirectly assignable.
+	 *
+	 * {@literal Collection<Integer> <: ArrayList<Integer>}
+	 */
+	@Test
+	public void isAssignableWithIndirectlyAssignableParameterizedTypeRawTypes() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( Collection.class, Integer.class ),
+				TypeHelper.parameterizedType( ArrayList.class, Integer.class )
+		);
+	}
+
+	/**
+	 * Tests that parameterized types are not assignable if their raw types are not assignable.
+	 *
+	 * {@literal List<Integer> !<: Set<Integer>}
+	 */
+	@Test
+	public void isAssignableWithUnassignableParameterizedTypeRawTypes() {
+		assertUnassignable(
+				TypeHelper.parameterizedType( List.class, Integer.class ),
+				TypeHelper.parameterizedType( Set.class, Integer.class )
+		);
+
+		assertUnassignable(
+				TypeHelper.parameterizedType( Set.class, Integer.class ),
+				TypeHelper.parameterizedType( List.class, Integer.class )
+		);
+	}
+
+	/**
+	 * Tests that parameterized types are not assignable even if their type arguments are assignable.
+	 *
+	 * {@literal List<Number> !<: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithAssignableParameterizedTypeArguments() {
+		assertUnassignable(
+				TypeHelper.parameterizedType( List.class, Number.class ),
+				TypeHelper.parameterizedType( List.class, Integer.class )
+		);
+
+		assertUnassignable(
+				TypeHelper.parameterizedType( List.class, Integer.class ),
+				TypeHelper.parameterizedType( List.class, Number.class )
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types.
+	 *
+	 * {@literal List<?> <: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithWildcardParameterizedTypeFromParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( List.class, wildcardType() ),
+				TypeHelper.parameterizedType( List.class, Integer.class )
+		);
+	}
+
+	/**
+	 * Tests that parameterized type upper bounded wildcard type arguments are assignable to wildcard types.
+	 *
+	 * {@literal List<?> <: List<? extends Number>}
+	 */
+	@Test
+	public void isAssignableWithWildcardParameterizedTypeFromUpperBoundedWildcardParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( List.class, wildcardType() ),
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeUpperBounded( new Type[] { Number.class } )
+				)
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types on their upper bound.
+	 *
+	 * {@literal List<? extends Number> <: List<Number>}
+	 */
+	@Test
+	public void isAssignableWithUpperBoundedWildcardParameterizedTypeFromParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType( List.class, Number.class )
+
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types within their upper bound.
+	 *
+	 * {@literal List<? extends Number> <: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithUpperBoundedWildcardParameterizedTypeFromInBoundsParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeUpperBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType( List.class, Integer.class )
+
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are not assignable to wildcard types outside of their upper bound.
+	 *
+	 * {@literal List<? extends Number> !<: List<Object>}
+	 */
+	@Test
+	public void isAssignableWithUpperBoundedWildcardParameterizedTypeFromOutOfBoundsParameterizedType() {
+		assertUnassignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeUpperBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType( List.class, Object.class )
+
+		);
+
+		assertUnassignable(
+				TypeHelper.parameterizedType( List.class, Object.class ),
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				)
+		);
+	}
+
+	/**
+	 * {@literal List<? extends Number> <: List<? extends Integer>}
+	 */
+	@Test
+	public void isAssignableWithUpperBoundedWildcardParameterizedTypeFromInBoundsUpperBoundedWildcardParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Integer.class } )
+				)
+
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types on their lower bound.
+	 *
+	 * {@literal List<? super Number> <: List<Number>}
+	 */
+	@Test
+	public void isAssignableWithLowerBoundedWildcardParameterizedTypeFromParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType(
+						List.class,
+						Number.class
+				)
+
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types within their lower bound.
+	 *
+	 * {@literal List<? super Number> <: List<Object>}
+	 */
+	@Test
+	public void isAssignableWithLowerBoundedWildcardParameterizedTypeFromInBoundsParameterizedType() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType(
+						List.class,
+						Object.class
+				)
+
+		);
+	}
+
+	/**
+	 * Tests that parameterized type arguments are assignable to wildcard types outside of their lower bound.
+	 *
+	 * {@literal List<? super Number> !<: List<Integer>}
+	 */
+	@Test
+	public void isAssignableWithLowerBoundedWildcardParameterizedTypeFromOutOfBoundsParameterizedType() {
+		assertUnassignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				),
+				TypeHelper.parameterizedType(
+						List.class,
+						Integer.class
+				)
+
+		);
+
+		assertUnassignable(
+				TypeHelper.parameterizedType(
+						List.class,
+						Integer.class
+				),
+				TypeHelper.parameterizedType(
+						List.class,
+						wildcardTypeLowerBounded( new Type[] { Number.class } )
+				)
+		);
+	}
+
+	/**
+	 * Tests that classes are assignable to parameterized supertypes.
+	 *
+	 * {@literal List<Integer> <: IntegerArrayList}
+	 */
+	@Test
+	public void isAssignableWithParameterizedTypeFromClassWithActualTypeArguments() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( List.class, Integer.class ),
+				IntegerArrayList.class
+		);
+	}
+
+	@Test
+	public void isAssignableWithUnboundedWildcardParameterizedTypeFromClass() {
+
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType( List.class, wildcardType() ),
+				ArrayList.class
+		);
+	}
+
+	@Test
+	public void isAssignableWithUnboundedWildcardParameterizedTypeFromClassWithActualTypeArguments() {
+		assertAsymmetricallyAssignable(
+				TypeHelper.parameterizedType(
+						Map.class,
+						wildcardType(),
+						wildcardType()
+				),
+				StringsByIntegerHashMap.class
+		);
+	}
+
+	/**
+	 * Tests that unbounded type variables are assignable to Object.
+	 *
+	 * {@literal Object <: T}
+	 */
+	@Test
+	public void isAssignableWithObjectFromTypeVariableWithNoBounds() {
+		assertAssignable( Object.class, typeVariable( declaration, "T" ) );
+	}
+
+	/**
+	 * Tests that type variables with a single bound are assignable to their bound.
+	 *
+	 * {@literal Number <: T extends Number}
+	 */
+	@Test
+	public void isAssignableWithBoundFromTypeVariableWithBound() {
+		assertAssignable( Object.class, typeVariable( declaration, "T", Number.class ) );
+	}
+
+	/**
+	 * Tests that type variables with a single bound are not assignable to subtypes of their bound.
+	 *
+	 * {@literal Integer !<: T extends Number}
+	 */
+	@Test
+	public void isAssignableWithTypeOutsideOfBoundFromTypeVariableWithBound() {
+		assertUnassignable( Integer.class, typeVariable( declaration, "T", Number.class ) );
+	}
+
+	/**
+	 * Tests that type variables with a single bound are assignable to supertypes of their bound.
+	 *
+	 * {@literal Number <: T extends Integer}
+	 */
+	@Test
+	public void isAssignableWithTypeInsideOfBoundFromTypeVariableWithBound() {
+		assertAssignable( Number.class, typeVariable( declaration, "T", Integer.class ) );
+	}
+
+	/**
+	 * Tests that type variables with multiple bounds are assignable to their bounds.
+	 *
+	 * {@literal Number, Collection <: T extends Number & Collection}
+	 */
+	@Test
+	public void isAssignableWithBoundsFromTypeVariableWithBounds() {
+		TypeVariable<?> type = typeVariable( declaration, "T", Number.class, Collection.class );
+
+		assertAssignable( Number.class, type );
+		assertAssignable( Collection.class, type );
+	}
+
+	/**
+	 * Tests that type variables with multiple bounds are not assignable to supertypes of their bounds.
+	 *
+	 * {@literal Integer, Thread !<: T extends Number & Runnable}
+	 */
+	@Test
+	public void isAssignableWithTypeOutsideOfBoundsFromTypeVariableWithBounds() {
+		TypeVariable<?> type = typeVariable( declaration, "T", Number.class, Collection.class );
+
+		assertUnassignable( Integer.class, type );
+		assertUnassignable( List.class, type );
+	}
+
+	/**
+	 * Tests that type variables with multiple bounds are assignable to subtypes of their bounds.
+	 *
+	 * {@literal Number, Collection <: T extends Integer & List}
+	 */
+	@Test
+	public void isAssignableWithTypeInsideOfBoundsFromTypeVariableWithBounds() {
+		TypeVariable<?> type = typeVariable( declaration, "T", Integer.class, List.class );
+
+		assertAssignable( Number.class, type );
+		assertAssignable( Collection.class, type );
+	}
+
+	/**
+	 * Tests that unbounded wildcards are assignable to Object.
+	 *
+	 * {@literal Object <: ?}
+	 */
+	@Test
+	public void isAssignableWithObjectFromUnboundedWildcardType() {
+		assertAssignable( Object.class, wildcardType() );
+	}
+
+	/**
+	 * Tests that upper bounded wildcards are assignable to their upper bound.
+	 *
+	 * {@literal Number <: ? extends Number}
+	 */
+	@Test
+	public void isAssignableWithBoundFromUpperBoundedWildcardType() {
+		assertAssignable( Number.class, wildcardTypeUpperBounded( new Type[] { Number.class } ) );
+	}
+
+	/**
+	 * Tests that upper bounded wildcards are assignable to supertypes of their upper bound.
+	 *
+	 * {@literal Number <: ? extends Integer}
+	 */
+	@Test
+	public void isAssignableWithBoundSupertypeFromUpperBoundedWildcardType() {
+		assertAssignable( Number.class, wildcardTypeUpperBounded( new Type[] { Integer.class } ) );
+	}
+
+	/**
+	 * Tests that upper bounded wildcards are not assignable to subtypes of their upper bound.
+	 *
+	 * {@literal Integer !<: ? extends Number}
+	 */
+	@Test
+	public void isAssignableWithBoundSubtypeFromUpperBoundedWildcardType() {
+		assertUnassignable( Integer.class, wildcardTypeUpperBounded( new Type[] { Number.class } ) );
+	}
+
+	/**
+	 * Tests that lower bounded wildcards are assignable to Object.
+	 *
+	 * {@literal Object <: ? super Number}
+	 */
+	@Test
+	public void isAssignableWithObjectFromLowerBoundedWildcardType() {
+		assertAssignable( Object.class, wildcardTypeLowerBounded( new Type[] { Number.class } ) );
+	}
+
+	/**
+	 * Tests that lower bounded wildcards are not assignable to their lower bound.
+	 *
+	 * {@literal Number !<: ? super Number}
+	 */
+	@Test
+	public void isAssignableWithBoundFromLowerBoundedWildcardType() {
+		assertUnassignable( Number.class, wildcardTypeLowerBounded( new Type[] { Number.class } ) );
+	}
+
+	/**
+	 * Tests that lower bounded wildcards are not assignable to supertypes of their lower bound.
+	 *
+	 * {@literal Number !<: ? super Integer}
+	 */
+	@Test
+	public void isAssignableWithBoundSupertypeFromLowerBoundedWildcardType() {
+		assertUnassignable( Number.class, wildcardTypeLowerBounded( new Type[] { Integer.class } ) );
+	}
+
+	/**
+	 * Tests that upper bounded wildcards are not assignable to subtypes of their upper bound.
+	 *
+	 * {@literal Integer <: ? super Number}
+	 */
+	@Test
+	public void isAssignableWithBoundSubtypeFromLowerBoundedWildcardType() {
+		assertUnassignable( Integer.class, wildcardTypeLowerBounded( new Type[] { Number.class } ) );
+	}
+
+	@Test(expectedExceptions = NullPointerException.class)
+	public void isInstanceWithNullType() {
+		TypeHelper.isInstance( null, 123 );
+	}
+
+	@Test
+	public void isInstanceWithClass() {
+		assertTrue( TypeHelper.isInstance( Integer.class, 123 ) );
+	}
+
+	@Test
+	public void isInstanceWithClassAndSubclass() {
+		assertTrue( TypeHelper.isInstance( Number.class, 123 ) );
+	}
+
+	@Test
+	public void isInstanceWithClassAndSuperclass() {
+		assertFalse( TypeHelper.isInstance( Number.class, new Object() ) );
+	}
+
+	@Test
+	public void isInstanceWithClassAndDisjointClass() {
+		assertFalse( TypeHelper.isInstance( Integer.class, 123L ) );
+	}
+
+	@Test
+	public void isInstanceWithClassAndNull() {
+		assertFalse( TypeHelper.isInstance( Integer.class, null ) );
+	}
+
+	@Test
+	public void isInstanceWithClassArray() {
+		assertTrue( TypeHelper.isInstance( Integer[].class, new Integer[0] ) );
+	}
+
+	@Test
+	public void isInstanceWithClassArrayAndSubclassArray() {
+		assertTrue( TypeHelper.isInstance( Number[].class, new Integer[0] ) );
+	}
+
+	@Test
+	public void isInstanceWithClassArrayAndSuperclassArray() {
+		assertFalse( TypeHelper.isInstance( Number[].class, new Object[0] ) );
+	}
+
+	@Test
+	public void isInstanceWithClassArrayAndDisjointClass() {
+		assertFalse( TypeHelper.isInstance( Integer[].class, new Long[0] ) );
+	}
+
+	@Test
+	public void isArrayWithNull() {
+		assertFalse( TypeHelper.isArray( null ) );
+	}
+
+	@Test
+	public void isArrayWithClass() {
+		assertFalse( TypeHelper.isArray( Integer.class ) );
+	}
+
+	@Test
+	public void isArrayWithClassArray() {
+		assertTrue( TypeHelper.isArray( Integer[].class ) );
+	}
+
+	@Test
+	public void isArrayWithGenericArrayType() {
+		assertTrue( TypeHelper.isArray( TypeHelper.genericArrayType( Integer.class ) ) );
+	}
+
+	@Test
+	public void isArrayWithParameterizedType() {
+		assertFalse( TypeHelper.isArray( TypeHelper.parameterizedType( List.class, Integer.class ) ) );
+	}
+
+	@Test
+	public void testTypeDiscovery() {
+		List<Class<? extends ConstraintValidator<Positive, ?>>> validators =
+				new ArrayList<Class<? extends ConstraintValidator<Positive, ?>>>();
+		validators.add( PositiveConstraintValidator.class );
+		Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorsTypes = TypeHelper
+				.getValidatorsTypes( validators );
+
+		assertEquals( validatorsTypes.get( Integer.class ), PositiveConstraintValidator.class );
+		assertNull( validatorsTypes.get( String.class ) );
+	}
+
+	private static void assertAsymmetricallyAssignable(Type supertype, Type type) {
+		assertAssignable( supertype, type );
+		assertUnassignable( type, supertype );
+	}
+
+	private static void assertAssignable(Type supertype, Type type) {
+		assertTrue( TypeHelper.isAssignable( supertype, type ), "Expected " + type + " assignable to " + supertype );
+	}
+
+	private static void assertUnassignable(Type supertype, Type type) {
+		assertFalse(
+				TypeHelper.isAssignable( supertype, type ), "Expected " + type + " not assignable to " + supertype
+		);
+	}
+
+	private static WildcardType wildcardTypeUpperBounded(final Type[] upperBounds) {
+		return wildcardType( upperBounds, DEFAULT_LOWER_BOUNDS );
+	}
+
+	private static WildcardType wildcardTypeLowerBounded(final Type[] lowerBounds) {
+		return wildcardType( DEFAULT_UPPER_BOUNDS, lowerBounds );
+	}
+
+	private static WildcardType wildcardType() {
+		return wildcardType( DEFAULT_UPPER_BOUNDS, DEFAULT_LOWER_BOUNDS );
+	}
+
+	private static WildcardType wildcardType(final Type[] upperBounds, final Type[] lowerBounds) {
+		return new WildcardType() {
+
+			public Type[] getUpperBounds() {
+				return upperBounds;
+			}
+
+			public Type[] getLowerBounds() {
+				return lowerBounds;
+			}
+		};
+	}
+
+	private static TypeVariable typeVariable(final GenericDeclaration declaration,
+											 final String name,
+											 final Type... bounds) {
+		return new TypeVariable() {
+			public Type[] getBounds() {
+				if ( bounds == null || bounds.length == 0 ) {
+					return new Type[] { Object.class };
+				}
+				return bounds;
+			}
+
+			public GenericDeclaration getGenericDeclaration() {
+				return declaration;
+			}
+
+			public String getName() {
+				return name;
+			}
+		};
+	}
+}
+
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/util/annotationfactory/AnnotationFactoryTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/annotationfactory/AnnotationFactoryTest.java
new file mode 100644
index 0000000..d0ef9eb
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/util/annotationfactory/AnnotationFactoryTest.java
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.util.annotationfactory;
+
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationDescriptor;
+import org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class AnnotationFactoryTest {
+
+	@Test
+	public void createAnnotationProxy() {
+		AnnotationDescriptor<Size> descriptor = new AnnotationDescriptor<Size>( Size.class );
+		descriptor.setValue( "min", 5 );
+		descriptor.setValue( "max", 10 );
+
+		Size size = AnnotationFactory.create( descriptor );
+
+		assertEquals( size.min(), 5, "Wrong parameter value" );
+		assertEquals( size.max(), 10, "Wrong parameter value" );
+	}
+
+	@Test(expectedExceptions = IllegalArgumentException.class)
+	public void createAnnotationProxyMissingRequiredParamter() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		AnnotationFactory.create( descriptor );
+	}
+
+	@Test
+	public void createAnnotationProxyWithRequiredParamter() {
+		AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
+		descriptor.setValue( "regexp", ".*" );
+
+		Pattern pattern = AnnotationFactory.create( descriptor );
+
+		assertEquals( ".*", pattern.regexp(), "Wrong parameter value" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Customer.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Customer.java
new file mode 100644
index 0000000..93e6cda
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Customer.java
@@ -0,0 +1,70 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Customer implements Person {
+    private String firstName;
+    private String middleName;
+    private String lastName;
+
+    private String customerId;
+
+    private String password;
+
+    public String getFirstName() {
+	return this.firstName;
+    }
+
+    public void setFirstName(final String firstName) {
+	this.firstName = firstName;
+    }
+
+    public String getMiddleName() {
+	return this.middleName;
+    }
+
+    public void setMiddleName(final String middleName) {
+	this.middleName = middleName;
+    }
+
+    public String getLastName() {
+	return this.lastName;
+    }
+
+    public void setLastName(final String lastName) {
+	this.lastName = lastName;
+    }
+
+    public String getCustomerId() {
+	return this.customerId;
+    }
+
+    public void setCustomerId(final String customerId) {
+	this.customerId = customerId;
+    }
+
+    public String getPassword() {
+	return this.password;
+    }
+
+    public void setPassword(final String password) {
+	this.password = password;
+    }
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterface.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterface.java
new file mode 100644
index 0000000..e6c905c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterface.java
@@ -0,0 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface MyInterface {
+	Integer getId();
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterfaceImpl.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterfaceImpl.java
new file mode 100644
index 0000000..9d194a2
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/MyInterfaceImpl.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MyInterfaceImpl implements MyInterface {
+	public Integer getId() {
+		return null;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Person.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Person.java
new file mode 100644
index 0000000..fee9684
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Person.java
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface Person {
+
+    String getFirstName();
+
+    String getMiddleName();
+
+    String getLastName();
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Properties.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Properties.java
new file mode 100644
index 0000000..468399e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/Properties.java
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+import java.util.List;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Properties {
+	private List<String> listOfString;
+
+	public List<String> getListOfString() {
+		return listOfString;
+	}
+
+	public void setListOfString(List<String> listOfString) {
+		this.listOfString = listOfString;
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/XmlMappingTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/XmlMappingTest.java
new file mode 100644
index 0000000..8ea6a98
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/XmlMappingTest.java
@@ -0,0 +1,161 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml;
+
+import java.io.InputStream;
+import java.lang.annotation.ElementType;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.groups.Default;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.cfg.defs.SizeDef;
+import org.hibernate.validator.testutil.TestForIssue;
+import org.hibernate.validator.testutil.ValidatorUtil;
+
+import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertCorrectConstraintViolationMessages;
+import static org.testng.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public class XmlMappingTest {
+
+	@Test
+	@TestForIssue(jiraKey = "HV-214")
+	public void testConstraintInheritanceWithXmlConfiguration() {
+
+		final Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "mapping.xml" ) );
+
+		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		final Validator validator = validatorFactory.getValidator();
+
+		final Set<ConstraintViolation<Customer>> violations = validator.validate( new Customer(), Default.class );
+
+		assertEquals( violations.size(), 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-252")
+	public void testListOfString() {
+
+		final Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "properties-mapping.xml" ) );
+
+		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		final Validator validator = validatorFactory.getValidator();
+
+		List<String> listOfString = new ArrayList<String>();
+		listOfString.add( "one" );
+		listOfString.add( "two" );
+		listOfString.add( "three" );
+
+		final Set<ConstraintViolation<Properties>> violations = validator.validateValue(
+				Properties.class, "listOfString", listOfString
+		);
+
+		assertEquals( violations.size(), 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-262")
+	public void testInterfaceConfiguration() {
+
+		final Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "my-interface-mapping.xml" ) );
+
+		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		final Validator validator = validatorFactory.getValidator();
+		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
+
+		assertEquals( violations.size(), 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-262")
+	public void testInterfaceImplementationConfiguration() {
+
+		final Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "my-interface-impl-mapping.xml" ) );
+
+		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		final Validator validator = validatorFactory.getValidator();
+		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
+
+		assertEquals( violations.size(), 1 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-263")
+	public void testEmptyInterfaceConfiguration() {
+
+		final Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.addMapping( XmlMappingTest.class.getResourceAsStream( "empty-my-interface-mapping.xml" ) );
+
+		final ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		final Validator validator = validatorFactory.getValidator();
+		final Set<ConstraintViolation<MyInterfaceImpl>> violations = validator.validate( new MyInterfaceImpl() );
+
+		assertEquals( violations.size(), 0 );
+	}
+
+	@Test
+	@TestForIssue(jiraKey = "HV-480")
+	public void testConstraintsFromXmlAndProgrammaticApiAddUp() {
+
+		//given
+		final ConstraintMapping programmaticMapping = new ConstraintMapping();
+		programmaticMapping.type( Customer.class )
+				.property( "firstName", ElementType.FIELD )
+				.constraint( new SizeDef().min( 2 ).max( 10 ) );
+
+		final InputStream xmlMapping = XmlMappingTest.class.getResourceAsStream( "hv-480-mapping.xml" );
+
+		final HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration( HibernateValidator.class );
+
+		configuration.addMapping( programmaticMapping );
+		configuration.addMapping( xmlMapping );
+
+		final Customer customer = new Customer();
+		customer.setFirstName( "" );
+
+		//when
+		final Set<ConstraintViolation<Customer>> violations = configuration.buildValidatorFactory()
+				.getValidator()
+				.validate(
+						customer
+				);
+
+		//then
+		assertCorrectConstraintViolationMessages(
+				violations,
+				"size must be between 1 and 10",
+				"size must be between 2 and 10"
+		);
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/ICompetition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/ICompetition.java
new file mode 100644
index 0000000..c771dcc
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/ICompetition.java
@@ -0,0 +1,19 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration;
+
+public interface ICompetition {}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/IFixture.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/IFixture.java
new file mode 100644
index 0000000..dc2a3c3
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/IFixture.java
@@ -0,0 +1,21 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration;
+
+public interface IFixture {
+	ICompetition getCompetition();
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/InheritanceMappingsTest.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/InheritanceMappingsTest.java
new file mode 100644
index 0000000..6be26af
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/InheritanceMappingsTest.java
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.NotNull;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.testutil.DummyTraversableResolver;
+import org.hibernate.validator.testutil.ValidatorUtil;
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation.Competition;
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation.Fixture;
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation.PersonCompetition;
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation.TeamCompetition;
+
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.FileAssert.fail;
+
+
+/**
+ * See HV-265
+ *
+ * @author Hardy Ferentschik
+ */
+public class InheritanceMappingsTest {
+
+	@Test
+	public void defaultConfigurationNoExplicitAnnotationDefinition1() {
+		validateAnnotatedFixture(
+				new PersonCompetition(),
+				ValidatorUtil.getValidator()
+		);
+	}
+
+	@Test
+	public void defaultConfigurationNoExplicitAnnotationDefinition2() {
+		validateAnnotatedFixture(
+				new TeamCompetition(),
+				ValidatorUtil.getValidator()
+		);
+	}
+
+	@Test
+	public void customConfigurationNoExplicitAnnotationDefinition1() {
+		validateAnnotatedFixture(
+				new PersonCompetition(),
+				configure( "annotation-mappings.xml" )
+		);
+	}
+
+	@Test
+	public void customConfigurationNoExplicitAnnotationDefinition2() {
+		validateAnnotatedFixture(
+				new TeamCompetition(),
+				configure( "annotation-mappings.xml" )
+		);
+	}
+
+	@Test
+	public void customConfigurationExplicitXmlDefinition() {
+		validateXmlDefinedFixture(
+				new org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.PersonCompetition(),
+				configure( "xml-mappings.xml" )
+		);
+	}
+
+	@Test
+	public void customConfigurationNoExplicitXmlDefinition() {
+		validateXmlDefinedFixture(
+				new org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.TeamCompetition(),
+				configure( "xml-mappings.xml" )
+		);
+	}
+
+	private Validator configure(String mappingsUrl) {
+		Configuration<?> configuration = ValidatorUtil.getConfiguration();
+		configuration.traversableResolver( new DummyTraversableResolver() );
+		configuration.addMapping( InheritanceMappingsTest.class.getResourceAsStream( mappingsUrl ) );
+
+		ValidatorFactory validatorFactory = configuration.buildValidatorFactory();
+		return validatorFactory.getValidator();
+	}
+
+	private void validateFixture(IFixture fixture, Validator validator) {
+		Set<ConstraintViolation<IFixture>> violations = validator.validate( fixture );
+
+		for ( ConstraintViolation<IFixture> violation : violations ) {
+			if ( violation.getLeafBean() instanceof ICompetition
+					&& "detail.competition.name".equals( violation.getPropertyPath().toString() ) ) {
+				assertEquals( violation.getLeafBean(), fixture.getCompetition() );
+				Annotation annotation = ( ( Annotation ) violation.getConstraintDescriptor().getAnnotation() );
+				assertEquals( annotation.annotationType(), NotNull.class );
+				return;
+			}
+		}
+		fail( "@NotNull constraint violation for 'detail.competition.name' not detected" );
+	}
+
+	private void validateAnnotatedFixture(Competition competition,
+										  Validator validator) {
+		Fixture fixture = new Fixture();
+		fixture.setCompetition( competition );
+		validateFixture( fixture, validator );
+	}
+
+	private void validateXmlDefinedFixture(org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Competition competition,
+										   Validator validator) {
+		org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Fixture fixture = new org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Fixture();
+		fixture.setCompetition( competition );
+		validateFixture( fixture, validator );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Competition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Competition.java
new file mode 100644
index 0000000..85af059
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Competition.java
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.ICompetition;
+
+public abstract class Competition implements ICompetition {
+
+	@NotNull
+	@Size(min = 1)
+	private String name;
+
+	public Competition() {
+		super();
+	}
+
+	public Competition(String name) {
+		setName( name );
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Fixture.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Fixture.java
new file mode 100644
index 0000000..cc4e47c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Fixture.java
@@ -0,0 +1,30 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.IFixture;
+
+public class Fixture extends Game implements IFixture {
+
+	public Fixture() {
+		super();
+	}
+
+	public Fixture(Competition competition) {
+		super( competition );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Game.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Game.java
new file mode 100644
index 0000000..628b471
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/Game.java
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+public abstract class Game {
+
+	@NotNull
+	@Valid
+	private GameDetail detail;
+
+	private Game(GameDetail detail) {
+		this.detail = detail;
+	}
+
+	public Game() {
+		this( new GameDetail() );
+	}
+
+	public Game(Competition competition) {
+		this( new GameDetail( competition ) );
+	}
+
+	public Competition getCompetition() {
+		return detail.getCompetition();
+	}
+
+	public void setCompetition(Competition competition) {
+		detail.setCompetition( competition );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/GameDetail.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/GameDetail.java
new file mode 100644
index 0000000..a17aebd
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/GameDetail.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+public class GameDetail {
+
+	@NotNull
+	@Valid
+	private Competition competition;
+
+	public GameDetail() {
+		super();
+	}
+
+	public GameDetail(Competition competition) {
+		setCompetition( competition );
+	}
+
+	public Competition getCompetition() {
+		return competition;
+	}
+
+	public void setCompetition(Competition competition) {
+		this.competition = competition;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/PersonCompetition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/PersonCompetition.java
new file mode 100644
index 0000000..d825cf5
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/PersonCompetition.java
@@ -0,0 +1,28 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+public class PersonCompetition extends Competition {
+
+	public PersonCompetition() {
+		super();
+	}
+
+	public PersonCompetition(String name) {
+		super( name );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/TeamCompetition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/TeamCompetition.java
new file mode 100644
index 0000000..e1800df
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation/TeamCompetition.java
@@ -0,0 +1,27 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.annotation;
+
+public class TeamCompetition extends Competition {
+	public TeamCompetition() {
+		super();
+	}
+
+	public TeamCompetition(String name) {
+		super( name );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Competition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Competition.java
new file mode 100644
index 0000000..8eefe1a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Competition.java
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.ICompetition;
+
+public abstract class Competition implements ICompetition {
+
+	private String name;
+
+	public Competition() {
+		super();
+	}
+
+	public Competition(String name) {
+		setName( name );
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Fixture.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Fixture.java
new file mode 100644
index 0000000..952760a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Fixture.java
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+import org.hibernate.validator.test.internal.xml.mixedconfiguration.IFixture;
+
+public class Fixture extends Game implements IFixture {
+
+	public Fixture() {
+		super();
+	}
+
+	public Fixture(Competition competition) {
+		super( competition );
+	}
+
+	@Override
+	public void setCompetition(Competition competition) {
+		super.setCompetition( competition );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Game.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Game.java
new file mode 100644
index 0000000..759f7c1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/Game.java
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+public abstract class Game {
+
+	private GameDetail detail;
+
+	private Game(GameDetail detail) {
+		this.detail = detail;
+	}
+
+	public Game() {
+		this( new GameDetail() );
+	}
+
+	public Game(Competition competition) {
+		this( new GameDetail( competition ) );
+	}
+
+	public Competition getCompetition() {
+		return detail.getCompetition();
+	}
+
+	public void setCompetition(Competition competition) {
+		detail.setCompetition( competition );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/GameDetail.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/GameDetail.java
new file mode 100644
index 0000000..d5ffa2c
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/GameDetail.java
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+public class GameDetail {
+
+	private Competition competition;
+
+	public GameDetail() {
+		super();
+	}
+
+	public GameDetail(Competition competition) {
+		setCompetition( competition );
+	}
+
+	public Competition getCompetition() {
+		return competition;
+	}
+
+	public void setCompetition(Competition competition) {
+		this.competition = competition;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/PersonCompetition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/PersonCompetition.java
new file mode 100644
index 0000000..a361faf
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/PersonCompetition.java
@@ -0,0 +1,28 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+public class PersonCompetition extends Competition {
+
+	public PersonCompetition() {
+		super();
+	}
+
+	public PersonCompetition(String name) {
+		super( name );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/TeamCompetition.java b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/TeamCompetition.java
new file mode 100644
index 0000000..bf8cf12
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml/TeamCompetition.java
@@ -0,0 +1,28 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.internal.xml.mixedconfiguration.xml;
+
+public class TeamCompetition extends Competition {
+
+	public TeamCompetition() {
+		super();
+	}
+
+	public TeamCompetition(String name) {
+		super( name );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java b/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java
new file mode 100644
index 0000000..5727055
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateBundleTest.java
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.resourceloading;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.resourceloading.AggregateResourceBundleLocator.AggregateBundle;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * Test for {@link AggregateBundle}.
+ *
+ * @author Gunnar Morling
+ */
+public class AggregateBundleTest {
+
+	private final static String BUNDLE_NAME_1 = AggregateResourceBundleLocatorTest.class.getPackage()
+			.getName() + ".AggregateResourceBundleLocatorTestBundle1";
+
+	private final static String BUNDLE_NAME_2 = AggregateResourceBundleLocatorTest.class.getPackage()
+			.getName() + ".AggregateResourceBundleLocatorTestBundle2";
+
+	@Test
+	public void aggregateBundleContainsKeysOfAllSourceBundles() {
+		ResourceBundle bundle_1 = ResourceBundle.getBundle( BUNDLE_NAME_1 );
+		ResourceBundle bundle_2 = ResourceBundle.getBundle( BUNDLE_NAME_2 );
+
+		ResourceBundle aggregateBundle = new AggregateBundle( Arrays.asList( bundle_1, bundle_2 ) );
+
+		Set<String> actualKeys = getAsSet( aggregateBundle.getKeys() );
+		Set<String> expectedKeys = new HashSet<String>( Arrays.asList( "key_1", "key_2", "key_3" ) );
+
+		assertEquals( actualKeys, expectedKeys );
+	}
+
+	@Test
+	public void aggregateBundleWithNoSourceBundlesContainsNoKeys() {
+		ResourceBundle aggregateBundle = new AggregateBundle( Collections.<ResourceBundle>emptyList() );
+		assertTrue( getAsSet( aggregateBundle.getKeys() ).isEmpty() );
+	}
+
+	@Test
+	public void valuesProperlyRetrievedFromAggregateBundle() {
+		ResourceBundle bundle_1 = ResourceBundle.getBundle( BUNDLE_NAME_1 );
+		ResourceBundle bundle_2 = ResourceBundle.getBundle( BUNDLE_NAME_2 );
+
+		ResourceBundle aggregateBundle = new AggregateBundle( Arrays.asList( bundle_1, bundle_2 ) );
+
+		assertEquals(
+				aggregateBundle.getString( "key_1" ),
+				"value 1 from bundle 1",
+				"Value for key_1 should be retrieved from bundle 1"
+		);
+		assertEquals(
+				aggregateBundle.getString( "key_2" ),
+				"value 2 from bundle 1",
+				"Value for key_2 should be retrieved from bundle 1"
+		);
+		assertEquals(
+				aggregateBundle.getString( "key_3" ),
+				"value 3 from bundle 2",
+				"Value for key_3 should be retrieved from bundle 2"
+		);
+	}
+
+	private Set<String> getAsSet(Enumeration<String> e) {
+		Set<String> theValue = new HashSet<String>();
+
+		while ( e.hasMoreElements() ) {
+			theValue.add( e.nextElement() );
+		}
+
+		return theValue;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java b/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java
new file mode 100644
index 0000000..b637924
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTest.java
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.test.resourceloading;
+
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.validator.resourceloading.AggregateResourceBundleLocator;
+import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
+import org.hibernate.validator.resourceloading.ResourceBundleLocator;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+
+/**
+ * Test for {@link org.hibernate.validator.resourceloading.AggregateResourceBundleLocator}.
+ *
+ * @author Gunnar Morling
+ */
+public class AggregateResourceBundleLocatorTest {
+
+	private final static String BUNDLE_NAME_1 =
+			AggregateResourceBundleLocatorTest.class.getPackage()
+					.getName() + ".AggregateResourceBundleLocatorTestBundle1";
+
+	private final static String BUNDLE_NAME_2 =
+			AggregateResourceBundleLocatorTest.class.getPackage()
+					.getName() + ".AggregateResourceBundleLocatorTestBundle2";
+
+	@Test
+	public void valuesAreRetrievedFromBothSourceBundles() {
+
+		ResourceBundleLocator locator =
+				new AggregateResourceBundleLocator( Arrays.asList( BUNDLE_NAME_1, BUNDLE_NAME_2 ) );
+
+		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.getDefault() );
+
+		assertNotNull( resourceBundle );
+
+		//contained in bundle 1
+		assertEquals( resourceBundle.getString( "key_1" ), "value 1 from bundle 1" );
+
+		//contained in both bundles, bundle 1 comes first
+		assertEquals( resourceBundle.getString( "key_2" ), "value 2 from bundle 1" );
+
+		//contained in bundle 2
+		assertEquals( resourceBundle.getString( "key_3" ), "value 3 from bundle 2" );
+	}
+
+	@Test
+	public void valuesAreRetrievedFromDelegate() {
+
+		ResourceBundleLocator locator =
+				new AggregateResourceBundleLocator(
+						Arrays.asList( BUNDLE_NAME_1 ),
+						(ResourceBundleLocator) new PlatformResourceBundleLocator( BUNDLE_NAME_2 )
+				);
+
+		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.ENGLISH );
+
+		assertNotNull( resourceBundle );
+
+		//contained in bundle 1
+		assertEquals( resourceBundle.getString( "key_1" ), "value 1 from bundle 1" );
+
+		//contained in both bundles, but bundle 1 is queried before bundle 2 (delegate)
+		assertEquals( resourceBundle.getString( "key_2" ), "value 2 from bundle 1" );
+
+		//contained in bundle 2
+		assertEquals( resourceBundle.getString( "key_3" ), "value 3 from bundle 2" );
+	}
+
+	@Test
+	public void nullReturnedAsBundleDoesNotExist() {
+
+		ResourceBundleLocator locator = new AggregateResourceBundleLocator( Arrays.asList( "foo" ) );
+		ResourceBundle resourceBundle = locator.getResourceBundle( Locale.ENGLISH );
+
+		assertNull( resourceBundle );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/ConstraintViolationAssert.java b/project/engine/src/test/java/org/hibernate/validator/testutil/ConstraintViolationAssert.java
new file mode 100644
index 0000000..3c47d25
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/ConstraintViolationAssert.java
@@ -0,0 +1,262 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.testutil;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Path;
+
+import org.hibernate.validator.method.MethodConstraintViolationException;
+
+import static org.hibernate.validator.internal.engine.PathImpl.createPathFromString;
+import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * This class provides useful functions to assert correctness of constraint violations raised
+ * during tests.
+ *
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ */
+public final class ConstraintViolationAssert {
+	/**
+	 * Private constructor in order to avoid instantiation.
+	 */
+	private ConstraintViolationAssert() {
+	}
+
+	/**
+	 * Asserts that the messages in the violation list matches exactly the expected messages list.
+	 *
+	 * @param violations The violation list to verify.
+	 * @param expectedMessages The expected constraint violation messages.
+	 */
+	public static void assertCorrectConstraintViolationMessages(Set<? extends ConstraintViolation<?>> violations, String... expectedMessages) {
+
+		List<String> expectedMessagesAsList = Arrays.asList( expectedMessages );
+
+		List<String> actualMessages = newArrayList();
+		for ( ConstraintViolation<?> violation : violations ) {
+			actualMessages.add( violation.getMessage() );
+		}
+
+		Collections.sort( expectedMessagesAsList );
+		Collections.sort( actualMessages );
+
+		assertEquals( actualMessages, expectedMessagesAsList );
+	}
+
+	public static void assertCorrectConstraintViolationMessages(MethodConstraintViolationException e, String... expectedMessages) {
+		assertCorrectConstraintViolationMessages( e.getConstraintViolations(), expectedMessages );
+	}
+
+	/**
+	 * Asserts that the violated constraint type in the violation list matches exactly the expected constraint types
+	 * list.
+	 *
+	 * @param violations The violation list to verify.
+	 * @param expectedConstraintTypes The expected constraint types.
+	 */
+	public static <T> void assertCorrectConstraintTypes(Set<ConstraintViolation<T>> violations, Class<?>... expectedConstraintTypes) {
+
+		List<String> expectedConstraintTypeNames = newArrayList();
+		for ( Class<?> oneExpectedConstraintType : expectedConstraintTypes ) {
+			expectedConstraintTypeNames.add( oneExpectedConstraintType.getName() );
+		}
+
+		List<String> actualConstraintTypeNames = newArrayList();
+		for ( ConstraintViolation<?> violation : violations ) {
+			actualConstraintTypeNames.add(
+					violation.getConstraintDescriptor().getAnnotation().annotationType().getName()
+			);
+		}
+
+		Collections.sort( expectedConstraintTypeNames );
+		Collections.sort( actualConstraintTypeNames );
+
+		assertEquals( actualConstraintTypeNames, expectedConstraintTypeNames );
+	}
+
+	/**
+	 * Asserts that the given list of constraint violation paths matches the list of expected property paths.
+	 *
+	 * @param violations The violation list to verify.
+	 * @param expectedPropertyPaths The expected property paths.
+	 */
+	public static void assertCorrectPropertyPaths(Set<? extends ConstraintViolation<?>> violations, String... expectedPropertyPaths) {
+
+		List<String> expectedPathsAsList = Arrays.asList( expectedPropertyPaths );
+
+		List<String> actualPaths = newArrayList();
+		for ( ConstraintViolation<?> violation : violations ) {
+			actualPaths.add( violation.getPropertyPath().toString() );
+		}
+
+		Collections.sort( expectedPathsAsList );
+		Collections.sort( actualPaths );
+
+		assertEquals( actualPaths, expectedPathsAsList );
+	}
+
+	public static void assertCorrectPropertyPaths(MethodConstraintViolationException e, String... expectedPropertyPaths) {
+		assertCorrectPropertyPaths( e.getConstraintViolations(), expectedPropertyPaths );
+	}
+
+	/**
+	 * Asserts that the error message, root bean class, invalid value and property path of the given violation are equal
+	 * to the expected message, root bean class, invalid value and propertyPath.
+	 *
+	 * @param violation The violation to verify.
+	 * @param errorMessage The expected violation error message.
+	 * @param rootBeanClass The expected root bean class.
+	 * @param invalidValue The expected invalid value.
+	 * @param propertyPath The expected property path.
+	 */
+	public static void assertConstraintViolation(ConstraintViolation<?> violation, String errorMessage, Class<?> rootBeanClass, Object invalidValue, String propertyPath) {
+		assertTrue(
+				pathsAreEqual( violation.getPropertyPath(), createPathFromString( propertyPath ) ),
+				"Wrong propertyPath"
+		);
+		assertConstraintViolation( violation, errorMessage, rootBeanClass, invalidValue );
+	}
+
+	/**
+	 * Asserts that the error message, root bean class and invalid value of the given violation are equal to the
+	 * expected message, root bean class and invalid value.
+	 *
+	 * @param violation The violation to verify.
+	 * @param errorMessage The expected error message.
+	 * @param rootBeanClass The expected root bean class.
+	 * @param invalidValue The expected invalid value.
+	 */
+	public static void assertConstraintViolation(ConstraintViolation<?> violation, String errorMessage, Class<?> rootBeanClass, Object invalidValue) {
+		assertEquals( violation.getInvalidValue(), invalidValue, "Wrong invalid value" );
+		assertConstraintViolation( violation, errorMessage, rootBeanClass );
+	}
+
+	/**
+	 * Asserts that the error message and the root bean class of the given violation are equal to the expected message
+	 * and root bean class.
+	 *
+	 * @param violation The violation to verify.
+	 * @param errorMessage The expected error message.
+	 * @param rootBeanClass The expected root bean class.
+	 */
+	public static void assertConstraintViolation(ConstraintViolation<?> violation, String errorMessage, Class<?> rootBeanClass) {
+		assertEquals( violation.getRootBean().getClass(), rootBeanClass, "Wrong root bean type" );
+		assertConstraintViolation( violation, errorMessage );
+	}
+
+	/**
+	 * Asserts that the error message of the given violation is equal to the expected message.
+	 *
+	 * @param violation The violation to verify.
+	 * @param errorMessage The expected error message.
+	 */
+	public static void assertConstraintViolation(ConstraintViolation<?> violation, String errorMessage) {
+		assertEquals( violation.getMessage(), errorMessage, "Wrong expectedMessage" );
+	}
+
+	/**
+	 * Asserts that the given violation list has the expected number of violations.
+	 *
+	 * @param violations The violation list to verify.
+	 * @param numberOfViolations The expected number of violation.
+	 */
+	public static void assertNumberOfViolations(Set<? extends ConstraintViolation<?>> violations, int numberOfViolations) {
+		assertEquals( violations.size(), numberOfViolations, "Wrong number of constraint violations" );
+	}
+
+	/**
+	 * Checks that two property paths are equal.
+	 *
+	 * @param p1 The first property path.
+	 * @param p2 The second property path.
+	 *
+	 * @return {@code true} if the given paths are equal, {@code false} otherwise.
+	 */
+	public static boolean pathsAreEqual(Path p1, Path p2) {
+		Iterator<Path.Node> p1Iterator = p1.iterator();
+		Iterator<Path.Node> p2Iterator = p2.iterator();
+		while ( p1Iterator.hasNext() ) {
+			Path.Node p1Node = p1Iterator.next();
+			if ( !p2Iterator.hasNext() ) {
+				return false;
+			}
+			Path.Node p2Node = p2Iterator.next();
+
+			// do the comparison on the node values
+			if ( p2Node.getName() == null ) {
+				if ( p1Node.getName() != null ) {
+					return false;
+				}
+			}
+			else if ( !p2Node.getName().equals( p1Node.getName() ) ) {
+				return false;
+			}
+
+			if ( p2Node.isInIterable() != p1Node.isInIterable() ) {
+				return false;
+			}
+
+
+			if ( p2Node.getIndex() == null ) {
+				if ( p1Node.getIndex() != null ) {
+					return false;
+				}
+			}
+			else if ( !p2Node.getIndex().equals( p1Node.getIndex() ) ) {
+				return false;
+			}
+
+			if ( p2Node.getKey() == null ) {
+				if ( p1Node.getKey() != null ) {
+					return false;
+				}
+			}
+			else if ( !p2Node.getKey().equals( p1Node.getKey() ) ) {
+				return false;
+			}
+		}
+
+		return !p2Iterator.hasNext();
+	}
+
+	/**
+	 * Asserts that the given iterable has the expected size.
+	 *
+	 * @param iterable The iterable which size have to be verified.
+	 * @param size The expected size.
+	 */
+	public static void assertIterableSize(Iterable<?> iterable, int size) {
+		int i = 0;
+
+		//noinspection UnusedDeclaration
+		for ( @SuppressWarnings("unused") Object o : iterable ) {
+			i++;
+		}
+
+		assertEquals( i, size, "Actual size of iterable [" + iterable + "] differed from expected size" );
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCalls.java b/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCalls.java
new file mode 100644
index 0000000..8a6454a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCalls.java
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.testutil;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+ at Target( { METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Constraint(validatedBy = CountValidationCallsValidator.class)
+public @interface CountValidationCalls {
+	String message() default "";
+
+	Class<?>[] groups() default { };
+
+	Class<? extends Payload>[] payload() default { };
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCallsValidator.java b/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCallsValidator.java
new file mode 100644
index 0000000..120f34a
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/CountValidationCallsValidator.java
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.testutil;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public class CountValidationCallsValidator implements ConstraintValidator<CountValidationCalls, Object> {
+	private static final ThreadLocal<Integer> NUMBER_OF_VALIDATION_CALLS = new ThreadLocal<Integer>() {
+		@Override
+		protected Integer initialValue() {
+			return 0;
+		}
+	};
+
+	public static void init() {
+		NUMBER_OF_VALIDATION_CALLS.set( 0 );
+	}
+
+	public static int getNumberOfValidationCall() {
+		return NUMBER_OF_VALIDATION_CALLS.get();
+	}
+
+	public void initialize(CountValidationCalls constraintAnnotation) {
+	}
+
+	public boolean isValid(Object value, ConstraintValidatorContext context) {
+		NUMBER_OF_VALIDATION_CALLS.set( NUMBER_OF_VALIDATION_CALLS.get() + 1 );
+		return true;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/DummyTraversableResolver.java b/project/engine/src/test/java/org/hibernate/validator/testutil/DummyTraversableResolver.java
new file mode 100644
index 0000000..fce51ad
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/DummyTraversableResolver.java
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.testutil;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Path;
+import javax.validation.TraversableResolver;
+
+/**
+ * A dummy traversable resolver which returns always {@code true}. This resolver is used by default by all test cases. 
+ *
+ * @author Hardy Ferentschik
+ */
+public class DummyTraversableResolver implements TraversableResolver {
+	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		return true;
+	}
+
+	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
+		return true;
+	}
+}
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/HibernateTestCase.java b/project/engine/src/test/java/org/hibernate/validator/testutil/HibernateTestCase.java
new file mode 100644
index 0000000..9c0d3db
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/HibernateTestCase.java
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.testutil;
+
+import java.io.InputStream;
+import java.util.Properties;
+import javax.validation.ValidatorFactory;
+
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.tool.hbm2ddl.SchemaExport;
+
+/**
+ * Base class for validation test which work in combination with Hibernate Core.
+ *
+ * @author Hardy Ferentschik
+ */
+public abstract class HibernateTestCase {
+	private SessionFactory sessionFactory;
+	private Configuration cfg;
+
+	@BeforeTest
+	protected void setUp() throws Exception {
+		buildSessionFactory( getAnnotatedClasses(), getAnnotatedPackages(), getXmlFiles() );
+	}
+
+	@AfterTest
+	protected void tearDown() throws Exception {
+		SchemaExport export = new SchemaExport( cfg );
+		export.drop( false, true );
+		sessionFactory = null;
+	}
+
+	public SessionFactory getSessionFactory() {
+		return sessionFactory;
+	}
+
+	private void buildSessionFactory(Class<?>[] classes, String[] packages, String[] xmlFiles) throws Exception {
+		if ( sessionFactory != null ) {
+			sessionFactory.close();
+		}
+		try {
+			setCfg( new AnnotationConfiguration() );
+			configure( cfg );
+			if ( recreateSchema() ) {
+				cfg.setProperty( org.hibernate.cfg.Environment.HBM2DDL_AUTO, "create-drop" );
+			}
+			for ( String aPackage : packages ) {
+				( (AnnotationConfiguration) getCfg() ).addPackage( aPackage );
+			}
+			for ( Class<?> aClass : classes ) {
+				( (AnnotationConfiguration) getCfg() ).addAnnotatedClass( aClass );
+			}
+			for ( String xmlFile : xmlFiles ) {
+				InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFile );
+				getCfg().addInputStream( is );
+			}
+			sessionFactory = getCfg().buildSessionFactory();
+		}
+		catch ( Exception e ) {
+			e.printStackTrace();
+			throw e;
+		}
+	}
+
+	protected void configure(Configuration cfg) {
+		Properties prop = cfg.getProperties();
+		//prop.put( "javax.persistence.validation.mode", "none" );
+		prop.put( "javax.persistence.validation.factory", getValidatorFactory() );
+		prop.put( "hibernate.current_session_context_class", "thread" );
+	}
+
+	protected abstract ValidatorFactory getValidatorFactory();
+
+	protected abstract Class<?>[] getAnnotatedClasses();
+
+	protected String[] getAnnotatedPackages() {
+		return new String[] { };
+	}
+
+	protected String[] getXmlFiles() {
+		return new String[] { };
+	}
+
+	protected boolean recreateSchema() {
+		return true;
+	}
+
+	protected void setCfg(Configuration cfg) {
+		this.cfg = cfg;
+	}
+
+	protected Configuration getCfg() {
+		return cfg;
+	}
+}
+
+
+
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/TestForIssue.java b/project/engine/src/test/java/org/hibernate/validator/testutil/TestForIssue.java
new file mode 100644
index 0000000..2a9a9e1
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/TestForIssue.java
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.testutil;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * A documentation annotation for notating what JIRA issue is being tested.
+ *
+ * @author Steve Ebersole
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({ ElementType.METHOD, ElementType.TYPE })
+public @interface TestForIssue {
+	/**
+	 * The key of a JIRA issue tested.
+	 * @return The jira issue key
+	 */
+	String jiraKey();
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/ValidationInvocationHandler.java b/project/engine/src/test/java/org/hibernate/validator/testutil/ValidationInvocationHandler.java
new file mode 100644
index 0000000..2da544e
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/ValidationInvocationHandler.java
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.testutil;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import org.hibernate.validator.method.MethodConstraintViolation;
+import org.hibernate.validator.method.MethodConstraintViolationException;
+import org.hibernate.validator.method.MethodValidator;
+
+/**
+ * An invocation handler used to test method-level validation.
+ *
+ * @author Gunnar Morling
+ */
+public class ValidationInvocationHandler implements InvocationHandler {
+
+	private final Object wrapped;
+
+	private final MethodValidator validator;
+
+	private final Integer parameterIndex;
+
+	private final Class<?>[] groups;
+
+	public ValidationInvocationHandler(Object wrapped, MethodValidator validator, Class<?>... groups) {
+
+		this( wrapped, validator, null, groups );
+	}
+
+	public ValidationInvocationHandler(Object wrapped, MethodValidator validator, Integer parameterIndex, Class<?>... groups) {
+
+		this.wrapped = wrapped;
+		this.validator = validator;
+		this.parameterIndex = parameterIndex;
+		this.groups = groups;
+	}
+
+	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+		Set<MethodConstraintViolation<Object>> constraintViolations;
+
+		if ( parameterIndex != null ) {
+			constraintViolations = validator.validateParameter(
+					wrapped, method, args[parameterIndex], parameterIndex, groups
+			);
+		}
+		else {
+			constraintViolations = validator.validateAllParameters( wrapped, method, args, groups );
+		}
+
+		if ( !constraintViolations.isEmpty() ) {
+			throw new MethodConstraintViolationException( constraintViolations );
+		}
+
+		Object result = method.invoke( wrapped, args );
+
+		constraintViolations = validator.validateReturnValue( wrapped, method, result, groups );
+
+		if ( !constraintViolations.isEmpty() ) {
+			throw new MethodConstraintViolationException( constraintViolations );
+		}
+
+		return result;
+	}
+
+	public Object getWrapped() {
+		return wrapped;
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/ValidatorUtil.java b/project/engine/src/test/java/org/hibernate/validator/testutil/ValidatorUtil.java
new file mode 100644
index 0000000..67582a4
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/ValidatorUtil.java
@@ -0,0 +1,251 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.testutil;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.Locale;
+import javax.validation.Configuration;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.metadata.PropertyDescriptor;
+import javax.validation.spi.ValidationProvider;
+
+import org.hibernate.validator.HibernateValidator;
+import org.hibernate.validator.HibernateValidatorConfiguration;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.method.MethodValidator;
+import org.hibernate.validator.method.metadata.MethodDescriptor;
+import org.hibernate.validator.method.metadata.ParameterDescriptor;
+import org.hibernate.validator.method.metadata.TypeDescriptor;
+
+import static org.hibernate.validator.internal.util.Contracts.assertNotNull;
+
+/**
+ * A helper providing useful functions for setting up validators.
+ *
+ * @author Hardy Ferentschik
+ * @author Gunnar Morling
+ * @author Kevin Pollet <kevin.pollet at serli.com> (C) 2011 SERLI
+ */
+public final class ValidatorUtil {
+
+	/**
+	 * Private constructor in order to avoid instantiation.
+	 */
+	private ValidatorUtil() {
+	}
+
+	/**
+	 * Returns a configured instance of {@code Validator}. This validator is configured to use a
+	 * {@link DummyTraversableResolver}. This method also sets the default locale to english.
+	 *
+	 * @return an instance of {@code Validator}.
+	 */
+	public static Validator getValidator() {
+		final Configuration<HibernateValidatorConfiguration> configuration = getConfiguration();
+		configuration.traversableResolver( new DummyTraversableResolver() );
+		
+		return configuration.buildValidatorFactory().getValidator();
+	}
+
+	/**
+	 * Returns a configured instance of {@code Validator} initialized with the given constraint mappings. This validator
+	 * is configured to use a {@link DummyTraversableResolver}. This method also sets the default locale to english.
+	 *
+	 * @param mappings The constraint mappings.
+	 *
+	 * @return an instance of {@code Validator}.
+	 */
+	public static Validator getValidatorForProgrammaticMapping(ConstraintMapping... mappings) {
+		assertNotNull( mappings );
+		final HibernateValidatorConfiguration config = getConfiguration( HibernateValidator.class );
+		config.traversableResolver( new DummyTraversableResolver() );
+		for ( ConstraintMapping mapping : mappings ) {
+			config.addMapping( mapping );
+		}
+		return config.buildValidatorFactory().getValidator();
+	}
+
+	/**
+	 * Returns an instance of {@code MethodValidator} which can be used to validate method constraints. This validator
+	 * is constructed by getting an instance of {@code Validator} with the method {@link ValidatorUtil#getValidator()}.
+	 *
+	 * @return an instance of {@code MethodValidator}.
+	 */
+	public static MethodValidator getMethodValidator() {
+		return getValidator().unwrap( MethodValidator.class );
+	}
+
+	public static MethodValidator getMethodValidatorForMapping(ConstraintMapping... mappings) {
+		return getValidatorForProgrammaticMapping( mappings ).unwrap( MethodValidator.class );
+	}
+
+	/**
+	 * Returns the {@code Configuration} object for Hibernate Validator. This method also sets the default locale to
+	 * english.
+	 *
+	 * @return an instance of {@code Configuration} for Hibernate Validator.
+	 */
+	public static HibernateValidatorConfiguration getConfiguration() {
+		return getConfiguration( HibernateValidator.class, Locale.ENGLISH );
+	}
+
+	/**
+	 * Returns the {@code Configuration} object for Hibernate Validator. This method also sets the default locale to
+	 * the given locale.
+	 *
+	 * @param locale The default locale to set.
+	 *
+	 * @return an instance of {@code Configuration} for Hibernate Validator.
+	 */
+	public static HibernateValidatorConfiguration getConfiguration(Locale locale) {
+		return getConfiguration( HibernateValidator.class, locale );
+	}
+
+	/**
+	 * Returns the {@code Configuration} object for the given validation provider type. This method also sets the
+	 * default locale to english.
+	 *
+	 * @param type The validation provider type.
+	 *
+	 * @return an instance of {@code Configuration}.
+	 */
+	public static <T extends Configuration<T>, U extends ValidationProvider<T>> T getConfiguration(Class<U> type) {
+		return getConfiguration( type, Locale.ENGLISH );
+	}
+
+	/**
+	 * Returns the {@code Configuration} object for the given validation provider type. This method also sets the
+	 * default locale to the given locale.
+	 *
+	 * @param type The validation provider type.
+	 * @param locale The default locale to set.
+	 *
+	 * @return an instance of {@code Configuration}.
+	 */
+	public static <T extends Configuration<T>, U extends ValidationProvider<T>> T getConfiguration(Class<U> type, Locale locale) {
+		Locale.setDefault( locale );
+		return Validation.byProvider( type ).configure();
+	}
+
+	/**
+	 * Returns the {@code PropertyDescriptor} corresponding to the property contained in the given class.
+	 *
+	 * @param clazz The class containing the given property.
+	 * @param property The property name.
+	 *
+	 * @return an instance of {@code PropertyDescriptor} or {@code null} if does not exists or has no constraint.
+	 *
+	 * @see javax.validation.metadata.BeanDescriptor#getConstraintsForProperty(String)
+	 */
+	public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String property) {
+		return getValidator().getConstraintsForClass( clazz ).getConstraintsForProperty( property );
+	}
+
+	/**
+	 * Returns the {@code TypeDescriptor} corresponding to the given type.
+	 *
+	 * @param clazz The type.
+	 *
+	 * @return an instance of {@code TypeDescriptor} for the given type, never {@code null}
+	 */
+	public static TypeDescriptor getTypeDescriptor(Class<?> clazz) {
+		return getMethodValidator().getConstraintsForType( clazz );
+	}
+
+	/**
+	 * Returns the {@code MethodDescriptor} for the given method signature in the given class.
+	 *
+	 * @param clazz The class.
+	 * @param methodName The method name.
+	 * @param parameterTypes The method parameter types.
+	 *
+	 * @return an instance of {@code MethodDescriptor} for the given method signature or {@code null} if does not exists.
+	 *
+	 * @see TypeDescriptor#getConstraintsForMethod(String, Class[])
+	 */
+	public static MethodDescriptor getMethodDescriptor(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
+		return getTypeDescriptor( clazz ).getConstraintsForMethod( methodName, parameterTypes );
+	}
+
+	/**
+	 * Returns the {@code ParameterDescriptor} for the parameter at the given index within the method, corresponding to
+	 * the given signature, within the given class.
+	 *
+	 * @param clazz The class.
+	 * @param methodName The method name.
+	 * @param parameterTypes The method parameter types.
+	 * @param parameterIndex The parameter index.
+	 *
+	 * @return an instance of {@code ParameterDescriptor}.
+	 */
+	public static ParameterDescriptor getParameterDescriptor(Class<?> clazz, String methodName, Class<?>[] parameterTypes, int parameterIndex) {
+		final MethodDescriptor methodDescriptor = getMethodDescriptor( clazz, methodName, parameterTypes );
+		assertNotNull(
+				methodDescriptor,
+				"No method with the given signature is declared in " + clazz + " or its super class"
+		);
+		return methodDescriptor.getParameterDescriptors().get( parameterIndex );
+	}
+
+	public static <T, I extends T> T getValidatingProxy(I implementor) {
+		return getValidatingProxy( implementor, getMethodValidatorForMapping() );
+	}
+
+	public static <T, I extends T> T getValidatingProxy(I implementor, Class<?>... validationGroups) {
+		return getValidatingProxy( implementor, getMethodValidatorForMapping(), validationGroups );
+	}
+
+	public static <T, I extends T> T getValidatingProxy(I implementor, Integer parameterIndex, Class<?>... validationGroups) {
+		return getValidatingProxy( implementor, getMethodValidatorForMapping(), parameterIndex, validationGroups );
+	}
+
+	public static <T, I extends T> T getValidatingProxy(I implementor, ConstraintMapping... mappings) {
+		return getValidatingProxy( implementor, getMethodValidatorForMapping( mappings ) );
+	}
+
+	public static <T, I extends T> T getValidatingProxy(I implementor, MethodValidator methodValidator, Class<?>... validationGroups) {
+		return getValidatingProxy( implementor, methodValidator, null, validationGroups );
+	}
+
+	/**
+	 * Creates a proxy for the given object which performs a validation of the given object's method constraints upon method invocation.
+	 *
+	 * @param <T> The type to which the proxy shall be casted. Must be an interface.
+	 * @param <I> The type of the object to be proxied.
+	 * @param implementor The object to be proxied.
+	 * @param methodValidator The validator to use for method validation.
+	 * @param parameterIndex Optionally the index of the parameter to which validation shall apply.
+	 * @param validationGroups Optionally the groups which shall be evaluated.
+	 *
+	 * @return A proxy performing an automatic method validation.
+	 */
+	@SuppressWarnings("unchecked")
+	private static <T, I extends T> T getValidatingProxy(I implementor, MethodValidator methodValidator, Integer parameterIndex, Class<?>... validationGroups) {
+
+		InvocationHandler handler = new ValidationInvocationHandler(
+				implementor, methodValidator, parameterIndex, validationGroups
+		);
+
+		return (T) Proxy.newProxyInstance(
+				implementor.getClass().getClassLoader(),
+				implementor.getClass().getInterfaces(),
+				handler
+		);
+	}
+}
diff --git a/project/engine/src/test/java/org/hibernate/validator/testutil/package-info.java b/project/engine/src/test/java/org/hibernate/validator/testutil/package-info.java
new file mode 100644
index 0000000..4ac2f88
--- /dev/null
+++ b/project/engine/src/test/java/org/hibernate/validator/testutil/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * This package contains utility classes for testing
+ */
+package org.hibernate.validator.testutil;
diff --git a/hibernate-validator/src/test/resources/ValidationMessages_es.properties b/project/engine/src/test/resources/ValidationMessages_es.properties
similarity index 100%
rename from hibernate-validator/src/test/resources/ValidationMessages_es.properties
rename to project/engine/src/test/resources/ValidationMessages_es.properties
diff --git a/hibernate-validator/src/test/resources/hibernate.properties b/project/engine/src/test/resources/hibernate.properties
similarity index 100%
rename from hibernate-validator/src/test/resources/hibernate.properties
rename to project/engine/src/test/resources/hibernate.properties
diff --git a/project/engine/src/test/resources/log4j.properties b/project/engine/src/test/resources/log4j.properties
new file mode 100644
index 0000000..6e7112b
--- /dev/null
+++ b/project/engine/src/test/resources/log4j.properties
@@ -0,0 +1,26 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to file hibernate.log ###
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=hibernate.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to socket - chainsaw ###
+log4j.appender.socket=org.apache.log4j.net.SocketAppender
+log4j.appender.socket.remoteHost=localhost
+log4j.appender.socket.port=4560
+log4j.appender.socket.locationInfo=true
+
+
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+log4j.rootLogger=debug, stdout
+
+log4j.logger.org.hibernate.validator.internal.engine.ValidatorImpl=trace
+#log4j.logger.org.hibernate.validator.internal.engine.resolver.JPATraversableResolver=trace
+#log4j.logger.org.hibernate.validatorengine.ConstraintTree=trace
+log4j.logger.org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator=info
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/engine/mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/engine/mapping.xml
new file mode 100644
index 0000000..10a8443
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/engine/mapping.xml
@@ -0,0 +1,8 @@
+<constraint-mappings
+        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation=
+                "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
+
+    <default-package>org.hibernate.validator.test.internal.engine</default-package>
+</constraint-mappings>
\ No newline at end of file
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/empty-my-interface-mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/empty-my-interface-mapping.xml
new file mode 100644
index 0000000..9ae7c82
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/empty-my-interface-mapping.xml
@@ -0,0 +1,7 @@
+<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
+                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+    <default-package>org.hibernate.validator.internal.xml</default-package>
+    <bean class="org.hibernate.validator.test.internal.xml.MyInterface" ignore-annotations="true">
+    </bean>
+</constraint-mappings>
\ No newline at end of file
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/hv-480-mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/hv-480-mapping.xml
new file mode 100644
index 0000000..7b61df1
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/hv-480-mapping.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<constraint-mappings
+        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
+
+    <bean class="org.hibernate.validator.test.internal.xml.Customer" ignore-annotations="false">
+        <getter name="firstName">
+            <constraint annotation="javax.validation.constraints.Size">
+                <element name="min">1</element>
+                <element name="max">10</element>
+            </constraint>
+        </getter>
+    </bean>
+</constraint-mappings>
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mapping.xml
new file mode 100644
index 0000000..4e3f118
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mapping.xml
@@ -0,0 +1,16 @@
+<constraint-mappings
+        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation=
+                "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
+
+    <default-package>org.hibernate.validator.internal.xml</default-package>
+
+    <bean class="org.hibernate.validator.test.internal.xml.Person" ignore-annotations="false">
+        <getter name="firstName">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </getter>
+    </bean>
+
+    <bean class="org.hibernate.validator.test.internal.xml.Customer" ignore-annotations="false"/>
+</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mixedconfiguration/annotation-mappings.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation-mappings.xml
similarity index 100%
rename from hibernate-validator/src/test/resources/org/hibernate/validator/test/xml/mixedconfiguration/annotation-mappings.xml
rename to project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mixedconfiguration/annotation-mappings.xml
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml-mappings.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml-mappings.xml
new file mode 100755
index 0000000..5ec2a8e
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/mixedconfiguration/xml-mappings.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<constraint-mappings
+        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="
+		http://jboss.org/xml/ns/javax/validation/mapping
+		validation-mapping-1.0.xsd">
+
+    <default-package>org.hibernate.validator.internal.xml.mixedconfiguration.xml</default-package>
+
+    <bean class="org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Competition" ignore-annotations="true">
+        <field name="name">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+            <constraint annotation="javax.validation.constraints.Size">
+                <element name="min">1</element>
+            </constraint>
+        </field>
+    </bean>
+    <bean class="org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.PersonCompetition" ignore-annotations="true"/>
+    <!--bean class="TeamCompetition"/-->
+
+    <bean class="org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Game" ignore-annotations="true">
+        <field name="detail">
+            <valid/>
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </field>
+    </bean>
+
+    <bean class="org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.GameDetail" ignore-annotations="true">
+        <field name="competition">
+            <valid/>
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </field>
+    </bean>
+    <bean class="org.hibernate.validator.test.internal.xml.mixedconfiguration.xml.Fixture"/>
+
+</constraint-mappings>
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-impl-mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-impl-mapping.xml
new file mode 100644
index 0000000..bc27fac
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-impl-mapping.xml
@@ -0,0 +1,10 @@
+<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
+                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+    <default-package>org.hibernate.validator.internal.xml</default-package>
+    <bean class="org.hibernate.validator.test.internal.xml.MyInterfaceImpl" ignore-annotations="true">
+        <getter name="id" ignore-annotations="true">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </getter>
+    </bean>
+</constraint-mappings>
\ No newline at end of file
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-mapping.xml
new file mode 100644
index 0000000..5e27d41
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/my-interface-mapping.xml
@@ -0,0 +1,10 @@
+<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                     xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"
+                     xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+    <default-package>org.hibernate.validator.internal.xml</default-package>
+    <bean class="org.hibernate.validator.test.internal.xml.MyInterface" ignore-annotations="true">
+        <getter name="id" ignore-annotations="true">
+            <constraint annotation="javax.validation.constraints.NotNull"/>
+        </getter>
+    </bean>
+</constraint-mappings>
\ No newline at end of file
diff --git a/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/properties-mapping.xml b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/properties-mapping.xml
new file mode 100644
index 0000000..ed3a9c4
--- /dev/null
+++ b/project/engine/src/test/resources/org/hibernate/validator/test/internal/xml/properties-mapping.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<constraint-mappings xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
+      <default-package>org.hibernate.validator.internal.xml</default-package>
+      <bean class="org.hibernate.validator.test.internal.xml.Properties" ignore-annotations="true">
+          <getter name="listOfString" ignore-annotations="true">
+              <constraint annotation="javax.validation.constraints.NotNull" />
+          </getter>
+      </bean>
+</constraint-mappings>
\ No newline at end of file
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle1.properties b/project/engine/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle1.properties
similarity index 100%
rename from hibernate-validator/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle1.properties
rename to project/engine/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle1.properties
diff --git a/hibernate-validator/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle2.properties b/project/engine/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle2.properties
similarity index 100%
rename from hibernate-validator/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle2.properties
rename to project/engine/src/test/resources/org/hibernate/validator/test/resourceloading/AggregateResourceBundleLocatorTestBundle2.properties
diff --git a/project/engine/src/test/suite/unit-tests.xml b/project/engine/src/test/suite/unit-tests.xml
new file mode 100644
index 0000000..fae12d4
--- /dev/null
+++ b/project/engine/src/test/suite/unit-tests.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="Hibernate Validator Unit Tests" verbose="1">
+    <test name="Unit tests">
+        <packages>
+            <package name="org.hibernate.validator.test.*"/>
+        </packages>
+    </test>
+</suite>
diff --git a/project/integration/pom.xml b/project/integration/pom.xml
new file mode 100644
index 0000000..f309fef
--- /dev/null
+++ b/project/integration/pom.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-integrationtest</artifactId>
+
+    <name>Hibernate Validator Integration Tests</name>
+    <description>Hibernate Validator integration tests.</description>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <jbossas.version>7.1.1.Final</jbossas.version>
+        <arquillian.version>1.0.0.CR7</arquillian.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.jboss.arquillian</groupId>
+                <artifactId>arquillian-bom</artifactId>
+                <version>${arquillian.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.8.2</version>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>1.2.16</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate.javax.persistence</groupId>
+                <artifactId>hibernate-jpa-2.0-api</artifactId>
+                <version>1.0.1.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.as</groupId>
+                <artifactId>jboss-as-arquillian-container-managed</artifactId>
+                <version>${jbossas.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <!-- test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.junit</groupId>
+            <artifactId>arquillian-junit-container</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
+            <artifactId>shrinkwrap-descriptors-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-arquillian-container-managed</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <filtering>true</filtering>
+                <directory>src/test/resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.jboss.as</groupId>
+                                    <artifactId>jboss-as-dist</artifactId>
+                                    <version>${jbossas.version}</version>
+                                    <type>zip</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/hibernate-validator-tck-runner/src/test/resources/org/jboss/testharness/impl/packaging/jsr299/default/beans.xml b/project/integration/src/main/java/.dontdelete
similarity index 100%
rename from hibernate-validator-tck-runner/src/test/resources/org/jboss/testharness/impl/packaging/jsr299/default/beans.xml
rename to project/integration/src/main/java/.dontdelete
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/CustomValidatorFactoryInPersistenceUnitIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/CustomValidatorFactoryInPersistenceUnitIT.java
new file mode 100644
index 0000000..cda360a
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/CustomValidatorFactoryInPersistenceUnitIT.java
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.jbossas7;
+
+import java.util.Map;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.validation.ValidatorFactory;
+
+import org.apache.log4j.Logger;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.Asset;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.descriptor.api.Descriptors;
+import org.jboss.shrinkwrap.descriptor.api.spec.jpa.persistence.PersistenceDescriptor;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Tests the integration of Hibernate Validator in JBoss AS 7
+ *
+ * @author Hardy Ferentschik
+ */
+ at RunWith(Arquillian.class)
+public class CustomValidatorFactoryInPersistenceUnitIT {
+	private static final String WAR_FILE_NAME = CustomValidatorFactoryInPersistenceUnitIT.class.getSimpleName() + ".war";
+	private static final Logger log = Logger.getLogger( CustomValidatorFactoryInPersistenceUnitIT.class );
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		return ShrinkWrap
+				.create( WebArchive.class, WAR_FILE_NAME )
+				.addClasses( User.class )
+				.addAsLibrary( IntegrationTestUtil.createCustomBeanValidationProviderJar() )
+				.addAsLibraries( IntegrationTestUtil.bundleLoggingDependencies() )
+				.addAsResource( "log4j.properties" )
+				.addAsResource( persistenceXml(), "META-INF/persistence.xml" )
+				.addAsResource( "validation.xml", "META-INF/validation.xml" )
+				.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" );
+	}
+
+	private static Asset persistenceXml() {
+		String persistenceXml = Descriptors.create( PersistenceDescriptor.class )
+				.version( "2.0" )
+				.persistenceUnit( "default" )
+				.jtaDataSource( "java:jboss/datasources/ExampleDS" )
+				.property( "hibernate.hbm2ddl.auto", "create-drop" )
+				.exportAsString();
+		return new StringAsset( persistenceXml );
+	}
+
+	@PersistenceContext
+	EntityManager em;
+
+	@Test
+	// TODO see HV-546
+	public void testValidatorFactoryPassedToPersistenceUnit() throws Exception {
+		log.debug( "Running testValidatorFactoryPassedToPersistenceUnit..." );
+		Map<String, Object> properties = em.getEntityManagerFactory().getProperties();
+
+		// TODO the test should also execute an actual validation. It is not guaranteed that one can access the validator factory
+		// under javax.persistence.validation.factory. This works for the JBoss AS purposes, but not generically
+		Object obj = properties.get( "javax.persistence.validation.factory" );
+		assertTrue( "There should be an object under this property", obj != null );
+		ValidatorFactory factory = (ValidatorFactory) obj;
+//		assertTrue(
+//				"The Custom Validator implementation should be used",
+//				factory instanceof MyValidationProvider.DummyValidatorFactory
+//		);
+		log.debug( "testValidatorFactoryPassedToPersistenceUnit completed" );
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/DefaultValidatorFactoryInPersistenceUnitIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/DefaultValidatorFactoryInPersistenceUnitIT.java
new file mode 100644
index 0000000..4e86f8b
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/DefaultValidatorFactoryInPersistenceUnitIT.java
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.jbossas7;
+
+import java.util.Map;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.validation.ValidatorFactory;
+
+import org.apache.log4j.Logger;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.Asset;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.descriptor.api.Descriptors;
+import org.jboss.shrinkwrap.descriptor.api.spec.jpa.persistence.PersistenceDescriptor;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Tests the integration of Hibernate Validator in JBoss AS 7
+ *
+ * @author Hardy Ferentschik
+ * @todo the test should execute an actual validation. It is not guaranteed that one can access the validator factory
+ * under javax.persistence.validation.factory
+ */
+ at RunWith(Arquillian.class)
+public class DefaultValidatorFactoryInPersistenceUnitIT {
+	private static final String WAR_FILE_NAME = DefaultValidatorFactoryInPersistenceUnitIT.class.getSimpleName() + ".war";
+	private static final Logger log = Logger.getLogger( DefaultValidatorFactoryInPersistenceUnitIT.class );
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		return ShrinkWrap
+				.create( WebArchive.class, WAR_FILE_NAME )
+				.addClasses( User.class )
+				.addAsLibraries( IntegrationTestUtil.bundleLoggingDependencies() )
+				.addAsResource( "log4j.properties" )
+				.addAsResource( persistenceXml(), "META-INF/persistence.xml" )
+				.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" );
+	}
+
+	private static Asset persistenceXml() {
+		String persistenceXml = Descriptors.create( PersistenceDescriptor.class )
+				.version( "2.0" )
+				.persistenceUnit( "default" )
+				.jtaDataSource( "java:jboss/datasources/ExampleDS" )
+				.property( "hibernate.hbm2ddl.auto", "create-drop" )
+				.exportAsString();
+		return new StringAsset( persistenceXml );
+	}
+
+	@PersistenceContext
+	EntityManager em;
+
+	@Test
+	public void testValidatorFactoryPassedToPersistenceUnit() throws Exception {
+		log.debug( "Running testValidatorFactoryPassedToPersistenceUnit..." );
+		Map<String, Object> properties = em.getEntityManagerFactory().getProperties();
+		// TODO the test should also execute an actual validation. It is not guaranteed that one can access the validator factory
+		// under javax.persistence.validation.factory. This works for the JBoss AS purposes, but not generically
+		Object obj = properties.get( "javax.persistence.validation.factory" );
+		assertTrue( "There should be an object under this property", obj != null );
+		ValidatorFactory factory = (ValidatorFactory) obj;
+		assertEquals(
+				"The Hibernate Validator implementation should be used",
+				"ValidatorImpl",
+				factory.getValidator().getClass().getSimpleName()
+		);
+		log.debug( "testValidatorFactoryPassedToPersistenceUnit completed" );
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/JndiLookupOfValidatorFactoryIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/JndiLookupOfValidatorFactoryIT.java
new file mode 100644
index 0000000..d40a17a
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/JndiLookupOfValidatorFactoryIT.java
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.jbossas7;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.validation.ValidatorFactory;
+
+import org.apache.log4j.Logger;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+
+/**
+ * Tests the integration of Hibernate Validator in JBoss AS 7.
+ *
+ * @author Hardy Ferentschik
+ */
+ at RunWith(Arquillian.class)
+public class JndiLookupOfValidatorFactoryIT {
+	private static final String WAR_FILE_NAME = JndiLookupOfValidatorFactoryIT.class.getSimpleName() + ".war";
+	private static final Logger log = Logger.getLogger( JndiLookupOfValidatorFactoryIT.class );
+	private static final String DEFAULT_JNDI_NAME_OF_VALIDATOR_FACTORY = "java:comp/ValidatorFactory";
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		return ShrinkWrap
+				.create( WebArchive.class, WAR_FILE_NAME )
+				.addAsLibraries( IntegrationTestUtil.bundleLoggingDependencies() )
+				.addAsResource( "log4j.properties" );
+	}
+
+	@Test
+	public void testDefaultValidatorFactoryLookup() throws Exception {
+		log.debug( "Running testDefaultValidatorFactoryLookup..." );
+		try {
+			Context ctx = new InitialContext();
+			Object obj = ctx.lookup( DEFAULT_JNDI_NAME_OF_VALIDATOR_FACTORY );
+			assertTrue( "The default validator factory should be bound", obj != null );
+			ValidatorFactory factory = (ValidatorFactory) obj;
+			assertEquals(
+					"The Hibernate Validator implementation should be used",
+					"ValidatorImpl",
+					factory.getValidator().getClass().getSimpleName()
+			);
+		}
+		catch ( NamingException e ) {
+			fail( "The default validator factory should be bound" );
+		}
+		log.debug( "testDefaultValidatorFactoryLookup completed" );
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/User.java b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/User.java
new file mode 100644
index 0000000..59257b2
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/jbossas7/User.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.jbossas7;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at Entity
+public class User {
+	@Id
+	@GeneratedValue
+	private long id;
+
+	private String name;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlButNoProviderTestIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlButNoProviderTestIT.java
new file mode 100644
index 0000000..bf3ea12
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlButNoProviderTestIT.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.lazyfactory;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.Node;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+import org.hibernate.validator.internal.engine.ValidatorImpl;
+import org.hibernate.validator.internal.util.LazyValidatorFactory;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.fail;
+
+/**
+ * Tests for {@code LazyValidatorFactory}. See HV-546.
+ *
+ * @author Hardy Ferentschik
+ */
+ at RunWith(Arquillian.class)
+public class LazyValidatorFactoryWithValidationXmlButNoProviderTestIT {
+	private static final String WAR_FILE_NAME = LazyValidatorFactoryWithValidationXmlButNoProviderTestIT.class.getSimpleName() + ".war";
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		Archive<?> beanValidationJarWithMissingProvider = IntegrationTestUtil.createCustomBeanValidationProviderJar();
+		Node providerClass = beanValidationJarWithMissingProvider.delete(
+				"org/hibernate/validator/integration/util/MyValidationProvider.class"
+		);
+		if ( providerClass == null ) {
+			fail( "MyValidationProvider was not as expected in the custom jar" );
+		}
+		return ShrinkWrap.create( WebArchive.class, WAR_FILE_NAME )
+				.addAsLibraries( IntegrationTestUtil.bundleHibernateValidatorWithDependencies( true ) )
+				.addAsLibrary( beanValidationJarWithMissingProvider )
+				.addAsResource( "log4j.properties" )
+				.addAsWebInfResource( "jboss-deployment-structure.xml" );
+	}
+
+	@Test
+	public void testBootstrappingDoesNotFailDueToMissingCustomProvider() throws Exception {
+		LazyValidatorFactory factory = new LazyValidatorFactory();
+		assertEquals(
+				"Since the custom provider cannot be loaded, Hibernate Validator should be the default",
+				ValidatorImpl.class.getName(),
+				factory.getValidator().getClass().getName()
+		);
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlTestIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlTestIT.java
new file mode 100644
index 0000000..56ed781
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithValidationXmlTestIT.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.lazyfactory;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+import org.hibernate.validator.integration.util.MyValidator;
+import org.hibernate.validator.internal.util.LazyValidatorFactory;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * Tests for {@code LazyValidatorFactory}. See HV-546.
+ *
+ * @author Hardy Ferentschik
+ */
+ at RunWith(Arquillian.class)
+public class LazyValidatorFactoryWithValidationXmlTestIT {
+	private static final String WAR_FILE_NAME = LazyValidatorFactoryWithValidationXmlTestIT.class.getSimpleName() + ".war";
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		return ShrinkWrap.create( WebArchive.class, WAR_FILE_NAME )
+				.addAsLibraries( IntegrationTestUtil.bundleHibernateValidatorWithDependencies( true ) )
+				.addAsLibraries( IntegrationTestUtil.createCustomBeanValidationProviderJar() )
+				.addAsResource( "validation.xml", "META-INF/validation.xml" )
+				.addAsResource( "log4j.properties" )
+				.addAsWebInfResource( "jboss-deployment-structure.xml" );
+	}
+
+	@Test
+	public void testBootstrapCustomProviderWithLazyFactory() throws Exception {
+		LazyValidatorFactory factory = new LazyValidatorFactory();
+		assertEquals(
+				"The custom validator should have been created",
+				MyValidator.class.getName(),
+				factory.getValidator().getClass().getName()
+		);
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithoutValidationXmlTestIT.java b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithoutValidationXmlTestIT.java
new file mode 100644
index 0000000..256b272
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/lazyfactory/LazyValidatorFactoryWithoutValidationXmlTestIT.java
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.lazyfactory;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.hibernate.validator.internal.engine.ValidatorImpl;
+import org.hibernate.validator.integration.util.IntegrationTestUtil;
+import org.hibernate.validator.internal.util.LazyValidatorFactory;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * Tests for {@code LazyValidatorFactory}. See HV-546.
+ *
+ * @author Hardy Ferentschik
+ */
+ at RunWith(Arquillian.class)
+public class LazyValidatorFactoryWithoutValidationXmlTestIT {
+	private static final String WAR_FILE_NAME = LazyValidatorFactoryWithoutValidationXmlTestIT.class.getSimpleName() + ".war";
+
+	@Deployment
+	public static Archive<?> createTestArchive() {
+		return ShrinkWrap.create( WebArchive.class, WAR_FILE_NAME )
+				.addAsLibraries( IntegrationTestUtil.bundleHibernateValidatorWithDependencies( true ) )
+				.addAsLibrary( IntegrationTestUtil.createCustomBeanValidationProviderJar() )
+				.addAsResource( "log4j.properties" )
+				.addAsWebInfResource( "jboss-deployment-structure.xml" );
+	}
+
+	@Test
+	public void testBootstrapWithoutValidationXmlCreatesHibernateValidatorInstance() throws Exception {
+		LazyValidatorFactory factory = new LazyValidatorFactory();
+		assertEquals(
+				"Hibernate Validator should be the chosen provider. " +
+						"Even though we bundle another provider it does not get explicitly configured.",
+				ValidatorImpl.class.getName(),
+				factory.getValidator().getClass().getName()
+		);
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/util/IntegrationTestUtil.java b/project/integration/src/test/java/org/hibernate/validator/integration/util/IntegrationTestUtil.java
new file mode 100644
index 0000000..ece71d5
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/util/IntegrationTestUtil.java
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.util;
+
+import java.util.Collection;
+
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.resolver.api.DependencyResolvers;
+import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver;
+
+import org.hibernate.validator.internal.util.Version;
+
+/**
+ * Helper functions for creating integration tests with Arquillian and Shrinkwrap.
+ *
+ * @author Hardy Ferentschik
+ */
+public class IntegrationTestUtil {
+	// if you want to run this test from the IDE make sure that the hibernate-validator-integrationtest module has
+	// a dependency to the hibernate-validator jar file since the version string in org.hibernate.validator.util.Version
+	// works with byte code enhancement
+	private static final String VALIDATOR_VERSION = Version.getVersionString();
+	private static final String CUSTOM_BV_JAR_NAME = "dummy-bean-validation-provider.jar";
+	private static final String VALIDATION_PROVIDER_SERVICE_FILE_PATH = "META-INF/services/javax.validation.spi.ValidationProvider";
+
+	// prevent instantiation
+	private IntegrationTestUtil() {
+	}
+
+	/**
+	 * @return Returns a jar file containing a custom (dummy) Bean Validation provider including provider, configuration,
+	 *         validator and service file
+	 */
+	public static Archive<?> createCustomBeanValidationProviderJar() {
+		return ShrinkWrap.create( JavaArchive.class, CUSTOM_BV_JAR_NAME )
+				.addClasses(
+						MyValidator.class,
+						MyValidatorConfiguration.class,
+						MyValidationProvider.class
+				)
+				.addAsResource(
+						"javax.validation.spi.ValidationProvider",
+						VALIDATION_PROVIDER_SERVICE_FILE_PATH
+				);
+	}
+
+	public static Collection<JavaArchive> bundleHibernateValidatorWithDependencies(boolean removeServiceFile) {
+		Collection<JavaArchive> hibernateValidatorWithDependencies = DependencyResolvers.use(
+				MavenDependencyResolver.class
+		)
+				// go offline to make sure to get the SNAPSHOT from the current build and not a resolved SNAPSHOT
+				// from a remote repo
+				.goOffline()
+				.artifact( "org.hibernate:hibernate-validator:" + VALIDATOR_VERSION )
+				.resolveAs( JavaArchive.class );
+
+		// remove the service file for Hibernate Validator to avoid bootstrapping Hibernate Validator
+		if ( removeServiceFile ) {
+			for ( JavaArchive archive : hibernateValidatorWithDependencies ) {
+				if ( archive.contains( VALIDATION_PROVIDER_SERVICE_FILE_PATH ) ) {
+					archive.delete( VALIDATION_PROVIDER_SERVICE_FILE_PATH );
+				}
+			}
+		}
+
+		// add logging classes
+		hibernateValidatorWithDependencies.addAll( bundleLoggingDependencies() );
+		return hibernateValidatorWithDependencies;
+	}
+
+	public static Collection<JavaArchive> bundleLoggingDependencies() {
+		return DependencyResolvers.use( MavenDependencyResolver.class )
+				.loadMetadataFromPom( "pom.xml" )
+				.artifact( "log4j:log4j" )
+				.resolveAs( JavaArchive.class );
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidationProvider.java b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidationProvider.java
new file mode 100644
index 0000000..cfcaf76
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidationProvider.java
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.util;
+
+import javax.validation.Configuration;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.Validator;
+import javax.validation.ValidatorContext;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.BootstrapState;
+import javax.validation.spi.ConfigurationState;
+import javax.validation.spi.ValidationProvider;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MyValidationProvider implements ValidationProvider<MyValidatorConfiguration> {
+
+	public MyValidatorConfiguration createSpecializedConfiguration(BootstrapState state) {
+		return MyValidatorConfiguration.class.cast( new MyValidatorConfiguration( this ) );
+	}
+
+	public Configuration<?> createGenericConfiguration(BootstrapState state) {
+		return new MyValidatorConfiguration( this );
+	}
+
+	public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState) {
+		return new DummyValidatorFactory();
+	}
+
+	public static class DummyValidatorFactory implements ValidatorFactory {
+
+		public Validator getValidator() {
+			return new MyValidator();
+		}
+
+		public ValidatorContext usingContext() {
+			throw new UnsupportedOperationException();
+		}
+
+		public MessageInterpolator getMessageInterpolator() {
+			throw new UnsupportedOperationException();
+		}
+
+		public TraversableResolver getTraversableResolver() {
+			throw new UnsupportedOperationException();
+		}
+
+		public ConstraintValidatorFactory getConstraintValidatorFactory() {
+			throw new UnsupportedOperationException();
+		}
+
+		public <T> T unwrap(Class<T> type) {
+			throw new UnsupportedOperationException();
+		}
+	}
+}
+
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidator.java b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidator.java
new file mode 100644
index 0000000..b0b4f22
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidator.java
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.util;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+import javax.validation.metadata.BeanDescriptor;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MyValidator implements Validator {
+	public <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
+		throw new UnsupportedOperationException();
+	}
+
+	public <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
+		throw new UnsupportedOperationException();
+	}
+
+	public <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
+		throw new UnsupportedOperationException();
+	}
+
+	public BeanDescriptor getConstraintsForClass(Class<?> clazz) {
+		throw new UnsupportedOperationException();
+	}
+
+	public <T> T unwrap(Class<T> type) {
+		throw new UnsupportedOperationException();
+	}
+}
+
+
diff --git a/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidatorConfiguration.java b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidatorConfiguration.java
new file mode 100644
index 0000000..4d79f96
--- /dev/null
+++ b/project/integration/src/test/java/org/hibernate/validator/integration/util/MyValidatorConfiguration.java
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.integration.util;
+
+import java.io.InputStream;
+import javax.validation.Configuration;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.ValidationProvider;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MyValidatorConfiguration implements Configuration<MyValidatorConfiguration> {
+
+	private final ValidationProvider provider;
+
+	public MyValidatorConfiguration() {
+		provider = null;
+	}
+
+	public MyValidatorConfiguration(ValidationProvider provider) {
+		this.provider = provider;
+	}
+
+	public MyValidatorConfiguration ignoreXmlConfiguration() {
+		throw new UnsupportedOperationException();
+	}
+
+	public MyValidatorConfiguration messageInterpolator(MessageInterpolator interpolator) {
+		throw new UnsupportedOperationException();
+	}
+
+	public MyValidatorConfiguration traversableResolver(TraversableResolver resolver) {
+		throw new UnsupportedOperationException();
+	}
+
+	public MyValidatorConfiguration constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory) {
+		throw new UnsupportedOperationException();
+	}
+
+	public MyValidatorConfiguration addMapping(InputStream stream) {
+		throw new UnsupportedOperationException();
+	}
+
+	public MyValidatorConfiguration addProperty(String name, String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public MessageInterpolator getDefaultMessageInterpolator() {
+		throw new UnsupportedOperationException();
+	}
+
+	public TraversableResolver getDefaultTraversableResolver() {
+		throw new UnsupportedOperationException();
+	}
+
+	public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
+		throw new UnsupportedOperationException();
+	}
+
+	public ValidatorFactory buildValidatorFactory() {
+		return provider.buildValidatorFactory( null );
+	}
+}
+
+
diff --git a/project/integration/src/test/resources/arquillian.xml b/project/integration/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..c439df1
--- /dev/null
+++ b/project/integration/src/test/resources/arquillian.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://jboss.org/schema/arquillian
+        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+    <engine>
+        <property name="deploymentExportPath">target/</property>
+    </engine>
+
+    <container qualifier="jboss" default="true">
+        <protocol type="jmx-as7">
+            <property name="executionType">REMOTE</property>
+        </protocol>
+        <configuration>
+            <property name="jbossHome">target/jboss-as-${jbossas.version}</property>
+            <!--<property name="javaVmArguments">-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y -Xmx512m -XX:MaxPermSize=128m</property>-->
+        </configuration>
+    </container>
+
+</arquillian>
\ No newline at end of file
diff --git a/project/integration/src/test/resources/javax.validation.spi.ValidationProvider b/project/integration/src/test/resources/javax.validation.spi.ValidationProvider
new file mode 100644
index 0000000..be55930
--- /dev/null
+++ b/project/integration/src/test/resources/javax.validation.spi.ValidationProvider
@@ -0,0 +1 @@
+org.hibernate.validator.integration.util.MyValidationProvider
\ No newline at end of file
diff --git a/project/integration/src/test/resources/jboss-deployment-structure.xml b/project/integration/src/test/resources/jboss-deployment-structure.xml
new file mode 100644
index 0000000..b90b44b
--- /dev/null
+++ b/project/integration/src/test/resources/jboss-deployment-structure.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<jboss-deployment-structure>
+    <deployment>
+        <exclusions>
+            <!--
+            In order to test with the Hibernate Validator classes bundled in the war file we have to make sure
+            that the default org.hibernate.validator module classes are not loaded/used instead.
+            System dependencies have precedence - see https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
+            -->
+            <module name="org.hibernate.validator"/>
+        </exclusions>
+    </deployment>
+</jboss-deployment-structure>
+
diff --git a/project/integration/src/test/resources/log4j.properties b/project/integration/src/test/resources/log4j.properties
new file mode 100644
index 0000000..482f236
--- /dev/null
+++ b/project/integration/src/test/resources/log4j.properties
@@ -0,0 +1,8 @@
+log4j.rootCategory=DEBUG, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%d{yyyy-mm-dd hh:mm:ss.S},%6.6r]%-5p[%t]%x(%F:%L) - %m%n
+
+#log4j.logger.org.hibernate.search=TRACE
\ No newline at end of file
diff --git a/project/integration/src/test/resources/validation.xml b/project/integration/src/test/resources/validation.xml
new file mode 100644
index 0000000..44dccd4
--- /dev/null
+++ b/project/integration/src/test/resources/validation.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+                   xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.0.xsd"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <default-provider>org.hibernate.validator.integration.util.MyValidationProvider</default-provider>
+</validation-config>
\ No newline at end of file
diff --git a/project/performance/pom.xml b/project/performance/pom.xml
new file mode 100644
index 0000000..3a07bf3
--- /dev/null
+++ b/project/performance/pom.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-performance</artifactId>
+
+    <name>Hibernate Validator Performance Tests</name>
+    <description>Hibernate Validator performance tests.</description>
+
+    <properties>
+        <profilingOptions>-agentpath:/Applications/Development/jprofiler7/bin/macos/libjprofilerti.jnilib=port=8849,nowait</profilingOptions>
+        <history.directory>${project.basedir}/history</history.directory>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>chronos-jmeter-maven-plugin</artifactId>
+                <configuration>
+                    <input>${basedir}/src/jmx</input>
+                    <jMeterRemoteLocation>http://www.apache.org/dist/jmeter/binaries/apache-jmeter-2.6.zip</jMeterRemoteLocation>
+                    <jmeterhome>${project.basedir}/jmeter</jmeterhome>
+                    <jmeterOutput>${project.basedir}/target/chronos/performancetest</jmeterOutput>
+                    <historydir>${history.directory}</historydir>
+                    <heap>1024m</heap>
+                    <loggc>false</loggc>
+                    <jmeterVariables>
+                        <property>
+                            <name>validator</name>
+                            <value>${validator.version}</value>
+                        </property>
+                    </jmeterVariables>
+                    <!--<options>-->
+                    <!--<option>${profilingOptions}</option>-->
+                    <!--</options>-->
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>chronos-report-maven-plugin</artifactId>
+                <!-- Can't retrieve reporting plug-in version from pluginManagement
+                     (see http://jira.codehaus.org/browse/MSITE-443) -->
+                <version>${org.codehaus.mojo.chronos.version}</version>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <profiles>
+        <profile>
+            <id>hv-4.3</id>
+            <activation>
+                <property>
+                    <name>validator</name>
+                    <value>hv-4.3</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-validator</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </dependency>
+            </dependencies>
+            <properties>
+                <validator.version>HV 4.3.0-SNAPSHOT</validator.version>
+            </properties>
+        </profile>
+        <profile>
+            <id>hv-4.2</id>
+            <activation>
+                <property>
+                    <name>validator</name>
+                    <value>hv-4.2</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-validator</artifactId>
+                    <version>4.2.0.Final</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                    <version>1.6.1</version>
+                </dependency>
+            </dependencies>
+            <properties>
+                <validator.version>HV 4.2.0.Final</validator.version>
+            </properties>
+        </profile>
+        <profile>
+            <id>hv-4.1</id>
+            <activation>
+                <property>
+                    <name>validator</name>
+                    <value>hv-4.1</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-validator</artifactId>
+                    <version>4.1.0.Final</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                    <version>1.5.6</version>
+                </dependency>
+            </dependencies>
+            <properties>
+                <validator.version>HV 4.1.0.Final</validator.version>
+            </properties>
+        </profile>
+        <profile>
+            <id>bval-0.4</id>
+            <activation>
+                <property>
+                    <name>validator</name>
+                    <value>bval-0.4</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.bval</groupId>
+                    <artifactId>bval-core</artifactId>
+                    <version>0.4</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.bval</groupId>
+                    <artifactId>bval-jsr303</artifactId>
+                    <version>0.4</version>
+                </dependency>
+            </dependencies>
+            <properties>
+                <validator.version>BVAL 0.4</validator.version>
+            </properties>
+        </profile>
+    </profiles>
+</project>
diff --git a/project/performance/readme.md b/project/performance/readme.md
new file mode 100644
index 0000000..e76634e
--- /dev/null
+++ b/project/performance/readme.md
@@ -0,0 +1,80 @@
+# Performance test for Hibernate Validator
+
+The tests are written as JUnit tests. They can be developed and executed as usual in your IDE. However, they are not
+run as unit tests during a _mvn test_. Instead, to execute the performance tests [Apache JMeter](http://jmeter.apache.org/)
+and the [chronos-jmeter-maven-plugin](http://mojo.codehaus.org/chronos/chronos-jmeter-maven-plugin) is used.
+
+## Profiles
+
+To allow performance testing of different Hibernate Validator versions there are multiple profiles configured.
+Choosing a profile executes the tests against the specified Hibernate Validator version. The defined profiles are:
+
+* hv-4.3 (Hibernate Validator 4.3.0-SNAPSHOT)
+* hv-4.2 (Hibernate Validator 4.2.0.Final)
+* hv-4.1 (Hibernate Validator 4.1.0.Final)
+
+## Executing the performance tests
+
+Some tips before you start:
+
+* When running the test for the first time (either via the GUI or the command line), the specified JMeter version is
+downloaded and extracted into the performance module.
+* For JMeter to execute JUnit tests they have to be copied to _\<jmeter_install_dir\>/lib/junit_. This happens automatically
+  when _chronos-jmeter:jmetergui_ or _chronos-jmeter:jmeter_ is executed. After the execution the artifacts are removed.
+* You need to specify a profile!
+
+### Using the JMeter GUI
+
+To run or configure a test via the GUI you run:
+
+    > mvn chronos-jmeter:jmetergui -P hv-4.3 &
+
+Then open a JMeter test file from _src/jmx_ and run the test.
+
+### Using the maven build
+
+The following command line will run all performance tests found under _src/jmx/_  (_*.jmx_ files):
+
+    > mvn clean package chronos-jmeter:jmeter -P hv-4.3
+
+To generate a report from the test execution run:
+
+    > mvn chronos-jmeter:jmeteroutput chronos-report:report
+
+After the completion of the report generation open:
+
+    > open target/site/performancetest.html
+
+#### Profiling
+
+The pom contains an example on how you can run the tests while attaching a profiler. You will need to uncomment and
+adjust the property _profilingOptions_ and make sure it is used in the _chronos-report-maven-plugin_ configuration.
+
+#### Creating reports for all major Validator versions
+
+    > for i in "hv-4.3" "hv-4.2" "hv-4.1"
+    > do
+    > mvn -P $i clean package chronos-jmeter:jmeter ; mvn chronos-jmeter:jmeteroutput chronos-report:report; open target/site/performancetest.html;
+    > done
+
+## Existing tests (work in progress)
+
+At the moment the following tests are defined
+
+### Simple ValidationTest
+
+A simple bean with a random number of failing constraints gets initalized and validated. The test is once executed with
+a shared _ValidatorFactory_ and once the factory is recreated on each invocation.
+
+### CascadedValidationTest
+
+Simple bean with cascaded validation ...
+
+### StatisticalValidationTest
+
+A number of _TestEntity_s is created where each entity contains a property for each built-in constraint type and also a reference
+to another _TestEntity_. All constraints are evaluated by a single ConstraintValidator implementation which fails a specified
+percentage of the validations.
+
+
+
diff --git a/project/performance/src/jmx/cascaded.jmx b/project/performance/src/jmx/cascaded.jmx
new file mode 100644
index 0000000..6996d85
--- /dev/null
+++ b/project/performance/src/jmx/cascaded.jmx
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.2">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Hibernate Validator Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments">
+          <elementProp name="validator.version" elementType="Argument">
+            <stringProp name="Argument.name">validator.version</stringProp>
+            <stringProp name="Argument.value">${__property(validator)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+        </collectionProp>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1335351500000</longProp>
+        <longProp name="ThreadGroup.end_time">1335351500000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </SetupThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Setup Cascaded Validation - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.cascaded.CascadedValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">setupValidatorInstance</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+          <stringProp name="TestPlan.comments">A cascaded validation test</stringProp>
+        </JUnitSampler>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">100</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">100</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">10</stringProp>
+        <longProp name="ThreadGroup.start_time">1332340789000</longProp>
+        <longProp name="ThreadGroup.end_time">1332340789000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Cascaded Validation  - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.cascaded.CascadedValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">testCascadedValidation</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">true</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+          <stringProp name="TestPlan.comments">A cascaded validation test</stringProp>
+        </JUnitSampler>
+        <hashTree/>
+        <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>true</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>
diff --git a/project/performance/src/jmx/simple-cached-validator-factory.jmx b/project/performance/src/jmx/simple-cached-validator-factory.jmx
new file mode 100644
index 0000000..6002a79
--- /dev/null
+++ b/project/performance/src/jmx/simple-cached-validator-factory.jmx
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.2">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Hibernate Validator Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments">
+          <elementProp name="validator.version" elementType="Argument">
+            <stringProp name="Argument.name">validator.version</stringProp>
+            <stringProp name="Argument.value">${__property(validator)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+        </collectionProp>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1335351872000</longProp>
+        <longProp name="ThreadGroup.end_time">1335351872000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </SetupThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Setup Simple Validation shared ValidatorFactory - ${validator.version}" enabled="true">
+          <stringProp name="TestPlan.comments">A simple bean validation</stringProp>
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.simple.SimpleValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">setUpValidatorFactory</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">100</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">100</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">10</stringProp>
+        <longProp name="ThreadGroup.start_time">1332326233000</longProp>
+        <longProp name="ThreadGroup.end_time">1332326233000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Simple Validation shared ValidatorFactory - ${validator.version}" enabled="true">
+          <stringProp name="TestPlan.comments">A simple bean validation</stringProp>
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.simple.SimpleValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">testSimpleBeanValidation</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+        <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
+          <boolProp name="ResultCollector.error_logging">true</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <sampleCount>true</sampleCount>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>
diff --git a/project/performance/src/jmx/simple-uncached-validator-factory.jmx b/project/performance/src/jmx/simple-uncached-validator-factory.jmx
new file mode 100644
index 0000000..0e5a204
--- /dev/null
+++ b/project/performance/src/jmx/simple-uncached-validator-factory.jmx
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.2">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Hibernate Validator Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments">
+          <elementProp name="validator.version" elementType="Argument">
+            <stringProp name="Argument.name">validator.version</stringProp>
+            <stringProp name="Argument.value">${__property(validator)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+        </collectionProp>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1335352495000</longProp>
+        <longProp name="ThreadGroup.end_time">1335352495000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </SetupThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Setup Simple Validation recreated ValidatorFactory - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.simple.SimpleValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">setUpValidatorFactory</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">false</stringProp>
+          <stringProp name="junitsampler.append.exception">false</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">100</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">100</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">10</stringProp>
+        <longProp name="ThreadGroup.start_time">1332326233000</longProp>
+        <longProp name="ThreadGroup.end_time">1332326233000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Simple Validation recreated ValidatorFactory - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.simple.SimpleValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">testSimpleBeanValidationRecreatingValidatorFactory</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">false</stringProp>
+          <stringProp name="junitsampler.append.exception">false</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+        <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
+          <boolProp name="ResultCollector.error_logging">true</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <sampleCount>true</sampleCount>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>
diff --git a/project/performance/src/jmx/statistical.jmx b/project/performance/src/jmx/statistical.jmx
new file mode 100644
index 0000000..aefe775
--- /dev/null
+++ b/project/performance/src/jmx/statistical.jmx
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.2">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Testing Validator peformance w/ random graph depth and random failures" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments">
+          <elementProp name="validator.version" elementType="Argument">
+            <stringProp name="Argument.name">validator.version</stringProp>
+            <stringProp name="Argument.value">${__property(validator)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+        </collectionProp>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1335351976000</longProp>
+        <longProp name="ThreadGroup.end_time">1335351976000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </SetupThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Setup Statistical Validation - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.statistical.StatisticalValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">setUpValidatorFactory</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">200</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">10</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">5</stringProp>
+        <longProp name="ThreadGroup.start_time">1332326233000</longProp>
+        <longProp name="ThreadGroup.end_time">1332326233000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="Statistical Validation - ${validator.version}" enabled="true">
+          <stringProp name="junitSampler.classname">org.hibernate.validator.performance.statistical.StatisticalValidationTest</stringProp>
+          <stringProp name="junitsampler.constructorstring"></stringProp>
+          <stringProp name="junitsampler.method">testValidationWithStatisticalGraphDepthAndConstraintValidator</stringProp>
+          <stringProp name="junitsampler.pkg.filter"></stringProp>
+          <stringProp name="junitsampler.success">Test successful</stringProp>
+          <stringProp name="junitsampler.success.code">1000</stringProp>
+          <stringProp name="junitsampler.failure">Test failed</stringProp>
+          <stringProp name="junitsampler.failure.code">0001</stringProp>
+          <stringProp name="junitsampler.error">An unexpected error occured</stringProp>
+          <stringProp name="junitsampler.error.code">9999</stringProp>
+          <stringProp name="junitsampler.exec.setup">false</stringProp>
+          <stringProp name="junitsampler.append.error">true</stringProp>
+          <stringProp name="junitsampler.append.exception">true</stringProp>
+          <boolProp name="junitsampler.junit4">true</boolProp>
+        </JUnitSampler>
+        <hashTree/>
+        <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="false">
+          <boolProp name="ResultCollector.error_logging">true</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <sampleCount>true</sampleCount>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>
diff --git a/project/performance/src/main/java/org/hibernate/validator/performance/cascaded/CascadedValidationTest.java b/project/performance/src/main/java/org/hibernate/validator/performance/cascaded/CascadedValidationTest.java
new file mode 100644
index 0000000..f906120
--- /dev/null
+++ b/project/performance/src/main/java/org/hibernate/validator/performance/cascaded/CascadedValidationTest.java
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.performance.cascaded;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Valid;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.NotNull;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CascadedValidationTest {
+	private static Validator validator;
+
+	@BeforeClass
+	public static void setupValidatorInstance() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		validator = factory.getValidator();
+	}
+
+	@Test
+	public void testCascadedValidation() {
+		// TODO graphs needs to be generated and deeper
+		Person kermit = new Person( "kermit" );
+		Person piggy = new Person( "miss piggy" );
+		Person gonzo = new Person( "gonzo" );
+
+		kermit.addFriend( piggy ).addFriend( gonzo );
+		piggy.addFriend( kermit ).addFriend( gonzo );
+		gonzo.addFriend( kermit ).addFriend( piggy );
+
+		Set<ConstraintViolation<Person>> violations = validator.validate( kermit );
+		assertEquals( 0, violations.size() );
+	}
+
+	public class Person {
+		@NotNull
+		String name;
+
+		@Valid
+		Set<Person> friends = new HashSet<Person>();
+
+		public Person(String name) {
+			this.name = name;
+		}
+
+		public Person addFriend(Person friend) {
+			friends.add( friend );
+			return this;
+		}
+	}
+}
+
+
+
diff --git a/project/performance/src/main/java/org/hibernate/validator/performance/simple/SimpleValidationTest.java b/project/performance/src/main/java/org/hibernate/validator/performance/simple/SimpleValidationTest.java
new file mode 100644
index 0000000..f53d8f9
--- /dev/null
+++ b/project/performance/src/main/java/org/hibernate/validator/performance/simple/SimpleValidationTest.java
@@ -0,0 +1,141 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.performance.simple;
+
+import java.util.Random;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SimpleValidationTest {
+	private static final String[] names = {
+			null,
+			"Jacob",
+			"Isabella",
+			"Ethan",
+			"Sophia",
+			"Michael",
+			"Emma",
+			"Jayden",
+			"Olivia",
+			"William"
+	};
+
+	private static Validator validator;
+	private static Random random;
+
+	@BeforeClass
+	public static void setUpValidatorFactory() {
+		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+		validator = factory.getValidator();
+		random = new Random();
+	}
+
+	@Test
+	public void testSimpleBeanValidation() {
+		DriverSetup driverSetup = new DriverSetup();
+		Set<ConstraintViolation<Driver>> violations = validator.validate( driverSetup.getDriver() );
+		assertEquals( driverSetup.getExpectedViolationCount(), violations.size() );
+	}
+
+	@Test
+	public void testSimpleBeanValidationRecreatingValidatorFactory() {
+		DriverSetup driverSetup = new DriverSetup();
+		Validator localValidator = Validation.buildDefaultValidatorFactory().getValidator();
+		Set<ConstraintViolation<Driver>> violations = localValidator.validate( driverSetup.getDriver() );
+		assertEquals( driverSetup.getExpectedViolationCount(), violations.size() );
+	}
+
+	public class Driver {
+		@NotNull
+		String name;
+
+		@Min(18)
+		int age;
+
+		@AssertTrue
+		private boolean hasDrivingLicense;
+
+		public Driver(String name, int age, boolean hasDrivingLicense) {
+			this.name = name;
+			this.age = age;
+			this.hasDrivingLicense = hasDrivingLicense;
+		}
+
+		@Override
+		public String toString() {
+			final StringBuilder sb = new StringBuilder();
+			sb.append( "Driver" );
+			sb.append( "{name='" ).append( name ).append( '\'' );
+			sb.append( ", age=" ).append( age );
+			sb.append( ", hasDrivingLicense=" ).append( hasDrivingLicense );
+			sb.append( '}' );
+			return sb.toString();
+		}
+	}
+
+	private class DriverSetup {
+		private int expectedViolationCount;
+		private Driver driver;
+
+		public DriverSetup() {
+			expectedViolationCount = 0;
+
+			String name = names[random.nextInt( 10 )];
+			if ( name == null ) {
+				expectedViolationCount++;
+			}
+
+			int randomAge = random.nextInt( 100 );
+			if ( randomAge < 18 ) {
+				expectedViolationCount++;
+			}
+
+			int rand = random.nextInt( 2 );
+			boolean hasLicense = rand == 1;
+			if ( !hasLicense ) {
+				expectedViolationCount++;
+			}
+
+			driver = new Driver( name, randomAge, hasLicense );
+		}
+
+		public int getExpectedViolationCount() {
+			return expectedViolationCount;
+		}
+
+		public Driver getDriver() {
+			return driver;
+		}
+	}
+}
+
+
+
diff --git a/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalConstraintValidator.java b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalConstraintValidator.java
new file mode 100644
index 0000000..400f7ce
--- /dev/null
+++ b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalConstraintValidator.java
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.performance.statistical;
+
+import java.lang.annotation.Annotation;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class StatisticalConstraintValidator implements ConstraintValidator<Annotation, Object> {
+	private static final float FAILURE_RATE = 0.25f;
+
+	public static final ThreadLocal<Counter> threadLocalCounter = new ThreadLocal<Counter>() {
+		protected Counter initialValue() {
+			return new Counter();
+		}
+	};
+
+	public void initialize(Annotation constraintAnnotation) {
+	}
+
+	public boolean isValid(Object value, ConstraintValidatorContext context) {
+		return threadLocalCounter.get().incrementCount();
+	}
+
+	public static class Counter {
+		private int totalCount = 0;
+		private int failures = 0;
+
+		public int getFailures() {
+			return failures;
+		}
+
+		public boolean incrementCount() {
+			totalCount++;
+			if ( totalCount * FAILURE_RATE > failures ) {
+				failures++;
+				return false;
+			}
+			return true;
+		}
+
+		public void reset() {
+			totalCount = 0;
+			failures = 0;
+		}
+
+		@Override
+		public String toString() {
+			final StringBuilder sb = new StringBuilder();
+			sb.append( "Counter" );
+			sb.append( "{totalCount=" ).append( totalCount );
+			sb.append( ", failures=" ).append( failures );
+			sb.append( '}' );
+			return sb.toString();
+		}
+	}
+}
+
+
diff --git a/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalValidationTest.java b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalValidationTest.java
new file mode 100644
index 0000000..e33ca93
--- /dev/null
+++ b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/StatisticalValidationTest.java
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.performance.statistical;
+
+import java.io.InputStream;
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class StatisticalValidationTest {
+	private static final int NUMBER_OF_TEST_ENTITIES = 100;
+
+	private static Validator validator;
+	private static TestEntity[] entitiesUnderTest = new TestEntity[NUMBER_OF_TEST_ENTITIES];
+
+	@BeforeClass
+	public static void setUpValidatorFactory() throws Exception {
+		ValidatorFactory factory;
+		final Configuration<?> configuration = Validation.byDefaultProvider().configure();
+		InputStream mappingStream = StatisticalValidationTest.class.getResourceAsStream( "mapping.xml" );
+		try {
+			configuration.addMapping( mappingStream );
+			factory = configuration.buildValidatorFactory();
+			assertNotNull( factory );
+		}
+		finally {
+			mappingStream.close();
+		}
+
+		validator = factory.getValidator();
+
+		for ( int i = 0; i < NUMBER_OF_TEST_ENTITIES; i++ ) {
+			entitiesUnderTest[i] = new TestEntity( i % 10 );
+		}
+	}
+
+	@Test
+	public void testValidationWithStatisticalGraphDepthAndConstraintValidator() throws Exception {
+		for ( int i = 0; i < NUMBER_OF_TEST_ENTITIES; i++ ) {
+			Set<ConstraintViolation<TestEntity>> violations = validator.validate( entitiesUnderTest[i] );
+			assertEquals( StatisticalConstraintValidator.threadLocalCounter.get().getFailures(), violations.size() );
+			StatisticalConstraintValidator.threadLocalCounter.get().reset();
+		}
+	}
+}
+
+
+
diff --git a/project/performance/src/main/java/org/hibernate/validator/performance/statistical/TestEntity.java b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/TestEntity.java
new file mode 100644
index 0000000..6d079a8
--- /dev/null
+++ b/project/performance/src/main/java/org/hibernate/validator/performance/statistical/TestEntity.java
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.validator.performance.statistical;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import javax.validation.Valid;
+import javax.validation.constraints.AssertFalse;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Null;
+import javax.validation.constraints.Past;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+ at SuppressWarnings("unused")
+public class TestEntity {
+	public static final int MAX_DEPTH = 10;
+	private static final Calendar cal = GregorianCalendar.getInstance();
+
+	public TestEntity(int depth) {
+		if ( depth <= MAX_DEPTH ) {
+			depth++;
+			testEntity = new TestEntity( depth );
+		}
+	}
+
+	// it is not really necessary to initialise the values
+	@Null
+	private String value1 = null;
+
+	@NotNull
+	private String value2 = "";
+
+	@Size
+	private String value3 = "";
+
+	@Past
+	private Date value4 = cal.getTime();
+
+	@Future
+	private Date value5 = cal.getTime();
+
+	@Pattern(regexp = ".*")
+	private String value6;
+
+	@Min(0)
+	private Integer value7 = 0;
+
+	@Max(100)
+	private Integer value8 = 0;
+
+	@DecimalMin("1.0")
+	private BigDecimal value9 = new BigDecimal( "1.0" );
+
+	@DecimalMin("1.0")
+	private BigDecimal value10 = new BigDecimal( "1.0" );
+
+	@AssertFalse
+	private boolean value11;
+
+	@AssertTrue
+	private boolean value12;
+
+	@Valid
+	private TestEntity testEntity;
+}
+
+
diff --git a/project/performance/src/main/resources/log4j.properties b/project/performance/src/main/resources/log4j.properties
new file mode 100644
index 0000000..13cc623
--- /dev/null
+++ b/project/performance/src/main/resources/log4j.properties
@@ -0,0 +1,26 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to file hibernate.log ###
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=hibernate-validator.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to socket - chainsaw ###
+log4j.appender.socket=org.apache.log4j.net.SocketAppender
+log4j.appender.socket.remoteHost=localhost
+log4j.appender.socket.port=4560
+log4j.appender.socket.locationInfo=true
+
+
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+log4j.rootLogger=debug, stdout,file
+
+log4j.logger.org.hibernate.validator.internal.engine.ValidatorImpl=trace
+#log4j.logger.org.hibernate.validator.internal.engine.resolver.JPATraversableResolver=trace
+#log4j.logger.org.hibernate.validatorengine.ConstraintTree=trace
+log4j.logger.org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator=info
diff --git a/project/performance/src/main/resources/org/hibernate/validator/performance/statistical/mapping.xml b/project/performance/src/main/resources/org/hibernate/validator/performance/statistical/mapping.xml
new file mode 100644
index 0000000..7d38f39
--- /dev/null
+++ b/project/performance/src/main/resources/org/hibernate/validator/performance/statistical/mapping.xml
@@ -0,0 +1,65 @@
+<constraint-mappings
+        xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
+    <constraint-definition annotation="javax.validation.constraints.Size">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Min">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Max">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Past">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Future">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Null">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.NotNull">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.DecimalMin">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.DecimalMax">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.AssertTrue">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.AssertFalse">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+    <constraint-definition annotation="javax.validation.constraints.Pattern">
+        <validated-by include-existing-validators="false">
+            <value>org.hibernate.validator.performance.statistical.StatisticalConstraintValidator</value>
+        </validated-by>
+    </constraint-definition>
+</constraint-mappings>
\ No newline at end of file
diff --git a/project/pom.xml b/project/pom.xml
new file mode 100644
index 0000000..78b4ae3
--- /dev/null
+++ b/project/pom.xml
@@ -0,0 +1,497 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.hibernate</groupId>
+    <artifactId>hibernate-validator-parent</artifactId>
+    <version>4.3.1.Final</version>
+    <packaging>pom</packaging>
+
+    <name>Hibernate Validator Aggregator</name>
+    <url>http://validator.hibernate.org</url>
+    <description>Aggregator of the Hibernate Validator modules.</description>
+
+    <developers>
+        <developer>
+            <id>epbernard</id>
+            <name>Emmanuel Bernard</name>
+            <email>emmanuel at hibernate.org</email>
+            <organization>JBoss, a division of Red Hat</organization>
+            <url>http://in.relation.to/Bloggers/Emmanuel</url>
+        </developer>
+        <developer>
+            <id>hardy.ferentschik</id>
+            <name>Hardy Ferentschik</name>
+            <email>hferents at redhat.com</email>
+            <organization>JBoss, a division of Red Hat</organization>
+            <url>http://in.relation.to/Bloggers/Hardy</url>
+        </developer>
+        <developer>
+            <id>gunnar.morling</id>
+            <name>Gunnar Morling</name>
+            <email>gunnar.morling at googlemail.com</email>
+            <organization>Individual</organization>
+            <url>http://musingsofaprogrammingaddict.blogspot.com/</url>
+        </developer>
+        <developer>
+            <id>kevinpollet</id>
+            <name>Kevin Pollet</name>
+            <email>kevin.pollet at serli.com</email>
+            <organization>SERLI</organization>
+            <url>http://www.serli.com</url>
+        </developer>
+    </developers>
+
+    <contributors>
+        <contributor>
+            <name>George Gastaldi</name>
+            <email>gegastaldi at gmail.com</email>
+        </contributor>
+    </contributors>
+
+    <mailingLists>
+        <mailingList>
+            <name>hibernate-dev</name>
+            <post>hibernate-dev at lists.jboss.org</post>
+        </mailingList>
+    </mailingLists>
+
+    <modules>
+        <module>engine</module>
+        <module>tck-runner</module>
+        <module>integration</module>
+        <module>annotation-processor</module>
+        <module>archetype</module>
+        <module>performance</module>
+    </modules>
+
+    <properties>
+        <!-- see http://maven.apache.org/general.html -->
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <org.codehaus.mojo.chronos.version>1.0-beta-3</org.codehaus.mojo.chronos.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-validator</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-validator-annotation-processor</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>javax.validation</groupId>
+                <artifactId>validation-api</artifactId>
+                <version>1.0.0.GA</version>
+            </dependency>
+            <dependency>
+                <groupId>joda-time</groupId>
+                <artifactId>joda-time</artifactId>
+                <version>1.6</version>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>1.2.16</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate.javax.persistence</groupId>
+                <artifactId>hibernate-jpa-2.0-api</artifactId>
+                <version>1.0.1.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-entitymanager</artifactId>
+                <version>3.6.0.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.8.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.testng</groupId>
+                <artifactId>testng</artifactId>
+                <version>5.14.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.codehaus.groovy</groupId>
+                <artifactId>groovy</artifactId>
+                <version>1.8.3</version>
+            </dependency>
+            <dependency>
+                <groupId>org.easymock</groupId>
+                <artifactId>easymock</artifactId>
+                <version>3.0</version>
+            </dependency>
+            <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+                <version>1.2.124</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jsoup</groupId>
+                <artifactId>jsoup</artifactId>
+                <version>1.6.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.logging</groupId>
+                <artifactId>jboss-logging</artifactId>
+                <version>3.1.0.CR2</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-webdav</artifactId>
+                <version>1.0-beta-2</version>
+            </extension>
+        </extensions>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>1.0.1</version>
+                <executions>
+                    <execution>
+                        <id>enforce-java</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <rules>
+                        <requireJavaVersion>
+                            <!-- require JDK 1.6 to run the build -->
+                            <version>[1.6,)</version>
+                        </requireJavaVersion>
+                    </rules>
+                </configuration>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.4</version>
+                    <configuration>
+                        <archive>
+                            <manifestEntries>
+                                <Implementation-Title>${project.artifactId}</Implementation-Title>
+                                <Implementation-Version>${project.version}</Implementation-Version>
+                                <Implementation-Vendor>${project.parent.groupId}</Implementation-Vendor>
+                                <Implementation-Vendor-Id>${project.parent.groupId}</Implementation-Vendor-Id>
+                                <Implementation-URL>http://validator.hibernate.org</Implementation-URL>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>2.3.2</version>
+                    <configuration>
+                        <source>1.6</source>
+                        <target>1.6</target>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.12</version>
+                    <configuration>
+                        <forkMode>once</forkMode>
+                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                        <includes>
+                            <include>**/*Test.java</include>
+                        </includes>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-report-plugin</artifactId>
+                    <version>2.12</version>
+                    <executions>
+                        <execution>
+                            <id>generate-test-report</id>
+                            <phase>test</phase>
+                            <goals>
+                                <goal>report-only</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <configuration>
+                        <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                        <outputName>test-report</outputName>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <version>2.12</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <version>2.4</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.3.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>2.3</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-release-plugin</artifactId>
+                    <version>2.2.2</version>
+                    <configuration>
+                        <preparationGoals>clean install</preparationGoals>
+                        <autoVersionSubmodules>true</autoVersionSubmodules>
+                        <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>exec-maven-plugin</artifactId>
+                    <version>1.2.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>jaxb2-maven-plugin</artifactId>
+                    <version>1.3.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.jboss.maven.plugins</groupId>
+                    <artifactId>maven-jdocbook-plugin</artifactId>
+                    <version>2.3.5</version>
+                    <extensions>true</extensions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.hibernate</groupId>
+                            <artifactId>hibernate-jdocbook-style</artifactId>
+                            <version>2.0.1</version>
+                            <type>jdocbook-style</type>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>2.0.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>2.3.6</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-archetype-plugin</artifactId>
+                    <version>2.2</version>
+                    <executions>
+                        <execution>
+                            <id>generate-archetype-install</id>
+                            <phase>install</phase>
+                            <goals>
+                                <goal>create-from-project</goal>
+                            </goals>
+                            <configuration>
+                                <archetypePostPhase>install</archetypePostPhase>
+                                <propertyFile>archetype.properties</propertyFile>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>generate-archetype-deploy</id>
+                            <phase>deploy</phase>
+                            <goals>
+                                <goal>create-from-project</goal>
+                            </goals>
+                            <configuration>
+                                <archetypePostPhase>deploy</archetypePostPhase>
+                                <propertyFile>archetype.properties</propertyFile>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-source-plugin</artifactId>
+                    <version>2.1.2</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.8.1</version>
+                    <configuration>
+                        <docfilessubdirs>true</docfilessubdirs>
+                        <javadocDirectory>${project.basedir}/../src/main/javadoc</javadocDirectory>
+                        <stylesheetfile>stylesheet.css</stylesheetfile>
+                        <bottom>
+                            <![CDATA[Copyright © ${project.inceptionYear}-{currentYear} <a href="http://redhat.com">Red Hat Middleware, LLC.</a>  All Rights Reserved]]></bottom>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.7</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.jboss.maven.plugins</groupId>
+                    <artifactId>maven-injection-plugin</artifactId>
+                    <version>1.0.2</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.gmaven</groupId>
+                    <artifactId>gmaven-plugin</artifactId>
+                    <version>1.3</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.zanata</groupId>
+                    <artifactId>zanata-maven-plugin</artifactId>
+                    <version>1.3</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.bsc.maven</groupId>
+                    <artifactId>maven-processor-plugin</artifactId>
+                    <version>2.0.2</version>
+                    <configuration>
+                        <defaultOutputDirectory>${project.build.directory}/generated-sources/logging</defaultOutputDirectory>
+                        <processors>
+                            <processor>org.jboss.logging.processor.apt.LoggingToolsProcessor</processor>
+                        </processors>
+                        <compilerArguments>-AloggingVersion=3.0 -AtranslationFilesPath=${project.basedir}/src/main/resources -source 1.6 -target 1.6 -sourcepath ${project.build.directory}/generated-sources/jaxb -encoding UTF-8</compilerArguments>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>process</id>
+                            <phase>generate-sources</phase>
+                            <goals>
+                                <goal>process</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.jboss.logging</groupId>
+                            <artifactId>jboss-logging-processor</artifactId>
+                            <version>1.0.1.Final</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <!-- By default the "@" character is a delimiter, causing files containing
+                             that character to not be filtered properly -->
+                        <useDefaultDelimiters>false</useDefaultDelimiters>
+                        <delimiters>
+                            <delimiter>${*}</delimiter>
+                        </delimiters>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>chronos-jmeter-maven-plugin</artifactId>
+                    <version>${org.codehaus.mojo.chronos.version}</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <ciManagement>
+        <system>Hudson</system>
+        <url>http://hudson.qa.jboss.com/hudson/job/beanvalidation</url>
+    </ciManagement>
+
+    <issueManagement>
+        <system>JIRA</system>
+        <url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
+    </issueManagement>
+
+    <inceptionYear>2007</inceptionYear>
+
+    <licenses>
+        <license>
+            <name>Apache License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git://github.com/hibernate/hibernate-validator.git</connection>
+        <developerConnection>scm:git:git at github.com:hibernate/hibernate-validator.git</developerConnection>
+        <url>http://github.com/hibernate/hibernate-validator</url>
+    </scm>
+
+    <distributionManagement>
+        <repository>
+            <id>jboss-releases-repository</id>
+            <name>JBoss Releases Repository</name>
+            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
+        </repository>
+        <snapshotRepository>
+            <id>jboss-snapshots-repository</id>
+            <name>JBoss Snapshots Repository</name>
+            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
+        </snapshotRepository>
+    </distributionManagement>
+
+    <profiles>
+        <profile>
+            <id>docs</id>
+            <activation>
+                <property>
+                    <name>disableDocumentationBuild</name>
+                    <value>!true</value>
+                </property>
+            </activation>
+            <modules>
+                <module>documentation</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>dist</id>
+            <activation>
+                <property>
+                    <name>disableDistributionBuild</name>
+                    <value>!true</value>
+                </property>
+            </activation>
+            <modules>
+                <module>distribution</module>
+            </modules>
+        </profile>
+    </profiles>
+</project>
diff --git a/project/settings-example.xml b/project/settings-example.xml
new file mode 100644
index 0000000..2d38140
--- /dev/null
+++ b/project/settings-example.xml
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+ | This is the configuration file for Maven. It can be specified at two levels:
+ |
+ |  1. User Level. This settings.xml file provides configuration for a single user,
+ |                 and is normally provided in ${user.home}/.m2/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -s /path/to/user/settings.xml
+ |
+ |  2. Global Level. This settings.xml file provides configuration for all Maven
+ |                 users on a machine (assuming they're all using the same Maven
+ |                 installation). It's normally provided in
+ |                 ${maven.home}/conf/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -gs /path/to/global/settings.xml
+ |
+ | The sections in this sample file are intended to give you a running start at
+ | getting the most out of your Maven installation. Where appropriate, the default
+ | values (values used when the setting is not specified) are provided.
+ |
+ |-->
+<settings xmlns="http://maven.apache.org/settings/1.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+    <!-- localRepository
+       | The path to the local repository maven will use to store artifacts.
+       |
+       | Default: ~/.m2/repository
+      <localRepository>/path/to/local/repo</localRepository>
+      -->
+
+    <!-- interactiveMode
+       | This will determine whether maven prompts you when it needs input. If set to false,
+       | maven will use a sensible default value, perhaps based on some other setting, for
+       | the parameter in question.
+       |
+       | Default: true
+      <interactiveMode>true</interactiveMode>
+      -->
+
+    <!-- offline
+       | Determines whether maven should attempt to connect to the network when executing a build.
+       | This will have an effect on artifact downloads, artifact deployment, and others.
+       |
+       | Default: false
+      <offline>false</offline>
+      -->
+
+    <!-- pluginGroups
+       | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
+       | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
+       | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
+       |-->
+    <pluginGroups>
+        <!-- pluginGroup
+             | Specifies a further group identifier to use for plugin lookup.
+            <pluginGroup>com.your.plugins</pluginGroup>
+            -->
+
+        <!-- jboss.org config start -->
+        <pluginGroup>org.jboss.maven.plugins</pluginGroup>
+        <!-- jboss.org config end -->
+
+
+    </pluginGroups>
+
+    <!-- proxies
+       | This is a list of proxies which can be used on this machine to connect to the network.
+       | Unless otherwise specified (by system property or command-line switch), the first proxy
+       | specification in this list marked as active will be used.
+       |-->
+    <proxies>
+        <!-- proxy
+             | Specification for one proxy, to be used in connecting to the network.
+             |
+            <proxy>
+              <id>optional</id>
+              <active>true</active>
+              <protocol>http</protocol>
+              <username>proxyuser</username>
+              <password>proxypass</password>
+              <host>proxy.host.net</host>
+              <port>80</port>
+              <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
+            </proxy>
+            -->
+    </proxies>
+
+    <!-- servers
+       | This is a list of authentication profiles, keyed by the server-id used within the system.
+       | Authentication profiles can be used whenever maven must make a connection to a remote server.
+       |-->
+    <servers>
+        <!-- server
+             | Specifies the authentication information to use when connecting to a particular server, identified by
+             | a unique name within the system (referred to by the 'id' attribute below).
+             |
+             | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
+             |       used together.
+             |
+            <server>
+              <id>deploymentRepo</id>
+              <username>repouser</username>
+              <password>repopwd</password>
+            </server>
+            -->
+
+        <!-- Another sample, using keys to authenticate.
+            <server>
+              <id>siteServer</id>
+              <privateKey>/path/to/private/key</privateKey>
+              <passphrase>optional; leave empty if not used.</passphrase>
+            </server>
+            -->
+    </servers>
+
+    <!-- mirrors
+       | This is a list of mirrors to be used in downloading artifacts from remote repositories.
+       |
+       | It works like this: a POM may declare a repository to use in resolving certain artifacts.
+       | However, this repository may have problems with heavy traffic at times, so people have mirrored
+       | it to several places.
+       |
+       | That repository definition will have a unique id, so we can create a mirror reference for that
+       | repository, to be used as an alternate download site. The mirror site will be the preferred
+       | server for that repository.
+       |-->
+    <mirrors>
+        <!-- mirror
+             | Specifies a repository mirror site to use instead of a given repository. The repository that
+             | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
+             | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
+             |
+            <mirror>
+              <id>mirrorId</id>
+              <mirrorOf>repositoryId</mirrorOf>
+              <name>Human Readable Name for this Mirror.</name>
+              <url>http://my.repository.com/repo/path</url>
+            </mirror>
+             -->
+    </mirrors>
+
+    <!-- profiles
+       | This is a list of profiles which can be activated in a variety of ways, and which can modify
+       | the build process. Profiles provided in the settings.xml are intended to provide local machine-
+       | specific paths and repository locations which allow the build to work in the local environment.
+       |
+       | For example, if you have an integration testing plugin - like cactus - that needs to know where
+       | your Tomcat instance is installed, you can provide a variable here such that the variable is
+       | dereferenced during the build process to configure the cactus plugin.
+       |
+       | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
+       | section of this document (settings.xml) - will be discussed later. Another way essentially
+       | relies on the detection of a system property, either matching a particular value for the property,
+       | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
+       | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
+       | Finally, the list of active profiles can be specified directly from the command line.
+       |
+       | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
+       |       repositories, plugin repositories, and free-form properties to be used as configuration
+       |       variables for plugins in the POM.
+       |
+       |-->
+    <profiles>
+        <!-- profile
+             | Specifies a set of introductions to the build process, to be activated using one or more of the
+             | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
+             | or the command line, profiles have to have an ID that is unique.
+             |
+             | An encouraged best practice for profile identification is to use a consistent naming convention
+             | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
+             | This will make it more intuitive to understand what the set of introduced profiles is attempting
+             | to accomplish, particularly when you only have a list of profile id's for debug.
+             |
+             | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
+            <profile>
+              <id>jdk-1.4</id>
+
+              <activation>
+                <jdk>1.4</jdk>
+              </activation>
+
+              <repositories>
+                <repository>
+                  <id>jdk14</id>
+                  <name>Repository for JDK 1.4 builds</name>
+                  <url>http://www.myhost.com/maven/jdk14</url>
+                  <layout>default</layout>
+                  <snapshotPolicy>always</snapshotPolicy>
+                </repository>
+              </repositories>
+            </profile>
+            -->
+
+        <!--
+             | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
+             | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
+             | might hypothetically look like:
+             |
+             | ...
+             | <plugin>
+             |   <groupId>org.myco.myplugins</groupId>
+             |   <artifactId>myplugin</artifactId>
+             |
+             |   <configuration>
+             |     <tomcatLocation>${tomcatPath}</tomcatLocation>
+             |   </configuration>
+             | </plugin>
+             | ...
+             |
+             | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
+             |       anything, you could just leave off the <value/> inside the activation-property.
+             |
+            <profile>
+              <id>env-dev</id>
+
+              <activation>
+                <property>
+                  <name>target-env</name>
+                  <value>dev</value>
+                </property>
+              </activation>
+
+              <properties>
+                <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+              </properties>
+            </profile>
+            -->
+
+        <!-- jboss.org config start -->
+        <profile>
+            <id>jboss-public-repository</id>
+            <repositories>
+                <repository>
+                    <id>jboss-public-repository-group</id>
+                    <name>JBoss Public Maven Repository Group</name>
+                    <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+                    <layout>default</layout>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </snapshots>
+                </repository>
+            </repositories>
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>jboss-public-repository-group</id>
+                    <name>JBoss Public Maven Repository Group</name>
+                    <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+                    <layout>default</layout>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </snapshots>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+
+
+        <profile>
+            <id>jboss-deprecated-repository</id>
+            <repositories>
+                <repository>
+                    <id>jboss-deprecated-repository</id>
+                    <name>JBoss Deprecated Maven Repository</name>
+                    <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
+                    <layout>default</layout>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </releases>
+                    <snapshots>
+                        <enabled>false</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </snapshots>
+                </repository>
+            </repositories>
+        </profile>
+        <!-- jboss.org config end -->
+
+    </profiles>
+
+    <!-- jboss.org config start -->
+    <activeProfiles>
+        <activeProfile>jboss-public-repository</activeProfile>
+    </activeProfiles>
+    <!-- jboss.org config end -->
+
+</settings>
\ No newline at end of file
diff --git a/hibernate-validator/src/main/javadoc/resources/bkg_blkheader.png b/project/src/main/javadoc/resources/bkg_blkheader.png
similarity index 100%
rename from hibernate-validator/src/main/javadoc/resources/bkg_blkheader.png
rename to project/src/main/javadoc/resources/bkg_blkheader.png
diff --git a/hibernate-validator/src/main/javadoc/resources/bkg_gradient.gif b/project/src/main/javadoc/resources/bkg_gradient.gif
similarity index 100%
rename from hibernate-validator/src/main/javadoc/resources/bkg_gradient.gif
rename to project/src/main/javadoc/resources/bkg_gradient.gif
diff --git a/hibernate-validator/src/main/javadoc/resources/bkgheader.png b/project/src/main/javadoc/resources/bkgheader.png
similarity index 100%
rename from hibernate-validator/src/main/javadoc/resources/bkgheader.png
rename to project/src/main/javadoc/resources/bkgheader.png
diff --git a/hibernate-validator/src/main/javadoc/resources/h1_hdr.png b/project/src/main/javadoc/resources/h1_hdr.png
similarity index 100%
rename from hibernate-validator/src/main/javadoc/resources/h1_hdr.png
rename to project/src/main/javadoc/resources/h1_hdr.png
diff --git a/hibernate-validator/src/main/javadoc/stylesheet.css b/project/src/main/javadoc/stylesheet.css
similarity index 100%
rename from hibernate-validator/src/main/javadoc/stylesheet.css
rename to project/src/main/javadoc/stylesheet.css
diff --git a/project/tck-runner/pom.xml b/project/tck-runner/pom.xml
new file mode 100644
index 0000000..37df67a
--- /dev/null
+++ b/project/tck-runner/pom.xml
@@ -0,0 +1,377 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.3.1.Final</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hibernate-validator-tck-runner</artifactId>
+
+    <name>Hibernate Validator TCK Runner</name>
+    <description>Aggregates dependencies and runs the JSR-303 TCK</description>
+
+    <properties>
+        <jsr303.tck.version>1.0.6.GA</jsr303.tck.version>
+        <arquillian.version>1.0.0.CR7</arquillian.version>
+        <jbossas.version>7.1.0.Beta1b</jbossas.version>
+        <validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
+        <remote.debug />
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.jbossas.as7-cdi-tck</groupId>
+            <artifactId>jbossas-container</artifactId>
+            <version>1.0.0.CR1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.jsr303.tck</groupId>
+            <artifactId>jsr303-tck</artifactId>
+            <version>${jsr303.tck.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.core</groupId>
+            <artifactId>arquillian-core-spi</artifactId>
+            <version>${arquillian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.core</groupId>
+            <artifactId>arquillian-core-impl-base</artifactId>
+            <version>${arquillian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.container</groupId>
+            <artifactId>arquillian-container-impl-base</artifactId>
+            <version>${arquillian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.container</groupId>
+            <artifactId>arquillian-container-spi</artifactId>
+            <version>${arquillian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-arquillian-container-managed</artifactId>
+            <version>${jbossas.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-arquillian-common</artifactId>
+            <version>${jbossas.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-arquillian-container-remote</artifactId>
+            <version>${jbossas.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller-client</artifactId>
+            <version>${jbossas.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <stripVersion>true</stripVersion>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.hibernate.jsr303.tck</groupId>
+                                    <artifactId>jsr303-tck</artifactId>
+                                    <type>xml</type>
+                                    <classifier>suite</classifier>
+                                    <overWrite>false</overWrite>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                    <argLine>-Xmx128m</argLine>
+                    <forkMode>once</forkMode>
+                    <systemProperties>
+                        <property>
+                            <name>validation.provider</name>
+                            <value>${validation.provider}</value>
+                        </property>
+                        <property>
+                            <name>org.jboss.testharness.spi.StandaloneContainers</name>
+                            <value>org.hibernate.jsr303.tck.util.StandaloneContainersImpl</value>
+                        </property>
+                    </systemProperties>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-test-report</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report-only</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                    <outputName>test-report</outputName>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>incontainer-debug</id>
+            <activation>
+                <property>
+                    <name>debug</name>
+                </property>
+            </activation>
+            <properties>
+                <remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
+                    -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+                </remote.debug>
+            </properties>
+        </profile>
+        <profile>
+            <id>incontainer</id>
+            <activation>
+                <property>
+                    <name>incontainer</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack</id>
+                                <phase>process-test-resources</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.jboss.as</groupId>
+                                            <artifactId>jboss-as-dist</artifactId>
+                                            <version>${jbossas.version}</version>
+                                            <type>zip</type>
+                                            <overWrite>false</overWrite>
+                                            <outputDirectory>${project.build.directory}</outputDirectory>
+                                        </artifactItem>
+                                    </artifactItems>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <argLine>-Xmx1024m -Djava.util.logging.manager=org.jboss.logmanager.LogManager</argLine>
+                            <forkMode>once</forkMode>
+                            <suiteXmlFiles>
+                                <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+                            </suiteXmlFiles>
+                            <systemPropertyVariables>
+                                <!-- TCK test harness related properties -->
+                                <java.io.tmpdir>${project.build.outputDirectory}</java.io.tmpdir>
+                                <org.jboss.testharness.standalone>false</org.jboss.testharness.standalone>
+                                <org.jboss.testharness.container.forceRestart>true</org.jboss.testharness.container.forceRestart>
+                                <org.jboss.testharness.runIntegrationTests>true</org.jboss.testharness.runIntegrationTests>
+                                <org.jboss.testharness.libraryDirectory>${project.build.directory}/dependency/lib</org.jboss.testharness.libraryDirectory>
+                                <org.jboss.testharness.outputDirectory>${project.build.directory}</org.jboss.testharness.outputDirectory>
+                                <org.jboss.testharness.spi.Containers>org.jboss.jbossas.cdiTck.container.ArquillianContainerAdaptor</org.jboss.testharness.spi.Containers>
+                                <org.jboss.har2arq.container>org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</org.jboss.har2arq.container>
+
+                                <!-- JBOSS container related properties -->
+                                <jboss.options>-Xmx1024m -XX:MaxPermSize=512m -enableassertions -Dvalidation.provider=${validation.provider} ${remote.debug}</jboss.options>
+
+                                <!-- The validation provider to use -->
+                                <validation.provider>${validation.provider}</validation.provider>
+                            </systemPropertyVariables>
+                            <environmentVariables>
+                                 <JBOSS_HOME>${project.build.directory}/jboss-as-${jbossas.version}</JBOSS_HOME>
+                            </environmentVariables>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <!--
+                 Enabling this profile will bundle the BV API and Hibernate Validator w/ the deployed war files instead of
+                 testing against the AS provided dependencies
+            -->
+            <id>bundled-dependencies</id>
+            <activation>
+                <property>
+                    <name>bundled-dependencies</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy</id>
+                                <phase>generate-test-sources</phase>
+                                <goals>
+                                    <goal>copy</goal>
+                                </goals>
+                                <configuration>
+                                    <stripVersion>true</stripVersion>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.hibernate.jsr303.tck</groupId>
+                                            <artifactId>jsr303-tck</artifactId>
+                                            <type>xml</type>
+                                            <classifier>suite</classifier>
+                                            <overWrite>false</overWrite>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>javax.validation</groupId>
+                                            <artifactId>validation-api</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.hibernate</groupId>
+                                            <artifactId>hibernate-validator</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.jboss.logging</groupId>
+                                            <artifactId>jboss-logging</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>log4j</groupId>
+                                            <artifactId>log4j</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                    </artifactItems>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>write-artifacts-to-disk</id>
+            <activation>
+                <property>
+                    <name>dumpArtifacts</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>generate-jsr-303-artifacts</id>
+                                <phase>test-compile</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <classpathScope>test</classpathScope>
+                            <mainClass>org.jboss.testharness.api.TCK</mainClass>
+                            <systemProperties>
+                                <systemProperty>
+                                    <key>dumpArtifacts</key>
+                                    <value>true</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.outputDirectory</key>
+                                    <value>target/jsr303-artifacts</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.libraryDirectory</key>
+                                    <value>target/jsr303-artifacts/dependencies</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.libraryDirectory</key>
+                                    <value>${project.build.directory}/dependency/lib</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.spi.StandaloneContainers</key>
+                                    <value>org.hibernate.jsr303.tck.util.StandaloneContainersImpl</value>
+                                </systemProperty>
+                            </systemProperties>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/project/tck-runner/readme.md b/project/tck-runner/readme.md
new file mode 100644
index 0000000..41373e0
--- /dev/null
+++ b/project/tck-runner/readme.md
@@ -0,0 +1,30 @@
+# Hibernate Validator TCK Runner
+
+This maven module allows to run the Bean Validation TCK against Hibernate Validator.
+There are several ways of doing this:
+
+## Standalone
+
+You can run the test as normal unit test using a JVM forked by the Surefire plugin. This is the default mode and
+used when running
+
+    $ mvn clean test
+
+## In container
+
+You can also run the TCK test against JBoss AS7 (>=[7.1.0.Beta1b](http://www.jboss.org/jbossas/downloads/)). In this case the tests are bundled as war files and executed
+in a remote JBoss AS7 instance:
+
+    $ mvn clean test -Dincontainer
+
+In this mode the tests will run against the Hibernate Validator version bundled with AS 7 (currently 4.2.0.Final. See also _modules/org/hibernate/validator/main_ in the AS 7 installation).
+
+You can also bundle the Hibernate Validator jar with the deployed war files:
+
+    $ mvn test -Dincontainer -Dbundled-dependencies
+
+You can enforce the TCK via:
+
+    $ mvn test -Dincontainer -Djsr303.tck.version=1.0.4.GA
+
+You can find more information about the Bean Validation TCK [here](http://docs.jboss.org/hibernate/stable/beanvalidation/tck/reference/html_single/).
diff --git a/project/tck-runner/src/main/resources/META-INF/jboss-test-harness.properties b/project/tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
new file mode 100644
index 0000000..b6c75f5
--- /dev/null
+++ b/project/tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
@@ -0,0 +1,2 @@
+org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.servlet.ServletTestLauncher
+org.jboss.testharness.testPackage=org.hibernate.jsr303.tck.tests
\ No newline at end of file
diff --git a/hibernate-validator-tck-runner/src/test/resources/log4j.xml b/project/tck-runner/src/test/resources/log4j.xml
similarity index 100%
rename from hibernate-validator-tck-runner/src/test/resources/log4j.xml
rename to project/tck-runner/src/test/resources/log4j.xml
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index 6563bc4..0000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="Maven">
-  <bannerLeft>
-    <name>Maven</name>
-    <src>http://maven.apache.org/images/apache-maven-project.png</src>
-    <href>http://maven.apache.org/</href>
-  </bannerLeft>
-  <bannerRight>
-    <src>http://maven.apache.org/images/maven-small.gif</src>
-  </bannerRight>
-  <body>
-    <links>
-      <item name="Maven 2" href="http://maven.apache.org/"/>
-    </links>
-
-    <menu ref="modules" />  
-    <menu ref="reports"/>
-      
-
-  </body>
-</project>
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libhibernate-validator-java.git



More information about the pkg-java-commits mailing list