com.google.common.reflect
Class TypeParameter<T>
java.lang.Object
com.google.common.reflect.TypeParameter<T>
@Beta
public abstract class TypeParameter<T>
- extends Object
Captures a free type variable that can be used in TypeToken.where(com.google.common.reflect.TypeParameter, com.google.common.reflect.TypeToken)
.
For example:
static <T> TypeToken<List<T>> listOf(Class<T> elementType) {
return new TypeToken<List<T>>() {}
.where(new TypeParameter<T>() {}, elementType);
}
- Since:
- 12.0
- Author:
- Ben Yu
TypeParameter
protected TypeParameter()
hashCode
public final int hashCode()
- Overrides:
hashCode
in class Object
equals
public final boolean equals(Object o)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2010-2012. All Rights Reserved.