src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,15 +21,17 @@
  * 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 com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.Content;
+import javax.lang.model.element.Element;
 
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
 /**
  * An abstract class for that implements the {@link Taglet} interface.
  *
  *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.

@@ -127,19 +129,21 @@
         return name;
     }
 
     /**
      * {@inheritDoc}
-     * @throws IllegalArgumentException thrown when the method is not supported by the taglet.
+     * @throws UnsupportedTagletOperationException thrown when the method is
+     *         not supported by the taglet.
      */
-    public Content getTagletOutput(Tag tag, TagletWriter writer) {
-        throw new IllegalArgumentException("Method not supported in taglet " + getName() + ".");
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
+        throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
     }
 
     /**
      * {@inheritDoc}
-     * @throws IllegalArgumentException thrown when the method is not supported by the taglet.
+     * @throws UnsupportedTagletOperationException thrown when the method is not
+     *         supported by the taglet.
      */
-    public Content getTagletOutput(Doc holder, TagletWriter writer) {
-        throw new IllegalArgumentException("Method not supported in taglet " + getName() + ".");
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
     }
 }