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 Classes
    Modifier and Type
    Interface
    Description
    static enum 
    A non-operational null value guard.
    static class 
    A null value guard that expects a reference type and that skips the comparison if both values are null but returns if the invoked instance's field value is null but not the compared instance's value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a stack manipulation to apply after computing equality.
    Returns a stack manipulation to apply before computing equality.
    int
    Returns the required padding for the local variable array to apply this guard.
  • Method Details

    • before

      Returns a stack manipulation to apply before computing equality.
      Returns:
      A stack manipulation to apply before computing equality.
    • 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.