Uses of Class
com.google.common.reflect.Invokable
-
Packages that use Invokable Package Description com.google.common.reflect This package contains utilities to work with Java reflection.com.google.common.testing This package contains testing utilities. -
-
Uses of Invokable in com.google.common.reflect
Subclasses of Invokable in com.google.common.reflect Modifier and Type Class Description (package private) static class
Invokable.ConstructorInvokable<T>
(package private) static class
Invokable.MethodInvokable<T>
Fields in com.google.common.reflect declared as Invokable Modifier and Type Field Description private Invokable<?,?>
Parameter. declaration
Methods in com.google.common.reflect that return Invokable Modifier and Type Method Description Invokable<T,T>
TypeToken. constructor(java.lang.reflect.Constructor<?> constructor)
static <T> Invokable<T,T>
Invokable. from(java.lang.reflect.Constructor<T> constructor)
ReturnsInvokable
ofconstructor
.static Invokable<?,java.lang.Object>
Invokable. from(java.lang.reflect.Method method)
ReturnsInvokable
ofmethod
.Invokable<?,?>
Parameter. getDeclaringInvokable()
Returns theInvokable
that declares this parameter.Invokable<T,java.lang.Object>
TypeToken. method(java.lang.reflect.Method method)
<R1 extends R>
Invokable<T,R1>Invokable. returning(TypeToken<R1> returnType)
Explicitly specifies the return type of thisInvokable
.<R1 extends R>
Invokable<T,R1>Invokable. returning(java.lang.Class<R1> returnType)
Explicitly specifies the return type of thisInvokable
.Constructors in com.google.common.reflect with parameters of type Invokable Constructor Description Parameter(Invokable<?,?> declaration, int position, TypeToken<?> type, java.lang.annotation.Annotation[] annotations, java.lang.reflect.AnnotatedType annotatedType)
-
Uses of Invokable in com.google.common.testing
Fields in com.google.common.testing with type parameters of type Invokable Modifier and Type Field Description private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_METHOD_NAME
private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_NUMBER_OF_PARAMETERS
private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_PARAMETERS
private ImmutableList<Invokable<?,?>>
ClassSanityTester.FactoryMethodReturnValueTester. factories
Methods in com.google.common.testing that return Invokable Modifier and Type Method Description private static Invokable<?,?>
NullPointerTester. invokable(java.lang.Object instance, java.lang.reflect.Method method)
Methods in com.google.common.testing that return types with arguments of type Invokable Modifier and Type Method Description private static <T> ImmutableList<Invokable<?,? extends T>>
ClassSanityTester. getFactories(TypeToken<T> type)
Factories with the least number of parameters are listed first.private ImmutableList<Invokable<?,?>>
ClassSanityTester.FactoryMethodReturnValueTester. getFactoriesToTest()
Methods in com.google.common.testing with parameters of type Invokable Modifier and Type Method Description private java.lang.Object[]
NullPointerTester. buildParamList(Invokable<?,?> invokable, int indexOfParamToSetToNull)
private static <T> T
ClassSanityTester. createInstance(Invokable<?,? extends T> factory, java.util.List<?> args)
private java.util.List<java.lang.Object>
ClassSanityTester. generateEqualFactoryArguments(Invokable<?,?> factory, java.util.List<Parameter> params, java.util.List<java.lang.Object> args)
Returns dummy factory arguments that are equal toargs
but may be different instances, to be used to construct a second instance of the same equality group.private java.util.List<java.lang.Object>
ClassSanityTester. getDummyArguments(Invokable<?,?> invokable)
private static boolean
ClassSanityTester. hashCodeInsensitiveToArgReference(Invokable<?,?> factory, java.util.List<java.lang.Object> args, int i, java.lang.Object alternateArg)
private <T> T
ClassSanityTester. instantiate(Invokable<?,? extends T> factory)
Instantiates usingfactory
.private static <T> T
ClassSanityTester. invoke(Invokable<?,? extends T> factory, java.util.List<?> args)
(package private) static boolean
NullPointerTester. isNullable(Invokable<?,?> invokable)
private void
ClassSanityTester. testEqualsUsing(Invokable<?,?> factory)
private void
NullPointerTester. testParameter(java.lang.Object instance, Invokable<?,?> invokable, int paramIndex, java.lang.Class<?> testedClass)
Verifies thatinvokable
produces aNullPointerException
orUnsupportedOperationException
when the parameter in positionparamIndex
is null.Constructors in com.google.common.testing with parameters of type Invokable Constructor Description FactoryMethodReturnsNullException(Invokable<?,?> factory)
Constructor parameters in com.google.common.testing with type arguments of type Invokable Constructor Description FactoryMethodReturnValueTester(java.lang.Class<?> declaringClass, ImmutableList<Invokable<?,?>> factories, java.lang.String factoryMethodsDescription)
-