1 16 17 package org.springframework.beans; 18 19 import java.io.Serializable ; 20 21 import org.springframework.beans.factory.BeanNameAware; 22 import org.springframework.beans.factory.DisposableBean; 23 24 28 public class DerivedTestBean extends TestBean implements Serializable , BeanNameAware, DisposableBean { 29 30 private String beanName; 31 32 private boolean initialized; 33 34 private boolean destroyed; 35 36 public void setBeanName(String beanName) { 37 this.beanName = beanName; 38 } 39 40 public String getBeanName() { 41 return beanName; 42 } 43 44 public void initialize() { 45 this.initialized = true; 46 } 47 48 public boolean wasInitialized() { 49 return initialized; 50 } 51 52 public void destroy() { 53 this.destroyed = true; 54 } 55 56 public boolean wasDestroyed() { 57 return destroyed; 58 } 59 60 } 61 | Popular Tags |