Author: david.lloyd(a)jboss.com
Date: 2009-04-27 21:13:55 -0400 (Mon, 27 Apr 2009)
New Revision: 5092
Added:
remoting3/trunk/taglet/
remoting3/trunk/taglet/pom.xml
remoting3/trunk/taglet/src/
remoting3/trunk/taglet/src/main/
remoting3/trunk/taglet/src/main/java/
remoting3/trunk/taglet/src/main/java/org/
remoting3/trunk/taglet/src/main/java/org/jboss/
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingConsumeTaglet.java
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingImplementTaglet.java
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingInternalTaglet.java
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingTypeTaglet.java
Log:
Add remoting API description taglet
Added: remoting3/trunk/taglet/pom.xml
===================================================================
--- remoting3/trunk/taglet/pom.xml (rev 0)
+++ remoting3/trunk/taglet/pom.xml 2009-04-28 01:13:55 UTC (rev 5092)
@@ -0,0 +1,56 @@
+<!--
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2009, JBoss Inc., and individual contributors as indicated
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.remoting</groupId>
+ <artifactId>jboss-remoting-taglet</artifactId>
+ <packaging>jar</packaging>
+ <version>1.1.0.CR1</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.5.0</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added:
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingConsumeTaglet.java
===================================================================
---
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingConsumeTaglet.java
(rev 0)
+++
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingConsumeTaglet.java 2009-04-28
01:13:55 UTC (rev 5092)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.taglet;
+
+import com.sun.javadoc.Tag;
+
+public final class RemotingConsumeTaglet extends RemotingTypeTaglet {
+
+ public String getName() {
+ return "remoting.consume";
+ }
+
+ public String toString(final Tag tag) {
+ String t = tag.holder().isInterface() ? "interface" :
tag.holder().isClass() ? "class" : "type";
+ return "<p>This " + t + " is part of the Remoting 3 public
API. While instances of this type may " +
+ "be used publicly, users are not encouraged to implement or extend
this type as members may be " +
+ "added without notice.\n";
+ }
+}
Added:
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingImplementTaglet.java
===================================================================
---
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingImplementTaglet.java
(rev 0)
+++
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingImplementTaglet.java 2009-04-28
01:13:55 UTC (rev 5092)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.taglet;
+
+import com.sun.javadoc.Tag;
+
+public final class RemotingImplementTaglet extends RemotingTypeTaglet {
+
+ public String getName() {
+ return "remoting.implement";
+ }
+
+ public String toString(final Tag tag) {
+ final boolean isinterface = tag.holder().isInterface();
+ String t = isinterface ? "interface" : tag.holder().isClass() ?
"class" : "type";
+ String e = isinterface ? "implemented" : "extended";
+ return "<p>This " + t + " is part of the Remoting 3 public
API, and is intended to be " + e + " by " +
+ "users of this API. Abstract members will generally not be added to
such types so as to avoid " +
+ "backwards compatibility problems.\n";
+ }
+}
Added:
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingInternalTaglet.java
===================================================================
---
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingInternalTaglet.java
(rev 0)
+++
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingInternalTaglet.java 2009-04-28
01:13:55 UTC (rev 5092)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.taglet;
+
+import com.sun.javadoc.Tag;
+
+public final class RemotingInternalTaglet extends RemotingTypeTaglet {
+
+ public String getName() {
+ return "remoting.internal";
+ }
+
+ public String toString(final Tag tag) {
+ String t = tag.holder().isInterface() ? "interface" :
tag.holder().isClass() ? "class" : "type";
+ return "<p><b>Internal Class</b> - this " + t +
" is part of the internal Remoting 3 implementation and is " +
+ "<b>not</b> intended to be used or consumed publicly.
Members of this class may be added, removed, " +
+ "and/or changed without notice.\n";
+ }
+}
Added:
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingTypeTaglet.java
===================================================================
---
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingTypeTaglet.java
(rev 0)
+++
remoting3/trunk/taglet/src/main/java/org/jboss/remoting3/taglet/RemotingTypeTaglet.java 2009-04-28
01:13:55 UTC (rev 5092)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.taglet;
+
+import java.util.Map;
+
+import com.sun.javadoc.Tag;
+import com.sun.tools.doclets.Taglet;
+
+public abstract class RemotingTypeTaglet implements Taglet {
+
+ public boolean inField() {
+ return false;
+ }
+
+ public boolean inConstructor() {
+ return false;
+ }
+
+ public boolean inMethod() {
+ return false;
+ }
+
+ public boolean inOverview() {
+ return false;
+ }
+
+ public boolean inPackage() {
+ return false;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public String toString(final Tag[] tags) {
+ return tags.length > 0 ? toString(tags[0]) : "";
+ }
+
+ private static void add(Map<String, Taglet> tagletMap, Taglet taglet) {
+ tagletMap.put(taglet.getName(), taglet);
+ }
+
+ public static void register(Map<String, Taglet> tagletMap) {
+ add(tagletMap, new RemotingConsumeTaglet());
+ add(tagletMap, new RemotingImplementTaglet());
+ add(tagletMap, new RemotingInternalTaglet());
+ }
+}