Examples of IMethodBinding


Examples of org.eclipse.jdt.core.dom.IMethodBinding

   
    ITypeBinding declaringClass = binding.getDeclaringClass();
    if (declaringClass != null) {
      qualifiedName = getPath(resolveBinding(declaringClass));
    } else {
      IMethodBinding declaringMethod = binding.getDeclaringMethod();
      if (declaringMethod != null) {
        qualifiedName = getPath(resolveBinding(declaringMethod));
      }
    }
   
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

  }

  @Override
  public Variable getReceiverOperand() {
    if(getNode().getExpression() == null) {
      IMethodBinding method = resolveBinding();
      if(isStaticMethodCall()) {
        // static method--return type variable for surrounding class
        return typeVariable(method.getDeclaringClass());
      }
      else {
        // implicit this
        // the following should return correct this variable
        // use the type of the method being called to disambiguate inner from outer classes
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

      if(binding instanceof IVariableBinding) {
        IVariableBinding vb = (IVariableBinding) binding;
        if(vb.isEnumConstant() || vb.isField())
          throw new IllegalArgumentException("Not a local: " + binding);
        // figure out whether it's declared locally
        IMethodBinding declaredIn = vb.getDeclaringMethod();
        while(declaredIn != null && declaredIn != declaredIn.getMethodDeclaration()) {
          declaredIn = declaredIn.getMethodDeclaration();
        }
        result = new SourceVariable(vb.getName(), vb, method.equals(declaredIn));
      }
      else if(binding instanceof ITypeBinding) {
        ITypeBinding tb = (ITypeBinding) binding;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

    }
    annoList.add(anno);
  }

  public void addAnnotationToMethod(AnnotationSummary anno, MethodDeclaration method) {
    IMethodBinding binding = method.resolveBinding();
    String name = binding.getKey();

    AnnotationSummary existing = methods.get(name);
    if (existing == null)
      methods.put(name, anno);
    else
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

    }
    annoList.add(anno);
  }

  public void addAnnotationToMethod(AnnotationSummary anno, MethodDeclaration method) {
    IMethodBinding binding = method.resolveBinding();
    String name = binding.getKey();

    AnnotationSummary existing = methods.get(name);
    if (existing == null)
      methods.put(name, anno);
    else
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

      if(binding instanceof IVariableBinding) {
        IVariableBinding vb = (IVariableBinding) binding;
        if(vb.isEnumConstant() || vb.isField())
          throw new IllegalArgumentException("Not a local: " + binding);
        // figure out whether it's declared locally
        IMethodBinding declaredIn = vb.getDeclaringMethod();
        while(declaredIn != null && declaredIn != declaredIn.getMethodDeclaration()) {
          declaredIn = declaredIn.getMethodDeclaration();
        }
        result = new SourceVariable(vb.getName(), vb, method.equals(declaredIn));
      }
      else if(binding instanceof ITypeBinding) {
        ITypeBinding tb = (ITypeBinding) binding;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

     
      if (left instanceof Name && ((Name)left).resolveBinding() instanceof IVariableBinding) {
        IVariableBinding binding = (IVariableBinding) ((Name)left).resolveBinding();
     
        if (binding.isParameter()) {
          IMethodBinding method = Utilities.getMethodDeclaration(node).resolveBinding();
          AnnotationSummary summary = getInput().getAnnoDB().getSummaryForMethod(method);
       
          if (summary.getParameter(binding.getName(), NON_NULL_ANNO) != null)
            checkVariable(flowAnalysis.getResultsBefore(left), right);
        }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

     
      if (left instanceof Name && ((Name)left).resolveBinding() instanceof IVariableBinding) {
        IVariableBinding binding = (IVariableBinding) ((Name)left).resolveBinding();
     
        if (binding.isParameter()) {
          IMethodBinding method = Utilities.getMethodDeclaration(node).resolveBinding();
          AnnotationSummary summary = getInput().getAnnoDB().getSummaryForMethod(method);
       
          if (summary.getParameter(binding.getName(), NON_NULL_ANNO) != null)
            checkVariable(flowAnalysis.getResultsBefore(left), right);
        }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

    this.tacs = new HashMap<IMethodBinding, EclipseTAC>();
  }
 
  public synchronized EclipseTAC getMethodTAC(MethodDeclaration methodDecl) {
    EclipseTAC tac;
    IMethodBinding methodBinding = methodDecl.resolveBinding();
    // try to reuse existing TAC instructions for this method
    tac = tacs.get(methodBinding);
    if(tac == null) {
      tac = new EclipseTAC(methodBinding);
      tacs.put(methodBinding, tac);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.IMethodBinding

        if (columnsList instanceof SimpleName) {
          // simple List variable
          bindColumnsAsList((SimpleName) columnsList, javaInfoList);
        } else if (columnsList instanceof MethodInvocation) {
          MethodInvocation invocation = (MethodInvocation) columnsList;
          IMethodBinding methodBinding = AstNodeUtils.getMethodBinding(invocation);
          if (methodBinding != null) {
            String methodQualifiedSignature =
                methodBinding.getDeclaringClass().getQualifiedName()
                    + "."
                    + AstNodeUtils.getMethodSignature(methodBinding);
            // inline Array to List conversion
            if ("java.util.Arrays.asList(com.extjs.gxt.ui.client.widget.grid.ColumnConfig[])".equals(methodQualifiedSignature)) {
              bindColumnsAsArray(invocation, javaInfoList);
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.