Interface EqualsMethod.NullValueGuard
- All Known Implementing Classes:
EqualsMethod.NullValueGuard.NoOp, EqualsMethod.NullValueGuard.UsingJump
- Enclosing class:
EqualsMethod
protected static interface EqualsMethod.NullValueGuard
Guards a field value against a potential
null value.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA non-operational null value guard.static classA null value guard that expects a reference type and that skips the comparison if both values arenullbut returns if the invoked instance's field value isnullbut not the compared instance's value. -
Method Summary
-
Method Details
-
before
StackManipulation before()Returns a stack manipulation to apply before computing equality.- Returns:
- A stack manipulation to apply before computing equality.
-
after
StackManipulation after()Returns a stack manipulation to apply after computing equality.- Returns:
- A stack manipulation to apply after computing equality.
-
getRequiredVariablePadding
int getRequiredVariablePadding()Returns the required padding for the local variable array to apply this guard.- Returns:
- The required padding for the local variable array to apply this guard.
-