1 15 package org.apache.tapestry.spec; 16 17 import java.util.ArrayList ; 18 import java.util.List ; 19 20 import org.apache.tapestry.bean.IBeanInitializer; 21 22 28 29 public class BeanSpecification extends LocatablePropertyHolder implements IBeanSpecification 30 { 31 protected String className; 32 33 protected BeanLifecycle lifecycle; 34 35 36 private String description; 37 38 39 40 private String _propertyName; 41 42 45 46 protected List initializers; 47 48 public String getClassName() 49 { 50 return className; 51 } 52 53 public BeanLifecycle getLifecycle() 54 { 55 return lifecycle; 56 } 57 58 61 62 public void addInitializer(IBeanInitializer initializer) 63 { 64 if (initializers == null) 65 initializers = new ArrayList (); 66 67 initializers.add(initializer); 68 } 69 70 76 77 public List getInitializers() 78 { 79 return initializers; 80 } 81 82 public String toString() 83 { 84 StringBuffer buffer = new StringBuffer ("BeanSpecification["); 85 86 buffer.append(className); 87 buffer.append(", lifecycle "); 88 buffer.append(lifecycle.getName()); 89 90 if (initializers != null && initializers.size() > 0) 91 { 92 buffer.append(", "); 93 buffer.append(initializers.size()); 94 buffer.append(" initializers"); 95 } 96 97 buffer.append(']'); 98 99 return buffer.toString(); 100 } 101 102 public String getDescription() 103 { 104 return description; 105 } 106 107 public void setDescription(String desc) 108 { 109 description = desc; 110 } 111 112 113 114 public void setClassName(String className) 115 { 116 this.className = className; 117 } 118 119 120 121 public void setLifecycle(BeanLifecycle lifecycle) 122 { 123 this.lifecycle = lifecycle; 124 } 125 126 127 public String getPropertyName() 128 { 129 return _propertyName; 130 } 131 132 133 public void setPropertyName(String propertyName) 134 { 135 _propertyName = propertyName; 136 } 137 } | Popular Tags |