Uses of Class
com.google.common.reflect.TypeToken
Packages that use TypeToken
Package
Description
This package contains utilities to work with Java reflection.
-
Uses of TypeToken in com.google.common.reflect
Methods in com.google.common.reflect that return TypeTokenModifier and TypeMethodDescriptionfinal TypeToken<?>TypeToken.getComponentType()Returns the array component type if this type represents an array (int[],T[],<? extends Map<String, Integer>[]>etc.), or elsenullis returned.Invokable.getOwnerType()Returns the type ofT.Invokable.getReturnType()Returns the return type of thisInvokable.TypeToken.getSubtype(Class<?> subclass) Returns subtype ofthiswithsubclassas the raw class.TypeToken.getSupertype(Class<? super T> superclass) Returns the generic form ofsuperclass.TypeToken<?>Parameter.getType()Returns the type of the parameter.static <T> TypeToken<T>Returns an instance of type token that wrapstype.static TypeToken<?>Returns an instance of type token that wrapstype.final TypeToken<?>TypeToken.resolveType(Type type) Resolves the giventypeagainst the type context represented by this type.TypeToken.unwrap()Returns the corresponding primitive type if this is a wrapper type; otherwise returnsthisitself.TypeToken.where(TypeParameter<X> typeParam, TypeToken<X> typeArg) Returns a newTypeTokenwhere type variables represented bytypeParamare substituted bytypeArg.TypeToken.where(TypeParameter<X> typeParam, Class<X> typeArg) Returns a newTypeTokenwhere type variables represented bytypeParamare substituted bytypeArg.TypeToken.wrap()Returns the corresponding wrapper type if this is a primitive type; otherwise returnsthisitself.Methods in com.google.common.reflect that return types with arguments of type TypeTokenModifier and TypeMethodDescriptionImmutableTypeToInstanceMap.delegate()MutableTypeToInstanceMap.delegate()TypeToken.TypeSet.delegate()MutableTypeToInstanceMap.entrySet()final ImmutableList<TypeToken<? extends Throwable>>Invokable.getExceptionTypes()Returns all declared exception types of thisInvokable.Methods in com.google.common.reflect with parameters of type TypeTokenModifier and TypeMethodDescription<T extends B>
TImmutableTypeToInstanceMap.getInstance(TypeToken<T> type) <T extends B>
TMutableTypeToInstanceMap.getInstance(TypeToken<T> type) <T extends B>
TTypeToInstanceMap.getInstance(TypeToken<T> type) Returns the value the specified type is mapped to, ornullif no entry for this type is present.final booleanTypeToken.isSubtypeOf(TypeToken<?> type) Returns true if this type is a subtype of the giventype.final booleanTypeToken.isSupertypeOf(TypeToken<?> type) Returns true if this type is a supertype of the giventype.<T extends B>
ImmutableTypeToInstanceMap.Builder<B>Associateskeywithvaluein the built map.Deprecated.unsupported operationDeprecated.unsupported operation<T extends B>
TImmutableTypeToInstanceMap.putInstance(TypeToken<T> type, T value) Deprecated.unsupported operation<T extends B>
TMutableTypeToInstanceMap.putInstance(TypeToken<T> type, T value) <T extends B>
TTypeToInstanceMap.putInstance(TypeToken<T> type, T value) Maps the specified type to the specified value.Explicitly specifies the return type of thisInvokable.TypeToken.where(TypeParameter<X> typeParam, TypeToken<X> typeArg) Returns a newTypeTokenwhere type variables represented bytypeParamare substituted bytypeArg.Method parameters in com.google.common.reflect with type arguments of type TypeToken