| Modifier and Type | Field and Description |
|---|---|
protected Map<Class,WeakReference<Resolution>> |
entries |
| Constructor and Description |
|---|
InstantiationCache() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
postProcess(T object,
ResolutionContext context,
Resolution<?> resolution)
Processes the newly created object.
|
Resolution<?> |
resolve(ResolutionContext context)
Resolves the context such that the object identified by the context's object identifier can be
instantiated or retrieved.
|
protected boolean |
shouldCacheMethod(ResolutionContext context)
Returns whether the instantiation method from the given context should be cached.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonAnnotation, onProvider, onProviderClassprotected Map<Class,WeakReference<Resolution>> entries
public Resolution<?> resolve(ResolutionContext context)
Handler
The returned Resolution must correspond to the type represented by the context's object identifier.
public <T> T postProcess(T object,
ResolutionContext context,
Resolution<?> resolution)
HandlerpostProcess in interface HandlerT - the object's typeobject - the object that was instantiatedcontext - the resolution contextresolution - the resolution that was used to create the objectprotected boolean shouldCacheMethod(ResolutionContext context)
context - the context to processCopyright © 2017. All rights reserved.