Class TypeFactory
java.lang.Object
io.helidon.metadata.reflection.TypeFactory
Reflection based support to get classes and types.
-
Method Summary
-
Method Details
-
toClass
Create a class from a type name. Primitive and array types are resolved directly. Other types useClass.forName(String).- 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
Convert a type name to aType.- Parameters:
typeName- type name- Returns:
- a Type representing the type name, may be a class, wildcard, or parameterized type
- Throws:
IllegalArgumentException- if the type cannot be resolved or is an array with a parameterized component
-