register(Class).
The transformer supports some debugging tools, enabled through JVM system properties:
org.lwjgl.util.mapped.PrintTiming=true, prints timing information for the transformation step.
org.lwjgl.util.mapped.PrintActivity=true, prints activity information.
org.lwjgl.util.mapped.PrintBytecode=true, prints the transformed bytecode.
org.lwjgl.util.Debug must also be set to true for the above to work.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final Map | |
| pack-priv static final Map | |
| pack-priv static boolean | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final Map | |
| pack-priv static final boolean | |
| pack-priv static final boolean | |
| pack-priv static final boolean | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static InsnList | |
| private static InsnList | generateByteBufferInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer.
|
| private static InsnList | |
| private static InsnList | |
| private static InsnList | |
| private static InsnList | generateFieldInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer.
|
| private static InsnList | generateMapInstructions(final MappedObjectTransformer.
|
| private static InsnList | |
| private static InsnList | |
| private static InsnList | generateSIZEOFInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer.
|
| private static InsnList | |
| private static InsnList | generateViewInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer.
|
| private static void | |
| pack-priv static AbstractInsnNode | |
| private static ClassAdapter | |
| pack-priv static String | |
| pack-priv static String | |
| pack-priv static String | |
| private static void | |
| public static void | register(Class<? extends MappedObject>
the mapped object class. type)Registers a class as a mapped object. |
| private static MappedObjectTransformer. | registerField(final boolean autoGenerateOffsets, final String className, long advancingOffset, final Field field)
|
| pack-priv static int | replace(final InsnList instructions, final int i, final AbstractInsnNode location, final InsnList list)
Replace an instruction with a list of instructions. |
| pack-priv static String | |
| private static void | |
| pack-priv static int | transformArrayAccess(final InsnList instructions, int i, final Map<AbstractInsnNode, Frame> frameMap, final VarInsnNode loadInsn, final MappedObjectTransformer.
|
| pack-priv static InsnList | |
| pack-priv static byte[] | |
| pack-priv static byte[] | transformMappedObject(byte[] bytecode)
Removes final from methods that will be overriden by subclasses. |
| pack-priv static int | transformMethodCall(final InsnList instructions, int i, final Map<AbstractInsnNode, Frame> frameMap, final MethodInsnNode methodInsn, final MappedObjectTransformer.
|
| pack-priv static void |
| ALIGN_METHOD_NAME | back to summary |
|---|---|
| pack-priv static final String ALIGN_METHOD_NAME | |
| CACHE_LINE_PAD_JVM | back to summary |
|---|---|
| pack-priv static final String CACHE_LINE_PAD_JVM | |
| CAPACITY_METHOD_NAME | back to summary |
|---|---|
| pack-priv static final String CAPACITY_METHOD_NAME | |
| className_to_subtype | back to summary |
|---|---|
| pack-priv static final Map<String, MappedObjectTransformer. | |
| INSNTYPE_TO_NAME | back to summary |
|---|---|
| pack-priv static final Map<Integer, String> INSNTYPE_TO_NAME | |
| is_currently_computing_frames | back to summary |
|---|---|
| pack-priv static boolean is_currently_computing_frames | |
| MAPPED_HELPER_JVM | back to summary |
|---|---|
| pack-priv static final String MAPPED_HELPER_JVM | |
| MAPPED_OBJECT_JVM | back to summary |
|---|---|
| pack-priv static final String MAPPED_OBJECT_JVM | |
| MAPPED_SET2_JVM | back to summary |
|---|---|
| pack-priv static final String MAPPED_SET2_JVM | |
| MAPPED_SET3_JVM | back to summary |
|---|---|
| pack-priv static final String MAPPED_SET3_JVM | |
| MAPPED_SET4_JVM | back to summary |
|---|---|
| pack-priv static final String MAPPED_SET4_JVM | |
| MAPPEDSET_PREFIX | back to summary |
|---|---|
| pack-priv static final String MAPPEDSET_PREFIX | |
| NEXT_METHOD_NAME | back to summary |
|---|---|
| pack-priv static final String NEXT_METHOD_NAME | |
| OPCODE_TO_NAME | back to summary |
|---|---|
| pack-priv static final Map<Integer, String> OPCODE_TO_NAME | |
| PRINT_ACTIVITY | back to summary |
|---|---|
| pack-priv static final boolean PRINT_ACTIVITY | |
| PRINT_BYTECODE | back to summary |
|---|---|
| pack-priv static final boolean PRINT_BYTECODE | |
| PRINT_TIMING | back to summary |
|---|---|
| pack-priv static final boolean PRINT_TIMING | |
| SIZEOF_METHOD_NAME | back to summary |
|---|---|
| pack-priv static final String SIZEOF_METHOD_NAME | |
| VIEW_CONSTRUCTOR_NAME | back to summary |
|---|---|
| pack-priv static final String VIEW_CONSTRUCTOR_NAME | |
| VIEWADDRESS_METHOD_NAME | back to summary |
|---|---|
| pack-priv static final String VIEWADDRESS_METHOD_NAME | |
| MappedObjectTransformer | back to summary |
|---|---|
| public MappedObjectTransformer() | |
| checkInsnAfterIsArray | back to summary |
|---|---|
| private static void checkInsnAfterIsArray(final AbstractInsnNode instruction, final int opcode) | |
| generateAddressInstructions | back to summary |
|---|---|
| private static InsnList generateAddressInstructions(final FieldInsnNode fieldInsn) | |
| generateByteBufferInstructions | back to summary |
|---|---|
| private static InsnList generateByteBufferInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer. | |
| generateCopyRangeInstructions | back to summary |
|---|---|
| private static InsnList generateCopyRangeInstructions(final MappedObjectTransformer. | |
| generateCopyToInstructions | back to summary |
|---|---|
| private static InsnList generateCopyToInstructions(final MappedObjectTransformer. | |
| generateDupInstructions | back to summary |
|---|---|
| private static InsnList generateDupInstructions(final MethodInsnNode methodInsn) | |
| generateFieldInstructions | back to summary |
|---|---|
| private static InsnList generateFieldInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer. | |
| generateMapInstructions | back to summary |
|---|---|
| private static InsnList generateMapInstructions(final MappedObjectTransformer. | |
| generateRunViewConstructorInstructions | back to summary |
|---|---|
| private static InsnList generateRunViewConstructorInstructions(final MethodInsnNode methodInsn) | |
| generateSetViewInstructions | back to summary |
|---|---|
| private static InsnList generateSetViewInstructions(final FieldInsnNode fieldInsn) | |
| generateSIZEOFInstructions | back to summary |
|---|---|
| private static InsnList generateSIZEOFInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer. | |
| generateSliceInstructions | back to summary |
|---|---|
| private static InsnList generateSliceInstructions(final MethodInsnNode methodInsn) | |
| generateViewInstructions | back to summary |
|---|---|
| private static InsnList generateViewInstructions(final FieldInsnNode fieldInsn, final MappedObjectTransformer. | |
| getClassEnums | back to summary |
|---|---|
| private static void getClassEnums(final Class<T> clazz, final Map<Integer, String> map, final String... prefixFilters) | |
| getIntNode | back to summary |
|---|---|
| pack-priv static AbstractInsnNode getIntNode(final int value) | |
| getMethodGenAdapter | back to summary |
|---|---|
| private static ClassAdapter getMethodGenAdapter(final String className, final ClassVisitor cv) | |
| getOpcodeName | back to summary |
|---|---|
| pack-priv static String getOpcodeName(final AbstractInsnNode insn) | |
| getterName | back to summary |
|---|---|
| pack-priv static String getterName(final String fieldName) | |
| jvmClassName | back to summary |
|---|---|
| pack-priv static String jvmClassName(Class<?> type) | |
| printBytecode | back to summary |
|---|---|
| private static void printBytecode(byte[] bytecode) | |
| register | back to summary |
|---|---|
| public static void register(Class<? extends MappedObject> type) Registers a class as a mapped object.
The class must extend
| |
| registerField | back to summary |
|---|---|
| private static MappedObjectTransformer. | |
| replace | back to summary |
|---|---|
| pack-priv static int replace(final InsnList instructions, final int i, final AbstractInsnNode location, final InsnList list) Replace an instruction with a list of instructions. | |
| setterName | back to summary |
|---|---|
| pack-priv static String setterName(final String fieldName) | |
| throwAccessErrorOnReadOnlyField | back to summary |
|---|---|
| private static void throwAccessErrorOnReadOnlyField(String className, String fieldName) | |
| transformArrayAccess | back to summary |
|---|---|
| pack-priv static int transformArrayAccess(final InsnList instructions, int i, final Map<AbstractInsnNode, Frame> frameMap, final VarInsnNode loadInsn, final MappedObjectTransformer. | |
| transformFieldAccess | back to summary |
|---|---|
| pack-priv static InsnList transformFieldAccess(final FieldInsnNode fieldInsn) | |
| transformMappedAPI | back to summary |
|---|---|
| pack-priv static byte[] transformMappedAPI(final String className, byte[] bytecode) | |
| transformMappedObject | back to summary |
|---|---|
| pack-priv static byte[] transformMappedObject(byte[] bytecode) Removes final from methods that will be overriden by subclasses. | |
| transformMethodCall | back to summary |
|---|---|
| pack-priv static int transformMethodCall(final InsnList instructions, int i, final Map<AbstractInsnNode, Frame> frameMap, final MethodInsnNode methodInsn, final MappedObjectTransformer. | |
| visitIntNode | back to summary |
|---|---|
| pack-priv static void visitIntNode(final MethodVisitor mv, final int value) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final long | |
| pack-priv final long | |
| pack-priv final long | |
| pack-priv final Type |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String |
| isPointer | back to summary |
|---|---|
| pack-priv final boolean isPointer | |
| isVolatile | back to summary |
|---|---|
| pack-priv final boolean isVolatile | |
| length | back to summary |
|---|---|
| pack-priv final long length | |
| lengthPadded | back to summary |
|---|---|
| pack-priv final long lengthPadded | |
| offset | back to summary |
|---|---|
| pack-priv final long offset | |
| type | back to summary |
|---|---|
| pack-priv final Type type | |
| FieldInfo | back to summary |
|---|---|
| pack-priv FieldInfo(final long offset, final long length, final long lengthPadded, final Type type, final boolean isVolatile, final boolean isPointer) | |
| getAccessType | back to summary |
|---|---|
| pack-priv String getAccessType() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final boolean | |
| pack-priv final String | |
| pack-priv final Map | |
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | MappedSubtypeInfo(String className, Map<String, MappedObjectTransformer.
|
| Modifier and Type | Method and Description |
|---|---|
| private static int |
| align | back to summary |
|---|---|
| pack-priv final int align | |
| cacheLinePadded | back to summary |
|---|---|
| pack-priv final boolean cacheLinePadded | |
| className | back to summary |
|---|---|
| pack-priv final String className | |
| fields | back to summary |
|---|---|
| pack-priv final Map<String, MappedObjectTransformer. | |
| padding | back to summary |
|---|---|
| pack-priv final int padding | |
| sizeof | back to summary |
|---|---|
| pack-priv final int sizeof | |
| sizeof_shift | back to summary |
|---|---|
| pack-priv final int sizeof_shift | |
| MappedSubtypeInfo | back to summary |
|---|---|
| pack-priv MappedSubtypeInfo(String className, Map<String, MappedObjectTransformer. | |
| getPoT | back to summary |
|---|---|
| private static int getPoT(int value) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public FieldVisitor | visitField(final int
the field's access flags (see access, final String Opcodes). This
parameter also indicates if the field is synthetic and/or
deprecated.the field's name. name, final String the field's descriptor (see desc, final String Type).the field's signature. May be null if the
field's type does not use generic types. signature, final Object the field's initial value. This parameter, which may be
null if the field does not have an initial value, must
be an value)Integer, a Float, a Long, a
Double or a String (for int,
float, long or String fields
respectively). This parameter is only used for static fields.
Its value is ignored for non static fields, which must be
initialized through bytecode instructions in constructors or
methods.Overrides org. Implements org. |
| public MethodVisitor | visitMethod(final int
the method's access flags (see access, String Opcodes). This
parameter also indicates if the method is synthetic and/or
deprecated.the method's name. name, final String the method's descriptor (see desc, final String Type).the method's signature. May be null if the
method parameters, return type and exceptions do not use generic
types. signature, final String[] the internal names of the method's exception classes
(see exceptions)getInternalName). May be
null.Overrides org. Implements org. |
| className | back to summary |
|---|---|
| pack-priv final String className | |
| transformed | back to summary |
|---|---|
| pack-priv boolean transformed | |
| TransformationAdapter | back to summary |
|---|---|
| pack-priv TransformationAdapter(final ClassVisitor cv, final String className) | |
| visitField | back to summary |
|---|---|
| public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) Overrides org. Implements org. Doc from org. Visits a field of the class.
| |
| visitMethod | back to summary |
|---|---|
| public MethodVisitor visitMethod(final int access, String name, final String desc, final String signature, final String[] exceptions) Overrides org. Implements org. Doc from org. Visits a method of the class. This method must return a new
| |