Examples of JMethod


Examples of com.google.gwt.dev.jjs.ast.JMethod

   */
  private static JStatement makeStatsCalls(JProgram program,
      String mainClassName) {
    SourceInfo sourceInfo = program.createSourceInfoSynthetic(
        JavaToJavaScriptCompiler.class, "onModuleStart() stats call");
    JMethod isStatsAvailableMethod = program.getIndexedMethod("Stats.isStatsAvailable");
    JMethod onModuleStartMethod = program.getIndexedMethod("Stats.onModuleStart");

    JMethodCall availableCall = new JMethodCall(sourceInfo, null,
        isStatsAvailableMethod);
    JMethodCall onModuleStartCall = new JMethodCall(sourceInfo, null,
        onModuleStartMethod);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod

    int size = dependencyChain.size();
    if (size < 2) {
      return;
    }

    JMethod curMethod = dependencyChain.get(size - 1);
    builder.append("<method name=\"");
    if (curMethod.getEnclosingType() != null) {
      builder.append(curMethod.getEnclosingType().getName());
      builder.append("::");
    }
    builder.append(curMethod.getName());
    builder.append("\">\n");

    JMethod depMethod = dependencyChain.get(size - 2);
    builder.append("<called by=\"");
    if (depMethod.getEnclosingType() != null) {
      builder.append(depMethod.getEnclosingType().getName());
      builder.append("::");
    }
    builder.append(depMethod.getName());
    builder.append("\"/>\n");
    builder.append("</method>\n");
  }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod

    writer.close();
  }

  private static TypedProgramReference typedProgramReference(JsName name,
      JavaToJavaScriptMap jjsmap, Map<JsName, String> obfuscateMap) {
    JMethod method = jjsmap.nameToMethod(name);
    if (method != null) {
      StringBuilder sb = new StringBuilder();
      sb.append(method.getEnclosingType().getName());
      sb.append("::");
      sb.append(method.getName());
      sb.append("(");
      for (JType type : method.getOriginalParamTypes()) {
        sb.append(type.getJsniSignatureName());
      }
      sb.append(")");
      sb.append(method.getOriginalReturnType().getJsniSignatureName());
      String desc = sb.toString();
      return new TypedProgramReference("method", desc);
    }

    JReferenceType type = jjsmap.nameToType(name);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod

      JReferenceType type = map.typeForStatement(stat);
      if (type != null) {
        return map.nameForType(type);
      }

      JMethod method = FragmentExtractor.methodFor(stat, map);
      if (method != null) {
        return map.nameForMethod(method);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod

              membersByCorrelation.put(c, member);
              functionsMutable.add(member);
              break;
            }
            case METHOD: {
              JMethod method = c.getMethod();
              JDeclaredType type = c.getType();
              StandardMethodMember member = memberFactory.get(method);
              memberFactory.get(type).addMethod(member);
              membersByCorrelation.put(c, member);
              break;
View Full Code Here

Examples of com.helger.jcodemodel.JMethod

        AbstractJType usedAcceptingInterfaceType = acceptingInterface.narrow(valueClass.typeParams());
        return valueClass.field(JMod.PRIVATE | JMod.FINAL, usedAcceptingInterfaceType, "acceptor");
    }

    void buildPrivateConstructor(JFieldVar acceptorField) {
        JMethod constructor = valueClass.constructor(JMod.PRIVATE);
        constructor.param(acceptorField.type(), acceptorField.name());
        constructor.body().assign(JExpr.refthis(acceptorField.name()), JExpr.ref(acceptorField.name()));
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

       
        JCodeModel model = generator.getCodeModel();
        JDefinedClass echo = model._getClass("jsr181.echo.wrapped.EchoPortType");
        assertNotNull(echo);
       
        JMethod method = echo.getMethod("echo", new JType[] { model.ref(String.class) });
        assertNotNull(method);
        assertEquals( model.ref(String.class), method.type() );
       
        assertNotNull(model._getClass("jsr181.echo.wrapped.EchoClient"));
        assertNotNull(model._getClass("jsr181.echo.wrapped.EchoImpl"));
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

       
        JCodeModel model = generator.getCodeModel();
        JDefinedClass echo = model._getClass("echo.wrapped.unbounded.EchoPortType");
        assertNotNull(echo);
       
        JMethod jm = echo.methods().iterator().next();
        assertEquals("java.util.List<java.lang.String>", jm.type().fullName());
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

       
        JCodeModel model = generator.getCodeModel();
        JDefinedClass echo = model._getClass("echo.wrapped.keyword.EchoPortType");
        assertNotNull(echo);
       
        JMethod jm = echo.methods().iterator().next();
        assertEquals("java.util.List<java.lang.String>", jm.type().fullName());
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

       
        JCodeModel model = generator.getCodeModel();
        JDefinedClass echo = model._getClass("echo.wrapped.mtom.EchoPortType");
        assertNotNull(echo);
       
        JMethod jm = echo.methods().iterator().next();
        assertEquals("javax.activation.DataHandler", jm.type().fullName());
    }
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.