Lines 352-361
Link Here
|
352 |
* <p> |
352 |
* <p> |
353 |
* The <code>compare</code> method of the given comparator is passed pairs |
353 |
* The <code>compare</code> method of the given comparator is passed pairs |
354 |
* of body declarations (subclasses of <code>BodyDeclaration</code>) |
354 |
* of body declarations (subclasses of <code>BodyDeclaration</code>) |
355 |
* representing body declarations at the same level. The nodes are from an |
355 |
* representing body declarations at the same level. |
356 |
* AST of the specified level ({@link org.eclipse.jdt.core.dom.ASTParser#newParser(int)}. |
|
|
357 |
* Clients will generally use AST.JLS3 since that will cover all |
358 |
* constructs found in Java 1.0, 1.1, 1.2, 1.3, 1.4, and 1.5 source code. |
359 |
* The comparator is called on body declarations of nested classes, |
356 |
* The comparator is called on body declarations of nested classes, |
360 |
* including anonymous and local classes, but always at the same level. |
357 |
* including anonymous and local classes, but always at the same level. |
361 |
* Clients need to provide a comparator implementation (there is no standard |
358 |
* Clients need to provide a comparator implementation (there is no standard |
Lines 413-422
Link Here
|
413 |
* <td width="50%"><code>modifiers, name, arguments<br> |
410 |
* <td width="50%"><code>modifiers, name, arguments<br> |
414 |
* RELATIVE_ORDER property</code></td> |
411 |
* RELATIVE_ORDER property</code></td> |
415 |
* </tr> |
412 |
* </tr> |
416 |
* </table> Clients should not rely on the AST nodes being properly parented |
413 |
* </table> |
417 |
* or on having source range information. (Future releases may provide |
|
|
418 |
* options for requesting additional information like source positions, full |
419 |
* ASTs, non-recursive sorting, etc.) |
420 |
* </p> |
414 |
* </p> |
421 |
* |
415 |
* |
422 |
* @param unit |
416 |
* @param unit |
Lines 438-451
Link Here
|
438 |
* if the compilation unit could not be sorted. Reasons |
432 |
* if the compilation unit could not be sorted. Reasons |
439 |
* include: |
433 |
* include: |
440 |
* <ul> |
434 |
* <ul> |
441 |
* <li> The given compilation unit does not exist |
435 |
* <li> The given unit was not created from a ICompilationUnit (INVALID_ELEMENT_TYPES)</li> |
442 |
* (ELEMENT_DOES_NOT_EXIST)</li> |
|
|
443 |
* <li> The given compilation unit is not a working copy |
444 |
* (INVALID_ELEMENT_TYPES)</li> |
445 |
* <li> A <code>CoreException</code> occurred while |
446 |
* accessing the underlying resource</li> |
447 |
* <li>The given compilation unit doesn't come from an ICompilationUnit and this ICompilationUnit is |
448 |
* not a working copy (NO_ELEMENTS_TO_PROCESS)</li> |
449 |
* </ul> |
436 |
* </ul> |
450 |
* @exception IllegalArgumentException |
437 |
* @exception IllegalArgumentException |
451 |
* if the given compilation unit is null or if the given |
438 |
* if the given compilation unit is null or if the given |