Class RuntimeProcessingEnvironmentSupplier
java.lang.Object
org.microbean.construct.RuntimeProcessingEnvironmentSupplier
- All Implemented Interfaces:
AutoCloseable,Supplier<ProcessingEnvironment>
public final class RuntimeProcessingEnvironmentSupplier
extends Object
implements AutoCloseable, Supplier<ProcessingEnvironment>
A utility class that can supply a
ProcessingEnvironment suitable for use at runtime.- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()Closes thisRuntimeProcessingEnvironmentSupplier, which invalidates allProcessingEnvironments supplied by it.final ProcessingEnvironmentget()Returns a non-null,ProcessingEnvironmentsuitable for runtime use.static final RuntimeProcessingEnvironmentSupplierof()Returns a non-nullRuntimeProcessingEnvironmentSupplier.
-
Method Details
-
close
Closes thisRuntimeProcessingEnvironmentSupplier, which invalidates allProcessingEnvironments supplied by it.A subsequent call to
get()will reset thisRuntimeProcessingEnvironmentSupplier.Closing a
RuntimeProcessingEnvironmentSupplierthat has already been closed has no effect.Most users should not have a need to call this method.
RuntimeProcessingEnvironmentSupplierinstances do not have to be closed.- Specified by:
closein interfaceAutoCloseable- See Also:
-
get
Returns a non-null,ProcessingEnvironmentsuitable for runtime use.ProcessingEnvironmentinstances are not guaranteed to be thread-safe.- Specified by:
getin interfaceSupplier<ProcessingEnvironment>- Returns:
- a non-
nullProcessingEnvironment - See Also:
-
of
Returns a non-nullRuntimeProcessingEnvironmentSupplier.- Returns:
- a non-
nullRuntimeProcessingEnvironmentSupplier - See Also:
-