Examples of JNode


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

        error(x, "Only string literals may be used as arguments to Impl.getNameOf()");
        return null;
      }
      JStringLiteral stringLiteral = (JStringLiteral) arg;
      String stringValue = stringLiteral.getValue();
      JNode node = null;

      JsniRef ref = JsniRef.parse(stringValue);
      if (ref != null) {
        node = JsniRefLookup.findJsniRefTarget(ref, program, new JsniRefLookup.ErrorReporter() {
          @Override
View Full Code Here

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

          // Only constructors reach this point, all other JSNI references in the method body
          // would have already been replaced at endVisit(JsNameRef).

          // Replace invocation to ctor with a new op.
          String ident = ref.getIdent();
          JNode node = 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) {
          if (!x.isJsniReference()) {
            return;
          }

          String ident = x.getIdent();
          JNode node = jsniMap.get(ident);
          assert (node != null);
          if (node instanceof JField) {
            JField field = (JField) node;
            JsName jsName = names.get(field);
            assert (jsName != null);
View Full Code Here

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

  public TypeMap(JProgram program) {
    this.program = program;
  }

  public JNode get(Binding binding) {
    JNode result = internalGet(binding);
    if (result == null) {
      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

  public JNode tryGet(Binding binding) {
    return internalGet(binding);
  }

  private JNode internalGet(Binding binding) {
    JNode cached = (JNode) crossRefMap.get(binding);
    if (cached != null) {
      // Already seen this one.
      return cached;
    } else if (binding instanceof BaseTypeBinding) {
      BaseTypeBinding baseTypeBinding = (BaseTypeBinding) binding;
View Full Code Here

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

    print(' ');
  }

  protected void visitCollectionWithCommas(Iterator/* <? extends JNode> */iter) {
    if (iter.hasNext()) {
      JNode node = (JNode) iter.next();
      accept(node);
    }
    while (iter.hasNext()) {
      print(CHARS_COMMA);
      JNode node = (JNode) iter.next();
      accept(node);
    }
  }
View Full Code Here

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 jadx.gui.treemodel.JNode

  }

  private void treeClickAction() {
    Object obj = tree.getLastSelectedPathComponent();
    if (obj instanceof JNode) {
      JNode node = (JNode) obj;
      JClass cls = node.getRootClass();
      if (cls != null) {
        tabbedPane.showCode(new Position(cls, node.getLine()));
      }
    }
  }
View Full Code Here

Examples of jadx.gui.treemodel.JNode

  private void openSelectedItem() {
    int selectedId = resultsList.getSelectedIndex();
    if (selectedId == -1) {
      return;
    }
    JNode node = (JNode) resultsModel.get(selectedId);
    tabbedPane.showCode(new Position(node.getRootClass(), node.getLine()));

    dispose();
  }
View Full Code Here

Examples of jadx.gui.treemodel.JNode

    public Component getListCellRendererComponent(JList list,
                                                  Object obj, int index, boolean isSelected, boolean cellHasFocus) {
      if (!(obj instanceof JNode)) {
        return null;
      }
      JNode value = (JNode) obj;
      JLabel label = new JLabel();
      label.setOpaque(true);
      label.setIcon(value.getIcon());
      label.setText(value.makeLongString());
      if (isSelected) {
        label.setBackground(selectedBackground);
        label.setForeground(selectedForeground);
      }
      return label;
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.