FileDocCategorySizeDatePackage
CstByte.javaAPI DocAndroid 5.1 API2640Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.rop.cst

CstByte

public final class CstByte extends CstLiteral32
Constants of type {@code byte}.

Fields Summary
public static final CstByte
VALUE_0
{@code non-null;} the value {@code 0} as an instance of this class
Constructors Summary
private CstByte(byte value)
Constructs an instance. This constructor is private; use {@link #make}.

param
value the {@code byte} value

        super(value);
    
Methods Summary
public com.android.dexgen.rop.type.TypegetType()
{@inheritDoc}

        return Type.BYTE;
    
public bytegetValue()
Gets the {@code byte} value.

return
the value

        return (byte) getIntBits();
    
public static com.android.dexgen.rop.cst.CstBytemake(byte value)
Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.

param
value the {@code byte} value


                                
         
        return new CstByte(value);
    
public static com.android.dexgen.rop.cst.CstBytemake(int value)
Makes an instance for the given {@code int} value. This may (but does not necessarily) return an already-allocated instance.

param
value the value, which must be in range for a {@code byte}
return
{@code non-null;} the appropriate instance

        byte cast = (byte) value;

        if (cast != value) {
            throw new IllegalArgumentException("bogus byte value: " +
                    value);
        }

        return make(cast);
    
public java.lang.StringtoHuman()
{@inheritDoc}

        return Integer.toString(getIntBits());
    
public java.lang.StringtoString()
{@inheritDoc}

        int value = getIntBits();
        return "byte{0x" + Hex.u1(value) + " / " + value + '}";
    
public java.lang.StringtypeName()
{@inheritDoc}

        return "byte";