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.
Most users should simply use an appropriate DefaultDomain
instead of working directly with instances of this class.
- 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 safe for concurrent use by multiple threads.Most users should simply use an appropriate
DefaultDomaininstead of working directly with instances of this class.- Specified by:
getin interfaceSupplier<ProcessingEnvironment>- Returns:
- a non-
nullProcessingEnvironment - See Also:
-
of
Returns a non-nullRuntimeProcessingEnvironmentSupplier.Most users should simply use an appropriate
DefaultDomaininstead of working directly with instances of this class.- Returns:
- a non-
nullRuntimeProcessingEnvironmentSupplier - See Also:
-