Package org.apache.shiro.util
Class AbstractFactory<T>
- java.lang.Object
-
- org.apache.shiro.util.AbstractFactory<T>
-
- All Implemented Interfaces:
Factory<T>
- Direct Known Subclasses:
IniFactorySupport
public abstract class AbstractFactory<T> extends Object implements Factory<T>
TODO - Class JavaDoc- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T
createInstance()
T
getInstance()
Returns an instance of the required type.boolean
isSingleton()
void
setSingleton(boolean singleton)
-
-
-
Constructor Detail
-
AbstractFactory
public AbstractFactory()
-
-
Method Detail
-
isSingleton
public boolean isSingleton()
-
setSingleton
public void setSingleton(boolean singleton)
-
getInstance
public T getInstance()
Description copied from interface:Factory
Returns an instance of the required type. The implementation determines whether or not a new or cached instance is created every time this method is called.- Specified by:
getInstance
in interfaceFactory<T>
- Returns:
- an instance of the required type.
-
createInstance
protected abstract T createInstance()
-
-