FileDocCategorySizeDatePackage
CstByte.javaAPI DocAndroid 1.5 API2656Wed May 06 22:41:02 BST 2009com.android.dx.rop.cst

CstByte

public final class CstByte extends CstLiteral32
Constants of type byte.

Fields Summary
public static final CstByte
VALUE_0
non-null; the value 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 byte value

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

        return Type.BYTE;
    
public bytegetValue()
Gets the byte value.

return
the value

        return (byte) getIntBits();
    
public static com.android.dx.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 byte value

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

param
value the value, which must be in range for a byte
return
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";