1 32 package net.sf.retrotranslator.tests.custom; 33 34 import net.sf.retrotranslator.tests.TestBean; 35 36 39 public class _TestBean { 40 41 public static class FirstTestBeanBuilder { 42 private boolean visible; 43 private char sign; 44 private byte code; 45 private short width; 46 private int height; 47 private float opacity; 48 private long area; 49 private double weight; 50 private String name; 51 52 protected FirstTestBeanBuilder( 53 boolean visible, char sign, byte code, short width, 54 int height, float opacity, long area, double weight, String name) { 55 this.visible = visible; 56 this.sign = sign; 57 this.code = code; 58 this.width = width; 59 this.height = height; 60 this.opacity = opacity; 61 this.area = area; 62 this.weight = weight; 63 this.name = name; 64 } 65 66 public String argument1() { 67 return name; 68 } 69 70 public double argument2() { 71 return weight; 72 } 73 74 public long argument3() { 75 return area; 76 } 77 78 public float argument4() { 79 return opacity; 80 } 81 82 public int argument5() { 83 return height; 84 } 85 86 public short argument6() { 87 return width; 88 } 89 90 public byte argument7() { 91 return code; 92 } 93 94 public boolean argument9() { 95 return visible; 96 } 97 98 public char argument8() { 99 return sign; 100 } 101 102 public void initialize(TestBean testBean) { 103 testBean.setState("initialized"); 104 } 105 106 } 107 108 public static class SecondTestBeanBuilder { 109 110 private String state; 111 112 public SecondTestBeanBuilder(String state) { 113 this.state = state; 114 } 115 116 public void initialize(TestBean testBean) { 117 testBean.setState(state); 118 } 119 120 } 121 122 public static FirstTestBeanBuilder createInstanceBuilder( 123 boolean visible, char sign, byte code, short width, 124 int height, float opacity, long area, double weight, String name) { 125 return new FirstTestBeanBuilder(visible, sign, code, width, height, opacity, area, weight, name); 126 } 127 128 public static SecondTestBeanBuilder createInstanceBuilder(String state) { 129 return new SecondTestBeanBuilder(state); 130 } 131 132 } 133 | Popular Tags |