1 | |
package com.sun.javafx.runtime.location; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | 3025 | public class AbstractBindingExpression { |
9 | |
private Location location; |
10 | |
|
11 | |
public void setLocation(Location location) { |
12 | 3023 | if (this.location != null) |
13 | 0 | throw new IllegalStateException("Cannot reuse binding expressions"); |
14 | 3023 | this.location = location; |
15 | 3023 | Location[] fixedDependents = getStaticDependents(); |
16 | 3023 | if (fixedDependents != null) { |
17 | 684 | location.addDependencies(fixedDependents); |
18 | |
} |
19 | 3023 | } |
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
protected Location[] getStaticDependents() { |
26 | 2339 | return null; |
27 | |
} |
28 | |
|
29 | |
protected <T extends Location> T addDynamicDependent(T dep) { |
30 | 9 | location.addDynamicDependency(dep); |
31 | 9 | return dep; |
32 | |
} |
33 | |
|
34 | |
protected <T extends Location> T addStaticDependent(T dep) { |
35 | 1 | location.addDependencies(dep); |
36 | 1 | return dep; |
37 | |
} |
38 | |
|
39 | |
protected void clearDynamicDependencies() { |
40 | 7 | location.clearDynamicDependencies(); |
41 | 7 | } |
42 | |
} |