Examples of MethodInfo


Examples of ariba.util.fieldtype.MethodInfo

    private void setMethodReturnType (TypeInfo type,
                                      String methodName,
                                      Node node)
    {
        MethodInfo method = null;

        // prepare the parameter list
        List parameters = ListUtil.list();
        int numOfChild = node.jjtGetNumChildren();
        for (int i=0; i < numOfChild; i++) {
View Full Code Here

Examples of br.com.caelum.vraptor.core.MethodInfo

  }

  @Test
  public void shouldValidateMethodWithConstraint()
  throws Exception {
  MethodInfo info = new DefaultMethodInfo();
  info.setParameters(new Object[] { null });
  info.setResourceMethod(withConstraint);

  interceptor = new MethodValidatorInterceptor(l10n, interpolator, validator, info, factory.getValidator(), provider);
  when(l10n.getLocale()).thenReturn(new Locale("pt", "br"));

  MyController controller = new MyController();
  interceptor.intercept(stack, info.getResourceMethod(), controller);
 
  assertThat(validator.getErrors(), hasSize(1));
  assertThat(validator.getErrors().get(0).getCategory(), is("withConstraint.email"));
  }
View Full Code Here

Examples of ch.ralscha.extdirectspring.util.MethodInfo

  }

  private void buildRemotingApi(final RemotingApi remotingApi, final String group) {

    for (Map.Entry<MethodInfoCache.Key, MethodInfo> entry : MethodInfoCache.INSTANCE) {
      final MethodInfo methodInfo = entry.getValue();
      if (isSameGroup(group, methodInfo.getGroup())) {
        if (methodInfo.getAction() != null) {
          remotingApi.addAction(entry.getKey().getBeanName(), methodInfo.getAction());
        } else {
          remotingApi.addPollingProvider(methodInfo.getPollingProvider());
        }
      }
    }
  }
View Full Code Here

Examples of cli.System.Reflection.MethodInfo

        Type syscallType = Type.GetType("Mono.Unix.Native.Syscall, Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
        Type utsnameType = Type.GetType("Mono.Unix.Native.Utsname, Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
  if (syscallType != null && utsnameType != null)
  {
      Object[] arg = new Object[] { Activator.CreateInstance(utsnameType) };
      MethodInfo uname = syscallType.GetMethod("uname", new Type[] { utsnameType.MakeByRefType() });
      FieldInfo fi = utsnameType.GetField(field);
      if (uname != null && fi != null)
      {
    uname.Invoke(null, arg);
    return (String)fi.GetValue(arg[0]);
      }
  }
  return null;
    }
View Full Code Here

Examples of cn.wensiqun.info.MethodInfo

    return new FieldDefVisitor(grepClient, fieldInfo);
  }

 
  public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
    MethodInfo methodInfo = new MethodInfo(info, name, desc);
    info.getMethods().add(methodInfo);
    return new MethodDefVisitor(grepClient, methodInfo);
  }
View Full Code Here

Examples of com.alibaba.citrus.generictype.MethodInfo

            addProperty(prop);
        }
    }

    private PropertyInfo createMappedProperty(Method javaMethod, String propName, boolean read, int paramIndex) {
        MethodInfo method = factory.getMethod(javaMethod, getType());
        TypeInfo declaringType = method.getDeclaringType();
        TypeInfo type = paramIndex >= 0 ? method.getParameterTypes().get(paramIndex) : method.getReturnType();
        MethodInfo readMethod = read ? method : null;
        MethodInfo writMethod = read ? null : method;

        return new MappedPropertyImpl(propName, declaringType, type, readMethod, writMethod);
    }
View Full Code Here

