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

CstShort

public final class CstShort extends CstLiteral32
Constants of type {@code short}.

Fields Summary
public static final CstShort
VALUE_0
{@code non-null;} the value {@code 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 {@code short} value

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

        return Type.SHORT;
    
public shortgetValue()
Gets the {@code short} value.

return
the value

        return (short) getIntBits();
    
public static com.android.dexgen.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 {@code short} value
return
{@code non-null;} the appropriate instance


                                      
         
        return new CstShort(value);
    
public static com.android.dexgen.rop.cst.CstShortmake(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 short}
return
{@code 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";