T
- public class RawType<T> extends Object implements Type
There are two possible scenarios in which we operate on a raw type (java class) in HierarchyDiscovery
:
Firstly, we are discovering hierarchy of a class bean with type parameters. In this scenario, we need to resolve the
ParameterizedType
of the class instead of the raw type returned by the classloader. This is resolved by
HierarchyDiscovery
.
Secondly, we are working with a type of a java field, parameter or a method return type. If a generic class is declared
as a raw type, we want to preserve the fact that the type was raw because assignability rules in the CDI specification (5.2.3, 8.3.1 and 10.2.1)
recognize a raw type as a special case. Therefore, we do not want HierarchyDiscovery
to resolve the type.
This class is used as a wrapper that marks a raw type for the HierarchyDiscovery
not to resolve the type (the second scenario - see above).
Copyright © 2013 Seam Framework. All rights reserved.