Examples of Method


Examples of com.apitrary.api.annotation.Method

      return null;
    }

    Class<?> clazz = request.getClass();

    Method method = clazz.getAnnotation(Method.class);
    HttpMethod httpMethod = method.value();
    return httpMethod;
  }
View Full Code Here

Examples of com.azaptree.wadl.Method

        final Doc doc = new Doc();
        doc.getContent().add("The command's XML schema is returned");
        resource.getDoc().add(doc);

        final Method method = new Method();
        method.setName("GET");
        resource.getMethodOrResource().add(method);

        final Response response = new Response();
        method.getResponse().add(response);
        response.getStatus().add(Long.valueOf(HttpStatus.OK_200));
        final Representation representation = new Representation();
        representation.setMediaType("application/xml");
        response.getRepresentation().add(representation);
      }
View Full Code Here

Examples of com.badlogic.gdx.utils.reflect.Method

   * false, and removing "-disabled" from the style name when enabled is true. A method named "getStyle" is called the actor via
   * reflection and the name of that style is found in the skin. If the actor doesn't have a "getStyle" method or the style was
   * not found in the skin, no exception is thrown and the actor is left unchanged. */
  public void setEnabled (Actor actor, boolean enabled) {
    // Get current style.
    Method method = findMethod(actor.getClass(), "getStyle");
    if (method == null) return;
    Object style;
    try {
      style = method.invoke(actor);
    } catch (Exception ignored) {
      return;
    }
    // Determine new style.
    String name = find(style);
    if (name == null) return;
    name = name.replace("-disabled", "") + (enabled ? "" : "-disabled");
    style = get(name, style.getClass());
    // Set new style.
    method = findMethod(actor.getClass(), "setStyle");
    if (method == null) return;
    try {
      method.invoke(actor, style);
    } catch (Exception ignored) {
    }
  }
View Full Code Here

Examples of com.bradmcevoy.http.Request.Method

    private List<String> determineMethodsAllowed( HttpManager manager, Resource res ) {
        List<String> list = new ArrayList<String>();
        for( Handler f : manager.getAllHandlers() ) {
            if( f.isCompatible( res ) ) {
                for( String m : f.getMethods() ) {
                    Method httpMethod = Method.valueOf( m );
                    if( !handlerHelper.isNotCompatible( res, httpMethod) ) {
                        list.add( m );
                    }
                }
            }
View Full Code Here

Examples of com.carma.swagger.doclet.model.Method

      } else {
        for (MethodDoc method : currentClassDoc.methods()) {
          ApiMethodParser methodParser = this.parentMethod == null ? new ApiMethodParser(this.options, this.rootPath, method, this.classes,
              defaultErrorTypeClass) : new ApiMethodParser(this.options, this.parentMethod, method, this.classes, defaultErrorTypeClass);

          Method parsedMethod = methodParser.parse();
          if (parsedMethod == null) {
            continue;
          }

          // see which resource path to use for the method, if its got a resourceTag then use that
          // otherwise use the root path
          String resourcePath = buildResourcePath(classResourcePath, method);

          if (parsedMethod.isSubResource()) {
            ClassDoc subResourceClassDoc = lookUpClassDoc(method.returnType());
            if (subResourceClassDoc != null) {
              // delete class from the dictionary to handle recursive sub-resources
              Collection<ClassDoc> shrunkClasses = new ArrayList<ClassDoc>(this.classes);
              shrunkClasses.remove(currentClassDoc);
View Full Code Here

Examples of com.cloudcontrolled.api.annotation.Method

      return null;
    }

    Class<?> clazz = request.getClass();

    Method method = clazz.getAnnotation(Method.class);
    HttpMethod httpMethod = method.value();
    return httpMethod;
  }
View Full Code Here

Examples of com.eclipsesource.restfuse.Method

    RequestConfiguration requestConfiguration = new RequestConfiguration( baseUrl, method, target );
    return requestConfiguration.createRequest();
  }

  private ClientResponse callService( InternalRequest request ) {
    Method requestMethod = method.getAnnotation( HttpTest.class ).method();
    ClientResponse result = null;
    if( requestMethod.equals( Method.GET ) ) {
      result = request.get();
    } else if( requestMethod.equals( Method.POST ) ) {
      result = request.post();
    } else if( requestMethod.equals( Method.DELETE ) ) {
      result = request.delete();
    } else if( requestMethod.equals( Method.PUT ) ) {
      result = request.put();
    } else if( requestMethod.equals( Method.HEAD ) ) {
      result = request.head();
    } else if( requestMethod.equals( Method.OPTIONS ) ) {
      result = request.options();
    }
    return result;
  }
View Full Code Here

Examples of com.google.checkout.Method

      if (calcShipping) {
        for (int j = 0; j < _callback.getCalculate().getShipping().getMethodCount(); j++) {
          Result result = new Result();
          result.setAddressId(address.getId());
          result.setShippable(true);
          Method method = _callback.getCalculate().getShipping().getMethod(j);
          result.setShippingName(method.getName());
          // Load Shipping, read order:
          // 1. google.calculation.shipping.{method name}.{address region}
          // 2. google.calculation.shipping.{method name}.default
          // 3. google.calculation.shipping.default
          BigDecimal shipping = JavaCommerce.getConfiguration().getBigDecimal(new StringBuffer(CONFIG_GOOGLE_CALC_SHIPPING).append(".").append(method.getName()).append(".").append(address.getRegion()).toString(), JavaCommerce.getConfiguration().getBigDecimal(new StringBuffer(CONFIG_GOOGLE_CALC_SHIPPING).append(".").append(method.getName()).append(DOT_DEFAULT).toString(), defaultShipping));
          shipping = shipping.setScale(2, BigDecimal.ROUND_UP);
          if (LOG.isDebugEnabled()) {
            LOG.debug("Calculated shipping of [" + shipping + "] for [" + method.getName() + "]");
          }
          ShippingRate rate = new ShippingRate();
          rate.setContent(shipping);
          rate.setCurrency(DEFAULT_CURRENCY);
          result.setShippingRate(rate);
View Full Code Here

Examples of com.google.enterprise.connector.adgroups.AdConstants.Method

          + port + " didn't reply within 3 seconds", e);
    } catch (IOException e) {
      insertMessage(form, "hostname", "Connection failed", e);
    }

    Method method =
        conf.get("method").equals("SSL") ? Method.SSL : Method.STANDARD;
    String principal = conf.get("principal");
    String password = conf.get("password");
    if (connectivity && method == Method.SSL) {
      SSLSocketFactory socketFactory =
View Full Code Here

Examples of com.google.enterprise.connector.ldap.LdapConstants.Method

    LdapContext ldapContext = handler.getLdapContext();
    assertNotNull(ldapContext);
  }

  private static LdapConnectionSettings makeLdapConnectionSettings() {
    Method method = Method.STANDARD;
    String hostname = LdapHandlerTest.getHostname();
    int port = 389;
    String baseDN = LdapHandlerTest.getTestProperties().getProperty("basedn");
    LdapConnectionSettings settings;
    if (Strings.isNullOrEmpty(TEST_USER)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.