src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java

changeset 1724
d918b63a5509
parent 1359
25e14ad23cef
child 1751
ca8808c88f94
equal deleted inserted replaced
1723:a2889739cf21 1724:d918b63a5509
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
24 */ 24 */
25 25
26 package com.sun.tools.doclets.internal.toolkit.taglets; 26 package com.sun.tools.doclets.internal.toolkit.taglets;
27 27
28 import com.sun.javadoc.*; 28 import com.sun.javadoc.*;
29 import com.sun.tools.doclets.internal.toolkit.util.DocFinder;
29 30
30 /** 31 /**
31 * A simple single argument custom tag. 32 * A simple single argument custom tag.
32 * 33 *
33 * <p><b>This is NOT part of any supported API. 34 * <p><b>This is NOT part of any supported API.
36 * deletion without notice.</b> 37 * deletion without notice.</b>
37 * 38 *
38 * @author Jamie Ho 39 * @author Jamie Ho
39 */ 40 */
40 41
41 public class SimpleTaglet extends BaseTaglet { 42 public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
42 43
43 /** 44 /**
44 * The marker in the location string for excluded tags. 45 * The marker in the location string for excluded tags.
45 */ 46 */
46 public static final String EXCLUDED = "x"; 47 public static final String EXCLUDED = "x";
197 */ 198 */
198 public boolean isInlineTag() { 199 public boolean isInlineTag() {
199 return false; 200 return false;
200 } 201 }
201 202
203 @Override
204 public void inherit(DocFinder.Input input, DocFinder.Output output) {
205 Tag[] tags = input.element.tags(tagName);
206 if (tags.length > 0) {
207 output.holder = input.element;
208 output.holderTag = tags[0];
209 output.inlineTags = input.isFirstSentence
210 ? tags[0].firstSentenceTags() : tags[0].inlineTags();
211 }
212 }
213
202 /** 214 /**
203 * {@inheritDoc} 215 * {@inheritDoc}
204 */ 216 */
205 public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) { 217 public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) {
206 return header == null || tag == null ? null : writer.simpleTagOutput(tag, header); 218 return header == null || tag == null ? null : writer.simpleTagOutput(tag, header);

mercurial