Examples of JNode


Examples of com.google.gwt.dev.jjs.ast.JNode

    }

    JExpression processExpression(QualifiedNameReference x) {
      SourceInfo info = makeSourceInfo(x);
      Binding binding = x.binding;
      JNode node = typeMap.get(binding);
      if (!(node instanceof JVariable)) {
        return null;
      }
      JVariable variable = (JVariable) node;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

        Collections.addAll(toRescue, methods);

        for (String name : toRescue) {
          JsniRef ref = JsniRef.parse("@" + classType.getName() + "::" + name);
          final String[] errors = {null};
          JNode node = JsniRefLookup.findJsniRefTarget(ref, program,
              new JsniRefLookup.ErrorReporter() {
                public void reportError(String error) {
                  errors[0] = error;
                }
              });
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

    protected JDeclarationStatement pop(LocalDeclaration decl) {
      return (decl == null) ? null : (JDeclarationStatement) pop();
    }

    protected JStatement pop(Statement x) {
      JNode pop = (x == null) ? null : pop();
      if (x instanceof Expression) {
        return simplify((JExpression) pop, (Expression) x).makeStatement();
      }
      return (JStatement) pop;
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

        branch.log(TreeLogger.ERROR, "Badly formatted JSNI reference in "
            + PROP_INITIAL_SEQUENCE + ": " + refString);
        throw new UnableToCompleteException();
      }
      final String lookupErrorHolder[] = new String[1];
      JNode referent = JsniRefLookup.findJsniRefTarget(jsniRef, program,
          new JsniRefLookup.ErrorReporter() {
            public void reportError(String error) {
              lookupErrorHolder[0] = error;
            }
          });
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

      return get(pfb.original(), failOnNull);
    } else if (binding instanceof WildcardBinding) {
      WildcardBinding wcb = (WildcardBinding) binding;
      return get(wcb.erasure(), failOnNull);
    }
    JNode result = internalGet(binding, failOnNull);
    if (result == null && failOnNull) {
      InternalCompilerException ice = new InternalCompilerException(
          "Failed to get JNode");
      ice.addNode(binding.getClass().getName(), binding.toString(), null);
      throw ice;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

    }
    return new ArrayList<JNode>(nodes);
  }
 
  private JNode internalGet(Binding binding, boolean failOnNull) {
    JNode cached = crossRefMap.get(binding);
    if (cached != null) {
      return cached;
    } else if (binding instanceof BaseTypeBinding) {
      BaseTypeBinding baseTypeBinding = (BaseTypeBinding) binding;
      // see org.eclipse.jdt.internal.compiler.lookup.TypeIds constants
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

          // Replace invocation to ctor with a new op.
          if (x.getQualifier() instanceof JsNameRef) {
            JsNameRef ref = (JsNameRef) x.getQualifier();
            String ident = ref.getIdent();
            if (isJsniIdent(ident)) {
              JNode node = program.jsniMap.get(ident);
              assert node instanceof JConstructor;
              assert ref.getQualifier() == null;
              JsName jsName = names.get(node);
              assert (jsName != null);
              ref.resolve(jsName);
              JsNew jsNew = new JsNew(x.getSourceInfo(), ref);
              jsNew.getArguments().addAll(x.getArguments());
              ctx.replaceMe(jsNew);
            }
          }
        }

        @Override
        public void endVisit(JsNameRef x, JsContext ctx) {
          String ident = x.getIdent();
          if (isJsniIdent(ident)) {
            JNode node = program.jsniMap.get(ident);
            assert (node != null);
            if (node instanceof JClassLiteral) {
              node = ((JClassLiteral) node).getField();
              assert node != null;
            }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

      JDeclaredType refType;
      JsniRef ref = JsniRef.parse(stringValue);

      if (ref != null) {
        final List<String> errors = new ArrayList<String>();
        JNode node = JsniRefLookup.findJsniRefTarget(ref, program,
            new JsniRefLookup.ErrorReporter() {
              public void reportError(String error) {
                errors.add(error);
              }
            });
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

    protected JDeclarationStatement pop(LocalDeclaration decl) {
      return (decl == null) ? null : (JDeclarationStatement) pop();
    }

    protected JStatement pop(Statement x) {
      JNode pop = (x == null) ? null : pop();
      if (x instanceof Expression) {
        return simplify((JExpression) pop, (Expression) x).makeStatement();
      }
      return (JStatement) pop;
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JNode

        branch.log(TreeLogger.ERROR, "Badly formatted JSNI reference in " + PROP_INITIAL_SEQUENCE
            + ": " + refString);
        throw new UnableToCompleteException();
      }
      final String lookupErrorHolder[] = new String[1];
      JNode referent =
          JsniRefLookup.findJsniRefTarget(jsniRef, program, new JsniRefLookup.ErrorReporter() {
            @Override
            public void reportError(String error) {
              lookupErrorHolder[0] = error;
            }
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.