| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ClassDesc | |
| private final char | |
| private final String | |
| public static final Wrapper | |
| public static final Wrapper | |
| public static final Wrapper | |
| public static final int | |
| public static final Wrapper | |
| private static final Object | |
| private final Object | |
| public static final Wrapper | |
| private static final Object | |
| private final int | |
| private static final Wrapper[] | |
| public static final Wrapper | |
| public static final Wrapper | |
| private final int | |
| public static final Wrapper | |
| private final String | |
| private final Class | |
| public static final Wrapper | |
| private final int | |
| public static final Wrapper | |
| private final ClassDesc | |
| private final String | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public static <T> Class | asPrimitiveType(Class<T> type)
If |
| public static <T> Class | asWrapperType(Class<T> type)
If |
| public ClassDesc | |
| public static char | |
| public char | |
| private static RuntimeException | |
| public String | |
| public int | |
| private static boolean | |
| public <T> T | |
| private static boolean | |
| public <T> T | |
| private <T> T | |
| public void | |
| public void | |
| public String | |
| pack-priv static Wrapper | |
| public static Wrapper | forBasicType(char type)
Return the wrapper that corresponds to the given bytecode signature character. |
| public static Wrapper | forBasicType(Class<?> type)
Return the wrapper for the given type, if it is
a primitive type, else return |
| pack-priv static <T> Class | |
| public static Wrapper | |
| public static Wrapper | |
| public boolean | isConvertibleFrom(Wrapper source)
Does the JLS 5.1.2 allow a variable of this wrapper's primitive type to be assigned from a value of the given wrapper's primitive type? |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static boolean | isWrapperNumericOrBooleanType(Class<?> type)
Query: Is the given type a wrapper, such as |
| public static boolean | |
| public Object | |
| private static ClassCastException | |
| private static RuntimeException | |
| private static RuntimeException | |
| private static Number | |
| public String | |
| public Class | |
| public int | |
| public static Wrapper | |
| public static Wrapper[] | |
| public Object | |
| public Object | |
| public ClassDesc | |
| public String | |
| public Class | |
| public <T> Class | |
| private static RuntimeException | |
| public Object | |
| public <T> T |
| basicClassDesc | back to summary |
|---|---|
| private final ClassDesc basicClassDesc | |
| basicTypeChar | back to summary |
|---|---|
| private final char basicTypeChar | |
| basicTypeString | back to summary |
|---|---|
| private final String basicTypeString | |
| BOOLEAN | back to summary |
|---|---|
| public static final Wrapper BOOLEAN | |
| BYTE | back to summary |
|---|---|
| public static final Wrapper BYTE | |
| CHAR | back to summary |
|---|---|
| public static final Wrapper CHAR | |
| COUNT | back to summary |
|---|---|
| public static final int COUNT | |
| DOUBLE | back to summary |
|---|---|
| public static final Wrapper DOUBLE | |
| DOUBLE_ZERO | back to summary |
|---|---|
| private static final Object DOUBLE_ZERO | |
| emptyArray | back to summary |
|---|---|
| private final Object emptyArray | |
| FLOAT | back to summary |
|---|---|
| public static final Wrapper FLOAT | |
| FLOAT_ZERO | back to summary |
|---|---|
| private static final Object FLOAT_ZERO | |
| format | back to summary |
|---|---|
| private final int format | |
| FROM_CHAR | back to summary |
|---|---|
| private static final Wrapper[] FROM_CHAR | |
| INT | back to summary |
|---|---|
| public static final Wrapper INT | |
| LONG | back to summary |
|---|---|
| public static final Wrapper LONG | |
| numericClass | back to summary |
|---|---|
| private final int numericClass | |
| OBJECT | back to summary |
|---|---|
| public static final Wrapper OBJECT | |
| primitiveSimpleName | back to summary |
|---|---|
| private final String primitiveSimpleName | |
| primitiveType | back to summary |
|---|---|
| private final Class<?> primitiveType | |
| SHORT | back to summary |
|---|---|
| public static final Wrapper SHORT | |
| superClasses | back to summary |
|---|---|
| private final int superClasses | |
| VOID | back to summary |
|---|---|
| public static final Wrapper VOID | |
| wrapperClassDesc | back to summary |
|---|---|
| private final ClassDesc wrapperClassDesc | |
| wrapperSimpleName | back to summary |
|---|---|
| private final String wrapperSimpleName | |
| wrapperType | back to summary |
|---|---|
| private final Class<?> wrapperType | |
| Wrapper | back to summary |
|---|---|
| private Wrapper(Class<?> wtype, String wtypeName, Class<?> ptype, String ptypeName, char tchar, Object emptyArray, int format, int numericClass, int superClasses, ClassDesc basicClassDesc, ClassDesc wrapperClassDesc) | |
| arrayType | back to summary |
|---|---|
| public Class | |
| asPrimitiveType | back to summary |
|---|---|
| public static <T> Class If | |
| asWrapperType | back to summary |
|---|---|
| public static <T> Class If | |
| basicClassDescriptor | back to summary |
|---|---|
| public ClassDesc basicClassDescriptor() A nominal descriptor of the wrapped type | |
| basicTypeChar | back to summary |
|---|---|
| public static char basicTypeChar(Class<?> type) What is the bytecode signature character for this type? All non-primitives, including array types, report as 'L', the signature character for references. | |
| basicTypeChar | back to summary |
|---|---|
| public char basicTypeChar() What is the bytecode signature character for this wrapper's primitive type? | |
| basicTypeError | back to summary |
|---|---|
private static RuntimeException basicTypeError(char type)
| |
| basicTypeString | back to summary |
|---|---|
| public String basicTypeString() What is the bytecode signature string for this wrapper's primitive type? | |
| bitWidth | back to summary |
|---|---|
| public int bitWidth() How many bits are in the wrapped value? Returns 0 for OBJECT or VOID. | |
| boolValue | back to summary |
|---|---|
| private static boolean boolValue(byte bits) | |
| cast | back to summary |
|---|---|
| public <T> T cast(Object x, Class<T> type) Cast a wrapped value to the given type, which may be either a primitive or wrapper type.
The given target type must be this wrapper's primitive or wrapper type.
If this wrapper is OBJECT, the target type may also be an interface, perform no runtime check.
Performs standard primitive conversions, including truncation and float conversions.
The given type must be compatible with this wrapper. That is, it must either
be the wrapper type (or a subtype, in the case of
| |
| checkConvertibleFrom | back to summary |
|---|---|
| private static boolean checkConvertibleFrom() | |
| convert | back to summary |
|---|---|
| public <T> T convert(Object x, Class<T> type) Convert a wrapped value to the given type.
The given target type must be this wrapper's primitive or wrapper type.
This is equivalent to | |
| convert | back to summary |
|---|---|
| private <T> T convert(Object x, Class<T> type, boolean isCast) | |
| copyArrayBoxing | back to summary |
|---|---|
| public void copyArrayBoxing(Object a, int apos, Object[] values, int vpos, int length) | |
| copyArrayUnboxing | back to summary |
|---|---|
| public void copyArrayUnboxing(Object[] values, int vpos, Object a, int apos, int length) | |
| detailString | back to summary |
|---|---|
| public String detailString() For debugging, give the details of this wrapper. | |
| findWrapperType | back to summary |
|---|---|
| pack-priv static Wrapper findWrapperType(Class<?> type) | |
| forBasicType | back to summary |
|---|---|
| public static Wrapper forBasicType(char type) Return the wrapper that corresponds to the given bytecode
signature character. Return
| |
| forBasicType | back to summary |
|---|---|
| public static Wrapper forBasicType(Class<?> type) Return the wrapper for the given type, if it is
a primitive type, else return | |
| forceType | back to summary |
|---|---|
| pack-priv static <T> Class Cast a reference type to another reference type. If the target type is an interface, perform no runtime check. (This loophole is safe, and is allowed by the JVM verifier.) If the target type is a primitive, change it to a wrapper. | |
| forPrimitiveType | back to summary |
|---|---|
| public static Wrapper forPrimitiveType(Class<?> type) Return the wrapper that wraps values of the given type.
The type may be
| |
| forWrapperType | back to summary |
|---|---|
| public static Wrapper forWrapperType(Class<?> type) Return the wrapper that wraps values into the given wrapper type.
If it is
| |
| isConvertibleFrom | back to summary |
|---|---|
| public boolean isConvertibleFrom(Wrapper source) Does the JLS 5.1.2 allow a variable of this wrapper's primitive type to be assigned from a value of the given wrapper's primitive type? Cases:
| |
| isDoubleWord | back to summary |
|---|---|
| public boolean isDoubleWord() Does the wrapped value occupy two JVM stack slots? | |
| isFloating | back to summary |
|---|---|
| public boolean isFloating() Is the wrapped type either float or double? | |
| isIntegral | back to summary |
|---|---|
| public boolean isIntegral() Is the wrapped type a primitive other than float, double, or void? | |
| isNumeric | back to summary |
|---|---|
| public boolean isNumeric() Is the wrapped type numeric (not void or object)? | |
| isOther | back to summary |
|---|---|
| public boolean isOther() Is the wrapped type either void or a reference? | |
| isPrimitiveType | back to summary |
|---|---|
| public static boolean isPrimitiveType(Class<?> type) Query: Is the given type a primitive, such as | |
| isSigned | back to summary |
|---|---|
| public boolean isSigned() | |
| isSingleWord | back to summary |
|---|---|
| public boolean isSingleWord() Does the wrapped value occupy a single JVM stack slot? | |
| isStrictSubRangeOf | back to summary |
|---|---|
| public boolean isStrictSubRangeOf(Wrapper target) | |
| isSubwordOrInt | back to summary |
|---|---|
| public boolean isSubwordOrInt() Is the wrapped type one of int, boolean, byte, char, or short? | |
| isUnsigned | back to summary |
|---|---|
| public boolean isUnsigned() | |
| isWrapperNumericOrBooleanType | back to summary |
|---|---|
| public static boolean isWrapperNumericOrBooleanType(Class<?> type) Query: Is the given type a wrapper, such as | |
| isWrapperType | back to summary |
|---|---|
| public static boolean isWrapperType(Class<?> type) Query: Is the given type a wrapper, such as | |
| makeArray | back to summary |
|---|---|
| public Object makeArray(int len) | |
| newClassCastException | back to summary |
|---|---|
| private static ClassCastException newClassCastException(Class<?> actual, Class<?> expected) | |
| newIllegalArgumentException | back to summary |
|---|---|
| private static RuntimeException newIllegalArgumentException(String message, Object x) | |
| newIllegalArgumentException | back to summary |
|---|---|
| private static RuntimeException newIllegalArgumentException(String message) | |
| numberValue | back to summary |
|---|---|
| private static Number numberValue(Object x) | |
| primitiveSimpleName | back to summary |
|---|---|
| public String primitiveSimpleName() What is the simple name of the primitive type? | |
| primitiveType | back to summary |
|---|---|
| public Class What is the primitive type wrapped by this wrapper? | |
| stackSlots | back to summary |
|---|---|
| public int stackSlots() How many JVM stack slots occupied by the wrapped value? Returns 0 for VOID. | |
| valueOf | back to summary |
|---|---|
| public static Wrapper valueOf(String name) | |
| values | back to summary |
|---|---|
| public static Wrapper[] values() | |
| wrap | back to summary |
|---|---|
| public Object wrap(Object x) Wrap a value in this wrapper's type.
Performs standard primitive conversions, including truncation and float conversions.
Performs returns the unchanged reference for
| |
| wrap | back to summary |
|---|---|
| public Object wrap(int x) Wrap a value (an int or smaller value) in this wrapper's type.
Performs standard primitive conversions, including truncation and float conversions.
Produces an | |
| wrapperClassDescriptor | back to summary |
|---|---|
| public ClassDesc wrapperClassDescriptor() A nominal descriptor of the wrapper type | |
| wrapperSimpleName | back to summary |
|---|---|
| public String wrapperSimpleName() What is the simple name of the wrapper type? | |
| wrapperType | back to summary |
|---|---|
| public Class What is the wrapper type for this wrapper? | |
| wrapperType | back to summary |
|---|---|
| public <T> Class What is the wrapper type for this wrapper?
Otherwise, the example type must be the wrapper type,
or the corresponding primitive type.
(For | |
| wrapperTypeError | back to summary |
|---|---|
private static RuntimeException wrapperTypeError(Class<?> type)
| |
| zero | back to summary |
|---|---|
| public Object zero() Produce a zero value for the given wrapper type. This will be a numeric zero for a number or character, false for a boolean, and null for a reference or void. The common thread is that this is what is contained in a default-initialized variable of the given primitive type. (For void, it is what a reflective method returns instead of no value at all.) | |
| zero | back to summary |
|---|---|
| public <T> T zero(Class<T> type) Produce a zero value for the given wrapper type T.
The optional argument must a type compatible with this wrapper.
Equivalent to | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int |
| BOOLEAN | back to summary |
|---|---|
| pack-priv static final int BOOLEAN | |
| CHAR | back to summary |
|---|---|
| pack-priv static final int CHAR | |
| FLOAT | back to summary |
|---|---|
| pack-priv static final int FLOAT | |
| FLOATING | back to summary |
|---|---|
| pack-priv static final int FLOATING | |
| INT | back to summary |
|---|---|
| pack-priv static final int INT | |
| KIND_SHIFT | back to summary |
|---|---|
| pack-priv static final int KIND_SHIFT | |
| NUM_MASK | back to summary |
|---|---|
| pack-priv static final int NUM_MASK | |
| SHORT | back to summary |
|---|---|
| pack-priv static final int SHORT | |
| SIGNED | back to summary |
|---|---|
| pack-priv static final int SIGNED | |
| SIZE_MASK | back to summary |
|---|---|
| pack-priv static final int SIZE_MASK | |
| SIZE_SHIFT | back to summary |
|---|---|
| pack-priv static final int SIZE_SHIFT | |
| SLOT_MASK | back to summary |
|---|---|
| pack-priv static final int SLOT_MASK | |
| SLOT_SHIFT | back to summary |
|---|---|
| pack-priv static final int SLOT_SHIFT | |
| UNSIGNED | back to summary |
|---|---|
| pack-priv static final int UNSIGNED | |
| VOID | back to summary |
|---|---|
| pack-priv static final int VOID | |
| Format | back to summary |
|---|---|
| private Format() | |
| floating | back to summary |
|---|---|
| pack-priv static int floating(int size) | |
| format | back to summary |
|---|---|
| pack-priv static int format(int kind, int size, int slots) | |
| other | back to summary |
|---|---|
| pack-priv static int other(int slots) | |
| signed | back to summary |
|---|---|
| pack-priv static int signed(int size) | |
| unsigned | back to summary |
|---|---|
| pack-priv static int unsigned(int size) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| pack-priv static final int | |
| public static final int | |
| pack-priv static final int | |
| public static final int | |
| public static final int | |
| pack-priv static final int | |
| public static final int | |
| pack-priv static final int | |
| public static final int | |
| pack-priv static final int | |
| public static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public |
| BYTE_CLASS | back to summary |
|---|---|
| public static final int BYTE_CLASS | |
| BYTE_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int BYTE_SUPERCLASSES | |
| CHAR_CLASS | back to summary |
|---|---|
| public static final int CHAR_CLASS | |
| CHAR_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int CHAR_SUPERCLASSES | |
| DOUBLE_CLASS | back to summary |
|---|---|
| public static final int DOUBLE_CLASS | |
| FLOAT_CLASS | back to summary |
|---|---|
| public static final int FLOAT_CLASS | |
| FLOAT_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int FLOAT_SUPERCLASSES | |
| INT_CLASS | back to summary |
|---|---|
| public static final int INT_CLASS | |
| INT_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int INT_SUPERCLASSES | |
| LONG_CLASS | back to summary |
|---|---|
| public static final int LONG_CLASS | |
| LONG_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int LONG_SUPERCLASSES | |
| SHORT_CLASS | back to summary |
|---|---|
| public static final int SHORT_CLASS | |
| SHORT_SUPERCLASSES | back to summary |
|---|---|
| pack-priv static final int SHORT_SUPERCLASSES | |
| NumericClasses | back to summary |
|---|---|
| public NumericClasses() | |