Lines Matching refs:constant
21 import com.android.dexgen.rop.cst.Constant;
24 * Instruction which has a single constant argument in addition
28 /** {@code non-null;} the constant argument for this instruction */
29 private final Constant constant;
32 * {@code >= -1;} the constant pool index for {@link #constant}, or
38 * {@code >= -1;} the constant pool index for the class reference in
39 * {@link #constant} if any, or {@code -1} if not yet set
45 * initially unknown ({@code -1}) as is the constant pool index.
52 * @param constant {@code non-null;} constant argument
55 RegisterSpecList registers, Constant constant) {
58 if (constant == null) {
59 throw new NullPointerException("constant == null");
62 this.constant = constant;
71 new CstInsn(opcode, getPosition(), getRegisters(), constant);
88 new CstInsn(getOpcode(), getPosition(), registers, constant);
102 * Gets the constant argument.
104 * @return {@code non-null;} the constant argument
106 public Constant getConstant() {
107 return constant;
111 * Gets the constant's index. It is only valid to call this after
114 * @return {@code >= 0;} the constant pool index
118 throw new RuntimeException("index not yet set for " + constant);
125 * Returns whether the constant's index has been set for this instance.
136 * Sets the constant's index. It is only valid to call this method once
139 * @param index {@code >= 0;} the constant pool index
154 * Gets the constant's class index. It is only valid to call this after
157 * @return {@code >= 0;} the constant's class's constant pool index
168 * Returns whether the constant's class index has been set for this
180 * Sets the constant's class index. This is the constant pool index
181 * for the class referred to by this instance's constant. Only
186 * @param index {@code >= 0;} the constant's class's constant pool index
203 return constant.toHuman();