T - public class RawType<T>
extends java.lang.Object
implements java.lang.reflect.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).
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Class<T> |
getType() |
int |
hashCode() |
static <T> RawType<T> |
of(java.lang.Class<T> type) |
java.lang.String |
toString() |
static java.lang.reflect.Type |
unwrap(java.lang.reflect.Type type) |
static java.lang.reflect.Type |
wrap(java.lang.reflect.Type type) |
public static java.lang.reflect.Type wrap(java.lang.reflect.Type type)
public static java.lang.reflect.Type unwrap(java.lang.reflect.Type type)
public static <T> RawType<T> of(java.lang.Class<T> type)
public java.lang.Class<T> getType()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2013 Seam Framework. All Rights Reserved.