Lines 36-41
Link Here
|
36 |
private PointcutDesignator pointcutDesignator = null; |
36 |
private PointcutDesignator pointcutDesignator = null; |
37 |
public static final ChildPropertyDescriptor DESIGNATOR_PROPERTY = |
37 |
public static final ChildPropertyDescriptor DESIGNATOR_PROPERTY = |
38 |
new ChildPropertyDescriptor(PointcutDeclaration.class, "designator", PointcutDesignator.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$ |
38 |
new ChildPropertyDescriptor(PointcutDeclaration.class, "designator", PointcutDesignator.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$ |
|
|
39 |
|
40 |
/** |
41 |
* The "parameters" structural property of this node type. |
42 |
*/ |
43 |
public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY = |
44 |
new ChildListPropertyDescriptor(PointcutDeclaration.class, "parameters", SingleVariableDeclaration.class, CYCLE_RISK); //$NON-NLS-1$ |
39 |
|
45 |
|
40 |
public PointcutDesignator getDesignator() { |
46 |
public PointcutDesignator getDesignator() { |
41 |
return this.pointcutDesignator; |
47 |
return this.pointcutDesignator; |
Lines 110-129
Link Here
|
110 |
private static final List PROPERTY_DESCRIPTORS_3_0; |
116 |
private static final List PROPERTY_DESCRIPTORS_3_0; |
111 |
|
117 |
|
112 |
static { |
118 |
static { |
113 |
List propertyList = new ArrayList(5); |
119 |
List propertyList = new ArrayList(6); |
114 |
createPropertyList(PointcutDeclaration.class, propertyList); |
120 |
createPropertyList(PointcutDeclaration.class, propertyList); |
115 |
addProperty(JAVADOC_PROPERTY, propertyList); |
121 |
addProperty(JAVADOC_PROPERTY, propertyList); |
116 |
addProperty(MODIFIERS_PROPERTY, propertyList); |
122 |
addProperty(MODIFIERS_PROPERTY, propertyList); |
117 |
addProperty(NAME_PROPERTY, propertyList); |
123 |
addProperty(NAME_PROPERTY, propertyList); |
118 |
addProperty(DESIGNATOR_PROPERTY, propertyList); |
124 |
addProperty(DESIGNATOR_PROPERTY, propertyList); |
|
|
125 |
addProperty(PARAMETERS_PROPERTY, propertyList); |
126 |
|
119 |
PROPERTY_DESCRIPTORS_2_0 = reapPropertyList(propertyList); |
127 |
PROPERTY_DESCRIPTORS_2_0 = reapPropertyList(propertyList); |
120 |
|
128 |
|
121 |
propertyList = new ArrayList(5); |
129 |
propertyList = new ArrayList(6); |
122 |
createPropertyList(PointcutDeclaration.class, propertyList); |
130 |
createPropertyList(PointcutDeclaration.class, propertyList); |
123 |
addProperty(JAVADOC_PROPERTY, propertyList); |
131 |
addProperty(JAVADOC_PROPERTY, propertyList); |
124 |
addProperty(MODIFIERS2_PROPERTY, propertyList); |
132 |
addProperty(MODIFIERS2_PROPERTY, propertyList); |
125 |
addProperty(NAME_PROPERTY, propertyList); |
133 |
addProperty(NAME_PROPERTY, propertyList); |
126 |
addProperty(DESIGNATOR_PROPERTY, propertyList); |
134 |
addProperty(DESIGNATOR_PROPERTY, propertyList); |
|
|
135 |
addProperty(PARAMETERS_PROPERTY, propertyList); |
136 |
|
127 |
PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList); |
137 |
PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList); |
128 |
} |
138 |
} |
129 |
|
139 |
|
Lines 161-166
Link Here
|
161 |
super(ast); |
171 |
super(ast); |
162 |
} |
172 |
} |
163 |
|
173 |
|
|
|
174 |
protected ASTNode.NodeList parameters = |
175 |
new ASTNode.NodeList(PARAMETERS_PROPERTY); |
164 |
|
176 |
|
165 |
/* (omit javadoc for this method) |
177 |
/* (omit javadoc for this method) |
166 |
* Method declared on ASTNode. |
178 |
* Method declared on ASTNode. |
Lines 225-230
Link Here
|
225 |
if (property == MODIFIERS2_PROPERTY) { |
237 |
if (property == MODIFIERS2_PROPERTY) { |
226 |
return modifiers(); |
238 |
return modifiers(); |
227 |
} |
239 |
} |
|
|
240 |
if (property == PARAMETERS_PROPERTY) { |
241 |
return parameters(); |
242 |
} |
228 |
// allow default implementation to flag the error |
243 |
// allow default implementation to flag the error |
229 |
return super.internalGetChildListProperty(property); |
244 |
return super.internalGetChildListProperty(property); |
230 |
} |
245 |
} |
Lines 273-278
Link Here
|
273 |
} |
288 |
} |
274 |
result.setName((SimpleName) getName().clone(target)); |
289 |
result.setName((SimpleName) getName().clone(target)); |
275 |
result.setDesignator((PointcutDesignator) getDesignator().clone(target)); |
290 |
result.setDesignator((PointcutDesignator) getDesignator().clone(target)); |
|
|
291 |
result.parameters().addAll( |
292 |
ASTNode.copySubtrees(target, parameters())); |
276 |
return result; |
293 |
return result; |
277 |
} |
294 |
} |
278 |
|
295 |
|
Lines 299-314
Link Here
|
299 |
} |
316 |
} |
300 |
acceptChild(ajvis, getName()); |
317 |
acceptChild(ajvis, getName()); |
301 |
acceptChild(ajvis, getDesignator()); |
318 |
acceptChild(ajvis, getDesignator()); |
|
|
319 |
acceptChildren(visitor, this.parameters); |
302 |
} |
320 |
} |
303 |
ajvis.endVisit(this); |
321 |
ajvis.endVisit(this); |
304 |
} |
322 |
} |
305 |
} |
323 |
} |
306 |
|
324 |
|
|
|
325 |
/** |
326 |
* Returns the live ordered list of method parameter declarations for this |
327 |
* method declaration. |
328 |
* |
329 |
* @return the live list of method parameter declarations |
330 |
* (element type: <code>SingleVariableDeclaration</code>) |
331 |
*/ |
332 |
public List parameters() { |
333 |
return this.parameters; |
334 |
} |
335 |
|
307 |
/* (omit javadoc for this method) |
336 |
/* (omit javadoc for this method) |
308 |
* Method declared on ASTNode. |
337 |
* Method declared on ASTNode. |
309 |
*/ |
338 |
*/ |
310 |
int memSize() { |
339 |
int memSize() { |
311 |
return super.memSize() + 2 * 4; |
340 |
return super.memSize() + 3 * 4; |
312 |
} |
341 |
} |
313 |
|
342 |
|
314 |
/* (omit javadoc for this method) |
343 |
/* (omit javadoc for this method) |
Lines 320-325
Link Here
|
320 |
+ (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) |
349 |
+ (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) |
321 |
+ (this.pointcutName == null ? 0 : getName().treeSize()) |
350 |
+ (this.pointcutName == null ? 0 : getName().treeSize()) |
322 |
+ (this.modifiers == null ? 0 : this.modifiers.listSize()) |
351 |
+ (this.modifiers == null ? 0 : this.modifiers.listSize()) |
|
|
352 |
+ this.parameters.listSize() |
323 |
+ (this.pointcutDesignator == null ? 0 : getDesignator().treeSize()); |
353 |
+ (this.pointcutDesignator == null ? 0 : getDesignator().treeSize()); |
324 |
} |
354 |
} |
325 |
} |
355 |
} |