Examples of MethodInfo


Examples of com.google.test.metric.MethodInfo

    return classInfo.getMethod(methodName);
  }

  public void testMethodWithIIF() throws Exception {
    Class<IIF> clazz = IIF.class;
    MethodInfo method = getMethod("void method()", clazz);
    assertOperations(method.getOperations(),
        "b{int} <- 1{int}",
        "java.lang.Object:Object()",
        clazz.getCanonicalName() + ".a{java.lang.Object} <- new{java.lang.Object}",
        clazz.getCanonicalName() + ".a{java.lang.Object} <- null{java.lang.Object}",
        "b{int} <- 2{int}");
View Full Code Here

Examples of com.google.test.metric.MethodInfo

      a = 5;
    }
  }

  public void testSwitchTable() throws Exception {
    MethodInfo method = getMethod("void method()", SwitchTable.class);
    assertOperations(method.getOperations(), "a{int} <- 0{int}",
        "a{int} <- 1{int}", "a{int} <- 2{int}", "a{int} <- 3{int}",
        "a{int} <- 4{int}", "a{int} <- 5{int}");
  }
View Full Code Here

Examples of com.google.test.metric.MethodInfo

      return staticText.length();
    }
  }

  public void testCallMethodsLength() throws Exception {
    MethodInfo method = getMethod("int length()", CallMethods.class);
    assertOperations(method.getOperations(), "java.lang.String:int length()", "return ?{int}");
  }
View Full Code Here

Examples of com.leansoft.mwsc.model.MethodInfo

        seiInfo.setSoapBindingAnnotation(getSOAPBindingAnnotation(port));
       
            for (Operation operation: port.getOperations()) {
                JavaMethod method = operation.getJavaMethod();
               
          MethodInfo methodInfo = new MethodInfo();
          // method name
          methodInfo.setName(method.getName());
         
          // method doc comment
          String methodJavaDoc = operation.getJavaDoc();
          if (methodJavaDoc == null) {
            methodJavaDoc = "public method";
          }
         
          // method return type
                String returnTypeName;
          if(method.getReturnType().getName().equals("void")){
            returnTypeName = "void";
                } else {
                  returnTypeName = method.getReturnType().getType()
            .getName();
                }
          if (this.isWrapped(operation)) { // wrapped response
                Response response = operation.getResponse();
                    Block resBlock = response.getBodyBlocks().next();
                    returnTypeName = resBlock.getType().getJavaType().getName();
          }
          TypeInfo returnType = new TypeInfo();
          returnType.setFullName(returnTypeName);
          returnType.setName(ClassNameUtil
              .stripQualifier(returnTypeName));
          methodInfo.setReturnType(returnType);
         
          methodInfo.setWebMethodAnnotation(getWebMethodAnnotation(operation, method.getName()));
          methodInfo.setWebResultAnnotation(getWebResultAnnotation(operation));
          methodInfo.setSoapBindingAnnotation(getSOAPBindingAnnotation(operation));
         
          if (this.isWrapped(operation)) { // wrapped request parameter
                  Block reqBlock = operation.getRequest().getBodyBlocks().next();
                  String parameterTypeName = reqBlock.getType().getJavaType().getName();
                 
            ParameterInfo paramInfo = new ParameterInfo();
                  paramInfo.setName("request");
            // param type
            TypeInfo paramType = new TypeInfo();
            paramType.setFullName(parameterTypeName);
            paramType.setName(ClassNameUtil
                .stripQualifier(parameterTypeName));
            paramInfo.setType(paramType);
           
            // add this param in method definition
            methodInfo.getParameters().add(paramInfo);
          } else {
            for (JavaParameter parameter : method.getParametersList()) {
              ParameterInfo paramInfo = new ParameterInfo();
             
              // param name
              paramInfo.setName(parameter.getName());
              // param type
              TypeInfo paramType = new TypeInfo();
              paramType.setFullName(parameter.getType().getName());
              paramType.setName(ClassNameUtil
                  .stripQualifier(parameter.getType().getName()));
              paramInfo.setType(paramType);
             
              // @WebParam
              paramInfo.setWebParamAnnotation(getWebParamAnnotation(operation, parameter));
             
              // add this param in method definition
              methodInfo.getParameters().add(paramInfo);
              //methodJavaDoc += NEW_LINE + "@param " + parameter.getName();
            }
          }
         
          // Fault
          for(Fault fault : operation.getFaultsSet()) {
                String faultClassName = Names.customExceptionClassName(fault);
                FaultInfo faultInfo = null;
                if (faults.containsKey(faultClassName)) {
                  faultInfo = faults.get(faultClassName);
                } else {
                  faultInfo = getFaultInfo(fault);
                  // also put the fault model into the codegen model
                  cgModel.getFaults().add(faultInfo);
                  faults.put(faultClassName, faultInfo);
                }
                methodInfo.getThrows().add(faultInfo);
          }
         
          methodInfo.setDocComment(methodJavaDoc);
          seiInfo.getMethods().add(methodInfo);
            }
       
       
        // add this endpoint interface in the codegen
