Examples of IMethod


Examples of com.nirima.jenkins.webdav.interfaces.IMethod

            {
                ServletContextMimeTypeResolver ctx = new ServletContextMimeTypeResolver();
                ctx.setServletContext(req.getSession().getServletContext());
                repo.setMimeTypeResolver(ctx);
            }
            IMethod method = methodFactory.createMethod(req, rsp);
            method.init(req, rsp, null, repo, root);
            method.invoke();
        }
        catch (Exception e)
        {
            e.printStackTrace();
            logger.error("Error trying to serve request");
View Full Code Here

Examples of com4j.tlbimp.def.IMethod

    @Override
    protected final void generateExtends(IndentingWriter o) {
        boolean hasEnum = false;
        for( int j=0; j<t.countMethods() && !hasEnum; j++ ) {
            IMethod m = t.getMethod(j);
            hasEnum = MethodBinder.isEnum(m);
        }

        List<String> baseTypes = getBaseTypes();
        if(baseTypes.isEmpty()) {
View Full Code Here

Examples of net.sf.rej.gui.debug.wrappers.IMethod

    ClassIndex ci = SystemFacade.getInstance().getClassIndex();
    ClassLocator cl = ci.getLocator(sf.location().declaringType().name());
    if (cl != null) {
      try {
        ClassFile cf = SystemFacade.getInstance().getClassFile(cl);
        IMethod bpMethod = sf.location().method();
        for (net.sf.rej.java.Method method : cf.getMethods()) {
          if (method.getName().equals(bpMethod.name()) && method.getDescriptor().getRawDesc().equals(bpMethod.signature())) {
            Integer pc = null;
            if (sf.location().codeIndex() != -1) {
              pc = (int)sf.location().codeIndex();
            }
           
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

    if(type != null) {
      String[] args = new String[length];
      for(int i = 0;  i< length ; i++){
        args[i] = new String(paramTypeNames[i]);
      }
      IMethod method = type.getMethod(new String(selector),args);
      try{
        parameterNames = new char[length][];
        String[] params = method.getParameterNames();
        for(int i = 0;  i< length ; i++){
          parameterNames[i] = params[i].toCharArray();
        }
      } catch(JavaModelException e){
        parameterNames = null;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

    String[] parameterSignatures,
    char[][] typeParameterNames,
    char[][][] typeParameterBoundNames,
    char[] uniqueKey,
    boolean isConstructor) {
  IMethod method= type.getMethod(new String(selector), parameterSignatures);

  if (method.exists()) {
    if (typeParameterNames != null && typeParameterNames.length != 0) {
      IMethod[] methods = type.findMethods(method);
      if (methods.length > 1) {
        for (int i = 0; i < methods.length; i++) {
          if (areTypeParametersCompatible(methods[i], typeParameterNames, typeParameterBoundNames)) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

}
public void acceptLocalMethod(MethodBinding methodBinding) {
  IJavaElement res = findLocalElement(methodBinding.sourceStart());
  if(res != null) {
    if(res.getElementType() == IJavaElement.METHOD) {
      IMethod method = (IMethod) res;

      char[] uniqueKey = methodBinding.computeUniqueKey();
      if(method.isBinary()) {
        ResolvedBinaryMethod resolvedRes = new ResolvedBinaryMethod(
            (JavaElement)res.getParent(),
            method.getElementName(),
            method.getParameterTypes(),
            new String(uniqueKey));
        resolvedRes.occurrenceCount = method.getOccurrenceCount();
        res = resolvedRes;
      } else {
        ResolvedSourceMethod resolvedRes = new ResolvedSourceMethod(
            (JavaElement)res.getParent(),
            method.getElementName(),
            method.getParameterTypes(),
            new String(uniqueKey));
        resolvedRes.occurrenceCount = method.getOccurrenceCount();
        res = resolvedRes;
      }
      addElement(res);
      if(SelectionEngine.DEBUG){
        System.out.print("SELECTION - accept method("); //$NON-NLS-1$
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

}
public void acceptLocalMethodTypeParameter(TypeVariableBinding typeVariableBinding) {
  MethodBinding methodBinding = (MethodBinding)typeVariableBinding.declaringElement;
  IJavaElement res = findLocalElement(methodBinding.sourceStart());
  if(res != null && res.getElementType() == IJavaElement.METHOD) {
    IMethod method = (IMethod) res;

    ITypeParameter typeParameter = method.getTypeParameter(new String(typeVariableBinding.sourceName));
    if (typeParameter.exists()) {
      addElement(typeParameter);
      if(SelectionEngine.DEBUG){
        System.out.print("SELECTION - accept type parameter("); //$NON-NLS-1$
        System.out.print(typeParameter.toString());
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

  try {
    methods = type.getMethods();
    for (int i = 0; i < methods.length; i++) {
      if (methods[i].getElementName().equals(name)
          && methods[i].getParameterTypes().length == parameterTypeNames.length) {
        IMethod method = methods[i];
        if (uniqueKey != null) {
          ResolvedSourceMethod resolvedMethod = new ResolvedSourceMethod(
            (JavaElement)method.getParent(),
            method.getElementName(),
            method.getParameterTypes(),
            new String(uniqueKey));
          resolvedMethod.occurrenceCount = method.getOccurrenceCount();
          method = resolvedMethod;
        }
        addElement(method);
      }
    }
  } catch (JavaModelException e) {
    return;
  }

  // if no matches, nothing to report
  if (this.elementIndex == -1) {
    // no match was actually found, but a method was originally given -> default constructor
    addElement(type);
    if(SelectionEngine.DEBUG){
      System.out.print("SELECTION - accept type("); //$NON-NLS-1$
      System.out.print(type.toString());
      System.out.println(")"); //$NON-NLS-1$
    }
    return;
  }

  // if there is only one match, we've got it
  if (this.elementIndex == 0) {
    if(SelectionEngine.DEBUG){
      System.out.print("SELECTION - accept method("); //$NON-NLS-1$
      System.out.print(this.elements[0].toString());
      System.out.println(")"); //$NON-NLS-1$
    }
    return;
  }

  // more than one match - must match simple parameter types
  IJavaElement[] matches = this.elements;
  int matchesIndex = this.elementIndex;
  this.elements = JavaElement.NO_ELEMENTS;
  this.elementIndex = -1;
  for (int i = 0; i <= matchesIndex; i++) {
    IMethod method= (IMethod)matches[i];
    String[] signatures = method.getParameterTypes();
    boolean match= true;
    for (int p = 0; p < signatures.length; p++) {
      String simpleName= Signature.getSimpleName(Signature.toString(Signature.getTypeErasure(signatures[p])));
      char[] simpleParameterName = CharOperation.lastSegment(parameterTypeNames[p], '.');
      if (!simpleName.equals(new String(simpleParameterName))) {
        match = false;
        break;
      }
    }

    if (match && !areTypeParametersCompatible(method, typeParameterNames, typeParameterBoundNames)) {
      match = false;
    }

    if (match) {
      addElement(method);
      if(SelectionEngine.DEBUG){
        System.out.print("SELECTION - accept method("); //$NON-NLS-1$
        System.out.print(method.toString());
        System.out.println(")"); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IMethod

  IType type = resolveTypeByLocation(declaringTypePackageName, declaringTypeName,
      NameLookup.ACCEPT_ALL,
      selectorStart, selectorEnd);

  if(type != null) {
    IMethod method = null;

    String name = new String(selector);
    IMethod[] methods = null;

    try {
      methods = type.getMethods();
      done : for (int i = 0; i < methods.length; i++) {
        ISourceRange range = methods[i].getNameRange();
        if(range.getOffset() >= selectorStart
            && range.getOffset() + range.getLength() <= selectorEnd
            && methods[i].getElementName().equals(name)) {
          method = methods[i];
          break done;
        }
      }
    } catch (JavaModelException e) {
      //nothing to do
    }

    if(method == null) {
      addElement(type);
      if(SelectionEngine.DEBUG){
        System.out.print("SELECTION - accept type("); //$NON-NLS-1$
        System.out.print(type.toString());
        System.out.println(")"); //$NON-NLS-1$
      }
    } else {
      ITypeParameter typeParameter = method.getTypeParameter(new String(typeParameterName));
      if(typeParameter == null) {
        addElement(method);
        if(SelectionEngine.DEBUG){
          System.out.print("SELECTION - accept method("); //$NON-NLS-1$
          System.out.print(method.toString());
          System.out.println(")"); //$NON-NLS-1$
        }
      } else {
        addElement(typeParameter);
        if(SelectionEngine.DEBUG){
View Full Code Here

Examples of org.aspectj.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
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.