-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoit
More file actions
executable file
·58 lines (50 loc) · 1.18 KB
/
doit
File metadata and controls
executable file
·58 lines (50 loc) · 1.18 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /usr/bin/perl
doit("boolean", "allowed");
doit("double", "min");
doit("double", "max");
doit("DataValue", "anchor");
#doit("String", "fontname");
#doit("int", "fontsize");
#doit("RGBColor", "color");
#doit("double", "angle");
#doit("DPoint", "position");
#doit("DPoint", "anchor");
#doit("String", "positionbase");
#doit("DPoint", "base");
#doit("double", "anchor");
#doit("double", "length");
#doit("int", "pregap");
#doit("int", "postgap");
#doit("int", "minposition");
#doit("int", "maxposition");
#doit("Type", "type");
#doit("DataValue", "min");
#doit("DataValue", "max");
#doit("int", "tickmin");
#doit("int", "tickmax");
#doit("String", "highlightstyle");
#doit("int", "linewidth");
#doit("String", "id");
#doit("int", "position");
sub doit {
my $type = shift;
my $prop = shift;
my $Prop = ucfirst($prop);
print <<EOF
public $type get$Prop() {
return $prop;
}
public void set$Prop($type $prop) {
this.$prop = $prop;
}
public void set$Prop($type $prop, boolean isDefault) {
set$Prop($prop);
this.${prop}IsDefault = isDefault;
this.${prop}IsSet = true;
}
public void have$Prop() {
return ${prop}IsSet;
}
EOF
;
}