1 23 24 package org.objectweb.fractal.julia.conform.components; 25 26 import org.objectweb.fractal.api.control.BindingController; 27 28 import java.util.Map ; 29 import java.util.HashMap ; 30 31 public class C implements CAttributes, BindingController, I, J { 32 33 private boolean x1; 34 private byte x2; 35 private char x3; 36 private short x4; 37 private int x5; 38 private long x6; 39 private float x7; 40 private double x8; 41 private String x9; 42 private boolean x11; 43 44 private I i; 45 46 private Map j = new HashMap (); 47 48 50 public boolean getX1 () { 51 return x1; 52 } 53 54 public void setX1 (boolean x1) { 55 this.x1 = x1; 56 } 57 58 public byte getX2 () { 59 return x2; 60 } 61 62 public void setX2 (byte x2) { 63 this.x2 = x2; 64 } 65 66 public char getX3 () { 67 return x3; 68 } 69 70 public void setX3 (char x3) { 71 this.x3 = x3; 72 } 73 74 public short getX4 () { 75 return x4; 76 } 77 78 public void setX4 (short x4) { 79 this.x4 = x4; 80 } 81 82 public int getX5 () { 83 return x5; 84 } 85 86 public void setX5 (int x5) { 87 this.x5 = x5; 88 } 89 90 public long getX6 () { 91 return x6; 92 } 93 94 public void setX6 (long x6) { 95 this.x6 = x6; 96 } 97 98 public float getX7 () { 99 return x7; 100 } 101 102 public void setX7 (float x7) { 103 this.x7 = x7; 104 } 105 106 public double getX8 () { 107 return x8; 108 } 109 110 public void setX8 (double x8) { 111 this.x8 = x8; 112 } 113 114 public String getX9 () { 115 return x9; 116 } 117 118 public void setX9 (String x9) { 119 this.x9 = x9; 120 } 121 122 public boolean getReadOnlyX10 () { 123 return true; 124 } 125 126 public void setWriteOnlyX11 (boolean x11) { 127 this.x11 = x11; 128 } 129 130 132 public String [] listFc () { 133 String [] result = new String [j.size() + 1]; 134 j.keySet().toArray(result); 135 result[j.size()] = "client"; 136 return result; 137 } 138 139 public Object lookupFc (String s) { 140 if (s.equals("client")) { 141 return i; 142 } else if (s.startsWith("clients")) { 143 return j.get(s); 144 } 145 return null; 146 } 147 148 public void bindFc (String s, Object o) { 149 if (s.equals("client")) { 150 i = (I)o; 151 } else if (s.startsWith("clients")) { 152 j.put(s, o); 153 } 154 } 155 156 public void unbindFc (String s) { 157 if (s.equals("client")) { 158 i = null; 159 } else if (s.startsWith("clients")) { 160 j.remove(s); 161 } 162 } 163 164 166 public void m (boolean v) { 167 } 168 169 public void m (byte v) { 170 } 171 172 public void m (char v) { 173 } 174 175 public void m (short v) { 176 } 177 178 public void m (int v) { 179 } 180 181 public void m (long v) { 182 } 183 184 public void m (float v) { 185 } 186 187 public void m (double v) { 188 } 189 190 public void m (String v) { 191 } 192 193 public void m (String [] v) { 194 } 195 196 public boolean n (boolean v, String [] w) { 197 return v | x11; } 199 200 public byte n (byte v, String w) { 201 return v; 202 } 203 204 public char n (char v, double w) { 205 return v; 206 } 207 208 public short n (short v, float w) { 209 return v; 210 } 211 212 public int n (int v, long w) { 213 if (i != null) { 214 return w == 0 ? v : i.n(v + 1, w - 1); 216 } else if (j.size() > 0) { 217 return w == 0 ? v : ((I)j.values().iterator().next()).n(v + 1, w - 1); 219 } else { 220 return v; 221 } 222 } 223 224 public long n (long v, int w) { 225 return v; 226 } 227 228 public float n (float v, short w) { 229 return v; 230 } 231 232 public double n (double v, char w) { 233 return v; 234 } 235 236 public String n (String v, byte w) { 237 return v; 238 } 239 240 public String [] n (String [] v, boolean w) { 241 return v; 242 } 243 } 244 | Popular Tags |