1 17 package org.apache.avalon.lifecycle; 18 19 import org.apache.avalon.framework.context.Context; 20 import org.apache.avalon.framework.logger.AbstractLogEnabled; 21 22 26 public class AbstractCreator extends AbstractLogEnabled implements Creator 27 { 28 29 33 41 public void create( Object object, Context context ) 42 throws Exception 43 { 44 if( getLogger() == null ) 45 { 46 return; 47 } 48 49 if( getLogger().isDebugEnabled() ) 50 { 51 getLogger().debug( 52 "creating " + object.getClass().getName() 53 + "#" + System.identityHashCode( object ) ); 54 } 55 } 56 57 64 public void destroy( Object object, Context context ) 65 { 66 if( getLogger() == null ) 67 { 68 return; 69 } 70 71 if( getLogger().isDebugEnabled() ) 72 { 73 getLogger().debug( 74 "destroying " + object.getClass().getName() 75 + "#" + System.identityHashCode( object ) ); 76 } 77 } 78 } 79 | Popular Tags |