Java 类javax.validation.ConstraintTarget 实例源码

项目:minijax    文件:MinijaxConstraintDescriptor.java   
@Override
public ConstraintTarget getValidationAppliesTo() {
    throw new UnsupportedOperationException();
}
项目:lastaflute    文件:MockConstraintViolation.java   
@Required
@Override
public ConstraintDescriptor<?> getConstraintDescriptor() {
    String methodName = "getConstraintDescriptor";
    Method method;
    try {
        method = MockConstraintViolation.class.getMethod(methodName, new Class<?>[] {});
    } catch (NoSuchMethodException | SecurityException e) {
        throw new IllegalStateException("Failed to get the method: " + methodName, e);
    }
    Required annotation = method.getAnnotation(Required.class);
    return new ConstraintDescriptor<Annotation>() {

        @Override
        public Annotation getAnnotation() {
            return annotation;
        }

        @Override
        public String getMessageTemplate() {
            return null;
        }

        @Override
        public Set<Class<?>> getGroups() {
            return DfCollectionUtil.newHashSet(ClientError.class);
        }

        @Override
        public Set<Class<? extends Payload>> getPayload() {
            return null;
        }

        @Override
        public ConstraintTarget getValidationAppliesTo() {
            return null;
        }

        @Override
        public List<Class<? extends ConstraintValidator<Annotation, ?>>> getConstraintValidatorClasses() {
            return null;
        }

        @Override
        public Map<String, Object> getAttributes() {
            return null;
        }

        @Override
        public Set<ConstraintDescriptor<?>> getComposingConstraints() {
            return null;
        }

        @Override
        public boolean isReportAsSingleViolation() {
            return false;
        }

        @Override
        public ValidateUnwrappedValue getValueUnwrapping() {
            return null;
        }

        @Override
        public <U> U unwrap(Class<U> type) {
            return null;
        }
    };
}
项目:gwt-bean-validators    文件:ConstraintDescriptorImpl.java   
@Override
public ConstraintTarget getValidationAppliesTo() {
  return (ConstraintTarget) this.attributes.get(ConstraintHelper.VALIDATION_APPLIES_TO);
}
项目:cloudbreak    文件:AbstractValidatorTest.java   
@Override
public ConstraintTarget getValidationAppliesTo() {
    return ConstraintTarget.PARAMETERS;
}
项目:cloudbreak    文件:NetworkConfigurationValidatorTest.java   
@Override
public ConstraintTarget getValidationAppliesTo() {
    return ConstraintTarget.PARAMETERS;
}
项目:cloudbreak    文件:UpdateStackRequestValidatorTest.java   
@Override
public ConstraintTarget getValidationAppliesTo() {
    return ConstraintTarget.PARAMETERS;
}