
com.github.thorbenkuck.netcom2.auto.RecursiveHashingObjectRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of NetCom2-Auto Show documentation
Show all versions of NetCom2-Auto Show documentation
Annotation approach to reduce boilerplate code
The newest version!
package com.github.thorbenkuck.netcom2.auto;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
final class RecursiveHashingObjectRepository implements ObjectRepository {
private final Map, Object> mapping = new HashMap<>();
private T instantiate(Class type) {
Constructor>[] constructors = type.getConstructors();
for (Constructor> tmp : constructors) {
// This cast is required, because java
Constructor constructor = (Constructor) tmp;
Class>[] classes = constructor.getParameterTypes();
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy