- }\r
- \r
- public void setBoolean(Object r, int index, boolean z) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==boolean.class || cl==Boolean.class ) {\r
- f.setBoolean(r, z); \r
- } else { \r
- BooleanBinding b = (BooleanBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(z));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public boolean getBoolean(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==boolean.class || cl==Boolean.class ) return f.getBoolean(r);\r
- Object o = getComponent(r, index);\r
- BooleanBinding b = (BooleanBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public void setByte(Object r, int index, byte x) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==byte.class || cl==Byte.class ) {\r
- f.setByte(r, x); \r
- } else { \r
- ByteBinding b = (ByteBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(x));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public byte getByte(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==byte.class || cl==Byte.class ) return f.getByte(r);\r
- Object o = getComponent(r, index);\r
- ByteBinding b = (ByteBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
-\r
- public void setInt(Object r, int index, int x) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==int.class || cl==Integer.class ) {\r
- f.setInt(r, x); \r
- } else { \r
- IntegerBinding b = (IntegerBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(x));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public int getInt(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==int.class || cl==Integer.class ) return f.getInt(r);\r
- Object o = getComponent(r, index);\r
- IntegerBinding b = (IntegerBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public void setLong(Object r, int index, long x) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==long.class || cl==Long.class ) {\r
- f.setLong(r, x); \r
- } else { \r
- LongBinding b = (LongBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(x));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public long getLong(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==long.class || cl==Long.class ) return f.getLong(r);\r
- Object o = getComponent(r, index);\r
- LongBinding b = (LongBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public void setFloat(Object r, int index, float x) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==float.class || cl==Float.class ) {\r
- f.setFloat(r, x); \r
- } else { \r
- FloatBinding b = (FloatBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(x));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public float getFloat(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==float.class || cl==Float.class ) return f.getFloat(r);\r
- Object o = getComponent(r, index);\r
- FloatBinding b = (FloatBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public void setDouble(Object r, int index, double x) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f.getType();\r
- if ( cl==double.class || cl==Double.class ) {\r
- f.setDouble(r, x); \r
- } else { \r
- DoubleBinding b = (DoubleBinding) getComponentBinding(index);\r
- setComponent(r, index, b.create(x));\r
- }\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
- \r
- public double getDouble(Object r, int index) throws BindingException\r
- {\r
- try {\r
- Field f = ci.fields[index];\r
- Class<?> cl = f==null?null:f.getType();\r
- if ( cl==double.class || cl==Double.class ) return f.getDouble(r);\r
- Object o = getComponent(r, index);\r
- DoubleBinding b = (DoubleBinding) getComponentBinding(index); \r
- return b.getValue_(o);\r
- } catch (IllegalArgumentException e) {\r
- throw new BindingException(e);\r
- } catch (IllegalAccessException e) {\r
- throw new BindingException(e);\r
- }\r
- }\r
-\r
+ }
+
+ public void setBoolean(Object r, int index, boolean z) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==boolean.class || cl==Boolean.class ) {
+ f.setBoolean(r, z);
+ } else {
+ BooleanBinding b = (BooleanBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(z));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public boolean getBoolean(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==boolean.class || cl==Boolean.class ) return f.getBoolean(r);
+ Object o = getComponent(r, index);
+ BooleanBinding b = (BooleanBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public void setByte(Object r, int index, byte x) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==byte.class || cl==Byte.class ) {
+ f.setByte(r, x);
+ } else {
+ ByteBinding b = (ByteBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(x));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public byte getByte(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==byte.class || cl==Byte.class ) return f.getByte(r);
+ Object o = getComponent(r, index);
+ ByteBinding b = (ByteBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public void setInt(Object r, int index, int x) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==int.class || cl==Integer.class ) {
+ f.setInt(r, x);
+ } else {
+ IntegerBinding b = (IntegerBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(x));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public int getInt(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==int.class || cl==Integer.class ) return f.getInt(r);
+ Object o = getComponent(r, index);
+ IntegerBinding b = (IntegerBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public void setLong(Object r, int index, long x) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==long.class || cl==Long.class ) {
+ f.setLong(r, x);
+ } else {
+ LongBinding b = (LongBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(x));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public long getLong(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==long.class || cl==Long.class ) return f.getLong(r);
+ Object o = getComponent(r, index);
+ LongBinding b = (LongBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public void setFloat(Object r, int index, float x) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==float.class || cl==Float.class ) {
+ f.setFloat(r, x);
+ } else {
+ FloatBinding b = (FloatBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(x));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public float getFloat(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==float.class || cl==Float.class ) return f.getFloat(r);
+ Object o = getComponent(r, index);
+ FloatBinding b = (FloatBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public void setDouble(Object r, int index, double x) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f.getType();
+ if ( cl==double.class || cl==Double.class ) {
+ f.setDouble(r, x);
+ } else {
+ DoubleBinding b = (DoubleBinding) getComponentBinding(index);
+ setComponent(r, index, b.create(x));
+ }
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+
+ public double getDouble(Object r, int index) throws BindingException
+ {
+ try {
+ Field f = ci.fields[index];
+ Class<?> cl = f==null?null:f.getType();
+ if ( cl==double.class || cl==Double.class ) return f.getDouble(r);
+ Object o = getComponent(r, index);
+ DoubleBinding b = (DoubleBinding) getComponentBinding(index);
+ return b.getValue_(o);
+ } catch (IllegalArgumentException e) {
+ throw new BindingException(e);
+ } catch (IllegalAccessException e) {
+ throw new BindingException(e);
+ }
+ }
+