Class NoneScopelet
- All Implemented Interfaces:
AutoCloseable, Constable, Aggregate, Factory<NoneScopelet>
A
Scopelet implementation that does not cache objects at all.- Author:
- Laird Nelson
-
Field Summary
Fields inherited from interface Aggregate
EMPTY_ASSIGNMENTS, EMPTY_DEPENDENCIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<? extends ConstantDesc> <I> IChecks to see if thisScopeletis active and then returns a contextual instance created by the suppliedFactory.Methods inherited from class Scopelet
active, close, closed, create, destroy, destroys, fireScopeletDestroyed, fireScopeletDestroying, fireScopeletInitialized, remove, removes, singletonMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Aggregate
assign, dependencies
-
Constructor Details
-
NoneScopelet
public NoneScopelet()Creates a newNoneScopelet.
-
-
Method Details
-
instance
Checks to see if thisScopeletis active and then returns a contextual instance created by the suppliedFactory.This method (and its overrides) may return
null.If the supplied
Factoryisnull, this method will (and its overrides must) returnnull.- Specified by:
instancein classScopelet<NoneScopelet>- Type Parameters:
I- the type of contextual instance- Parameters:
ignoredBeanId- an identifier; ignored by the default implementation; may benullfactory- aFactory; may benullin which casenullwill and must be returnedcreation- aCreation, typically the one in effect that is causing this method to be invoked in the first place; may benull; most commonly also an instance ofDestructorRegistry- Returns:
- a contextual instance, or
null - Throws:
InactiveScopeletException- if thisScopeletis not activeClassCastException- if destruction is called for,creationis non-null, andcreationdoes not implementDestruction, a requirement of its contract- See Also:
-
describeConstable
- Specified by:
describeConstablein interfaceConstable- Specified by:
describeConstablein interfaceFactory<NoneScopelet>
-