KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > java > source > query > CommentSet


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.api.java.source.query;
21
22 import org.netbeans.api.java.source.Comment;
23
24 /**
25  * The set of comments associated with a single tree node.
26  */

27 public interface CommentSet {
28     /**
29      * Add the specified comment to the list of preceding comments.
30      */

31     void addPrecedingComment(Comment c);
32
33     /**
34      * Add the specified comment string to the list of preceding comments.
35      */

36     void addPrecedingComment(java.lang.String JavaDoc s);
37
38     /**
39      * Add a list of comments to the list of preceding comments.
40      */

41     void addPrecedingComments(java.util.List JavaDoc<Comment> comments);
42
43     /**
44      * Add the specified comment to the list of trailing comments.
45      */

46     void addTrailingComment(Comment c);
47
48     /**
49      * Add the specified comment string to the list of trailing comments.
50      */

51     void addTrailingComment(java.lang.String JavaDoc s);
52
53     /**
54      * Add a list of comments to the list of preceding comments.
55      */

56     void addTrailingComments(java.util.List JavaDoc<Comment> comments);
57
58     java.util.List JavaDoc<Comment> getPrecedingComments();
59
60     java.util.List JavaDoc<Comment> getTrailingComments();
61
62     boolean hasChanges();
63
64     boolean hasComments();
65
66     /**
67      *
68      * Returns the first character position, which is either the initial
69      * position of the first preceding comment, or NOPOS if there are no comments.
70      *
71      * @see org.netbeans.api.java.source.query.Query#NOPOS
72      */

73     int pos();
74     
75 }
76
Popular Tags