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

项目:vraptor4    文件:MethodValidator.java   
/**
 * Only accepts if method isn't parameterless and have at least one constraint.
 */
private boolean hasConstraints(ControllerMethod controllerMethod) {
    Method method = controllerMethod.getMethod();
    if (method.getParameterTypes().length == 0) {
        logger.debug("method {} has no parameters, skipping", controllerMethod);
        return false;
    }
    BeanDescriptor bean = bvalidator.getConstraintsForClass(controllerMethod.getController().getType());
    if(bean == null) {
        return false;
    }
    MethodDescriptor descriptor = bean.getConstraintsForMethod(method.getName(), method.getParameterTypes());
    return descriptor != null && descriptor.hasConstrainedParameters();
}
项目:minijax    文件:MinijaxBeanDescriptor.java   
@Override
public MethodDescriptor getConstraintsForMethod(final String methodName, final Class<?>... parameterTypes) {
    throw new UnsupportedOperationException();
}
项目:minijax    文件:MinijaxBeanDescriptor.java   
@Override
public Set<MethodDescriptor> getConstrainedMethods(final MethodType methodType, final MethodType... methodTypes) {
    throw new UnsupportedOperationException();
}
项目:gwt-bean-validators    文件:GwtBeanDescriptorImpl.java   
@Override
public MethodDescriptor getConstraintsForMethod(final String pmethodName,
    final Class<?>... pparameterTypes) {
  // TODO Auto-generated method stub
  return null;
}
项目:gwt-bean-validators    文件:GwtBeanDescriptorImpl.java   
@Override
public Set<MethodDescriptor> getConstrainedMethods(final MethodType pmethodType,
    final MethodType... pmethodTypes) {
  // TODO Auto-generated method stub
  return null;
}