Class WrapperProperty<T>
java.lang.Object
io.github.valentinherrmann.levenshtein.WrapperProperty<T>
- Type Parameters:
T- the type of the property being wrapped
A wrapper for properties of reflection elements that tracks expected vs. actual values
and their existence state (exact match, deviation, missing, or unchecked).
DEVIATES indicates a partial match or acceptable deviation which allows behavioral testing
using this component. For names the acceptable deviation is set via
LevenshteinSettings; for types
it is based on assignability, numeric widening and primitive-wrapper equivalence.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration representing the existence state of a property. -
Constructor Summary
ConstructorsConstructorDescriptionWrapperProperty(T expected) Constructs a new WrapperProperty with an expected value. -
Method Summary
Modifier and TypeMethodDescriptiontoString()Returns a string representation showing expected, actual, and existence state.
-
Constructor Details
-
WrapperProperty
Constructs a new WrapperProperty with an expected value. The actual value is initialized to null and existence is set to UNCHECKED.- Parameters:
expected- the expected value of this property
-
-
Method Details
-
getExpected
- Returns:
- the expected value
-
getActual
- Returns:
- the actual value found via reflection, or
nullif not (yet) found
-
getExistence
- Returns:
- the existence state of this property
-
toString
-