Package br.com.caelum.vraptor

Examples of br.com.caelum.vraptor.VRaptorException


      for (int i = 0; i < position; i++) {
        it.next();
      }
      return it.next();
    }
    throw new VRaptorException("Unable to access position of a" + current.getClass().getName() + ".");
  }
View Full Code Here


    if (method == null) {
      return false;
    }

    if(!method.getReturnType().equals(Boolean.class) && !method.getReturnType().equals(boolean.class)) {
      throw new VRaptorException("@Accepts method must return boolean");
    }

    SignatureAcceptor acceptor = new NoStackParameterSignatureAcceptor();
    if (!acceptor.accepts(method)) {
      throw new VRaptorException(method.getDeclaringClass().getCanonicalName() + " - " + acceptor.errorMessage());
    }

    return true;
  }
View Full Code Here

    Object current = root;
    for (int i = 1; i < paths.length; i++) {
      try {
        current = navigate(current, paths[i]);
      } catch (Exception e) {
        throw new VRaptorException("Unable to evaluate expression " + path, e);
      }
      if (current == null) {
        return "";
      }
    }
View Full Code Here

      for (int i = 0; i < position; i++) {
        it.next();
      }
      return it.next();
    }
    throw new VRaptorException("Unable to access position of a" + current.getClass().getName() + ".");
  }
View Full Code Here

    Object current = root;
    for (int i = 1; i < paths.length; i++) {
      try {
        current = navigate(current, paths[i]);
      } catch (Exception e) {
        throw new VRaptorException("Unable to evaluate expression " + path, e);
      }
      if (current == null) {
        return "";
      }
    }
View Full Code Here

      for (int i = 0; i < position; i++) {
        it.next();
      }
      return it.next();
    }
    throw new VRaptorException("Unable to access position of a" + current.getClass().getName() + ".");
  }
View Full Code Here

    this.converters = converters;
  }

  public void handle(Class<?> annotatedType) {
    if (!(Converter.class.isAssignableFrom(annotatedType))) {
      throw new VRaptorException("converter does not implement Converter");
    }
    if (BaseComponents.getBundledConverters().contains(annotatedType)) {
      logger.debug("Ignoring handling default converter {}", annotatedType);
      return;
    }
View Full Code Here

        }
    }

    public void register(Class<? extends Converter<?>> converterClass) {
        if (!converterClass.isAnnotationPresent(Convert.class)) {
            throw new VRaptorException("The converter type " + converterClass.getName()
                    + " should have the Convert annotation");
        }
    classes.addFirst(converterClass);
    }
View Full Code Here

    classes.addFirst(converterClass);
    }

    public <T> Converter<T> to(Class<T> clazz) {
        if (!existsFor(clazz)) {
      throw new VRaptorException("Unable to find converter for " + clazz.getName());
    }
        return (Converter<T>) container.instanceFor(findConverterType(clazz));
    }
View Full Code Here

    return found != null && TwoWayConverter.class.isAssignableFrom(found);
  }

  public TwoWayConverter<?> twoWayConverterFor(Class<?> type) {
    if (!existsTwoWayFor(type)) {
      throw new VRaptorException("Unable to find two way converter for " + type.getName());
    }
        return (TwoWayConverter<?>) container.instanceFor(findConverterType(type));
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.VRaptorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.