Package org.kiwiproject.beta.base
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcloseMethodName()The name of the "close" method.@Nullable Objectobject()Contains the object to be closed, ornull.static KiwiCloseables.CloseDescriptorof(@Nullable Object object)Create an instance assuming the method to close the object is named "close".static KiwiCloseables.CloseDescriptorof(@Nullable Object object, String closeMethodName)Create an instance assuming the method to close the object is namedcloseMethodName.
-
-
-
Method Detail
-
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 namedcloseMethodName.- Parameters:
object- the object to closecloseMethodName- 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, ornull.
-
closeMethodName
public String closeMethodName()
The name of the "close" method.
-
-