Package com.google.gwt.dev.jjs.ast

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


    private void replaceImplNameOf(JMethodCall x, Context ctx) {
      JExpression arg0 = x.getArgs().get(0);
      assert arg0 instanceof JStringLiteral;
      String stringLiteral = ((JStringLiteral) arg0).getValue();

      HasName named = null;

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

      if (ref != null) {
View Full Code Here


      }
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      boolean pruned;
      if (node instanceof JField) {
        pruned = isPruned((JField) node);
      } else if (node instanceof JMethod) {
        pruned = isPruned((JMethod) node);
View Full Code Here

          }
          program.jsniMap.put(ident, node);
        }
        assert (node != null);
        CanBeStatic canBeStatic = (CanBeStatic) node;
        HasName hasName = (HasName) node;
        boolean isField = node instanceof JField;
        assert (isField || node instanceof JMethod);
        if (canBeStatic.isStatic() && nameRef.getQualifier() != null) {
          reportJsniError(info, x,
              "Cannot make a qualified reference to the static "
                  + (isField ? "field " : "method ") + hasName.getName());
        } else if (!canBeStatic.isStatic() && nameRef.getQualifier() == null) {
          reportJsniError(info, x,
              "Cannot make an unqualified reference to the instance "
                  + (isField ? "field " : "method ") + hasName.getName());
        }

        if (isField) {
          /*
           * TODO FIXME HACK: We should be replacing compile-time constant refs
View Full Code Here

      }
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      boolean pruned;
      if (node instanceof JField) {
        pruned = isPruned((JField) node);
      } else if (node instanceof JMethod) {
        pruned = isPruned((JMethod) node);
View Full Code Here

      flowInto(target);
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      if (node instanceof JType) {
        node = translate((JType) node);
      } else if (node instanceof JField) {
        node = translate((JField) node);
      } else if (node instanceof JMethod) {
View Full Code Here

      }
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      boolean pruned;
      if (node instanceof JField) {
        pruned = isPruned((JField) node);
      } else if (node instanceof JMethod) {
        pruned = isPruned((JMethod) node);
View Full Code Here

      JExpression arg0 = x.getArgs().get(0);
      assert arg0 instanceof JStringLiteral;
      JStringLiteral stringLiteral = (JStringLiteral) arg0;
      String stringValue = stringLiteral.getValue();

      HasName named = null;

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

      if (ref != null) {
View Full Code Here

      }
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      boolean pruned;
      if (node instanceof JField) {
        pruned = isPruned((JField) node);
      } else if (node instanceof JMethod) {
        pruned = isPruned((JMethod) node);
View Full Code Here

      flowInto(target);
    }

    @Override
    public void endVisit(JNameOf x, Context ctx) {
      HasName node = x.getNode();
      if (node instanceof JType) {
        node = translate((JType) node);
      } else if (node instanceof JField) {
        node = translate((JField) node);
      } else if (node instanceof JMethod) {
View Full Code Here

          }
          program.jsniMap.put(ident, node);
        }
        assert (node != null);
        CanBeStatic canBeStatic = (CanBeStatic) node;
        HasName hasName = (HasName) node;
        boolean isField = node instanceof JField;
        assert (isField || node instanceof JMethod);
        if (canBeStatic.isStatic() && nameRef.getQualifier() != null) {
          reportJsniError(info, x,
              "Cannot make a qualified reference to the static "
                  + (isField ? "field " : "method ") + hasName.getName());
        } else if (!canBeStatic.isStatic() && nameRef.getQualifier() == null) {
          reportJsniError(info, x,
              "Cannot make an unqualified reference to the instance "
                  + (isField ? "field " : "method ") + hasName.getName());
        }

        if (isField) {
          /*
           * TODO FIXME HACK: We should be replacing compile-time constant refs
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.ast.HasName

Copyright © 2018 www.massapicom. 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.