public class JRClonePool extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND |
Constructor and Description |
---|
JRClonePool(JRFillCloneable original,
boolean trackLockedClones,
boolean useOriginal)
Creates a clone pool.
|
Modifier and Type | Method and Description |
---|---|
Object |
getClone()
Retrieves a clone from the pool.
|
void |
releaseClone(Object clone)
Release the clone back to the pool.
|
public static final String EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND
public JRClonePool(JRFillCloneable original, boolean trackLockedClones, boolean useOriginal)
original
- the original element that will be clonedtrackLockedClones
- whether to track clones retrieved from the pool
If set, the pool will keep a set of in-use clones and the caller will always have to release the clones back to the pool.
useOriginal
- whether the original object can be used as a working clonepublic Object getClone()
The clone is reserved to the caller who will need to call
releaseClone(Object)
to release it back to the pool.
public void releaseClone(Object clone)
clone
- the clone to be releasedCopyright © 2017. All rights reserved.