Index

A C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values

A

actual(Object) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
actualText(String) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
actualToString() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
 
actualToString() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
actualToString() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
 
actualToString() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
actualToString() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns a string representation of the actual element signature found.
ARGUMENT_DOES_NOT_FIT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when an argument does not fit the (deviating numeric) parameter type of the student's method.
arguments(Object...) - Method in class io.github.valentinherrmann.levenshtein.Failure
Shows argument values in the Input line, formatted like Failure.format(Object) and separated by commas.
assertCalled(MethodWrapper, int) - Method in class io.github.valentinherrmann.levenshtein.Mock
Fails unless the method was called exactly times times on Mock.obj().
assertCalled(MethodWrapper, int, Supplier) - Method in class io.github.valentinherrmann.levenshtein.Mock
Like Mock.assertCalled(MethodWrapper, int), but the text of context is put in front of the failure message, e.g. which call of the method under test should have called this method.
assertNotCalled(MethodWrapper) - Method in class io.github.valentinherrmann.levenshtein.Mock
Fails if the method was called on Mock.obj().
ATTRIBUTE_ACCESS_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when reading the value of an attribute fails.
ATTRIBUTE_FINAL_CANNOT_SET - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when trying to set the value of a final attribute.
ATTRIBUTE_NOT_IMPLEMENTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when the expected attribute is missing or deviates.
ATTRIBUTE_SET_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when setting the value of an attribute fails for an unexpected reason.
AttributeWrapper<T,V> - Class in io.github.valentinherrmann.levenshtein
Wrapper for class attributes (fields) that verifies their existence, name, type, and modifiers using Levenshtein distance for fuzzy matching.
AttributeWrapper(ClassWrapper, String, ClassWrapper, String...) - Constructor for class io.github.valentinherrmann.levenshtein.AttributeWrapper
Constructs a new AttributeWrapper for an attribute whose type is a student class, e.g. an attribute drummer of type Drummer.
AttributeWrapper(ClassWrapper, String, Class, String...) - Constructor for class io.github.valentinherrmann.levenshtein.AttributeWrapper
Constructs a new AttributeWrapper for verifying a class attribute.
AttributeWrapper(ClassWrapper, String, Supplier, String...) - Constructor for class io.github.valentinherrmann.levenshtein.AttributeWrapper
Like AttributeWrapper(ClassWrapper, String, ClassWrapper, String...), but the wrapper of the type is only taken from the supplier when the attribute is checked, e.g.

C

