Examples of IMethod


Examples of org.eclipse.jdt.core.IMethod

    methodDeclaration.setProperty("Signature", signature.toString());

    // creation of ASTRewrite
    astRoot.recordModifications();
    IMethod method = null;
    String content = createPreambule(methodDeclaration) + "\r\n"
        + methodDeclaration.toString();
    try {
      method = astRoot.getTypeRoot().findPrimaryType()
          .createMethod(content, null, overwrite, null);
View Full Code Here

Examples of org.eclipse.jdt.core.IMethod

        CompilationUnit astRoot = (CompilationUnit) parser
            .createAST(null);

        // creation of ASTRewrite
        astRoot.recordModifications();
        IMethod method = null;
        String content = createPreambule(selectedElement) + "\r\n"
            + selectedElement.toString();
        try {
          method = astRoot.getTypeRoot().findPrimaryType()
              .createMethod(content, null, overwrite, null);
View Full Code Here

Examples of org.eclipse.jdt.core.IMethod

          return null;
        }
        argumentTypeNames[i] = typeName;
      }
      // return binary method
      IMethod binaryMethod = createBinaryMethodHandle(type, method.selector, argumentTypeNames);
      if (binaryMethod == null) {
        // when first attempt fails, try with similar matches if any...
        PossibleMatch similarMatch = this.currentPossibleMatch.getSimilarMatch();
        while (similarMatch != null) {
          type = ((ClassFile)similarMatch.openable).getType();
View Full Code Here

Examples of org.eclipse.jdt.core.IMethod

/*
* Create method handle.
* Store occurences for create handle to retrieve possible duplicate ones.
*/
private IJavaElement createMethodHandle(IType type, String methodName, String[] parameterTypeSignatures) {
  IMethod methodHandle = type.getMethod(methodName, parameterTypeSignatures);
  if (methodHandle instanceof SourceMethod) {
    while (this.methodHandles.contains(methodHandle)) {
      ((SourceMethod) methodHandle).occurrenceCount++;
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.core.IMethod

        String[] parameterTypeSignatures = new String[length];
        for (int i = 0; i < length; i++) {
          parameterTypeSignatures[i] = Signature.createTypeSignature(parameterTypeNames[i], false);
        }
        IMethod searchedMethod = typeHandle.getMethod(String.valueOf(method.selector), parameterTypeSignatures);
        IMethod[] foundMethods = typeHandle.findMethods(searchedMethod);

        if(foundMethods != null) {
          int len = foundMethods.length;
          if(len == 1) {
View Full Code Here

Examples of org.lilystudio.httpclient.IMethod

      url = "http" + url.substring(4);
    } else {
      isGet = true;
      addParameter(relay, url, encoding);
    }
    IMethod httpMethod = isGet ? new GetMethod(url) : new PostMethod(url);
    // 设置客户端特殊的信息
    httpMethod.setRequestHeader("If-None-Match", request
        .getHeader("If-None-Match"));
    httpMethod.setRequestHeader("If-Modified-Since", request
        .getHeader("If-Modified-Since"));
    // 取出服务器端可能用到的Cookie信息
    Cookie[] cookies = request.getCookies();
    if (cookies != null) {
      StringBuilder s = new StringBuilder(64);
      for (Cookie cookie : cookies) {
        String name = cookie.getName();
        if (!name.equals("JSESSIONID")) {
          s.append(name).append('=').append(cookie.getValue()).append(';');
        }
      }
      UserInformation info = relay.getUserInformation(false);
      if (info != null) {
        Object o = info.getProperty(SESSION_COOKIE_KEY);
        if (o != null) {
          s.append(o);
        }
      }
      int len = s.length();
      if (len > 0) {
        s.setLength(len - 1);
      }
      httpMethod.setRequestHeader("Cookie", s.toString());
    }
    HttpClient httpClient = new HttpClient();
    httpClient.setAutoDecode(true);
    try {
      if (param != null) {
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.