1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.betwixt.schema;
18
19 import java.util.Vector;
20
21 /***
22 * <p> This is a bean specifically designed to test cyclic references.
23 * The idea is that there's a count that counts every time <code>getFriend</code>
24 * gets called and throws a <code>RuntimeException</code> if the count gets too high.</p>
25 *
26 * @author <a href='http://jakarta.apache.org/commons'>Jakarta Commons Team</a>, <a href='http://www.apache.org'>Apache Software Foundation</a>
27 */
28 public class CyclicBean {
29 private Vector layers = new Vector();
30
31 private String name;
32
33 public CyclicBean(String name)
34 {
35 this.name = name;
36 }
37
38 public Vector getLayers()
39 {
40 return this.layers;
41 }
42
43 public void setLayers(Vector vLayers)
44 {
45 this.layers = vLayers;
46 }
47
48 public void addLayer(CyclicLayer aLayer)
49 {
50 layers.add(aLayer);
51 }
52 public String getName()
53 {
54 return name;
55 }
56
57 public String toString()
58 {
59 return "[CyclicBean] name=" + name;
60 }
61
62 }