@Deprecated public class GenericType<T> extends Object
Type genericType = (new GenericTypeThe above code will get you the genericType for List>() {}).getGenericType();
GenericType
Modifier | Constructor and Description |
---|---|
protected |
GenericType()
Deprecated.
Constructs a new generic entity.
|
Modifier and Type | Method and Description |
---|---|
Type |
getGenericType()
Deprecated.
Gets underlying
Type instance. |
Class<T> |
getType()
Deprecated.
Gets the raw type of the enclosed entity.
|
protected GenericType()
entity
- the entity instance, must not be nullIllegalArgumentException
- if entity is nullpublic final Class<T> getType()
ArrayList
not List
.public final Type getGenericType()
Type
instance. Note that this is derived from the
type parameter, not the enclosed instance. I.e. in the example
in the introduction, the type is List<String>
not
ArrayList<String>
.Copyright © 2017 JBoss by Red Hat. All rights reserved.