| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: whether the retyping can be done without motion or reformattingthe type of a stacked value src, Class<?> the type by which we'd like to treat it dst, boolean if false, we treat any interface as if it were Object keepInterfaces)True if a value can be stacked as the source type and unstacked as the destination type, without violating the JVM's type consistency. |
| public static boolean | Returns: whether the retyping can be done without motion or reformattingthe type of call being made call, MethodType the type of the method handle receiving the call recv, boolean keepInterfaces)True if a method handle can receive a call under a slightly different method type, without moving or reformatting any stack elements. |
| public static boolean |
| VerifyType | back to summary |
|---|---|
| private VerifyType() | |
| isNullConversion | back to summary |
|---|---|
| public static boolean isNullConversion(Class<?> src, Class<?> dst, boolean keepInterfaces) True if a value can be stacked as the source type and unstacked as the destination type, without violating the JVM's type consistency. If both types are references, we apply the verifier's subclass check (or subtyping, if keepInterfaces). If the src type is a type guaranteed to be null (Void) it can be converted to any other reference type. If both types are primitives, we apply the verifier's primitive conversions. These do not include Java conversions such as long to double, since those require computation and (in general) stack depth changes. But very simple 32-bit viewing changes, such as byte to int, are null conversions, because they do not require any computation. These conversions are from any type to a wider type up to 32 bits, as long as the conversion is not signed to unsigned (byte to char). The primitive type 'void' does not interconvert with any other type, even though it is legal to drop any type from the stack and "return void". The stack effects, though are different between void and any other type, so it is safer to report a non-trivial conversion. | |
| isNullConversion | back to summary |
|---|---|
| public static boolean isNullConversion(MethodType call, MethodType recv, boolean keepInterfaces) True if a method handle can receive a call under a slightly different method type, without moving or reformatting any stack elements.
| |
| isNullType | back to summary |
|---|---|
| public static boolean isNullType(Class<?> type) Is the given type java.lang.Null or an equivalent null-only type? | |