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

CstChar

public final class CstChar extends CstLiteral32
Constants of type char.

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

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

        return Type.CHAR;
    
public chargetValue()
Gets the char value.

return
the value

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


                                
         
        return new CstChar(value);
    
public static com.android.dx.rop.cst.CstCharmake(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 char
return
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";