call(Failure.ThrowingRunnable) - Static method in class io.github.valentinherrmann.levenshtein.Failure
Like Failure.call(ThrowingSupplier) for code without a result.
call(Failure.ThrowingSupplier) - Static method in class io.github.valentinherrmann.levenshtein.Failure
Runs student code and turns an exception it throws into a failure block (Actual: the exception).
callCount(MethodWrapper) - Method in class io.github.valentinherrmann.levenshtein.Mock
How often a method was called on Mock.obj() (or on a clone of it).
calls(MethodWrapper) - Method in class io.github.valentinherrmann.levenshtein.Mock
The recorded calls of a method on Mock.obj(), in call order: the first 1000<T> calls, see Mock.callCount(MethodWrapper) for the number of all calls.
canContain(Class, Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Checks if the actual primitive type can contain the expected primitive type, i.e. whether Java's widening primitive conversion goes from the expected to the actual type.
cases(int, int) - Method in class io.github.valentinherrmann.levenshtein.Failure
Adds the line "(n of m cases failed)" if more than one case was checked.
CAST_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a value returned by student code cannot be converted to the expected type.
CLASS_CANNOT_INSTANTIATE_ABSTRACT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when trying to directly instantiate an abstract class.
CLASS_CANNOT_INSTANTIATE_INTERFACE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when trying to directly instantiate an interface.
CLASS_DEVIATION - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Intro line for a deviating class in ClassWrapper.toString().
CLASS_INSTANTIATION_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when instantiating a class via its constructor fails.
CLASS_MISSING - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Intro line for a missing class in ClassWrapper.toString().
CLASS_NOT_IMPLEMENTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when the expected class is missing or deviates.
CLASS_REPORT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Report of a class in ClassWrapper.toString().
CLASS_SUBCLASS_INSTANTIATION_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when creating a ByteBuddy dynamic subclass instance fails.
CLASS_UNCHECKED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Intro line for an unchecked class in ClassWrapper.toString().
ClassWrapper<T> - Class in io.github.valentinherrmann.levenshtein
Wrapper for classes that verifies their existence, name, modifiers, superclass, and interfaces using Levenshtein distance for fuzzy matching.
ClassWrapper(Class) - Constructor for class io.github.valentinherrmann.levenshtein.ClassWrapper
Constructs a wrapper for a class that is already available via reflection.
ClassWrapper(String, String, ClassWrapper, ClassWrapper[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.ClassWrapper
Constructs a new ClassWrapper with superclass and interface expectations.
ClassWrapper(String, String, String...) - Constructor for class io.github.valentinherrmann.levenshtein.ClassWrapper
Constructs a new ClassWrapper without superclass or interface expectations.
CONSTRUCTOR_INVOCATION_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
CONSTRUCTOR_NOT_IMPLEMENTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when the expected constructor is missing or deviates.
ConstructorWrapper<T> - Class in io.github.valentinherrmann.levenshtein
Wrapper for class constructors that verifies their existence, parameter types, and modifiers.
ConstructorWrapper(ClassWrapper, Class[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Constructs a new ConstructorWrapper for verifying a class constructor.
ConstructorWrapper(ClassWrapper, Object[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Constructs a new ConstructorWrapper whose parameter types may include student classes.
ConstructorWrapper(ClassWrapper, String) - Constructor for class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Constructs a new ConstructorWrapper for a no-argument constructor.

D

DEFAULT_DECIMALS - Static variable in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Default number of decimals of double and float values in failure messages.
DEFAULT_PACKAGE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown instead of the package name for the default package.
DEFAULT_THRESHOLD - Static variable in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Default threshold (percent) for all name deviations.
DEUTSCH - Enum constant in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.Language
 
DEVIATE - Enum constant in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.UnexpectedModifiers
Default: every modifier that is neither expected, optional ("final?") nor implicit is a deviation, and a missing expected static is a deviation as well.
DEVIATES - Enum constant in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Property exists but deviates from expected value

E

ENGLISH - Enum constant in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.Language
 
ensureChecked() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Runs the lookup in the student code exactly once.
equals(Object) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
error() - Method in class io.github.valentinherrmann.levenshtein.Failure
 
EXACT - Enum constant in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Property matches exactly with expected value
existence - Variable in class io.github.valentinherrmann.levenshtein.Wrapper
The overall existence (considering all parts state of the wrapped element (EXACT, DEVIATES, MISSING, or UNCHECKED).
expected(Object) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
EXPECTED_EXCEPTION_NOT_THROWN - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
expectedText(String) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
expectedToString() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
 
expectedToString() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
expectedToString() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
 
expectedToString() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
expectedToString() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns a string representation of the expected element signature.

F

Failure - Class in io.github.valentinherrmann.levenshtein
The one format of every behaviour failure: a block of labelled lines, localized with Messages and LevenshteinSettings.getLanguage().
FAILURE_ACTUAL - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Label of the line with the actual outcome in a Failure block.
FAILURE_CASES - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended below a Failure block when several cases were checked.
FAILURE_EXPECTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Label of the line with the expected outcome in a Failure block.
FAILURE_EXPECTED_EXCEPTION - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Expected outcome of a call that should throw an exception.
FAILURE_INPUT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Label of the line with the input (e.g. the arguments) in a Failure block.
FAILURE_METHOD - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Label of the line naming the method or constructor in a Failure block.
FAILURE_SCENARIO - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Label of the line describing the scenario (e.g. a generated case) in a Failure block.
FAILURE_STACK_OVERFLOW_HINT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended below a Failure block whose actual outcome is a StackOverflowError.
Failure.ThrowingRunnable - Interface in io.github.valentinherrmann.levenshtein
Code without a result that may throw anything.
Failure.ThrowingSupplier<R> - Interface in io.github.valentinherrmann.levenshtein
Code that returns a value and may throw anything.
findWithDeviation() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Attempts to find a field in a class, allowing for deviation in the attribute name.
findWithDeviation() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Searches for the class in the expected package, using LevenshteinSettings.getClassNameDeviationThreshold() for deviating names.
findWithDeviation() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Looks up the declared constructor (any visibility).
findWithDeviation() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
findWithDeviation() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Searches for the wrapped element using deviation detection (e.g., Levenshtein distance).
format(Object) - Static method in class io.github.valentinherrmann.levenshtein.Failure
Formats a value the same way in every failure message: double and float values with LevenshteinSettings.getDecimals() decimals (dot as separator), strings in double quotes, characters in single quotes, null, arrays and collections in brackets, very long values cut.
format(Object...) - Method in enum class io.github.valentinherrmann.levenshtein.Messages
Formats the localized message template with the given arguments.

G

GenericClassWrapper<T> - Class in io.github.valentinherrmann.levenshtein
A generic class wrapper for actually existing classes to make them compatible with the other wrappers.
GenericClassWrapper(Class) - Constructor for class io.github.valentinherrmann.levenshtein.GenericClassWrapper
Constructs a new GenericClassWrapper for an existing class.
get() - Method in interface io.github.valentinherrmann.levenshtein.Failure.ThrowingSupplier
 
get() - Method in enum class io.github.valentinherrmann.levenshtein.Messages
Returns the message in the language currently configured in LevenshteinSettings.getLanguage().
getActual() - Method in class io.github.valentinherrmann.levenshtein.WrapperProperty
 
getActualModifiers() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Retrieves the actual modifiers of the element found in the student code.
getActualName() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Retrieves the actual name of the element found in the student code.
getActualParamTypes() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Retrieves the parameter types of the constructor actually found (they may differ in primitive/wrapper types).
getActualParamTypes() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
getAttributeNameDeviationThreshold() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getAttributeWrappers() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Retrieves all AttributeWrapper fields defined in this ClassWrapper subclass.
getClassNameDeviationThreshold() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getClazz() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Retrieves the actual class found via reflection.
getConstructorWrappers() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Retrieves all ConstructorWrapper fields defined in this ClassWrapper subclass.
getDecimals() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getDynamicSubclassObj(ConstructorWrapper, Object...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Creates a dynamic subclass instance using ByteBuddy for abstract classes and interfaces.
getExistence() - Method in class io.github.valentinherrmann.levenshtein.WrapperProperty
 
getExpected() - Method in class io.github.valentinherrmann.levenshtein.WrapperProperty
 
getExpectedName() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Retrieves the expected name of this wrapped element instead of exposing the Wrapper.name property directly.
getExpectedPackage() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
getExpectedReturnType() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Resolves a student class given as return type.
getExpectedType() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Resolves a student class given as type (see AttributeWrapper(ClassWrapper, String, ClassWrapper, String...)).
getLanguage() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getMethodNameDeviationThreshold() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getMethodWrappers() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Retrieves all MethodWrapper fields defined in this ClassWrapper subclass.
getMissingModifiers() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
 
getObj() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Returns the (possibly cached) default instance of the class.
getObj(boolean) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Returns the default instance of the class represented by this ClassWrapper.
getObj(boolean) - Method in class io.github.valentinherrmann.levenshtein.GenericClassWrapper
This method is not supported for GenericClassWrapper as it only wraps existing classes.
getObj(boolean, ConstructorWrapper, Object...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Returns an instance of the class created with a specific constructor.
getOverallExistence() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Retrieves the overall existence state of this wrapped element.
getParamTypes() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Retrieves the parameter types expected for this constructor, resolving student classes given as types.
getParamTypes() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Resolves student classes given as parameter types.
getParentClassWrapper() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Retrieves the parent class wrapper containing this element.
GETTER_WRONG_VALUE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, testGetter reports with the GETTERS_SETTERS_* messages
GETTERS_SETTERS_ATTRIBUTE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_ATTRIBUTE_TO_GETTER - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Subtest label: the getter returns the value of the attribute.
GETTERS_SETTERS_EXPECT_REJECTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Expected outcome of a setter call with an invalid value.
GETTERS_SETTERS_INVALID_VALUE_STORED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_NOT_TESTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_PASSED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_REPORT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_SCENARIO - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Scenario of a getter/setter case.
GETTERS_SETTERS_SETTER_TO_ATTRIBUTE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Subtest label: the setter stores the value in the attribute.
GETTERS_SETTERS_SETTER_TO_GETTER - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Subtest label: the getter returns what the setter set.
GETTERS_SETTERS_THREW - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_VALUE_NOT_STORED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
GETTERS_SETTERS_WRONG_VALUE_RETURNED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
getUnexpectedModifiers() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
getUnexpectedModifiers() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
 
getValue() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Retrieves the value of this attribute from a default instance.
getValue(Object) - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Retrieves the value of this attribute from a specific object instance.

H

hashCode() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
hasUnexpectedModifier(String) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns whether the actual element has the given modifier although it is neither expected, optional nor implicit.
HiddenLevenshteinTest - Annotation Interface in io.github.valentinherrmann.levenshtein
Hidden counterpart of LevenshteinTest: composes Hidden, StrictTimeout(5) and MirrorOutput, plus StaticStateReset.

I

IGNORE - Enum constant in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.UnexpectedModifiers
Like before 2026.11.1: only an unexpected static of attributes and methods is reported, and a missing expected static makes the element missing.
implicitModifiers() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Constants of interfaces and enum constants are implicitly static final, the component fields of records implicitly final.
implicitModifiers() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Interfaces are implicitly abstract, enums final (or abstract if a constant has a body), records final; nested interfaces, enums and records as well as types declared in an interface are implicitly static.
implicitModifiers() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Abstract methods of interfaces are implicitly abstract.
implicitModifiers() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
The modifier bits that the actual element has implicitly, e.g.
input(String) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
interceptBeforeEachMethod(InvocationInterceptor.Invocation, ReflectiveInvocationContext, ExtensionContext) - Method in class io.github.valentinherrmann.levenshtein.StaticStateReset
 
interceptTestMethod(InvocationInterceptor.Invocation, ReflectiveInvocationContext, ExtensionContext) - Method in class io.github.valentinherrmann.levenshtein.StaticStateReset
 
interceptTestTemplateMethod(InvocationInterceptor.Invocation, ReflectiveInvocationContext, ExtensionContext) - Method in class io.github.valentinherrmann.levenshtein.StaticStateReset
 
INVOCATION_ARGUMENTS - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended on its own line to a failed constructor or method call with arguments.
invoke(Object...) - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Invokes the constructor with the specified arguments to create a new instance.
invoke(Object...) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Invokes the method on the class's default instance (or null for static methods).
invokeExpectingException(Class, Object...) - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
Invokes the constructor and expects the student code to throw an exception of the given type.
invokeExpectingException(Class, Object, Object...) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Invokes the method and expects the student code to throw an exception of the given type.
invokeOnSpecificObject(Object, Object...) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Invokes the method on a specific object instance.
invokeOnSpecificObjectWithContext(Supplier, Object, Object...) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Like MethodWrapper.invokeOnSpecificObject(Object, Object...), but if the student code throws, the text of context is put in front of the failure message (e.g. the scenario or the seed of generated inputs).
invokeWithContext(Supplier, Object...) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
Like MethodWrapper.invoke(Object...), but if the student code throws, the text of context is put in front of the failure message, e.g. the scenario or the seed of generated inputs:
io.github.valentinherrmann.levenshtein - package io.github.valentinherrmann.levenshtein
 
isGettersSettersRequireSameObject() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
isModifierExpected(String) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns whether the given modifier keyword is part of the expected modifiers.
isNameWithinDeviation(String, String, int) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Checks if names are within a specified deviation threshold.
isNumericDeviation(Class, Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Checks whether two types are different numeric types in either direction (e.g.

L

Language Switching - Section in enum class io.github.valentinherrmann.levenshtein.Messages
 
legacyReportsUnexpectedStatic() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Fields of interfaces are implicitly static, so the legacy mode only reports an unexpected static for classes.
legacyReportsUnexpectedStatic() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
legacyReportsUnexpectedStatic() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Whether an unexpected static is reported with LevenshteinSettings.UnexpectedModifiers.IGNORE (the behaviour before unexpected modifiers were reported in general).
levenshteinDistance(String, String) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Calculates the Levenshtein distance between two strings.
levenshteinDistancePercent(String, String) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Calculates the Levenshtein distance as percentage of the length of the longer string.
Levenshtein distance thresholds - Section in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
LevenshteinSettings - Class in io.github.valentinherrmann.levenshtein
Runtime configuration of the Levenshtein Testing Framework.
LevenshteinSettings.Language - Enum Class in io.github.valentinherrmann.levenshtein
Supported languages for assertion and feedback messages.
LevenshteinSettings.UnexpectedModifiers - Enum Class in io.github.valentinherrmann.levenshtein
How modifiers of the student's element that the test does not expect are treated.
LevenshteinTest - Annotation Interface in io.github.valentinherrmann.levenshtein
Marks a test class as a public Ares 2 test class using the Levenshtein Testing Framework.

M

MAX_RECORDED_CALLS - Static variable in class io.github.valentinherrmann.levenshtein.Mock
Calls per method whose arguments are kept; further calls are only counted.
message() - Method in class io.github.valentinherrmann.levenshtein.Failure
 
Messages - Enum Class in io.github.valentinherrmann.levenshtein
Central message catalog for all assertion and feedback messages shown to students.
METHOD_INVOCATION_EXCEPTION - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Deprecated.
no longer used, behaviour failures are reported as Failure block
METHOD_NOT_IMPLEMENTED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when the expected method is missing or deviates.
MethodWrapper<T,R> - Class in io.github.valentinherrmann.levenshtein
Wrapper for class methods that verifies their existence, name, return type, parameter types, and modifiers using Levenshtein distance for fuzzy name matching.
MethodWrapper(ClassWrapper, String, ClassWrapper, Object[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
Constructs a new MethodWrapper whose return type is a student class, e.g.
MethodWrapper(ClassWrapper, String, ClassWrapper, String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
MethodWrapper(ClassWrapper, String, Class, Class[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
Constructs a new MethodWrapper for verifying a class method.
MethodWrapper(ClassWrapper, String, Class, Object[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
Constructs a new MethodWrapper whose parameter types may include student classes.
MethodWrapper(ClassWrapper, String, Class, String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
Constructs a new MethodWrapper for a method with no parameters.
MethodWrapper(ClassWrapper, String, Supplier, Object[], String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
Like MethodWrapper(ClassWrapper, String, ClassWrapper, Object[], String...), but the wrapper of the return type is only taken from the supplier when the method is checked, e.g.
MethodWrapper(ClassWrapper, String, Supplier, String...) - Constructor for class io.github.valentinherrmann.levenshtein.MethodWrapper
MISSING - Enum constant in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Property is missing or does not match at all
MISSING_MODIFIERS - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended to a deviation when expected modifiers are missing.
mock() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Starts a Mock of the class: an object whose methods the test can replace and whose calls are recorded, created without running a constructor of the class.
Mock<T> - Class in io.github.valentinherrmann.levenshtein
An object of a student class whose methods the test can replace, and which records every call to its methods.
MOCK_ABSTRACT_NOT_OVERRIDDEN - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when student code calls an abstract method that the test did not override.
MOCK_CALL_COUNT - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a method was not called as often as expected.
MOCK_CLASS_NOT_OVERRIDABLE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a class cannot be subclassed for a mock.
MOCK_ENUM_NOT_INSTANTIABLE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when an enum should be created without a constructor.
MOCK_METHOD_NOT_IN_CLASS - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a method wrapper of another class is used for a mock (e.g. the class does not extend it).
MOCK_METHOD_NOT_OVERRIDABLE - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a method cannot be overridden in a mock.
MOCK_RECORDED_CALLS - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended on its own line to Messages.MOCK_CALL_COUNT if there were calls.
modifiers - Variable in class io.github.valentinherrmann.levenshtein.Wrapper
The expected and actual modifiers (e.g., "public static final") of the wrapped element.

N

name - Variable in class io.github.valentinherrmann.levenshtein.Wrapper
The expected and actual name of the wrapped element.
newObj() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Creates a new default instance of the class (never cached from earlier calls).
newObjOverriding(Map) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Creates an object of a subclass of the wrapped class in which each given method returns the result of its function.
newObjWithoutConstructor() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Creates an object of the wrapped class without running any of its constructors (attributes keep their default values 0, false, null; field initializers do not run either).
NOTHING_THROWN - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Used as the "actual outcome" of Messages.EXPECTED_EXCEPTION_NOT_THROWN when nothing was thrown.
NULL_NOT_ALLOWED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Thrown internally when a value is null where null is not permitted.

O

obj - Variable in class io.github.valentinherrmann.levenshtein.ClassWrapper
A default instance of the class for testing purposes.
obj() - Method in class io.github.valentinherrmann.levenshtein.Mock
The object of the mock, created on the first call (without running a constructor) and the same afterwards.
of(ConstructorWrapper) - Static method in class io.github.valentinherrmann.levenshtein.Failure
 
of(MethodWrapper) - Static method in class io.github.valentinherrmann.levenshtein.Failure
 
of(String) - Static method in class io.github.valentinherrmann.levenshtein.Failure
 
ONE_FOR_EVERYTHING - Enum constant in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Creates a single test for all structural elements
ONE_PER_CLASS - Enum constant in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Creates one test per class, including all its members
ONE_PER_MEMBER - Enum constant in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Creates individual tests for each member
ONE_PER_MEMBER_CATEGORY - Enum constant in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Creates separate tests for class, constructors, attributes, and methods
othersReturnDefaults() - Method in class io.github.valentinherrmann.levenshtein.Mock
Makes this a full mock: methods without override return their default value (0, false, null) instead of running the student's code.
override(MethodWrapper, Function) - Method in class io.github.valentinherrmann.levenshtein.Mock
Replaces a method: every call of it runs function instead of the student's code.

P

parseExistence() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
 
parseExistence() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
parseExistence() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
 
parseExistence() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
parseExistence() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Parses and updates the existence state based on all properties.
parseExistence(WrapperProperty...) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Helper method to parse existence state from multiple wrapper properties.

R

reference(String, String) - Static method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Creates a wrapper that only refers to a student class by its expected name, for use as the type of an attribute, a return value or a parameter, e.g.
relevantModifierMask() - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
 
relevantModifierMask() - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
 
relevantModifierMask() - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
relevantModifierMask() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
The modifier bits that are meaningful for this kind of element.
reset() - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Restores all defaults (German messages, 20 % for every threshold, getter/setter values compared by content, unexpected modifiers deviate, 2 decimals).
resetCalls() - Method in class io.github.valentinherrmann.levenshtein.Mock
Forgets all recorded calls, e.g. after preparing the object.
returning(MethodWrapper, Object) - Method in class io.github.valentinherrmann.levenshtein.Mock
Replaces a method by one that always returns value.
run() - Method in interface io.github.valentinherrmann.levenshtein.Failure.ThrowingRunnable
 

S

safeCast(Object, Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Converts a value to the given type: returns the value itself if it already is an instance, or converts between numeric types (e.g. an int result where a double is expected; char counts as numeric type).
safeCast(Object, Class, boolean) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Like Utils.safeCast(Object, Class), but optionally permits null.
scenario(String) - Method in class io.github.valentinherrmann.levenshtein.Failure
 
selectWorstExistence(WrapperProperty.Existence, WrapperProperty.Existence) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Selects the worse existence state between two states, ignoring UNCHECKED.
setAttributeNameDeviationThreshold(int) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
setCachedObj(Object) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Sets the cached default instance, e.g. to an object created in a test.
setClassNameDeviationThreshold(int) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
setDecimals(int) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Sets the number of decimals of double and float values in failure messages, e.g.
setGettersSettersRequireSameObject(boolean) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Chooses how testGettersSetters compares the value it set with the value it reads back.
setLanguage(LevenshteinSettings.Language) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
setMethodNameDeviationThreshold(int) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
setUnexpectedModifiers(LevenshteinSettings.UnexpectedModifiers) - Static method in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
Chooses how modifiers that the test does not expect are treated, see LevenshteinSettings.UnexpectedModifiers.
setValue(Object) - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Sets the value of this attribute on a default instance.
setValue(Object, Object) - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
Sets the value of this attribute on a specific object instance.
severity() - Method in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
 
StaticStateReset - Class in io.github.valentinherrmann.levenshtein
Resets attributes that the student declared static although the test expects an instance attribute (issue #35), so that their state does not leak from one test into the next.
StaticStateReset() - Constructor for class io.github.valentinherrmann.levenshtein.StaticStateReset
 
StructuralLevenshtein - Class in io.github.valentinherrmann.levenshtein
Utility class for generating structural validation tests using wrapper objects.
StructuralLevenshtein.DetailLevel - Enum Class in io.github.valentinherrmann.levenshtein
Enumeration defining the level of detail for structural test generation.
structuralTestFactory(StructuralLevenshtein.DetailLevel, boolean, ClassWrapper...) - Static method in class io.github.valentinherrmann.levenshtein.StructuralLevenshtein
Like StructuralLevenshtein.structuralTestFactory(DetailLevel, ClassWrapper[]), but chooses whether groups without wrappers get a test.
structuralTestFactory(StructuralLevenshtein.DetailLevel, ClassWrapper...) - Static method in class io.github.valentinherrmann.levenshtein.StructuralLevenshtein
Factory method for creating dynamic structural tests based on class wrappers.
structuralTestTemplate(List) - Static method in class io.github.valentinherrmann.levenshtein.StructuralLevenshtein
Template method for structural testing that checks wrapper existence states.

T

testGetter(AttributeWrapper, MethodWrapper) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Tests that a getter method returns the value of an attribute.
testGettersSetters(AttributeWrapper, MethodWrapper...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Tests the getter and/or setter of an attribute without conditions, i.e. the setter stores every value and the getter returns the stored value.
testGettersSetters(AttributeWrapper, Predicate, MethodWrapper...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Like ClassWrapper.testGettersSetters(AttributeWrapper, MethodWrapper[]), but the setter must only store values for which setterCondition holds.
testGettersSetters(AttributeWrapper, List, MethodWrapper...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Like ClassWrapper.testGettersSetters(AttributeWrapper, MethodWrapper[]), but with own sample values instead of generated ones (required for types without generated values, e.g. own classes).
testGettersSetters(AttributeWrapper, List, Predicate, MethodWrapper...) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
thrown(Throwable) - Method in class io.github.valentinherrmann.levenshtein.Failure
Shows an exception of the student code as actual outcome, e.g.
Timeouts - Section in class io.github.valentinherrmann.levenshtein.LevenshteinSettings
 
toString() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
toString() - Method in class io.github.valentinherrmann.levenshtein.Failure
 
toString() - Method in enum class io.github.valentinherrmann.levenshtein.Messages
 
toString() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns a string representation of this wrapped element showing its existence state.
toString() - Method in class io.github.valentinherrmann.levenshtein.WrapperProperty
Returns a string representation showing expected, actual, and existence state.
toWrapperType(Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Converts a primitive type to its corresponding wrapper type.

U

UNCHECKED - Enum constant in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Property has not yet been checked (unknown).
UNEXPECTED_MODIFIERS - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Appended to a deviation when the actual element has modifiers that are not expected.
unwrapPrimitive(Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Unwraps a primitive wrapper class to its corresponding primitive type.
usability() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
A class can be used in behavioral tests as soon as it was found, even if e.g. its superclass deviates.
usability() - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Returns the state that decides whether the element can be used in behavioral tests.
Usage - Section in enum class io.github.valentinherrmann.levenshtein.Messages
 
Utils - Class in io.github.valentinherrmann.levenshtein
 

V

valueOf(String) - Static method in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.Language
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.UnexpectedModifiers
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.valentinherrmann.levenshtein.Messages
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Returns the enum constant of this class with the specified name.
values() - Static method in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.Language
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.valentinherrmann.levenshtein.LevenshteinSettings.UnexpectedModifiers
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.valentinherrmann.levenshtein.Messages
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.valentinherrmann.levenshtein.StructuralLevenshtein.DetailLevel
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Returns an array containing the constants of this enum class, in the order they are declared.
verifyExistence(boolean) - Method in class io.github.valentinherrmann.levenshtein.AttributeWrapper
 
verifyExistence(boolean) - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
 
verifyExistence(boolean) - Method in class io.github.valentinherrmann.levenshtein.ConstructorWrapper
 
verifyExistence(boolean) - Method in class io.github.valentinherrmann.levenshtein.MethodWrapper
 
verifyExistence(boolean) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Verifies that the wrapped element exists in the actual class.
verifyExistence(String, boolean) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Verifies existence with a custom failure message.
verifyInterfaces() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Verifies that the actual interfaces match the expected interfaces.
verifyModifiers(int) - Method in class io.github.valentinherrmann.levenshtein.Wrapper
Verifies that the actual modifiers match the expected modifiers.
verifySuperClass() - Method in class io.github.valentinherrmann.levenshtein.ClassWrapper
Verifies that the actual superclass matches or is compatible with the expected superclass.
verifyType(WrapperProperty, Class) - Static method in class io.github.valentinherrmann.levenshtein.Utils
Verifies that the actual type matches or is compatible with the expected type.

W

worst(WrapperProperty.Existence, WrapperProperty.Existence) - Static method in enum class io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
Returns the worse of two states.
Wrapper<T> - Class in io.github.valentinherrmann.levenshtein
Abstract base class for wrapping and verifying Java reflection elements (classes, methods, fields, constructors).
Wrapper(ClassWrapper, String, String...) - Constructor for class io.github.valentinherrmann.levenshtein.Wrapper
Constructs a new Wrapper for a reflection element with expected name and modifiers.
WRAPPER_CHECK_FAILED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown in a structural test when checking one element failed unexpectedly.
WRAPPER_DEVIATION - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a structural element deviates from the expected signature.
WRAPPER_MISSING - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a structural element is completely missing.
WRAPPER_UNCHECKED - Enum constant in enum class io.github.valentinherrmann.levenshtein.Messages
Shown when a structural element has not been checked yet (debug / internal state).
WrapperProperty<T> - Class in io.github.valentinherrmann.levenshtein
A wrapper for properties of reflection elements that tracks expected vs. actual values and their existence state (exact match, deviation, missing, or unchecked).
WrapperProperty(T) - Constructor for class io.github.valentinherrmann.levenshtein.WrapperProperty
Constructs a new WrapperProperty with an expected value.
WrapperProperty.Existence - Enum Class in io.github.valentinherrmann.levenshtein
Enumeration representing the existence state of a property.
A C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values