Examples of JArrayLength


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

    return false;
  }

  @Override
  public boolean visit(JArrayLength x, Context ctx) {
    expression = new JArrayLength(x.getSourceInfo(), cloneExpression(x.getInstance()));
    return false;
  }
View Full Code Here

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

        JExpression expr;
        if (fieldBinding.declaringClass == null) {
          if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
            throw new InternalCompilerException("Expected [array].length.");
          }
          expr = new JArrayLength(info, instance);
        } else {
          JField field = typeMap.get(fieldBinding);
          expr = new JFieldRef(info, instance, field, curClass.type);
        }
View Full Code Here

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

          // T[] i$array = arr
          initializers.add(makeDeclaration(info, arrayVar, collection));
          // int i$index = 0
          initializers.add(makeDeclaration(info, indexVar, JIntLiteral.get(0)));
          // int i$max = i$array.length
          initializers.add(makeDeclaration(info, maxVar, new JArrayLength(info, new JLocalRef(info,
              arrayVar))));

          // i$index < i$max
          JExpression condition =
              new JBinaryOperation(info, JPrimitiveType.BOOLEAN, JBinaryOperator.LT, new JLocalRef(
View Full Code Here

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

            if (fieldBinding.declaringClass == null) {
              // probably array.length
              if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
                throw new InternalCompilerException("Expected [array].length.");
              }
              curRef = new JArrayLength(info, curRef);
            } else {
              JField field = typeMap.get(fieldBinding);
              curRef = new JFieldRef(info, curRef, field, curClass.type);
            }
            if (x.otherGenericCasts != null && x.otherGenericCasts[i] != null) {
View Full Code Here

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

        JExpression expr;
        if (fieldBinding.declaringClass == null) {
          if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
            throw new InternalCompilerException("Expected [array].length.");
          }
          expr = new JArrayLength(info, instance);
        } else {
          JField field = typeMap.get(fieldBinding);
          expr = new JFieldRef(info, instance, field, curClass.type);
        }
View Full Code Here

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

          // T[] i$array = arr
          initializers.add(makeDeclaration(info, arrayVar, collection));
          // int i$index = 0
          initializers.add(makeDeclaration(info, indexVar, JIntLiteral.get(0)));
          // int i$max = i$array.length
          initializers.add(makeDeclaration(info, maxVar, new JArrayLength(info, new JLocalRef(info,
              arrayVar))));

          // i$index < i$max
          JExpression condition =
              new JBinaryOperation(info, JPrimitiveType.BOOLEAN, JBinaryOperator.LT, new JLocalRef(
View Full Code Here

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

            if (fieldBinding.declaringClass == null) {
              // probably array.length
              if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
                throw new InternalCompilerException("Expected [array].length.");
              }
              curRef = new JArrayLength(info, curRef);
            } else {
              JField field = typeMap.get(fieldBinding);
              curRef = new JFieldRef(info, curRef, field, curClass.type);
            }
            if (x.otherGenericCasts != null && x.otherGenericCasts[i] != null) {
View Full Code Here

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

    return false;
  }

  @Override
  public boolean visit(JArrayLength x, Context ctx) {
    expression = new JArrayLength(x.getSourceInfo(), cloneExpression(
        x.getInstance()));
    return false;
  }
View Full Code Here

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

      JExpression expr;
      if (fieldBinding.declaringClass == null) {
        if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
          throw new InternalCompilerException("Expected [array].length.");
        }
        expr = new JArrayLength(info, instance);
      } else {
        JField field = (JField) typeMap.get(fieldBinding);
        expr = new JFieldRef(info, instance, field, currentClass);
      }
View Full Code Here

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

          if (fieldBinding.declaringClass == null) {
            // probably array.length
            if (!ARRAY_LENGTH_FIELD.equals(String.valueOf(fieldBinding.name))) {
              throw new InternalCompilerException("Expected [array].length.");
            }
            curRef = new JArrayLength(info, curRef);
          } else {
            JField field = (JField) typeMap.get(fieldBinding);
            curRef = new JFieldRef(info, curRef, field, currentClass);
          }
          if (x.otherGenericCasts != null && x.otherGenericCasts[i] != 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.