1 //
2 // THIS FILE IS AUTOMATICALLY GENERATED!!
3 //
4 // Generated at 2009-08-09 by the VDM++ to JAVA Code Generator
5 // (v8.2.1b - Wed 15-Jul-2009 14:09:22)
6 //
7 // Supported compilers: jdk 1.4/1.5/1.6
8 //
9
10 // ***** VDMTOOLS START Name=HeaderComment KEEP=NO
11 // ***** VDMTOOLS END Name=HeaderComment
12
13 // ***** VDMTOOLS START Name=package KEEP=NO
14 package org.overturetool.umltrans.uml;
15
16 // ***** VDMTOOLS END Name=package
17
18 // ***** VDMTOOLS START Name=imports KEEP=NO
19
20 import jp.co.csk.vdm.toolbox.VDM.*;
21 import java.util.*;
22 // ***** VDMTOOLS END Name=imports
23
24
25
26 public class UmlLiteralInteger extends IUmlLiteralInteger {
27
28 // ***** VDMTOOLS START Name=vdmComp KEEP=NO
29 static UTIL.VDMCompare vdmComp = new UTIL.VDMCompare();
30 // ***** VDMTOOLS END Name=vdmComp
31
32 // ***** VDMTOOLS START Name=ivValue KEEP=NO
33 private Long ivValue = null;
34 // ***** VDMTOOLS END Name=ivValue
35
36
37 // ***** VDMTOOLS START Name=vdm_init_UmlLiteralInteger KEEP=NO
38 private void vdm_init_UmlLiteralInteger () throws CGException {
39 try {
40 ivValue = null;
41 }
42 catch (Exception e){
43
44 e.printStackTrace(System.out);
45 System.out.println(e.getMessage());
46 }
47 }
48 // ***** VDMTOOLS END Name=vdm_init_UmlLiteralInteger
49
50
51 // ***** VDMTOOLS START Name=UmlLiteralInteger KEEP=NO
52 public UmlLiteralInteger () throws CGException {
53 vdm_init_UmlLiteralInteger();
54 }
55 // ***** VDMTOOLS END Name=UmlLiteralInteger
56
57
58 // ***** VDMTOOLS START Name=identity KEEP=NO
59 public String identity () throws CGException {
60 return new String("LiteralInteger");
61 }
62 // ***** VDMTOOLS END Name=identity
63
64
65 // ***** VDMTOOLS START Name=accept#1|IUmlVisitor KEEP=NO
66 public void accept (final IUmlVisitor pVisitor) throws CGException {
67 pVisitor.visitLiteralInteger((IUmlLiteralInteger) this);
68 }
69 // ***** VDMTOOLS END Name=accept#1|IUmlVisitor
70
71
72 // ***** VDMTOOLS START Name=UmlLiteralInteger#1|Long KEEP=NO
73 public UmlLiteralInteger (final Long p1) throws CGException {
74
75 vdm_init_UmlLiteralInteger();
76 setValue(p1);
77 }
78 // ***** VDMTOOLS END Name=UmlLiteralInteger#1|Long
79
80
81 // ***** VDMTOOLS START Name=UmlLiteralInteger#3|Long|Long|Long KEEP=NO
82 public UmlLiteralInteger (final Long p1, final Long line, final Long column) throws CGException {
83
84 vdm_init_UmlLiteralInteger();
85 {
86
87 setValue(p1);
88 setPosition(line, column);
89 }
90 }
91 // ***** VDMTOOLS END Name=UmlLiteralInteger#3|Long|Long|Long
92
93
94 // ***** VDMTOOLS START Name=init#1|HashMap KEEP=NO
95 public void init (final HashMap data) throws CGException {
96
97 String fname = new String("value");
98 Boolean cond_4 = null;
99 cond_4 = new Boolean(data.containsKey(fname));
100 if (cond_4.booleanValue())
101 setValue(UTIL.NumberToLong(data.get(fname)));
102 }
103 // ***** VDMTOOLS END Name=init#1|HashMap
104
105
106 // ***** VDMTOOLS START Name=getValue KEEP=NO
107 public Long getValue () throws CGException {
108 return ivValue;
109 }
110 // ***** VDMTOOLS END Name=getValue
111
112
113 // ***** VDMTOOLS START Name=setValue#1|Long KEEP=NO
114 public void setValue (final Long parg) throws CGException {
115 ivValue = UTIL.NumberToLong(UTIL.clone(parg));
116 }
117 // ***** VDMTOOLS END Name=setValue#1|Long
118
119 }
120 ;