No description
Find a file
2023-07-29 00:30:41 +02:00
.github/workflows Create maven-publish.yml 2023-07-26 17:41:06 +02:00
.mvn/wrapper first commit, humble beginnings 2023-07-21 17:52:35 +02:00
src added support for method arguments (maybe incomplete, should add tests with arrays) 2023-07-29 00:30:41 +02:00
.gitignore first commit, humble beginnings 2023-07-21 17:52:35 +02:00
LICENSE Initial commit 2023-07-21 17:50:03 +02:00
mvnw first commit, humble beginnings 2023-07-21 17:52:35 +02:00
mvnw.cmd first commit, humble beginnings 2023-07-21 17:52:35 +02:00
pom.xml renamed stuff and added generic reflection WIP 2023-07-27 14:22:09 +02:00
README.md invocation (not yet with arguments) 2023-07-28 18:21:35 +02:00

reflective

Utility classes that use ASM for generating metaclasses as if it were standard java reflection, but without the performance overhead.

nl.sander.reflective.compare.Compare

  • universal (deep) compare tool
  • compares [apple] to [orange] recursively and shows the diff
  • compiles to bytecode version jdk11
  • but also handles records, if you run jdk16+
  • Can optionally do 'structural comparison' (as opposed to nominal like in the respective types of polymorphism). Let's say you have class Apple with property color and a class Orange, also with property color. Compare provides any method with which you can compare the values disregarding the type that contains them.

nl.sander.reflective.tomap.ToMap

  • turn any bean/record into a Map<String, Object>

Now working on capabilities that mimick java.lang.reflect

  • not going to create something like setAccessible(true), since that's likely impossible without jdk support, and probably not wanted either
  • I do plan to substitute java.lang.reflect.Array, because of it's VERY poor performance
  • a read model for methods, fields etc
  • invocation capabilities