java.lang.Object
io.helidon.metadata.reflection.TypeFactory

public final class TypeFactory extends Object
Reflection based support to get classes and types.
  • Method Details

    • toClass

      public static Class<?> toClass(TypeName typeName)
      Create a class from a type name. This is using Class.forName(String) to obtain a class instance.
      Parameters:
      typeName - type to convert to class
      Returns:
      a class representing the type (ignoring generics)
      Throws:
      IllegalArgumentException - in case the class cannot be created
    • toType

      public static Type toType(TypeName typeName)
      Convert a type name to a Type.
      Parameters:
      typeName - type name
      Returns:
      a Type representing the type name, may be a class, wildcard, or parameterized type