Package org.eclipse.jdt.core.dom

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


    switch (node.getNodeType()) {
    case ASTNode.SIMPLE_NAME:
    case ASTNode.QUALIFIED_NAME: {
      final Name name = (Name) node;

      if (name.resolveBinding().getJavaElement() == null)
        throw new DefinitelyNotEnumerizableException(
            Messages.ASTNodeProcessor_NonEnumerizableTypeEncountered, node);
      else {
        final IJavaElement elem = name.resolveBinding()
            .getJavaElement();
View Full Code Here


      if (name.resolveBinding().getJavaElement() == null)
        throw new DefinitelyNotEnumerizableException(
            Messages.ASTNodeProcessor_NonEnumerizableTypeEncountered, node);
      else {
        final IJavaElement elem = name.resolveBinding()
            .getJavaElement();
        if (elem.isReadOnly() || name.resolveBoxing())
          throw new DefinitelyNotEnumerizableException(
              Messages.ASTNodeProcessor_SourceNotPresent, node);
        if (name.resolveTypeBinding().isEqualTo(
View Full Code Here

                    argumentType =
                            getInvocationHandler().convertParameterTypeBindingForMethodSignature(expressionBinding);
                } else if (expression instanceof Name) {
                    // manually resolving the type of the argument
                    Name castedName = (Name) expression;
                    IBinding binding = castedName.resolveBinding();
                    if ((binding != null) && (binding.getKind() == IBinding.VARIABLE)) {
                        IVariableBinding varBinding = (IVariableBinding) binding;
                        ITypeBinding varTypeBinding = varBinding.getType();
                        argumentType = getInvocationHandler().convert(varTypeBinding);
                    }
View Full Code Here

    if (x instanceof ITypeBinding) {
      hardDep((ITypeBinding) x);
      print(CName.relative((ITypeBinding) x, type, true));
    } else {
      Name qualifier = node.getQualifier();
      IBinding b = qualifier.resolveBinding();
      if (b instanceof ITypeBinding) {
        hardDep((ITypeBinding) b);
        print(CName.relative((ITypeBinding) b, type, true) + "::");
      } else if (b instanceof IVariableBinding) {
        IVariableBinding vb = (IVariableBinding) b;
View Full Code Here

        }
      }

      if (node instanceof Name) {
        Name name = ((Name) node);
        IBinding b = name.resolveBinding();
        if (b instanceof IVariableBinding) {
          IVariableBinding vb = (IVariableBinding) b;
          castName(node, name, vb);
        }
      }
View Full Code Here

      return;
    }

    if (parent instanceof Name) {
      Name p = (Name) parent;
      if (p.resolveBinding().isEqualTo(vb)) {
        return;
      }
    }

    if (parent instanceof FieldAccess) {
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.