Package net.sf.jasperreports.engine.fill
Class JRClonePool
java.lang.Object
net.sf.jasperreports.engine.fill.JRClonePool
Working clones pooling utility used at fill time.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJRClonePool
(JRFillCloneable original, boolean trackLockedClones, boolean useOriginal) Creates a clone pool. -
Method Summary
Modifier and TypeMethodDescriptiongetClone()
Retrieves a clone from the pool.void
releaseClone
(Object clone) Release the clone back to the pool.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND
- See Also:
-
-
Constructor Details
-
JRClonePool
Creates a clone pool.- Parameters:
original
- the original element that will be clonedtrackLockedClones
- whether to track clones retrieved from the poolIf 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 clone
-
-
Method Details
-
getClone
Retrieves a clone from the pool.The clone is reserved to the caller who will need to call
releaseClone(Object)
to release it back to the pool.- Returns:
- a clone of the original object
-
releaseClone
Release the clone back to the pool. The clone will be available for other clients.- Parameters:
clone
- the clone to be released
-