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 | |
package com.sun.tools.javafx.tree; |
34 | |
|
35 | |
import com.sun.javafx.api.tree.JavaFXTree.JavaFXKind; |
36 | |
import com.sun.javafx.api.tree.JavaFXTreeVisitor; |
37 | |
import com.sun.javafx.api.tree.OnReplaceTree; |
38 | |
|
39 | 0 | public class JFXOnReplace extends JFXStatement implements OnReplaceTree { |
40 | |
|
41 | |
private final JFXVar firstIndex; |
42 | |
private final JFXVar oldValue; |
43 | |
private final JCBlock body; |
44 | |
private int endKind; |
45 | |
|
46 | |
private JFXVar lastIndex; |
47 | |
private JFXVar newElements; |
48 | |
|
49 | |
|
50 | |
public JFXOnReplace( JFXVar oldValue, JCBlock body) { |
51 | 0 | this(oldValue, null, null, 0, null, body); |
52 | 0 | } |
53 | |
|
54 | |
|
55 | |
public JFXOnReplace(JFXVar oldValue, JFXVar firstIndex, JFXVar lastIndex, |
56 | 252 | int endKind, JFXVar newElements, JCBlock body) { |
57 | 252 | this.oldValue = oldValue; |
58 | 252 | this.firstIndex = firstIndex; |
59 | 252 | this.lastIndex = lastIndex; |
60 | 252 | this.endKind = endKind; |
61 | 252 | this.newElements = newElements; |
62 | 252 | this.body = body; |
63 | 252 | } |
64 | |
|
65 | |
public void accept(JavafxVisitor v) { |
66 | 758 | v.visitOnReplace(this); |
67 | 758 | } |
68 | |
|
69 | |
|
70 | |
public int getTag() { |
71 | 504 | return JavafxTag.ON_REPLACE; |
72 | |
} |
73 | |
|
74 | |
public JFXVar getOldValue() { |
75 | 1039 | return oldValue; |
76 | |
} |
77 | |
|
78 | |
public JCBlock getBody() { |
79 | 884 | return body; |
80 | |
} |
81 | |
|
82 | |
public JFXVar getFirstIndex () { |
83 | 793 | return firstIndex; |
84 | |
} |
85 | |
|
86 | |
public JFXVar getLastIndex () { |
87 | 793 | return lastIndex; |
88 | |
} |
89 | |
|
90 | |
public JFXVar getNewElements () { |
91 | 1017 | return newElements; |
92 | |
} |
93 | |
|
94 | |
public JavaFXKind getJavaFXKind() { |
95 | 0 | return JavaFXKind.ON_REPLACE; |
96 | |
} |
97 | |
|
98 | |
public <R, D> R accept(JavaFXTreeVisitor<R, D> visitor, D data) { |
99 | 0 | return visitor.visitOnReplace(this, data); |
100 | |
} |
101 | |
|
102 | |
public int getEndKind () { |
103 | 126 | return endKind; |
104 | |
} |
105 | |
} |