src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -21,22 +21,20 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package com.sun.tools.doclets.internal.toolkit.taglets;
+package jdk.javadoc.internal.doclets.toolkit.taglets;
-import java.util.Map;
+import javax.lang.model.element.Element;
-import com.sun.javadoc.Tag;
-import com.sun.tools.doclets.internal.toolkit.Content;
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
-
+import static com.sun.source.doctree.DocTree.Kind.*;
/**
* An inline Taglet used to denote literal text.
- * The enclosed text is interpreted as not containing HTML markup or
- * nested javadoc tags.
* For example, the text:
* <blockquote> {@code {@literal a<B>c}} </blockquote>
* displays as:
* <blockquote> {@literal a<B>c} </blockquote>
*
@@ -49,23 +47,18 @@
* @since 1.5
*/
public class LiteralTaglet extends BaseInlineTaglet {
- private static final String NAME = "literal";
+ private static final String NAME = LITERAL.tagName;
- public static void register(Map<String, Taglet> map) {
- map.remove(NAME);
- map.put(NAME, new LiteralTaglet());
- }
-
public String getName() {
return NAME;
}
/**
* {@inheritDoc}
*/
- public Content getTagletOutput(Tag tag, TagletWriter writer) {
- return writer.literalTagOutput(tag);
+ public Content getTagletOutput(Element e, DocTree tag, TagletWriter writer) {
+ return writer.literalTagOutput(e, tag);
}
}