Sun, 24 Feb 2013 11:36:58 -0800
7112427: The doclet needs to be able to generate JavaFX documentation.
Reviewed-by: jjg
Contributed-by: jan.valenta@oracle.com
jjg@1606 | 1 | /* |
jjg@1606 | 2 | * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. |
jjg@1606 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
jjg@1606 | 4 | * |
jjg@1606 | 5 | * This code is free software; you can redistribute it and/or modify it |
jjg@1606 | 6 | * under the terms of the GNU General Public License version 2 only, as |
jjg@1606 | 7 | * published by the Free Software Foundation. Oracle designates this |
jjg@1606 | 8 | * particular file as subject to the "Classpath" exception as provided |
jjg@1606 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
jjg@1606 | 10 | * |
jjg@1606 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
jjg@1606 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
jjg@1606 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
jjg@1606 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
jjg@1606 | 15 | * accompanied this code). |
jjg@1606 | 16 | * |
jjg@1606 | 17 | * You should have received a copy of the GNU General Public License version |
jjg@1606 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
jjg@1606 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
jjg@1606 | 20 | * |
jjg@1606 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
jjg@1606 | 22 | * or visit www.oracle.com if you need additional information or have any |
jjg@1606 | 23 | * questions. |
jjg@1606 | 24 | */ |
jjg@1606 | 25 | |
jjg@1606 | 26 | package com.sun.tools.doclets.internal.toolkit.taglets; |
jjg@1606 | 27 | |
jjg@1606 | 28 | import com.sun.javadoc.Tag; |
jjg@1606 | 29 | |
jjg@1606 | 30 | /** |
jjg@1606 | 31 | * An abstract class that implements the {@link Taglet} interface and |
jjg@1606 | 32 | * serves as a base for JavaFX property getter and setter taglets. |
jjg@1606 | 33 | * |
jjg@1606 | 34 | * <p><b>This is NOT part of any supported API. |
jjg@1606 | 35 | * If you write code that depends on this, you do so at your own risk. |
jjg@1606 | 36 | * This code and its internal interfaces are subject to change or |
jjg@1606 | 37 | * deletion without notice.</b> |
jjg@1606 | 38 | * |
jjg@1606 | 39 | */ |
jjg@1606 | 40 | public abstract class BasePropertyTaglet extends BaseTaglet { |
jjg@1606 | 41 | |
jjg@1606 | 42 | public BasePropertyTaglet() { |
jjg@1606 | 43 | } |
jjg@1606 | 44 | |
jjg@1606 | 45 | /** |
jjg@1606 | 46 | * This method returns the text to be put in the resulting javadoc before |
jjg@1606 | 47 | * the property name. |
jjg@1606 | 48 | * |
jjg@1606 | 49 | * @param tagletWriter the taglet writer for output |
jjg@1606 | 50 | * @return the string to be put in the resulting javadoc. |
jjg@1606 | 51 | */ |
jjg@1606 | 52 | abstract String getText(TagletWriter tagletWriter); |
jjg@1606 | 53 | |
jjg@1606 | 54 | /** |
jjg@1606 | 55 | * Given the <code>Tag</code> representation of this custom |
jjg@1606 | 56 | * tag, return its string representation, which is output |
jjg@1606 | 57 | * to the generated page. |
jjg@1606 | 58 | * @param tag the <code>Tag</code> representation of this custom tag. |
jjg@1606 | 59 | * @param tagletWriter the taglet writer for output. |
jjg@1606 | 60 | * @return the TagletOutput representation of this <code>Tag</code>. |
jjg@1606 | 61 | */ |
jjg@1606 | 62 | public TagletOutput getTagletOutput(Tag tag, TagletWriter tagletWriter) { |
jjg@1606 | 63 | TagletOutput tagletOutput = tagletWriter.getOutputInstance(); |
jjg@1606 | 64 | StringBuilder output = new StringBuilder("<P>"); |
jjg@1606 | 65 | output.append(getText(tagletWriter)); |
jjg@1606 | 66 | output.append(" <CODE>"); |
jjg@1606 | 67 | output.append(tag.text()); |
jjg@1606 | 68 | output.append("</CODE>.</P>"); |
jjg@1606 | 69 | tagletOutput.setOutput(output.toString()); |
jjg@1606 | 70 | return tagletOutput; |
jjg@1606 | 71 | } |
jjg@1606 | 72 | |
jjg@1606 | 73 | /** |
jjg@1606 | 74 | * Will return false because this tag may |
jjg@1606 | 75 | * only appear in Methods. |
jjg@1606 | 76 | * @return false since this is not a method. |
jjg@1606 | 77 | */ |
jjg@1606 | 78 | public boolean inConstructor() { |
jjg@1606 | 79 | return false; |
jjg@1606 | 80 | } |
jjg@1606 | 81 | |
jjg@1606 | 82 | /** |
jjg@1606 | 83 | * Will return false because this tag may |
jjg@1606 | 84 | * only appear in Methods. |
jjg@1606 | 85 | * @return false since this is not a method. |
jjg@1606 | 86 | */ |
jjg@1606 | 87 | public boolean inOverview() { |
jjg@1606 | 88 | return false; |
jjg@1606 | 89 | } |
jjg@1606 | 90 | |
jjg@1606 | 91 | /** |
jjg@1606 | 92 | * Will return false because this tag may |
jjg@1606 | 93 | * only appear in Methods. |
jjg@1606 | 94 | * @return false since this is not a method. |
jjg@1606 | 95 | */ |
jjg@1606 | 96 | public boolean inPackage() { |
jjg@1606 | 97 | return false; |
jjg@1606 | 98 | } |
jjg@1606 | 99 | |
jjg@1606 | 100 | /** |
jjg@1606 | 101 | * Will return false because this tag may |
jjg@1606 | 102 | * only appear in Methods. |
jjg@1606 | 103 | * @return false since this is not a method. |
jjg@1606 | 104 | */ |
jjg@1606 | 105 | public boolean inType() { |
jjg@1606 | 106 | return false; |
jjg@1606 | 107 | } |
jjg@1606 | 108 | |
jjg@1606 | 109 | /** |
jjg@1606 | 110 | * Will return false because this tag is not inline. |
jjg@1606 | 111 | * @return false since this is not an inline tag. |
jjg@1606 | 112 | */ |
jjg@1606 | 113 | public boolean isInlineTag() { |
jjg@1606 | 114 | return false; |
jjg@1606 | 115 | } |
jjg@1606 | 116 | |
jjg@1606 | 117 | } |