Package org.cruxframework.crux.core.shared.rest.annotation

Examples of org.cruxframework.crux.core.shared.rest.annotation.HttpMethod


  public static String getHttpMethod(Annotation[] annotations, boolean allowNull) throws InvalidRestMethod
  {
    String httpMethod = null;
    for (Annotation annotation : annotations)
    {
      HttpMethod http = annotation.annotationType().getAnnotation(HttpMethod.class);
      if (http != null)
      {
        if (httpMethod != null)
        {
          throw new InvalidRestMethod("Crux REST methods can not be bound to more than one HTTP Method");
        }
        httpMethod = http.value();
      }
    }
    if (!allowNull && httpMethod == null)
    {
      throw new InvalidRestMethod("Crux REST methods must be bound to one HTTP Method");
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.shared.rest.annotation.HttpMethod

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.