blob: 3abb36741955c0c91ac6d98e0b39cb88c163f355 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17public abstract class DocInfo
18{
19 public DocInfo(String rawCommentText, SourcePositionInfo sp)
20 {
21 mRawCommentText = rawCommentText;
22 mPosition = sp;
23 }
24
25 public boolean isHidden()
26 {
27 return comment().isHidden();
28 }
29
30 public boolean isDocOnly() {
31 return comment().isDocOnly();
32 }
33
34 public String getRawCommentText()
35 {
36 return mRawCommentText;
37 }
38
39 public Comment comment()
40 {
41 if (mComment == null) {
42 mComment = new Comment(mRawCommentText, parent(), mPosition);
43 }
44 return mComment;
45 }
46
47 public SourcePositionInfo position()
48 {
49 return mPosition;
50 }
51
52 public abstract ContainerInfo parent();
53
Jesse Wilson5e0dd412009-06-01 17:59:44 -070054 public void setSince(String since) {
55 mSince = since;
56 }
57
58 public String getSince() {
59 return mSince;
60 }
61
The Android Open Source Project88b60792009-03-03 19:28:42 -080062 private String mRawCommentText;
63 Comment mComment;
64 SourcePositionInfo mPosition;
Jesse Wilson5e0dd412009-06-01 17:59:44 -070065 private String mSince;
The Android Open Source Project88b60792009-03-03 19:28:42 -080066}
67