01: /*
02: * Copyright (C) 2007 XStream Committers.
03: * All rights reserved.
04: *
05: * The software in this package is published under the terms of the BSD
06: * style license a copy of which has been included with this distribution in
07: * the LICENSE.txt file.
08: *
09: * Created on 26. June 2007 by Joerg Schaible
10: */
11: package com.thoughtworks.xstream.benchmark.reflection.targets;
12:
13: import com.thoughtworks.xstream.benchmark.reflection.model.A100Fields;
14: import com.thoughtworks.xstream.tools.benchmark.Target;
15:
16: import java.util.ArrayList;
17: import java.util.List;
18:
19: /**
20: * A Target for a 100 fields class.
21: *
22: * @author Jörg Schaible
23: * @see com.thoughtworks.xstream.tools.benchmark.Harness
24: * @see Target
25: */
26: public class FieldReflection extends AbstractReflectionTarget {
27:
28: public FieldReflection() {
29: super (new ArrayList());
30: List list = (List) target();
31: for (int i = 0; i < 100; ++i) {
32: Object o = new A100Fields();
33: fill(o);
34: list.add(o);
35: }
36: }
37:
38: public String toString() {
39: return "Field Target";
40: }
41:
42: }
|