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

CstShort

public final class CstShort extends CstLiteral32
Constants of type short.

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

param
value the short value

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

        return Type.SHORT;
    
public shortgetValue()
Gets the short value.

return
the value

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

param
value the short value
return
non-null; the appropriate instance


                                     
         
        return new CstShort(value);
    
public static com.android.dx.rop.cst.CstShortmake(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 short
return
non-null; the appropriate instance

        short cast = (short) value;

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

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

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

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

        return "short";