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 void
close()
Closes thisRuntimeProcessingEnvironmentSupplier
, which invalidates allProcessingEnvironment
s supplied by it.final ProcessingEnvironment
get()
Returns a non-null
,ProcessingEnvironment
suitable for runtime use.static final RuntimeProcessingEnvironmentSupplier
of()
Returns a non-null
RuntimeProcessingEnvironmentSupplier
.
-
Method Details
-
close
Closes thisRuntimeProcessingEnvironmentSupplier
, which invalidates allProcessingEnvironment
s supplied by it.A subsequent call to
get()
will reset thisRuntimeProcessingEnvironmentSupplier
.Closing a
RuntimeProcessingEnvironmentSupplier
that has already been closed has no effect.Most users should not have a need to call this method.
RuntimeProcessingEnvironmentSupplier
instances do not have to be closed.- Specified by:
close
in interfaceAutoCloseable
- See Also:
-
get
Returns a non-null
,ProcessingEnvironment
suitable for runtime use.ProcessingEnvironment
instances are not guaranteed to be thread-safe.- Specified by:
get
in interfaceSupplier<ProcessingEnvironment>
- Returns:
- a non-
null
ProcessingEnvironment
- See Also:
-
of
Returns a non-null
RuntimeProcessingEnvironmentSupplier
.- Returns:
- a non-
null
RuntimeProcessingEnvironmentSupplier
- See Also:
-