Class KiwiCloseables.CloseDescriptor

java.lang.Object
org.kiwiproject.beta.base.KiwiCloseables.CloseDescriptor
Enclosing class:
KiwiCloseables

public static class KiwiCloseables.CloseDescriptor extends Object
A description of how to close a specific object.
  • Method Details

    • of

      public static KiwiCloseables.CloseDescriptor of(@Nullable Object object)
      Create an instance assuming the method to close the object is named "close".
      Parameters:
      object - to object to close
      Returns:
      a new instance
    • of

      public static KiwiCloseables.CloseDescriptor of(@Nullable Object object, String closeMethodName)
      Create an instance assuming the method to close the object is named closeMethodName.
      Parameters:
      object - the object to close
      closeMethodName - the name of the method that will close the object
      Returns:
      a new instance
    • object

      public @Nullable Object object()
      Contains the object to be closed, or null.
    • closeMethodName

      public String closeMethodName()
      The name of the "close" method.