Package com.google.test.metric.method

Examples of com.google.test.metric.method.Constant


  }

  @Override
  public List<Variable> apply(List<Variable> input) {
    Variable variable = input.get(0);
    return list(new Constant(variable.getName(), to));
  }
View Full Code Here


    this.clazz = clazz;
    this.name = name;
    this.params = params;
    this.isStatic = isStatic;
    this.returnType = returnType;
    this.returnValue = new Constant("?", returnType);
  }
View Full Code Here

    return block;
  }

  @Override
  public List<Variable> apply(List<Variable> input) {
    return list(new Constant("return address", JavaType.OBJECT));
  }
View Full Code Here

    return block;
  }

  @Override
  public List<Variable> apply(List<Variable> input) {
    return list(new Constant("return address", Type.OBJECT));
  }
View Full Code Here

  @Override
  public List<Variable> apply(List<Variable> input) {
    if (!input.get(0).getType().isObject()) {
      throw new IllegalStateException();
    }
    return list(new Constant("?", type));
  }
View Full Code Here

      assertEquals(error, expected[i], actual.get(i));
    }
  }

  private Variable var(Object value) {
    return new Constant(value, Type.fromClass(value.getClass()));
  }
View Full Code Here

        .fromJava(desc);
    recorder.add(new Runnable() {
      public void run() {
        switch (opcode) {
          case Opcodes.NEW :
            Constant constant = new Constant("new", type);
            block.addOp(new Load(lineNumber, constant));
            break;
          case Opcodes.NEWARRAY :
          case Opcodes.ANEWARRAY :
            block.addOp(new Transform(lineNumber, "newarray", Type.INT, null,
View Full Code Here

  }

  public void visitLdcInsn(final Object cst) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Load(lineNumber, new Constant(cst, Type.fromClass(cst
            .getClass()))));
      }
    });
  }
View Full Code Here

  public void visitInsn(final int opcode) {
    switch (opcode) {
      case Opcodes.ACONST_NULL :
        recorder.add(new Runnable() {
          public void run() {
            block.addOp(new Load(lineNumber, new Constant(null, Type.OBJECT)));
          }
        });
        break;
      case Opcodes.ICONST_M1 :
      case Opcodes.ICONST_0 :
View Full Code Here

  }

  private void loadConstant(final int constant, final Type type) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Load(lineNumber, new Constant(constant, type)));
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.method.Constant

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.