Fields Summary |
---|
private static final CstInteger[] | cache{@code non-null;} array of cached instances |
public static final CstInteger | VALUE_M1{@code non-null;} instance representing {@code -1} |
public static final CstInteger | VALUE_0{@code non-null;} instance representing {@code 0} |
public static final CstInteger | VALUE_1{@code non-null;} instance representing {@code 1} |
public static final CstInteger | VALUE_2{@code non-null;} instance representing {@code 2} |
public static final CstInteger | VALUE_3{@code non-null;} instance representing {@code 3} |
public static final CstInteger | VALUE_4{@code non-null;} instance representing {@code 4} |
public static final CstInteger | VALUE_5{@code non-null;} instance representing {@code 5} |
Methods Summary |
---|
public com.android.dexgen.rop.type.Type | getType(){@inheritDoc}
return Type.INT;
|
public int | getValue()Gets the {@code int} value.
return getIntBits();
|
public static com.android.dexgen.rop.cst.CstInteger | make(int value)Makes an instance for the given value. This may (but does not
necessarily) return an already-allocated instance.
/*
* Note: No need to synchronize, since we don't make any sort
* of guarantee about ==, and it's okay to overwrite existing
* entries too.
*/
int idx = (value & 0x7fffffff) % cache.length;
CstInteger obj = cache[idx];
if ((obj != null) && (obj.getValue() == value)) {
return obj;
}
obj = new CstInteger(value);
cache[idx] = obj;
return obj;
|
public java.lang.String | toHuman(){@inheritDoc}
return Integer.toString(getIntBits());
|
public java.lang.String | toString(){@inheritDoc}
int value = getIntBits();
return "int{0x" + Hex.u4(value) + " / " + value + '}";
|
public java.lang.String | typeName(){@inheritDoc}
return "int";
|