View Full Code Here

Examples of com.strobel.reflection.MethodInfo

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // BOXING AND CONVERSION OPERATIONS                                                                                   //
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void emitBox(final Type<?> type) {
        final MethodInfo boxMethod = TypeUtils.getBoxMethod(
            VerifyArgument.notNull(type, "type")
        );

        if (boxMethod != null) {
            call(OpCode.INVOKESTATIC, boxMethod);
View Full Code Here

Examples of com.subhajit.diagrams.codeanalysis.MethodInfo

      ctx.setClassInfo(new ClassInfo(className, classLoader));
      ctx.setFilters(SequenceDiagramAction.getPackageListInteractively()
          .toArray(IConstants.ZERO_LENGTH_STRING_ARRAY));
      ctx.setFollowInvokedMethods(true);

      MethodInfo methodInfo = MethodInfo.createMethodInfo(method);
      ctx.setMethodInfo(methodInfo);
      ctx.setShowInstructions(false);
      ctx.setShowSourceLines(false);
      String sequenceDiagramSpecification = generator
          .generateSequenceDiagramSpec(ctx);
View Full Code Here

Examples of com.volantis.mcs.build.javadoc.MethodInfo

    // Initialise the non identity fields.
    out.println ();
    for (Iterator i = extraObjectFields.iterator (); i.hasNext ();) {
      FieldInfo field = (FieldInfo) i.next ();
      String fieldName = field.getName ();
      MethodInfo setter = objectClassInfo.getSetterMethod (fieldName, true);
      MethodInfo getter = objectClassInfo.getGetterMethod (fieldName, true);

      out.println ("    copy." + setter.getName () + " ("
                   + "original." + getter.getName () + " ());");
    }

    // Add the copy.
    out.println ();
    out.println ("    addObject (connection, copy);");
View Full Code Here

Examples of components.MethodInfo

  iv = v;
    }

    private static MethodInfo findSlot( MethodConstant t[], MethodInfo m ){
  if ( t != null ){
      MethodInfo v;
      int nt = t.length;
      int ID = m.getID();
      for( int i = 0; i < nt; i++ ){
    if ((v=t[i].find()).getID() == ID )
        return v;
View Full Code Here

Examples of de.scoopgmbh.copper.instrument.MethodInfo

    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
    List<StackFrame>  verboseStack = new ArrayList<StackFrame>(stack.size());
    ClassInfo[] definingClass = new ClassInfo[1];
    MethodInfo currentMethod = getMethod(classInfo, "main", "()V", definingClass);
    for (StackEntry en : stack) {
      Method method = new Method(currentMethod.getDefiningClass(), currentMethod.getDeclaration());
      List<LabelInfo> labelInfos = currentMethod.getLabelInfos();
      LabelInfo lf = labelInfos.size() >= en.jumpNo?
          new LabelInfo(en.jumpNo, -1, Collections.<String>emptyList(), Collections.<Type>emptyList(), Collections.<Type>emptyList(), Collections.<Type>emptyList(), "INCOMPATIBLE_STACKINFO_OUTPUT_ABORTED", "()V")
          :labelInfos.get(en.jumpNo);
      StackFrame sf = new StackFrame(method, lf.getLineNo(), definingClass[0].getSourceCode());
      for (int i = 0; i < lf.getLocals().length; ++i) {
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.analysis.MethodInfo

    public XFactory() {
    }

    public void intern(XClass c) {
        for (XMethod m : c.getXMethods()) {
            MethodInfo mi = (MethodInfo) m;
            methods.put(mi, mi);
        }
        for (XField f : c.getXFields()) {
            FieldInfo fi = (FieldInfo) f;
            fields.put(fi, fi);
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.