Class Recycler.Recyclable
- java.lang.Object
-
- nonapi.io.github.classgraph.utils.Recycler.Recyclable
-
- All Implemented Interfaces:
AutoCloseable
public class Recycler.Recyclable extends Object implements AutoCloseable
An AutoCloseable wrapper for a recyclable object instance. Use in try-with-resources.
-
-
Constructor Summary
Constructors Constructor Description Recyclable()
Acquire or allocate an instance.
-
-
-
Method Detail
-
get
public T get()
- Returns:
- The new or recycled object instance.
-
close
public void close()
Recycle an instance. CallsRecycler.Resettable.reset()
if the instance implementsRecycler.Resettable
.- Specified by:
close
in interfaceAutoCloseable
-
-