91 } catch (IOException ioe) {
92 declarations = new ArrayList<>();
93 assert false; ioe.getMessage();
94
95 } finally {
96 serializedDecls = null;
97 }
98
99 }
100
101 return declarations;
102 }
103
104 private Observables observables = null;
105
106 /**
107 * This method is to support tooling that may want to add declarations to
108 * or remove declarations from a Rule. Changes to the list are tracked
109 * so that added declarations are tagged as belonging to this rule, and
110 * the rule for removed declarations is nulled out.
111 * If the list is not going to be modified, then it is more efficient to
112 * call {@link #getUnobservedDeclarationList()}, but the returned list
113 * must be treated as unmodifiable.
114 * @return a observable list of declarations
115 */
116 public final ObservableList<Declaration> getDeclarations() {
117
118 if (observables == null) {
119 observables = new Observables(this);
120 }
121
122 return observables.getDeclarations();
123 }
124
125 /**
126 * This method is to support tooling that may want to add selectors to
127 * or remove selectors from a Rule. Changes to the list are tracked
128 * so that added selectors are tagged as belonging to this rule, and
129 * the rule for removed selectors is nulled out.
130 * If the list is not going to be modified, then it is more efficient to
131 * call {@link #getUnobservedSelectorList()}, but the returned list
132 * must be treated as unmodifiable.
133 * @return an observable list of selectors
134 */
135 public final ObservableList<Selector> getSelectors() {
136
137 if (observables == null) {
138 observables = new Observables(this);
139 }
140
141 return observables.getSelectors();
142 }
143
144 /** The stylesheet this selector belongs to */
145 private Stylesheet stylesheet;
146 public Stylesheet getStylesheet() {
147 return stylesheet;
148 }
149
150 /* package */
151 void setStylesheet(Stylesheet stylesheet) {
152
|
91 } catch (IOException ioe) {
92 declarations = new ArrayList<>();
93 assert false; ioe.getMessage();
94
95 } finally {
96 serializedDecls = null;
97 }
98
99 }
100
101 return declarations;
102 }
103
104 private Observables observables = null;
105
106 /**
107 * This method is to support tooling that may want to add declarations to
108 * or remove declarations from a Rule. Changes to the list are tracked
109 * so that added declarations are tagged as belonging to this rule, and
110 * the rule for removed declarations is nulled out.
111 * @return a observable list of declarations
112 */
113 public final ObservableList<Declaration> getDeclarations() {
114
115 if (observables == null) {
116 observables = new Observables(this);
117 }
118
119 return observables.getDeclarations();
120 }
121
122 /**
123 * This method is to support tooling that may want to add selectors to
124 * or remove selectors from a Rule. Changes to the list are tracked
125 * so that added selectors are tagged as belonging to this rule, and
126 * the rule for removed selectors is nulled out.
127 * @return an observable list of selectors
128 */
129 public final ObservableList<Selector> getSelectors() {
130
131 if (observables == null) {
132 observables = new Observables(this);
133 }
134
135 return observables.getSelectors();
136 }
137
138 /** The stylesheet this selector belongs to */
139 private Stylesheet stylesheet;
140 public Stylesheet getStylesheet() {
141 return stylesheet;
142 }
143
144 /* package */
145 void setStylesheet(Stylesheet stylesheet) {
146
|