Examples of resolveBinding()


Examples of edu.cmu.cs.crystal.tac.model.MethodCallInstruction.resolveBinding()

      return null;
   
    if (isStatic != invoke.isStaticMethodCall())
      return null;

    IMethodBinding binding = invoke.resolveBinding();

    if (!types.existsCommonSubtype(thisType, invoke.getReceiverOperand().resolveType().getQualifiedName()))
      return null;

    if (binding.getParameterTypes().length != paramTypes.length)
View Full Code Here

Examples of edu.cmu.cs.crystal.tac.model.NewObjectInstruction.resolveBinding()

    if (!(instr instanceof NewObjectInstruction))
      return null;

    NewObjectInstruction newObj = (NewObjectInstruction) instr;

    IMethodBinding binding = newObj.resolveBinding();

    if (binding.getParameterTypes().length != paramTypes.length)
      return null;

    if (!types.existsCommonSubtype(type, binding.getDeclaringClass().getQualifiedName()))
View Full Code Here

Examples of edu.cmu.cs.fusion.relationship.EntryInstruction.resolveBinding()

    if (!(instr instanceof EntryInstruction))
      return null;

    EntryInstruction invoke = (EntryInstruction) instr;

    IMethodBinding binding = invoke.resolveBinding();
   
    if (methodName != null && !(methodName.equals(binding.getName())))
      return null;

    if (thisType != null && !types.existsCommonSubtype(thisType, binding.getDeclaringClass().getQualifiedName()))
View Full Code Here

Examples of org.eclipse.cdt.core.dom.ast.IASTName.resolveBinding()

        }
        IASTNodeSelector nodeSelector= ast.getNodeSelector(null);
        IASTNode selectedNode = nodeSelector.findEnclosingNode(offset, 1);
        if (selectedNode instanceof IASTName) {
          IASTName selectedName = (IASTName) selectedNode;
          IBinding binding = selectedName.resolveBinding();
          CppToProtobufMapping info = delegate.createMappingFrom(binding);
          mappingReference.set(info);
          return OK_STATUS;
        }
        return CANCEL_STATUS;
View Full Code Here

Examples of org.eclipse.jdt.core.IType.resolveBinding()

    // prepare AST unit and type
    CompilationUnit implRoot = Utils.parseUnit(implUnit);
    TypeDeclaration implType = (TypeDeclaration) implRoot.types().get(0);
    // use standard JDT operation
    final IWorkspaceRunnable workspaceRunnable =
        OverrideMethodsAction.createRunnable(implRoot, implType.resolveBinding(), null, -1, false);
    // execute in UI because operation works with widgets during apply
    ExecutionUtils.runLogUI(new RunnableEx() {
      public void run() throws Exception {
        workspaceRunnable.run(null);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AbstractTypeDeclaration.resolveBinding()

    CompilationUnit cu = (CompilationUnit) parser.createAST(null);
//    List types = cu.structuralPropertiesForType();
    for(Object o:cu.types()){
      AbstractTypeDeclaration dec = (AbstractTypeDeclaration) o;
      List bodyDeclarations = dec.bodyDeclarations();
      assertNotNull(dec.resolveBinding());
      for(Object body:bodyDeclarations){
        MethodDeclaration methodDec = (MethodDeclaration) body;
        IMethodBinding binding = methodDec.resolveBinding();
        assertNotNull(binding);
        ASTNode node = cu.findDeclaringNode(binding);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AnonymousClassDeclaration.resolveBinding()

        .getJavaElement();
    if (meth == null && ctorCall.getAnonymousClassDeclaration() != null) {
      // most likely an anonymous class.
      final AnonymousClassDeclaration acd = ctorCall
          .getAnonymousClassDeclaration();
      final ITypeBinding binding = acd.resolveBinding();
      final ITypeBinding superBinding = binding.getSuperclass();
      for (final Iterator it = Arrays.asList(
          superBinding.getDeclaredMethods()).iterator(); it.hasNext();) {
        final IMethodBinding imb = (IMethodBinding) it.next();
        if (imb.isConstructor()) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.FieldAccess.resolveBinding()

          new EclipseSuperFieldAccess(target, eclipseVariableQuery),
          eclipseVariableQuery);
    }
    if(targetNode instanceof QualifiedName) {
      QualifiedName target = (QualifiedName) targetNode;
      IBinding binding = target.resolveBinding();
      if(binding instanceof IVariableBinding) {
        IVariableBinding vb = (IVariableBinding) binding;
        if(vb.isField()) {
          return new StoreFieldInstructionImpl(
              node,
View Full Code Here

Examples of org.eclipse.jdt.core.dom.FieldAccess.resolveBinding()

        }
      }
    }
    if(targetNode instanceof SimpleName) {
      SimpleName target = (SimpleName) targetNode;
      IBinding binding = target.resolveBinding();
      if(binding instanceof IVariableBinding) {
        IVariableBinding vb = (IVariableBinding) binding;
        if(vb.isField()) {
          // implicit field access on this
          return new StoreFieldInstructionImpl(
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodDeclaration.resolveBinding()

  {
    MethodDeclaration surroundingMeth = ASTUtil.findAncestor(node, MethodDeclaration.class);

    if (surroundingMeth != null)
    {
      return findMockedType(surroundingMeth, surroundingMeth.resolveBinding());
    }
    else
    {
      return 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.