Package com.google.common.reflect
Class TypeResolver.TypeTable
- java.lang.Object
-
- com.google.common.reflect.TypeResolver.TypeTable
-
- Enclosing class:
- TypeResolver
private static class TypeResolver.TypeTable extends java.lang.Object
A TypeTable maintains mapping fromTypeVariable
to types.
-
-
Field Summary
Fields Modifier and Type Field Description private ImmutableMap<TypeResolver.TypeVariableKey,java.lang.reflect.Type>
map
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
TypeTable()
private
TypeTable(ImmutableMap<TypeResolver.TypeVariableKey,java.lang.reflect.Type> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.reflect.Type
resolve(java.lang.reflect.TypeVariable<?> var)
(package private) java.lang.reflect.Type
resolveInternal(java.lang.reflect.TypeVariable<?> var, TypeResolver.TypeTable forDependants)
Resolvesvar
using the encapsulated type mapping.(package private) TypeResolver.TypeTable
where(java.util.Map<TypeResolver.TypeVariableKey,? extends java.lang.reflect.Type> mappings)
Returns a newTypeResolver
withvariable
mapping totype
.
-
-
-
Field Detail
-
map
private final ImmutableMap<TypeResolver.TypeVariableKey,java.lang.reflect.Type> map
-
-
Constructor Detail
-
TypeTable
TypeTable()
-
TypeTable
private TypeTable(ImmutableMap<TypeResolver.TypeVariableKey,java.lang.reflect.Type> map)
-
-
Method Detail
-
where
final TypeResolver.TypeTable where(java.util.Map<TypeResolver.TypeVariableKey,? extends java.lang.reflect.Type> mappings)
Returns a newTypeResolver
withvariable
mapping totype
.
-
resolve
final java.lang.reflect.Type resolve(java.lang.reflect.TypeVariable<?> var)
-
resolveInternal
java.lang.reflect.Type resolveInternal(java.lang.reflect.TypeVariable<?> var, TypeResolver.TypeTable forDependants)
Resolvesvar
using the encapsulated type mapping. If it maps to yet another non-reified type or has bounds,forDependants
is used to do further resolution, which doesn't try to resolve any type variable on generic declarations that are already being resolved.Should only be called and overridden by
resolve(TypeVariable)
.
-
-