Java 类javax.validation.metadata.ElementDescriptor 实例源码

项目:t4f-data    文件:Jsr303Test.java   
public void testMetadataAPI_Engine() {
    ElementDescriptor desc = validator.getConstraintsForClass(Engine.class).getConstraintsForProperty(
            "serialNumber");
    assertNotNull(desc);
    // assertEquals(ElementType.FIELD, desc.getElementType());
    Assert.assertEquals(String.class, desc.getElementClass());
}