Examples of com.dianping.cat.report.page.cross.display.MethodInfo

      model.setReport(hostReport);
      model.setHostInfo(hostInfo);
      break;
    case HOURLY_METHOD:
      CrossReport methodReport = getHourlyReport(payload);
      MethodInfo methodInfo = new MethodInfo(payload.getHourDuration());

      methodInfo.setHostinfoService(m_hostinfoService);
      methodInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort()).setRemoteProject(payload.getProjectName());
      methodInfo.setRemoteIp(payload.getRemoteIp()).setQuery(model.getQueryName());
      methodInfo.visitCrossReport(methodReport);
      model.setReport(methodReport);
      model.setMethodInfo(methodInfo);
      break;
    case HISTORY_PROJECT:
      CrossReport historyProjectReport = getSummarizeReport(payload);
      ProjectInfo historyProjectInfo = new ProjectInfo(historyTime);

      historyProjectInfo.setHostinfoService(m_hostinfoService);
      historyProjectInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort());
      historyProjectInfo.visitCrossReport(historyProjectReport);
      model.setProjectInfo(historyProjectInfo);
      model.setReport(historyProjectReport);

      List<TypeDetailInfo> historyDetails = historyProjectInfo.getServiceProjectsInfo();

      if (historyProjectInfo.getCallerProjectsInfo().isEmpty()) {
        for (TypeDetailInfo info : historyDetails) {
          String projectName = info.getProjectName();
          if (projectName.equalsIgnoreCase(payload.getDomain()) || projectName.equalsIgnoreCase("UnknownProject")
                || projectName.equalsIgnoreCase(ProjectInfo.ALL_CLIENT)) {
            continue;
          }
          Date start = payload.getHistoryStartDate();
          Date end = payload.getHistoryEndDate();
          ProjectInfo temp = buildHistoryCallProjectInfo(projectName, start, end);

          TypeDetailInfo detail = temp.getAllCallProjectInfo().get(domain);

          if (detail != null) {
            detail.setProjectName(projectName);
            historyProjectInfo.addCallerProjectInfo(projectName, detail);
          }
        }
      }
      break;
    case HISTORY_HOST:
      CrossReport historyHostReport = getSummarizeReport(payload);
      HostInfo historyHostInfo = new HostInfo(historyTime);

      historyHostInfo.setHostinfoService(m_hostinfoService);
      historyHostInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort());
      historyHostInfo.setProjectName(payload.getProjectName());
      historyHostInfo.visitCrossReport(historyHostReport);
      model.setReport(historyHostReport);
      model.setHostInfo(historyHostInfo);
      break;
    case HISTORY_METHOD:
      CrossReport historyMethodReport = getSummarizeReport(payload);
      MethodInfo historyMethodInfo = new MethodInfo(historyTime);

      historyMethodInfo.setHostinfoService(m_hostinfoService);
      historyMethodInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort()).setRemoteProject(payload.getProjectName());
      historyMethodInfo.setRemoteIp(payload.getRemoteIp()).setQuery(model.getQueryName());
      historyMethodInfo.visitCrossReport(historyMethodReport);
      model.setReport(historyMethodReport);
      model.setMethodInfo(historyMethodInfo);
      break;

    case METHOD_QUERY:
View Full Code Here

Examples of com.google.test.metric.MethodInfo

      functionDefinition.accept(localVariablesExtractor);
      OperationBuilder operationBuilder = new OperationBuilder(repository);
      functionDefinition.accept(operationBuilder);

      ClassInfo classInfo = stack.peek();
      classInfo.addMethod(new MethodInfo(
          classInfo,
          functionDefinition.getName(),
          functionDefinition.getLine(),
          null,
          functionDefinition.getParameters(),
View Full Code Here

Examples of com.google.test.metric.MethodInfo

      assertTrue(actual, expectingOps.remove(actual));
    }
  }

  public void testConstructor() throws Exception {
    MethodInfo method = getMethod("Simple()", Simple.class);
    List<Operation> operations = method.getOperations();
    assertOperations(
        operations,
        "java.lang.Object:Object()",
        "java.lang.Object:Object()",
        "com.google.test.metric.method.MethodBlockTest.Simple.a{java.lang.Object} <- new{java.lang.Object}");
View Full Code Here

Examples of com.google.test.metric.MethodInfo

    }
  }

  public void testTryCatchBlock() throws Exception {

    MethodInfo method = getMethod("void method()", TryCatchFinally.class);
    String operations = method.getOperations().toString();

    assertTrue(operations.contains("b{int} <- 1{int}"));
    assertTrue(operations.contains("b{int} <- 2{int}"));
    assertTrue(operations.contains("b{int} <- 3{int}"));
    assertTrue(operations.contains("b{int} <- 4{int}"));
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.