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

CstChar

public final class CstChar extends CstLiteral32
Constants of type {@code char}.

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

param
value the {@code char} value

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

        return Type.CHAR;
    
public chargetValue()
Gets the {@code char} value.

return
the value

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

param
value the {@code char} value


                                
         
        return new CstChar(value);
    
public static com.android.dexgen.rop.cst.CstCharmake(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 char}
return
{@code non-null;} the appropriate instance

        char cast = (char) value;

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

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

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

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

        return "char";