Class ParameterTypeContext
java.lang.Object
com.pholser.junit.quickcheck.internal.ParameterTypeContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate AnnotatedElementprivate final Stringprivate static final Stringprivate final ru.vyarus.java.generics.resolver.context.GenericsContextprivate final intprivate final Stringprivate final AnnotatedTypeprivate final io.arxila.javaruntype.type.Type<?>private static Zilch -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateParameterTypeContext(String parameterName, AnnotatedType parameterType, String declarerName, io.arxila.javaruntype.type.Type<?> resolvedType, ru.vyarus.java.generics.resolver.context.GenericsContext generics) privateParameterTypeContext(String parameterName, AnnotatedType parameterType, String declarerName, io.arxila.javaruntype.type.Type<?> resolvedType, ru.vyarus.java.generics.resolver.context.GenericsContext generics, int parameterIndex) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddExtendsTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) private voidaddGenerators(List<From> generators) private voidaddStandardTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) private voidaddSuperTypeParameterContext(SourceOfRandomness random, List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) private voidaddWildcardTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, AnnotatedType a) booleanallowMixedTypes(boolean value) annotate(AnnotatedElement element) private AnnotatedTypeannotatedArrayComponent(io.arxila.javaruntype.type.Type<?> component) Deprecated.This will likely go away when languages whose compilers and interpreters produce class files that support annotations on type uses.private voidensureCorrectType(Generator<?> generator) static ParameterTypeContextstatic ParameterTypeContextstatic ParameterTypeContextforParameter(Parameter parameter) static ParameterTypeContextforParameter(Parameter parameter, ru.vyarus.java.generics.resolver.context.MethodGenericsContext generics) Class<?>List<io.arxila.javaruntype.type.TypeParameter<?>>booleanisArray()booleanisEnum()private Generator<?>makeGenerator(Class<? extends Generator> generatorType) methodReturnTypeContext(Method method) Gives a context for generation of the return type of a lambda method.name()private static intparameterIndex(Executable exec, Parameter parameter) private Class<?>booleantopLevel()Deprecated.This will likely go away when languages whose compilers and interpreters produce class files that support annotations on type uses.type()private static AnnotatedTypezilch()
-
Field Details
-
EXPLICIT_GENERATOR_TYPE_MISMATCH_MESSAGE
- See Also:
-
zilch
-
parameterName
-
parameterType
-
declarerName
-
resolved
private final io.arxila.javaruntype.type.Type<?> resolved -
explicits
-
generics
private final ru.vyarus.java.generics.resolver.context.GenericsContext generics -
parameterIndex
private final int parameterIndex -
annotatedElement
-
allowMixedTypes
private boolean allowMixedTypes
-
-
Constructor Details
-
ParameterTypeContext
private ParameterTypeContext(String parameterName, AnnotatedType parameterType, String declarerName, io.arxila.javaruntype.type.Type<?> resolvedType, ru.vyarus.java.generics.resolver.context.GenericsContext generics) -
ParameterTypeContext
private ParameterTypeContext(String parameterName, AnnotatedType parameterType, String declarerName, io.arxila.javaruntype.type.Type<?> resolvedType, ru.vyarus.java.generics.resolver.context.GenericsContext generics, int parameterIndex)
-
-
Method Details
-
forClass
-
forField
-
forParameter
-
forParameter
public static ParameterTypeContext forParameter(Parameter parameter, ru.vyarus.java.generics.resolver.context.MethodGenericsContext generics) -
parameterIndex
-
annotate
-
allowMixedTypes
-
allowMixedTypes
public boolean allowMixedTypes() -
methodReturnTypeContext
Gives a context for generation of the return type of a lambda method.- Parameters:
method- method whose return type we want to resolve- Returns:
- an associated parameter context
-
addGenerators
-
makeGenerator
-
rawParameterType
-
ensureCorrectType
-
name
-
annotatedType
-
type
-
annotatedElement
Deprecated.This will likely go away when languages whose compilers and interpreters produce class files that support annotations on type uses.- Returns:
- the annotated program element this context represents
- See Also:
-
topLevel
Deprecated.This will likely go away when languages whose compilers and interpreters produce class files that support annotations on type uses.- Returns:
- the annotated program element this context represents
- See Also:
-
explicitGenerators
-
arrayComponentContext
-
annotatedArrayComponent
-
isArray
public boolean isArray() -
getRawClass
-
isEnum
public boolean isEnum() -
getTypeParameters
-
typeParameterContexts
-
addStandardTypeParameterContext
private void addStandardTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) -
addWildcardTypeParameterContext
private void addWildcardTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, AnnotatedType a) -
addExtendsTypeParameterContext
private void addExtendsTypeParameterContext(List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) -
addSuperTypeParameterContext
private void addSuperTypeParameterContext(SourceOfRandomness random, List<ParameterTypeContext> typeParameterContexts, io.arxila.javaruntype.type.TypeParameter<?> p, AnnotatedType a) -
zilch
-