commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian K. Wallace" <>
Subject [betwixt] BeanReader - setXXX(Object)
Date Fri, 04 Apr 2003 04:55:42 GMT
  I was wondering if there is something I'm missing, or if Betwixt just
  can't do it as is. Given the following XML:
  <name>Element 1</name>

and the following bean mapped to the "Element" XML element:

public class ElementBean {
  private String mName;
  private Object mValue;

  public ElementBean() {

  public void setName(String iName) {
    mName = iName;

  public String getName() {
    return mName;

  public void setValue(Object iValue) {
    mValue = iValue;

  public Object getValue() {
    return mValue;

Is there any way to get the value (5) into the Element's setValue method
as an Integer as opposed to an Object?  I rely on being able to reuse
objects and pulling out the values as appropriate, but with the
BeanReader, all calls to 'getValue' result in Object@....
Aside from my 'Object'ion, the reader parses fine. Any help would be

View raw message