Methods Summary |
---|
protected java.lang.String | argString(){@inheritDoc}
return constant.toHuman();
|
public int | getClassIndex()Gets the constant's class index. It is only valid to call this after
{@link #setClassIndex} has been called.
if (classIndex < 0) {
throw new RuntimeException("class index not yet set");
}
return classIndex;
|
public com.android.dexgen.rop.cst.Constant | getConstant()Gets the constant argument.
return constant;
|
public int | getIndex()Gets the constant's index. It is only valid to call this after
{@link #setIndex} has been called.
if (index < 0) {
throw new RuntimeException("index not yet set for " + constant);
}
return index;
|
public boolean | hasClassIndex()Returns whether the constant's class index has been set for this
instance.
return (classIndex >= 0);
|
public boolean | hasIndex()Returns whether the constant's index has been set for this instance.
return (index >= 0);
|
public void | setClassIndex(int index)Sets the constant's class index. This is the constant pool index
for the class referred to by this instance's constant. Only
reference constants have a class, so it is only on instances
with reference constants that this method should ever be
called. It is only valid to call this method once per instance.
if (index < 0) {
throw new IllegalArgumentException("index < 0");
}
if (this.classIndex >= 0) {
throw new RuntimeException("class index already set");
}
this.classIndex = index;
|
public void | setIndex(int index)Sets the constant's index. It is only valid to call this method once
per instance.
if (index < 0) {
throw new IllegalArgumentException("index < 0");
}
if (this.index >= 0) {
throw new RuntimeException("index already set");
}
this.index = index;
|
public DalvInsn | withOpcode(Dop opcode){@inheritDoc}
CstInsn result =
new CstInsn(opcode, getPosition(), getRegisters(), constant);
if (index >= 0) {
result.setIndex(index);
}
if (classIndex >= 0) {
result.setClassIndex(classIndex);
}
return result;
|
public DalvInsn | withRegisters(com.android.dexgen.rop.code.RegisterSpecList registers){@inheritDoc}
CstInsn result =
new CstInsn(getOpcode(), getPosition(), registers, constant);
if (index >= 0) {
result.setIndex(index);
}
if (classIndex >= 0) {
result.setClassIndex(classIndex);
}
return result;
|