< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java

Print this page




  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.TypeElement;
  32 
  33 import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeFieldWriter;
  34 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
  35 import jdk.javadoc.internal.doclets.toolkit.Content;
  36 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  37 import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable;
  38 
  39 
  40 /**
  41  * Builds documentation for annotation type fields.
  42  *
  43  *  <p><b>This is NOT part of any supported API.
  44  *  If you write code that depends on this, you do so at your own risk.
  45  *  This code and its internal interfaces are subject to change or
  46  *  deletion without notice.</b>
  47  */
  48 public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
  49 
  50     /**
  51      * The writer to output the member documentation.
  52      */
  53     protected AnnotationTypeFieldWriter writer;
  54 


 159      * Build the signature.
 160      *
 161      * @param annotationDocTree the content tree to which the documentation will be added
 162      */
 163     protected void buildSignature(Content annotationDocTree) {
 164         annotationDocTree.add(
 165                 writer.getSignature(currentMember));
 166     }
 167 
 168     /**
 169      * Build the deprecation information.
 170      *
 171      * @param annotationDocTree the content tree to which the documentation will be added
 172      */
 173     protected void buildDeprecationInfo(Content annotationDocTree) {
 174         writer.addDeprecated(currentMember, annotationDocTree);
 175     }
 176 
 177     /**
 178      * Build the comments for the member.  Do nothing if
 179      * {@link BaseConfiguration#nocomment} is set to true.
 180      *
 181      * @param annotationDocTree the content tree to which the documentation will be added
 182      */
 183     protected void buildMemberComments(Content annotationDocTree) {
 184         if (!configuration.nocomment) {
 185             writer.addComments(currentMember, annotationDocTree);
 186         }
 187     }
 188 
 189     /**
 190      * Build the tag information.
 191      *
 192      * @param annotationDocTree the content tree to which the documentation will be added
 193      */
 194     protected void buildTagInfo(Content annotationDocTree) {
 195         writer.addTags(currentMember, annotationDocTree);
 196     }
 197 
 198     /**
 199      * Return the annotation type field writer for this builder.
 200      *
 201      * @return the annotation type field writer for this builder.
 202      */
 203     public AnnotationTypeFieldWriter getWriter() {
 204         return writer;


  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.TypeElement;
  32 
  33 import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeFieldWriter;
  34 import jdk.javadoc.internal.doclets.toolkit.BaseOptions;
  35 import jdk.javadoc.internal.doclets.toolkit.Content;
  36 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  37 import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable;
  38 
  39 
  40 /**
  41  * Builds documentation for annotation type fields.
  42  *
  43  *  <p><b>This is NOT part of any supported API.
  44  *  If you write code that depends on this, you do so at your own risk.
  45  *  This code and its internal interfaces are subject to change or
  46  *  deletion without notice.</b>
  47  */
  48 public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
  49 
  50     /**
  51      * The writer to output the member documentation.
  52      */
  53     protected AnnotationTypeFieldWriter writer;
  54 


 159      * Build the signature.
 160      *
 161      * @param annotationDocTree the content tree to which the documentation will be added
 162      */
 163     protected void buildSignature(Content annotationDocTree) {
 164         annotationDocTree.add(
 165                 writer.getSignature(currentMember));
 166     }
 167 
 168     /**
 169      * Build the deprecation information.
 170      *
 171      * @param annotationDocTree the content tree to which the documentation will be added
 172      */
 173     protected void buildDeprecationInfo(Content annotationDocTree) {
 174         writer.addDeprecated(currentMember, annotationDocTree);
 175     }
 176 
 177     /**
 178      * Build the comments for the member.  Do nothing if
 179      * {@link BaseOptions#noComment} is set to true.
 180      *
 181      * @param annotationDocTree the content tree to which the documentation will be added
 182      */
 183     protected void buildMemberComments(Content annotationDocTree) {
 184         if (!options.noComment) {
 185             writer.addComments(currentMember, annotationDocTree);
 186         }
 187     }
 188 
 189     /**
 190      * Build the tag information.
 191      *
 192      * @param annotationDocTree the content tree to which the documentation will be added
 193      */
 194     protected void buildTagInfo(Content annotationDocTree) {
 195         writer.addTags(currentMember, annotationDocTree);
 196     }
 197 
 198     /**
 199      * Return the annotation type field writer for this builder.
 200      *
 201      * @return the annotation type field writer for this builder.
 202      */
 203     public AnnotationTypeFieldWriter getWriter() {
 204         return writer;
< prev index next >