public class ObjenesisBase extends java.lang.Object implements Objenesis
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
cache
Strategy cache.
|
protected InstantiatorStrategy |
strategy
Strategy used by this Objenesi implementation to create classes
|
| Constructor and Description |
|---|
ObjenesisBase(InstantiatorStrategy strategy)
Constructor allowing to pick a strategy and using cache
|
ObjenesisBase(InstantiatorStrategy strategy,
boolean useCache)
Flexible constructor allowing to pick the strategy and if caching should be used
|
| Modifier and Type | Method and Description |
|---|---|
ObjectInstantiator |
getInstantiatorOf(java.lang.Class clazz)
Will pick the best instantiator for the provided class.
|
java.lang.Object |
newInstance(java.lang.Class clazz)
Will create a new object without any constructor being called
|
java.lang.String |
toString() |
protected final InstantiatorStrategy strategy
protected java.util.Map cache
public ObjenesisBase(InstantiatorStrategy strategy)
strategy - Strategy to usepublic ObjenesisBase(InstantiatorStrategy strategy, boolean useCache)
strategy - Strategy to useuseCache - If ObjectInstantiators should be cachedpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object newInstance(java.lang.Class clazz)
newInstance in interface Objenesisclazz - Class to instantiatepublic ObjectInstantiator getInstantiatorOf(java.lang.Class clazz)
newInstance(Class).getInstantiatorOf in interface Objenesisclazz - Class to instantiateCopyright © 2006-2012 Joe Walnes, Henri Tremblay, Leonardo Mesquita. All Rights Reserved.