FileDocCategorySizeDatePackage
StringifierRegistry.javaAPI DocGlassfish v2 API3698Fri May 04 22:25:02 BST 2007com.sun.cli.util.stringifier

StringifierRegistry

public class StringifierRegistry extends Object

Fields Summary
public static StringifierRegistry
DEFAULT
private final HashMap
mLookup
private final StringifierRegistry
mNextRegistry
Constructors Summary
public StringifierRegistry()

	
	/*
		Create a new registry.  Use the DEFAULT registry if possible;
		certain Stringifier classes depend on it.
	 */
		
	  
	
		this( null );
	
public StringifierRegistry(StringifierRegistry registry)

		mLookup			= new HashMap( );
		mNextRegistry	= registry;
	
Methods Summary
public voidadd(java.lang.Class theClass, Stringifier stringifier)

		mLookup.remove( theClass );
		mLookup.put( theClass, stringifier );
	
public Stringifierlookup(java.lang.Class theClass)

		Stringifier		stringifier	= (Stringifier)mLookup.get( theClass );
		
		if ( stringifier == null && mNextRegistry != null )
		{
		System.out.println( "can't find " + theClass.getName() );
			stringifier	= mNextRegistry.lookup( theClass );
		}
		
		return( stringifier );