All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JSci.doclet.NoosphereTaglet Maven / Gradle / Ivy

Go to download

JSci is a set of open source Java packages. The aim is to encapsulate scientific methods/principles in the most natural way possible. As such they should greatly aid the development of scientific based software. It offers: abstract math interfaces, linear algebra (support for various matrix and vector types), statistics (including probability distributions), wavelets, newtonian mechanics, chart/graph components (AWT and Swing), MathML DOM implementation, ... Note: some packages, like javax.comm, for the astro and instruments package aren't listed as dependencies (not available).

The newest version!
package JSci.doclet;

import com.sun.tools.doclets.*;
import com.sun.javadoc.*;
import java.util.Map;

public class NoosphereTaglet implements Taglet {
        private final String name;
	private final String desc;

	protected static void register(Map taglets, Taglet taglet) {
		String name = taglet.getName();
                Taglet old = (Taglet) taglets.get(name);
                if(old != null)
                        taglets.remove(name);
                taglets.put(name, taglet);
	}

	public NoosphereTaglet(String name, String desc) {
		this.name = name;
		this.desc = desc;
	}
        public String getName() {
                return name;
        }
        public boolean inConstructor() {
                return true;
        }
        public boolean inField() {
                return true;
        }
        public boolean inMethod() {
                return true;
        }
        public boolean inOverview() {
                return true;
        }
        public boolean inPackage() {
                return true;
        }
        public boolean inType() {
                return true;
        }
        public boolean isInlineTag() {
                return false;
        }
        public String toString(Tag tag) {
                return "
"+desc+" references:
"+createPMlink(tag.text())+"
"; } public String toString(Tag[] tags) { if(tags.length == 0) return null; StringBuffer buf = new StringBuffer("
"+desc+" references:
"); for(int i=0; i 0) buf.append(", "); buf.append(createPMlink(tags[i].text())); } return buf.append("
").toString(); } private String createPMlink(String cname) { if(cname.indexOf(' ') != -1) throw new IllegalArgumentException("Invalid canonical name: "+cname); String host = desc+".org"; return ""+cname+""; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy