1 23 24 29 30 package com.sun.appserv.management.util.stringifier; 31 32 import java.util.Iterator ; 33 import java.util.Collection ; 34 35 36 39 public class StringifierRegistryIniterImpl implements StringifierRegistryIniter 40 { 41 private final StringifierRegistry mRegistry; 42 43 public 44 StringifierRegistryIniterImpl( StringifierRegistry registry ) 45 { 46 mRegistry = registry; 47 48 registerTypes(); 49 } 50 51 void 52 registerTypes() 53 { 54 if ( mRegistry.lookup( Iterator .class ) == null ) 55 { 56 add( Iterator .class, IteratorStringifier.DEFAULT ); 57 add( Collection .class, CollectionStringifier.DEFAULT ); 58 add( Object .class, SmartStringifier.DEFAULT ); 59 60 add( java.security.Provider .class, ProviderStringifier.DEFAULT ); 61 } 62 } 63 64 65 public void 66 add( Class theClass, Stringifier theStringifier ) 67 { 68 mRegistry.add( theClass, theStringifier ); 69 } 70 71 public StringifierRegistry 72 getRegistry() 73 { 74 return( mRegistry ); 75 } 76 77 } 78 79 80 81 | Popular Tags |