/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * * @param type * @return */ public static Type getCanonicalType(Type type) { if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; return getCanonicalType(clazz); } return type; }
/** * Gets the actual type arguments of a class * * @param clazz The class to examine * @return The type arguments */ public static Type[] getActualTypeArguments(Class<?> clazz) { Type type = Types.getCanonicalType(clazz); if (type instanceof ParameterizedType) { return ((ParameterizedType) type).getActualTypeArguments(); } else { return EMPTY_TYPES; } }
/** * Gets the actual type arguments of a Type * * @param type The type to examine * @return The type arguments */ public static Type[] getActualTypeArguments(Type type) { Type resolvedType = Types.getCanonicalType(type); if (resolvedType instanceof ParameterizedType) { return ((ParameterizedType) resolvedType).getActualTypeArguments(); } else { return EMPTY_TYPES; } }
/** * Gets the actual type arguments of a Type * * @param type The type to examine * @return The type arguments */ public static Type[] getActualTypeArguments(Type type) { Type resolvedType = Types.getCanonicalType(type); if (resolvedType instanceof ParameterizedType) { return ((ParameterizedType) resolvedType).getActualTypeArguments(); } else { return EMPTY_TYPES; } }
@Override protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache) { return cache.getTypeClosureHolder(Types.getCanonicalType(baseType)); }
@Override protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache) { return cache.getTypeClosureHolder(Types.getCanonicalType(baseType)); }
@Override protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache) { return cache.getTypeClosureHolder(Types.getCanonicalType(baseType)); }
@Override protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache) { return cache.getTypeClosureHolder(Types.getCanonicalType(baseType)); }
@Override protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache) { return cache.getTypeClosureHolder(Types.getCanonicalType(baseType)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) { Class<?> rawType1 = Reflections.getRawType(type1); // raw types have to be assignable if (!isAssignableFrom(rawType1, type2)) { return false; } // this is a raw type with missing type arguments if (!Types.getCanonicalType(type2).equals(type2)) { return true; } return matches(type1, new HierarchyDiscovery(type2)); }