reflectasm
reflectasm copied to clipboard
High performance Java reflection
the jdk11+ has remove sun.misc.Unsafe.defineClass method, the useage of defineClass is broken. ```accessClass = UnsafeHolder.theUnsafe.defineClass(accessClassName, bytes, 0, bytes.length, loader,```
When using MethodAccess.get(Class type), I found that it can't find the default methods in interface("type" is not interface but implements an interface which have many default methods in it).
Scala 3 changed the implementation of lazy vals. Classes containing a lazy val end up with a field called `0bitmap$1`: ``` Compiled from "Test.scala" public class Test implements scala.Product,java.io.Serializable {...
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.esotericsoftware.reflectasm.AccessClassLoader (file:/C:/Users/Сергей/.m2/repository/com/esotericsoftware/reflectasm/1.11.7/reflectasm-1.11.7.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.reflectasm.AccessClassLoader WARNING: Use...
I'm facing a problem where I'm not able to get any method names (and indices) through the following code: ```MethodAccess.get(java.lang.Object.class)``` Using `getMethodNames()` will return an empty array.
Bumps [junit](https://github.com/junit-team/junit4) from 4.8.2 to 4.13.1. Release notes Sourced from junit's releases. JUnit 4.13.1 Please refer to the release notes for details. JUnit 4.13 Please refer to the release notes...
add newInstance0() to support for multi-argument constructors usage: ``` Constructor constructor = SomeClass.class.getConstructor(String.class); ConstructorAccess access = ConstructorAccess.get(SomeClass.class, constructor); assertEquals(new SomeClass("coo), access.newInstance0("coo")); ``` bytecode: ``` public Object newInstance0(Object[] var1) { return...
I find when the Class contains more than 150 fields, and use MethodAccess.invoke to run the method, it would take a lot of physical memory, those memory is outside the...
Verify compatibility of reflectasm with newer jdks. Jdk 9+ requires to change the source/target version from 1.5 to 1.6. I've not verified this locally, let's use travis for validation.
Added field access by sun.misc.Unsafe.