Top Description Inners Fields Constructors Methods
com.google.common.reflect

pack-priv final Class Types

extends Object
Class Inheritance
Annotations
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkArgument, .Preconditions.checkNotNull, com.google.common.collect.Iterables.transform, java.util.Objects.requireNonNull

Utilities for working with Type.
Author
Ben Yu

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
Types.ClassOwnership

Decides what owner type to use for constructing ParameterizedType from a raw class.

private static class
pack-priv static enum
pack-priv static class
Types.NativeTypeVariableEquals<X>

Per issue 1635, In JDK 1.7.0_51-b13, TypeVariableImpl#equals(Object) is changed to no longer be equal to custom TypeVariable implementations.

private static class
private static class
private static class
Types.TypeVariableInvocationHandler

Invocation handler to work around a compatibility problem between Java 7 and Java 8.

pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final Joiner
COMMA_JOINER

Class#toString without the "class " and "interface " prefixes

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
private static Iterable<Type>
pack-priv static Class<?>
getArrayClass(Class<?> componentType)

Returns the Class object of arrays with componentType.

pack-priv static Type
pack-priv static Type
newArrayType(Type componentType)

Returns the array type of componentType.

pack-priv static <D extends GenericDeclaration> TypeVariable<D>
newArtificialTypeVariable(D declaration, String name, Type... bounds)

Returns a new TypeVariable that belongs to declaration with name and bounds.

pack-priv static ParameterizedType
newParameterizedType(Class<?> rawType, Type... arguments)

Returns a type where rawType is parameterized by arguments.

pack-priv static ParameterizedType
newParameterizedTypeWithOwner(Type ownerType, Class<?> rawType, Type... arguments)

Returns a type where rawType is parameterized by arguments and is owned by ownerType.

private static <D extends GenericDeclaration> TypeVariable<D>
newTypeVariableImpl(D genericDeclaration, String name, Type[] bounds)

pack-priv static WildcardType
subtypeOf(Type upperBound)

Returns a new WildcardType with upperBound.

private static Type
subtypeOfComponentType(Type[] bounds)

Returns ?

pack-priv static WildcardType
supertypeOf(Type lowerBound)

Returns a new WildcardType with lowerBound.

private static Type[]
pack-priv static String
toString(Type type)

Returns a human-readable string representation of type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait