Examples of Method


Examples of net.java.dev.wadl.x2009.x02.MethodDocument.Method

    docConfig.getDomNode().appendChild( docConfig.getDomNode().getOwnerDocument().createTextNode( description ) );
  }

  private void generateWadlMethod( Resource resourceConfig, RestMethod restMethod )
  {
    Method methodConfig = resourceConfig.addNewMethod();
    createDoc( methodConfig.addNewDoc(), restMethod );
    methodConfig.setName( restMethod.getMethod().toString() );
    methodConfig.setId( restMethod.getName() );
    Request requestConfig = methodConfig.addNewRequest();

    Map<String, RestParamProperty> defaultParams = new HashMap<String, RestParamProperty>();
    for( RestParamProperty defaultParam : restMethod.getResource().getDefaultParams() )
      defaultParams.put( defaultParam.getName(), defaultParam );

    RestParamsPropertyHolder params = restMethod.getParams();
    for( int c = 0; c < params.size(); c++ )
    {
      RestParamProperty param = params.getPropertyAt( c );
      if( !defaultParams.containsKey( param.getName() ) || !param.equals( defaultParams.get( param.getName() ) ) )
        generateParam( requestConfig.addNewParam(), param );
    }

    if( restMethod.hasRequestBody() )
    {
      for( RestRepresentation representation : restMethod.getRepresentations( RestRepresentation.Type.REQUEST, null ) )
      {
        generateRepresentation( requestConfig.addNewRepresentation(), representation );
      }
    }

    Map<String, Response> responses = new HashMap<String, Response>();
    if( !isWADL11 )
      responses.put( null, methodConfig.addNewResponse() );
    for( RestRepresentation representation : restMethod.getRepresentations() )
    {
      Response response;
      if( isWADL11 )
      {
        List<Comparable> status = new ArrayList<Comparable>( ( List<Comparable> )representation.getStatus() );
        Collections.sort( status );
        StringBuilder statusStrBuilder = new StringBuilder();
        for( Object o : status )
          statusStrBuilder.append( o ).append( " " );
        String statusStr = statusStrBuilder.toString();

        if( !responses.containsKey( statusStr ) )
        {
          response = methodConfig.addNewResponse();
          response.setStatus( status );
          responses.put( statusStr, response );
        }
        else
        {
View Full Code Here

Examples of net.sf.gwtseam.model.Method

  {
    public void execute()
    {
      currentObject = CurrentObject.METHOD;
     
      currentMethod = new Method ();
      currentMethod.setName(getAttributes().getValue("name"));
     
      Attribute retType = new Attribute ();
      retType.setClazz(getAttributes().getValue("return"));
      retType.setContainer(getAttributes().getValue("container"));
View Full Code Here

Examples of net.sf.rej.java.Method

      MethodNode mNode = (MethodNode) node;
      return this.offsets.get(mNode.getMethod());
    } else if (node instanceof MethodAccessFlagsNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodAccessFlagsNode mafNode = (MethodAccessFlagsNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.ACCESS_FLAGS);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodNameNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodNameNode mafNode = (MethodNameNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_NAME);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodDescriptorNode) {     
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodDescriptorNode mafNode = (MethodDescriptorNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_DESCRIPTOR);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof AttributeNode) {
      AttributeNode aNode = (AttributeNode) node;
      AttributesNode an = (AttributesNode) aNode.getParent();
      Range range = getRange(an);
View Full Code Here

Examples of noop.model.Method

  public void shouldCreateVerticesForEveryElementUnderAProject() {
    Project p = new Project("example", "p", "MIT license");
    UUID uid = UUID.randomUUID();
    Library l = new Library(uid, "l");
    Clazz c = new Clazz("c");
    Method m = new Method("m");
    Library l2 = new Library(UUID.randomUUID(), "l2");

    p.addLibrary(l);
    p.addLibrary(l2);
    l.addClazz(c);
View Full Code Here

Examples of org.apache.bcel.classfile.Method

            return EMPTY_CLASS_ITEMS;
        } else {
            Method[] methods = getMethods();
            ClassItem[] items = new ClassItem[methods.length];
            for (int i = 0; i < methods.length; i++) {
                Method method = methods[i];
                items[i] = new ClassItem(method.getName(), this, method);
            }
            return items;
        }       
    }
View Full Code Here

Examples of org.apache.oodt.cas.pushpull.expressions.Method

                        else
                            break;
                    }

                    if (input.substring(j, j + 1).charAt(0) == '(') {
                        Method m = methodRepo.get(method.toString());
                        StringTokenizer st = new StringTokenizer(input
                                .substring(j, input.substring(j).indexOf(")")
                                        + j), "#\", ()");
                        while (st.hasMoreTokens()) {
                            String arg = st.nextToken();
                            m.addArg(null, arg);
                        }
                        String returnValue = m.execute().toString();
                        input = input.substring(0, i)
                                + returnValue
                                + input.substring(input.substring(i).indexOf(
                                        ")")
                                        + 1 + i);
View Full Code Here

Examples of org.apache.openejb.jee.Method

            if (method.getLock() != null) {
                info.concurrencyAttribute = method.getLock().toString();
            }
            info.accessTimeout = toInfo(method.getAccessTimeout());
           
            Method m = new Method(bean.getEjbName(), null, method.getMethod().getMethodName());
            m.setMethodParams(method.getMethod().getMethodParams());           
            info.methods.add(getMethodInfo(m, ejbds));           
            ejbJarInfo.methodConcurrency.add(info);
        }
    }
View Full Code Here

Examples of org.apache.qpid.transport.Method

    {
        BBDecoder dec = _decoder.get();
        dec.init(segment);

        int channel = frame.getChannel();
        Method command;

        switch (frame.getType())
        {
        case CONTROL:
            int controlType = dec.readUint16();
            Method control = Method.create(controlType);
            control.read(dec);
            emit(channel, control);
            break;
        case COMMAND:
            int commandType = dec.readUint16();
            // read in the session header, right now we don't use it
View Full Code Here

Examples of org.apache.shindig.gadgets.spec.BaseOAuthService.Method

      String paramLocationStr = arguments.getRequestOption(OAuthArguments.PARAM_LOCATION_PARAM, "");
      Location l = Location.parse(paramLocationStr);
      accessorBuilder.setParameterLocation(getStoreLocation(l, responseParams));

      String requestMethod = arguments.getRequestOption(OAuthArguments.REQUEST_METHOD_PARAM, "GET");
      Method m = Method.parse(requestMethod);
      accessorBuilder.setMethod(getStoreMethod(m, responseParams));

      String requestTokenUrl = arguments.getRequestOption(OAuthArguments.REQUEST_TOKEN_URL_PARAM);
      verifyUrl(requestTokenUrl, responseParams);
      String accessTokenUrl = arguments.getRequestOption(OAuthArguments.ACCESS_TOKEN_URL_PARAM);
View Full Code Here

Examples of org.apache.shindig.gadgets.spec.OAuthService.Method

      String paramLocationStr = arguments.getRequestOption(OAuthArguments.PARAM_LOCATION_PARAM, "");
      Location l = Location.parse(paramLocationStr);
      accessorBuilder.setParameterLocation(getStoreLocation(l, responseParams));

      String requestMethod = arguments.getRequestOption(OAuthArguments.REQUEST_METHOD_PARAM, "GET");
      Method m = Method.parse(requestMethod);
      accessorBuilder.setMethod(getStoreMethod(m, responseParams));

      String requestTokenUrl = arguments.getRequestOption(OAuthArguments.REQUEST_TOKEN_URL_PARAM);
      verifyUrl(requestTokenUrl, responseParams);
      String accessTokenUrl = arguments.getRequestOption(OAuthArguments.ACCESS_TOKEN_URL_PARAM);
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.