public final class BytecodeVersion
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
V10 |
Version of the Java 10 class file format.
|
Modifier and Type | Method | Description |
---|---|---|
static byte[] |
downgradeIfNeeded(int version,
byte[] source) |
Returns given bytes of class if its major bytecode version is less that
V10 , otherwise returns copy where major version set to
Opcodes.V9 . |
static int |
get(byte[] b) |
Gets major of bytecode version number from given bytes of class.
|
static void |
set(byte[] b,
int version) |
Sets major of bytecode version in given bytes of class.
|
public static final int V10
public static int get(byte[] b)
b
- bytes of classpublic static void set(byte[] b, int version)
b
- bytes of classversion
- version of bytecode to setpublic static byte[] downgradeIfNeeded(int version, byte[] source)
V10
, otherwise returns copy where major version set to
Opcodes.V9
.version
- version of bytecodesource
- bytes of classV10
,
otherwise copy where version set to Opcodes.V9
Copyright © 2018. All rights reserved.