org.apache.excalibur.mpool
Class PoolUtil

java.lang.Object
  extended by org.apache.excalibur.mpool.PoolUtil

public final class PoolUtil
extends java.lang.Object

The PoolUtil class performs the reflection magic that is necessary to work with the legacy Recyclable interface in the Pool package. It also works with the new Resettable interface in MPool.

Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
Author:
Avalon Development Team

Field Summary
private static java.lang.Object[] EMPTY
           
private static java.lang.Class[] EMPTY_ARGS
           
 
Constructor Summary
private PoolUtil()
           
 
Method Summary
static java.lang.Object recycle(java.lang.Object obj)
          This method will either call "reset" on Resettable objects, or it will call "recycle" on Recyclable objects.
private static void recycleLegacy(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

private static final java.lang.Object[] EMPTY

EMPTY_ARGS

private static final java.lang.Class[] EMPTY_ARGS
Constructor Detail

PoolUtil

private PoolUtil()
Method Detail

recycle

public static java.lang.Object recycle(java.lang.Object obj)
This method will either call "reset" on Resettable objects, or it will call "recycle" on Recyclable objects.

Parameters:
obj - The object you want recycled.
Returns:
the same object

recycleLegacy

private static void recycleLegacy(java.lang.Object obj)
                           throws java.lang.Exception
Throws:
java.lang.Exception