1 /* 2 * jDTAUS Core RI Client Container 3 * Copyright (C) 2005 Christian Schulte 4 * <cs@schulte.it> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 package org.jdtaus.core.container.ri.client.test; 22 23 import org.jdtaus.core.container.ContainerFactory; 24 import org.jdtaus.core.container.ContainerInitializer; 25 26 /** 27 * Implementation used for testing the {@code Container} runtime. 28 * 29 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 30 * @version $JDTAUS: TestImplementation.java 8641 2012-09-27 06:45:17Z schulte $ 31 */ 32 public class TestImplementation 33 implements MultitonSpecification, ContainerInitializer 34 { 35 //--Implementation---------------------------------------------------------- 36 37 // This section is managed by jdtaus-container-mojo. 38 39 40 //----------------------------------------------------------Implementation-- 41 //--Constructors------------------------------------------------------------ 42 43 // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors 44 // This section is managed by jdtaus-container-mojo. 45 46 /** Standard implementation constructor <code>org.jdtaus.core.container.ri.client.test.TestImplementation</code>. */ 47 public TestImplementation() 48 { 49 super(); 50 } 51 52 // </editor-fold>//GEN-END:jdtausConstructors 53 54 //------------------------------------------------------------Constructors-- 55 //--ContainerInitializer---------------------------------------------------- 56 57 /** Flag indicating that the {@link #initialize()} method got called. */ 58 private boolean initialized; 59 60 public void initialize() 61 { 62 this.initialized = true; 63 } 64 65 //----------------------------------------------------ContainerInitializer-- 66 //--Dependencies------------------------------------------------------------ 67 68 // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausDependencies 69 // This section is managed by jdtaus-container-mojo. 70 71 /** 72 * Gets the configured <code>CycleTestSpecification</code> implementation. 73 * 74 * @return the configured <code>CycleTestSpecification</code> implementation. 75 */ 76 protected CycleTestSpecification getCycleTestSpecification() 77 { 78 return (CycleTestSpecification) ContainerFactory.getContainer(). 79 getDependency( this, "CycleTestSpecification"); 80 81 } 82 83 /** 84 * Gets the configured <code>MultitonSpecification</code> implementation. 85 * 86 * @return the configured <code>MultitonSpecification</code> implementation. 87 */ 88 protected MultitonSpecification getMultitonSpecification() 89 { 90 return (MultitonSpecification) ContainerFactory.getContainer(). 91 getDependency( this, "MultitonSpecification"); 92 93 } 94 95 // </editor-fold>//GEN-END:jdtausDependencies 96 97 //------------------------------------------------------------Dependencies-- 98 //--Properties-------------------------------------------------------------- 99 100 // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausProperties 101 // This section is managed by jdtaus-container-mojo. 102 103 /** 104 * Gets the value of property <code>stringObject</code>. 105 * 106 * @return Test-Property 107 */ 108 public java.lang.String getStringObject() 109 { 110 return (java.lang.String) ContainerFactory.getContainer(). 111 getProperty( this, "stringObject" ); 112 113 } 114 115 /** 116 * Gets the value of property <code>shortObject</code>. 117 * 118 * @return Test-Property 119 */ 120 public java.lang.Short getShortObject() 121 { 122 return (java.lang.Short) ContainerFactory.getContainer(). 123 getProperty( this, "shortObject" ); 124 125 } 126 127 /** 128 * Gets the value of property <code>short</code>. 129 * 130 * @return Test-Property 131 */ 132 public short getShort() 133 { 134 return ( (java.lang.Short) ContainerFactory.getContainer(). 135 getProperty( this, "short" ) ).shortValue(); 136 137 } 138 139 /** 140 * Gets the value of property <code>longObject</code>. 141 * 142 * @return Test-Property 143 */ 144 public java.lang.Long getLongObject() 145 { 146 return (java.lang.Long) ContainerFactory.getContainer(). 147 getProperty( this, "longObject" ); 148 149 } 150 151 /** 152 * Gets the value of property <code>long</code>. 153 * 154 * @return Test-Property 155 */ 156 public long getLong() 157 { 158 return ( (java.lang.Long) ContainerFactory.getContainer(). 159 getProperty( this, "long" ) ).longValue(); 160 161 } 162 163 /** 164 * Gets the value of property <code>integerObject</code>. 165 * 166 * @return Test-Property 167 */ 168 public java.lang.Integer getIntegerObject() 169 { 170 return (java.lang.Integer) ContainerFactory.getContainer(). 171 getProperty( this, "integerObject" ); 172 173 } 174 175 /** 176 * Gets the value of property <code>int</code>. 177 * 178 * @return Test-Property 179 */ 180 public int getInt() 181 { 182 return ( (java.lang.Integer) ContainerFactory.getContainer(). 183 getProperty( this, "int" ) ).intValue(); 184 185 } 186 187 /** 188 * Gets the value of property <code>floatObject</code>. 189 * 190 * @return Test-Property 191 */ 192 public java.lang.Float getFloatObject() 193 { 194 return (java.lang.Float) ContainerFactory.getContainer(). 195 getProperty( this, "floatObject" ); 196 197 } 198 199 /** 200 * Gets the value of property <code>float</code>. 201 * 202 * @return Test-Property 203 */ 204 public float getFloat() 205 { 206 return ( (java.lang.Float) ContainerFactory.getContainer(). 207 getProperty( this, "float" ) ).floatValue(); 208 209 } 210 211 /** 212 * Gets the value of property <code>doubleObject</code>. 213 * 214 * @return Test-Property 215 */ 216 public java.lang.Double getDoubleObject() 217 { 218 return (java.lang.Double) ContainerFactory.getContainer(). 219 getProperty( this, "doubleObject" ); 220 221 } 222 223 /** 224 * Gets the value of property <code>double</code>. 225 * 226 * @return Test-Property 227 */ 228 public double getDouble() 229 { 230 return ( (java.lang.Double) ContainerFactory.getContainer(). 231 getProperty( this, "double" ) ).doubleValue(); 232 233 } 234 235 /** 236 * Gets the value of property <code>characterObject</code>. 237 * 238 * @return Test-Property 239 */ 240 public java.lang.Character getCharacterObject() 241 { 242 return (java.lang.Character) ContainerFactory.getContainer(). 243 getProperty( this, "characterObject" ); 244 245 } 246 247 /** 248 * Gets the value of property <code>char</code>. 249 * 250 * @return Test-Property 251 */ 252 public char getChar() 253 { 254 return ( (java.lang.Character) ContainerFactory.getContainer(). 255 getProperty( this, "char" ) ).charValue(); 256 257 } 258 259 /** 260 * Gets the value of property <code>byteObject</code>. 261 * 262 * @return Test-Property 263 */ 264 public java.lang.Byte getByteObject() 265 { 266 return (java.lang.Byte) ContainerFactory.getContainer(). 267 getProperty( this, "byteObject" ); 268 269 } 270 271 /** 272 * Gets the value of property <code>byte</code>. 273 * 274 * @return Test-Property 275 */ 276 public byte getByte() 277 { 278 return ( (java.lang.Byte) ContainerFactory.getContainer(). 279 getProperty( this, "byte" ) ).byteValue(); 280 281 } 282 283 /** 284 * Gets the value of property <code>booleanObject</code>. 285 * 286 * @return Test-Property 287 */ 288 public java.lang.Boolean isBooleanObject() 289 { 290 return (java.lang.Boolean) ContainerFactory.getContainer(). 291 getProperty( this, "booleanObject" ); 292 293 } 294 295 /** 296 * Gets the value of property <code>boolean</code>. 297 * 298 * @return Test-Property 299 */ 300 public boolean isBoolean() 301 { 302 return ( (java.lang.Boolean) ContainerFactory.getContainer(). 303 getProperty( this, "boolean" ) ).booleanValue(); 304 305 } 306 307 // </editor-fold>//GEN-END:jdtausProperties 308 309 //--------------------------------------------------------------Properties-- 310 //--TestSpecification------------------------------------------------------- 311 312 public boolean isInitialized() 313 { 314 return this.initialized; 315 } 316 317 public MultitonSpecification getDependency() 318 { 319 return this.getMultitonSpecification(); 320 } 321 322 //-------------------------------------------------------TestSpecification-- 323 }