org.wamblee.inject
Class InjectorCache

java.lang.Object
  extended by org.wamblee.inject.InjectorCache

public class InjectorCache
extends java.lang.Object

Cache of CdiInjectors for efficiency to avoid duplicate analysis of a given class.

Author:
Erik Brakkee

Constructor Summary
InjectorCache(InjectorFactory aInjectorFactory)
          Constructs an empty cache.
 
Method Summary
 Injector getInjector(java.lang.Class aClass)
          Gets the injector for a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectorCache

public InjectorCache(InjectorFactory aInjectorFactory)
Constructs an empty cache.

Parameters:
aInjectorFactory - Injector factory to create Injectors.
Method Detail

getInjector

public Injector getInjector(java.lang.Class aClass)
Gets the injector for a given class. This returns a cached injector or creates a new injector and caches it.

Parameters:
aClass - Class to find injector for.
Returns:
Injector.


Copyright © 2022. All Rights Reserved.