| The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | /* | 
|  | 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 |  | 
|  | 17 | public 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 |  | 
|  | 54 | private String mRawCommentText; | 
|  | 55 | Comment mComment; | 
|  | 56 | SourcePositionInfo mPosition; | 
|  | 57 | } | 
|  | 58 |  |