Supports inline instantiation of objects that represent parameterized types with actual type parameters.
An object that represents any parameterized type may be obtained by subclassing TypeLiteral.
TypeLiteral<List<String>> stringListType = new TypeLiteral<List<String>>() {
};
javax.enterprise.inject.Instance#select(TypeLiteral, Annotation...), javax.enterprise.event.Event#select(TypeLiteral, Annotation...)
| Modifier and Type | Field and Description |
|---|---|
| private transient Type | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public final Class | |
| public final Type | |
| private static Class | |
| private static Type | |
| public int | |
| public String |
| actualType | back to summary |
|---|---|
| private transient Type actualType | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| TypeLiteral | back to summary |
|---|---|
| protected TypeLiteral() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getRawType | back to summary |
|---|---|
public final Class
| |
| getType | back to summary |
|---|---|
public final Type getType()
| |
| getTypeLiteralSubclass | back to summary |
|---|---|
| private static Class | |
| getTypeParameter | back to summary |
|---|---|
| private static Type getTypeParameter(Class<?> superclass) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |