我试图使用BeanUtils的同一个Java bean类似于以下交互的列表索引属性: public class Bean {
private List<Integer> prices = new LinkedList<Integer>();
public List<Integer> getPrices() {
return prices;
}
}
我有下面的类: import org.apache.commons.beanutils.BeanUtils;
import com.thoughtworks.xstream.XStream;
...
public class MyBean {
protected static final XStream XSTREAM = new XStream(new DomDriver())
我使用PropertyUtils.setProperty(对象名称,值)阿帕奇百科全书豆utils的的方法: 给这些类: public class A {
B b;
}
public class B {
C c;
}
public class C {
}
这: A a = new A();
C c = new C();
PropertyUtils.setP
在Apache Commons BeanUtil中,如何在列表中获取类型?例如 class Track {
List<Actor> actorList = new ArrayList<Actor>();
}
System.err.println(PropertyUtils.getPropertyType(trackBean, "actorList"));
// it should
我想在一个bean设置一个属性,我不能似乎得到BeanUtils的工作的BeanUtils ...... 继承人我得到这个问题的一个小例子。 public class Example
{
public static void main(String[] args)
{
Example example = new Example();
example.r