////
//// Source code recreated from a .class file by IntelliJ IDEA
//// (powered by FernFlower decompiler)
////
//
//package org.fedai.core.utils;
//
//import java.io.Serializable;
//import java.lang.reflect.Array;
//import java.lang.reflect.Constructor;
//import java.lang.reflect.Field;
//import java.lang.reflect.GenericArrayType;
//import java.lang.reflect.Method;
//import java.lang.reflect.ParameterizedType;
//import java.lang.reflect.Type;
//import java.lang.reflect.TypeVariable;
//import java.lang.reflect.WildcardType;
//import java.util.Arrays;
//import java.util.Collection;
//import java.util.IdentityHashMap;
//import java.util.Map;
//import java.util.StringJoiner;
//
//
//public class ResolvableType implements Serializable {
// public static final ResolvableType NONE;
// private static final ResolvableType[] EMPTY_TYPES_ARRAY;
// private static final ConcurrentReferenceHashMap<ResolvableType, ResolvableType> cache;
// private final Type type;
//
//// private final TypeProvider typeProvider;
//// private final ResolvableType.VariableResolver variableResolver;
// private final ResolvableType componentType;
//
// private final Integer hash;
//
// private Class<?> resolved;
//
// private volatile ResolvableType superType;
//
// private volatile ResolvableType[] interfaces;
//
// private volatile ResolvableType[] generics;
//
//// private ResolvableType(Type type, TypeProvider typeProvider, ResolvableType.VariableResolver variableResolver) {
//// this.type = type;
//// this.typeProvider = typeProvider;
//// this.variableResolver = variableResolver;
//// this.componentType = null;
//// this.hash = this.calculateHashCode();
//// this.resolved = null;
//// }
//
//// private ResolvableType(Type type, @Nullable TypeProvider typeProvider, @Nullable ResolvableType.VariableResolver variableResolver, @Nullable Integer hash) {
//// this.type = type;
//// this.typeProvider = typeProvider;
//// this.variableResolver = variableResolver;
//// this.componentType = null;
//// this.hash = hash;
//// this.resolved = this.resolveClass();
//// }
//
//// private ResolvableType(Type type, @Nullable TypeProvider typeProvider, @Nullable ResolvableType.VariableResolver variableResolver, @Nullable ResolvableType componentType) {
//// this.type = type;
//// this.typeProvider = typeProvider;
//// this.variableResolver = variableResolver;
//// this.componentType = componentType;
//// this.hash = null;
//// this.resolved = this.resolveClass();
//// }
//
//
// public static ResolvableType forType( Type type) {
// return forType(type, (TypeProvider)null, (ResolvableType.VariableResolver)null);
// }
//
//
// private ResolvableType( Class<?> clazz) {
// this.resolved = clazz != null ? clazz : Object.class;
// this.type = this.resolved;
//// this.typeProvider = null;
// // this.variableResolver = null;
// this.componentType = null;
// this.hash = null;
// }
//
// public Type getType() {
// return SerializableTypeWrapper.unwrap(this.type);
// }
//
//
// public Class<?> getRawClass() {
// if (this.type == this.resolved) {
// return this.resolved;
// } else {
// Type rawType = this.type;
// if (rawType instanceof ParameterizedType) {
// rawType = ((ParameterizedType)rawType).getRawType();
// }
//
// return rawType instanceof Class ? (Class)rawType : null;
// }
// }
//
//// public Object getSource() {
//// Object source = this.typeProvider != null ? this.typeProvider.getSource() : null;
//// return source != null ? source : this.type;
//// }
//
// public Class<?> toClass() {
// return this.resolve(Object.class);
// }
//
//// public boolean isInstance(@Nullable Object obj) {
//// return obj != null && this.isAssignableFrom(obj.getClass());
//// }
//
// public boolean isAssignableFrom(Class<?> other) {
// return this.isAssignableFrom(forClass(other), (Map)null);
// }
//
// public boolean isAssignableFrom(ResolvableType other) {
// return this.isAssignableFrom(other, (Map)null);
// }
//
//// private boolean isAssignableFrom(ResolvableType other, @Nullable Map<Type, Type> matchedBefore) {
//// Assert.notNull(other, "ResolvableType must not be null");
//// if (this != NONE && other != NONE) {
//// if (this.isArray()) {
//// return other.isArray() && this.getComponentType().isAssignableFrom(other.getComponentType());
//// } else if (matchedBefore != null && ((Map)matchedBefore).get(this.type) == other.type) {
//// return true;
//// } else {
//// ResolvableType.WildcardBounds ourBounds = ResolvableType.WildcardBounds.get(this);
//// ResolvableType.WildcardBounds typeBounds = ResolvableType.WildcardBounds.get(other);
//// if (typeBounds != null) {
//// return ourBounds != null && ourBounds.isSameKind(typeBounds) && ourBounds.isAssignableFrom(typeBounds.getBounds());
//// } else if (ourBounds != null) {
//// return ourBounds.isAssignableFrom(other);
//// } else {
//// boolean exactMatch = matchedBefore != null;
//// boolean checkGenerics = true;
//// Class<?> ourResolved = null;
//// if (this.type instanceof TypeVariable) {
//// TypeVariable<?> variable = (TypeVariable)this.type;
//// ResolvableType resolved;
//// if (this.variableResolver != null) {
//// resolved = this.variableResolver.resolveVariable(variable);
//// if (resolved != null) {
//// ourResolved = resolved.resolve();
//// }
//// }
////
//// if (ourResolved == null && other.variableResolver != null) {
//// resolved = other.variableResolver.resolveVariable(variable);
//// if (resolved != null) {
//// ourResolved = resolved.resolve();
//// checkGenerics = false;
//// }
//// }
////
//// if (ourResolved == null) {
//// exactMatch = false;
//// }
//// }
////
//// if (ourResolved == null) {
//// ourResolved = this.resolve(Object.class);
//// }
////
//// Class<?> otherResolved = other.toClass();
//// if (exactMatch) {
//// if (!ourResolved.equals(otherResolved)) {
//// return false;
//// }
//// } else if (!ClassUtils.isAssignable(ourResolved, otherResolved)) {
//// return false;
//// }
////
//// if (checkGenerics) {
//// ResolvableType[] ourGenerics = this.getGenerics();
//// ResolvableType[] typeGenerics = other.as(ourResolved).getGenerics();
//// if (ourGenerics.length != typeGenerics.length) {
//// return false;
//// }
////
//// if (matchedBefore == null) {
//// matchedBefore = new IdentityHashMap(1);
//// }
////
//// ((Map)matchedBefore).put(this.type, other.type);
////
//// for(int i = 0; i < ourG