Examples of Method


Examples of org.glassfish.grizzly.http.Method

        /*
         * Only for GET should the response actually contain the content.
         * Java Web Start uses HEAD to find out when the target was last
         * modified to see if it should ask for the entire target.
         */
        final Method methodType = gReq.getMethod();
        if (Method.GET.equals(methodType)) {
            writeData(instance.getText(), gResp);
        }
        logger.log(Level.FINE, "{0}Served dyn content for {1}: {2}{3}",
                new Object[]{logPrefix(), methodType, relativeURIString,
View Full Code Here

Examples of org.jboss.forge.parser.java.Method

   @SuppressWarnings({ "rawtypes" })
   public void resetTests() throws IOException
   {
      URL url = MethodVisibilityTest.class
               .getResource("/org/jboss/forge/grammar/java/MockAnnotatedMethod.java");
      Method method = JavaParser.parse(JavaClass.class, url).getMethods().get(0);
      setTarget(method);
   }
View Full Code Here

Examples of org.jf.dexlib2.iface.Method

                "    sget-object v0, V:I\n" +
                "    sget-object v0, I:I\n" +
                "    return-void\n" +
                ".end method");

        Method mainMethod = null;
        for (Method method: classDef.getMethods()) {
            if (method.getName().equals("main")) {
                mainMethod = method;
            }
        }
        Assert.assertNotNull(mainMethod);

        MethodImplementation methodImpl = mainMethod.getImplementation();
        Assert.assertNotNull(methodImpl);

        List<Instruction> instructions = Lists.newArrayList(methodImpl.getInstructions());

        Instruction21c instruction = (Instruction21c)instructions.get(0);
View Full Code Here

Examples of org.jreversepro.reflect.Method

    short count = dis.readShort();

    List<Method> methods = new ArrayList<Method>();

    for (int i = 0; i < count; i++) {
      Method curMethod = new Method();

      short accessFlags = dis.readShort();
      short nameIndex = dis.readShort();
      short descIndex = dis.readShort();

      String name = cpInfo.getUtf8String(nameIndex);
      String descriptor = cpInfo.getUtf8String(descIndex);

      curMethod.setName(name);
      curMethod.setSignature(descriptor);
      curMethod.setQualifier(accessFlags);

      short attrCount = dis.readShort();
      for (int j = 0; j < attrCount; j++) {
        readMethodAttributes(curMethod, dis, cpInfo);
      }
      if (curMethod.getVariableTable() == null) {
        // It was not decompiled with variableTable- Hence setting it
        // using symboltable
        curMethod.initializeSymbolTable();
      }

      methods.add(curMethod);
    }
    return methods;
View Full Code Here

Examples of org.jwall.web.policy.Method

        super.getListCellRendererComponent(arg0, arg1, arg2, arg3, arg4);
        setFont(new Font("Monospaced", Font.PLAIN, 13));

       
        if( arg1.getType() == TreeNode.METHOD_NODE ){
          Method m = (Method) arg1;
            setText( "Method "+m.getValue() );
            setIcon( WebPolicyEditor.getIcon(m) );
            return this;
        }
       
        if( arg1.getType() == TreeNode.META_INF_NODE ){
View Full Code Here

Examples of org.molgenis.model.elements.Method

      logger.error(message);
      throw new MolgenisModelException(message);
    }

    // construct
    Method method = new Method(element.getAttribute("name"), model.getMethodSchema());

    NodeList nodes = element.getChildNodes();
    for (int nodeid = 0; nodeid < nodes.getLength(); ++nodeid)
    {
      Node node = nodes.item(nodeid);
      if (node.getNodeType() != Node.ELEMENT_NODE)
      {
        continue;
      }

      if (((Element) node).getTagName().equals("description"))
      {
        method.setDescription(((Element) node).getTextContent().trim());
      }
      else if (((Element) node).getTagName().equals("parameter"))
      {
        parseParameter(method, (Element) node);
      }
View Full Code Here

Examples of org.mybatis.generator.api.dom.java.Method

    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    FullyQualifiedJavaType returnType = new FullyQualifiedJavaType("java.util.LinkedHashMap");
    returnType.addTypeArgument(new FullyQualifiedJavaType("java.lang.String"));
    returnType.addTypeArgument(new FullyQualifiedJavaType("java.util.List"));
    importedTypes.add(returnType);
    Method method = new Method();
    method.addAnnotation("@Override");
    method.addSuppressTypeWarningsAnnotation();
    method.setReturnType(returnType);
    topLevelClass.addImportedTypes(importedTypes);
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("getExportData");
    method.addBodyLine("LinkedHashMap<String, List> map = new LinkedHashMap<String, List>();");
    method.addBodyLine("map.put(\"SheetName_1\", findAll());");
    method.addBodyLine("map.put(\"SheetName_2\", findAll());");
    method.addBodyLine("map.put(\"SheetName_3\", findAll());");
    method.addBodyLine("map.put(\"SheetName_N\", findAll());");
    method.addBodyLine("return map;");
    topLevelClass.addMethod(method);
  }
View Full Code Here

Examples of org.nbphpcouncil.modules.php.yii.editor.completion.methods.Method

            return null;
        }

        // create task
        FileObject currentFile = NbEditorUtilities.getFileObject(component.getDocument());
        Method method = MethodFactory.create(methodName, currentFile, phpModule);
        if (method == null) {
            return null;
        }
        return new AsyncCompletionTask(new AsyncCompletionQueryImpl(method), component);
    }
View Full Code Here

Examples of org.netbeans.modules.exceptions.entity.Method

    }

    private Component getComponentFromSourceJar(EntityManager em, StackTraceElement stackTraceElement) {
        SourcejarMapping bestMapping = null;
        String methodName = Method.getMethodNameFromSTE(stackTraceElement);
        Method method = (Method) PersistenceUtils.getExist(em, "Method.findByName", methodName);
        if ((method != null) && (method.getSourcejar() != null)){
            for (SourcejarMapping mapping: mappings){
                if (!mapping.matches(method.getSourcejar())){
                    continue;
                }
                if ((bestMapping == null) || (mapping.getSourcejar().length() > bestMapping.getSourcejar().length())){
                    bestMapping = mapping;
                }
View Full Code Here

Examples of org.objectweb.asm.commons.Method

      fv.visitEnd();
    }
    MethodVisitor mv;
    mv = cv.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
    if (mv != null) {
      Method m = Method.getMethod("void <init>()");
      GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC, m, mv);
      ga.visitCode();
      ga.loadThis();
      ga.invokeConstructor(Type.getType("Ljava/lang/Object;"), m);
      ga.returnValue();
      ga.endMethod();
    }
    mv = cv.visitMethod(ACC_PUBLIC, "getF", "()I", null, null);
    if (mv != null) {
      Type bean = Type.getType("Lpkg/Bean;");
      Method m = Method.getMethod("int getF()");
      GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC, m, mv);
      ga.visitCode();
      ga.loadThis();
      ga.getField(bean, "f", Type.INT_TYPE);
      ga.returnValue();
      ga.endMethod();
    }
    mv = cv.visitMethod(ACC_PUBLIC, "setF", "(I)V", null, null);
    if (mv != null) {
      Type bean = Type.getType("Lpkg/Bean;");
      Method m = Method.getMethod("void setF(int)");
      GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC, m, mv);
      ga.visitCode();
      ga.loadThis();
      ga.loadArg(0);
      ga.putField(bean, "f", Type.INT_TYPE);
      ga.returnValue();
      ga.endMethod();
    }
    mv = cv.visitMethod(ACC_PUBLIC, "checkAndSetF", "(I)V", null, null);
    if (mv != null) {
      Type bean = Type.getType("Lpkg/Bean;");
      Method m = Method.getMethod("void checkAndSetF(int)");
      GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC, m, mv);
      ga.visitCode();
      ga.loadArg(0);
      Label label = new Label();
      ga.ifZCmp(GeneratorAdapter.LT, label);
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.