File: PrimitivesBuilder.java

package info (click to toggle)
castor 1.3.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 44,976 kB
  • sloc: java: 206,032; xml: 95,088; sql: 14,460; sh: 365; makefile: 10
file content (31 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

import java.util.Vector;

import org.castor.xmlctf.ObjectModelBuilder;

public class PrimitivesBuilder implements ObjectModelBuilder {

    /**
     * Build the object expected when unmarshalling 'input1.xml'.
     */
    public Object buildInstance() {
        TestPrimitiveToWrapper test = new TestPrimitiveToWrapper();
        test.setBooleanTestAtt(new Boolean(false));
        test.setFloatTestAtt(new Float(3.141526f));
        test.setDoubleTestAtt(new Double(1.171077));
        test.setIntTestAtt(new Integer(23));
        test.setIntegerTestAtt(new Long(12));
        test.setLongTestAtt(new Long(23121311L));
        test.setShortTestAtt(new Short((short)2));
        test.setBooleanTest(new Boolean(true));
        test.setFloatTest(new Float(123456.78f));
        test.setDoubleTest(new Double(0.6385682166079459));
        test.setIntTest(new Integer(12));
        test.addIntegerTest(new Long(325325));
        test.setLongTest(new Long(98998989898L));
        test.setShortTest(new Short((short)34));

        return test;
    }

}