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

CstFloat

public final class CstFloat extends CstLiteral32
Constants of type {@code CONSTANT_Float_info}.

Fields Summary
public static final CstFloat
VALUE_0
{@code non-null;} instance representing {@code 0}
public static final CstFloat
VALUE_1
{@code non-null;} instance representing {@code 1}
public static final CstFloat
VALUE_2
{@code non-null;} instance representing {@code 2}
Constructors Summary
private CstFloat(int bits)
Constructs an instance. This constructor is private; use {@link #make}.

param
bits the {@code float} value as {@code int} bits

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

        return Type.FLOAT;
    
public floatgetValue()
Gets the {@code float} value.

return
the value

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

param
bits the {@code float} value as {@code int} bits


                                    
         
        /*
         * Note: Javadoc notwithstanding, this implementation always
         * allocates.
         */
        return new CstFloat(bits);
    
public java.lang.StringtoHuman()
{@inheritDoc}

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

        int bits = getIntBits();
        return "float{0x" + Hex.u4(bits) + " / " +
            Float.intBitsToFloat(bits) + '}";
    
public java.lang.StringtypeName()
{@inheritDoc}

        return "float";