Class TypeUtils

java.lang.Object
io.activej.inject.util.TypeUtils

public final class TypeUtils extends Object
This class contains reflection utilities to work with Java types. Its main use is for method Types.parameterized. However, just like with ReflectionUtils, other type utility methods are pretty clean too, so they are left public.
  • Constructor Details

    • TypeUtils

      public TypeUtils()
  • Method Details

    • isInheritedFrom

      public static boolean isInheritedFrom(Type type, Type from, Map<Type,Type> dejaVu)
    • matches

      public static boolean matches(Type strict, Type pattern)
    • contains

      public static boolean contains(Type type, Type sub)
    • extractMatchingGenerics

      public static Map<TypeVariable<?>,Type> extractMatchingGenerics(Type pattern, Type real)
    • simplifyType

      public static Type simplifyType(Type original)