From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/javadoc/README | 7 + .../latex/contrib/javadoc/doc/javadoc_doc_de.pdf | Bin 0 -> 311801 bytes .../latex/contrib/javadoc/doc/javadoc_doc_de.tex | 220 +++++++ .../latex/contrib/javadoc/doc/javadoc_doc_en.pdf | Bin 0 -> 296724 bytes .../latex/contrib/javadoc/doc/javadoc_doc_en.tex | 219 +++++++ .../contrib/javadoc/doclet/doc/ClassWriter.tex | 308 ++++++++++ .../latex/contrib/javadoc/doclet/doc/InhEntry.tex | 89 +++ .../latex/contrib/javadoc/doclet/doc/InhTable.tex | 56 ++ macros/latex/contrib/javadoc/doclet/doc/TexGen.tex | 71 +++ .../contrib/javadoc/doclet/doc/TexPrintStream.tex | 97 ++++ .../latex/contrib/javadoc/doclet/texgen_doc_de.pdf | Bin 0 -> 374501 bytes .../latex/contrib/javadoc/doclet/texgen_doc_de.tex | 56 ++ .../latex/contrib/javadoc/doclet/texgen_doc_en.pdf | Bin 0 -> 366949 bytes .../latex/contrib/javadoc/doclet/texgen_doc_en.tex | 56 ++ macros/latex/contrib/javadoc/tex/javadoc.sty | 643 +++++++++++++++++++++ 15 files changed, 1822 insertions(+) create mode 100644 macros/latex/contrib/javadoc/README create mode 100644 macros/latex/contrib/javadoc/doc/javadoc_doc_de.pdf create mode 100644 macros/latex/contrib/javadoc/doc/javadoc_doc_de.tex create mode 100644 macros/latex/contrib/javadoc/doc/javadoc_doc_en.pdf create mode 100644 macros/latex/contrib/javadoc/doc/javadoc_doc_en.tex create mode 100644 macros/latex/contrib/javadoc/doclet/doc/ClassWriter.tex create mode 100644 macros/latex/contrib/javadoc/doclet/doc/InhEntry.tex create mode 100644 macros/latex/contrib/javadoc/doclet/doc/InhTable.tex create mode 100644 macros/latex/contrib/javadoc/doclet/doc/TexGen.tex create mode 100644 macros/latex/contrib/javadoc/doclet/doc/TexPrintStream.tex create mode 100644 macros/latex/contrib/javadoc/doclet/texgen_doc_de.pdf create mode 100644 macros/latex/contrib/javadoc/doclet/texgen_doc_de.tex create mode 100644 macros/latex/contrib/javadoc/doclet/texgen_doc_en.pdf create mode 100644 macros/latex/contrib/javadoc/doclet/texgen_doc_en.tex create mode 100644 macros/latex/contrib/javadoc/tex/javadoc.sty (limited to 'macros/latex/contrib/javadoc') diff --git a/macros/latex/contrib/javadoc/README b/macros/latex/contrib/javadoc/README new file mode 100644 index 0000000000..a98aae44cd --- /dev/null +++ b/macros/latex/contrib/javadoc/README @@ -0,0 +1,7 @@ +The javadoc package provides an easy way to document source code. It is related to the javadoc system for java source code and tries to provide the same descriptions. But, of course, source code of other languages can be documented using this package. The package is under GNU GENERAL PUBLIC LICENSE\footnote (see www.gnu.org). + +A doclet is a class derived from com.sun.javadoc.Doclet that can be used to generate a documentation with the javadoc-tool out of commented java-source-code. By default javadoc generates a HTML documentation, TexGen generates TeX-files according to the javadoc-package. The doclet is under GNU GENERAL PUBLIC LICENSE\footnote (see www.gnu.org). + +Das javadoc Package bietet eine einfache Möglichkeit, Dokumentationen von Quellcode zu erstellen. Es leitet sich vom Dokumentationssystem javadoc für Java ab und bietet dieselben Attribute an. Aber natürlich kann auch Quellcode anderer Sprachen damit dokumentiert werden. Das Paket steht unter GNU GENERAL PUBLIC LICENSE\footnote (see www.gnu.org). + +Ein Doclet ist eine von com.sun.javadoc.Doclet abgeleitete Klasse, die verwendet werden kann, um mit dem Javadoc-Tool aus kommentierten Java-Quellcode-Dateien eine Dokumentation zu generieren. Standardmäßig werden HTML Dateien generiert, TexGen generiert TeX-Dateien gemäß dem javadoc-Package. Das Doclet steht unter GNU GENERAL PUBLIC LICENSE\footnote (see www.gnu.org). diff --git a/macros/latex/contrib/javadoc/doc/javadoc_doc_de.pdf b/macros/latex/contrib/javadoc/doc/javadoc_doc_de.pdf new file mode 100644 index 0000000000..622bec13bf Binary files /dev/null and b/macros/latex/contrib/javadoc/doc/javadoc_doc_de.pdf differ diff --git a/macros/latex/contrib/javadoc/doc/javadoc_doc_de.tex b/macros/latex/contrib/javadoc/doc/javadoc_doc_de.tex new file mode 100644 index 0000000000..db8e8a58cd --- /dev/null +++ b/macros/latex/contrib/javadoc/doc/javadoc_doc_de.tex @@ -0,0 +1,220 @@ +\documentclass[11pt,a4paper]{article} +\usepackage[ngerman]{babel} +\usepackage[T1]{fontenc} +\usepackage[ansinew]{inputenc} +\usepackage{csquotes} +\usepackage{rotating} + +\newcommand{\code}[1]{\protect\texttt{#1}} +\newcommand{\befehl}[1]{\code{$\backslash$#1}} + +\begin{document} +\title{Das \code{javadoc} Package} +\author{Jolle\footnote{Verbesserungsvorschläge, Kommentare, Korrekturen, Anregungen und Danksagungen an \mbox{joerman.lieder@gmx.net}} } +\date{\today} +\maketitle + +\begin{abstract} +Das \code{javadoc} Package bietet eine einfache Möglichkeit, Dokumentationen von Quellcode zu erstellen. Es leitet sich vom Dokumentationssystem javadoc für Java ab und bietet dieselben Attribute an. Aber natürlich kann auch Quellcode anderer Sprachen damit dokumentiert werden. Das Paket steht unter GNU GENERAL PUBLIC LICENSE\footnote{www.gnu.org} +\end{abstract} + +\tableofcontents + +\section{Einführung} +Mit dem Programm \code{javadoc} wird den Programmierern in der Java-Welt ein mächtiges Werkzeug gegeben, ihren Quellcode zu dokumentieren. Javadoc arbeitet mit besonders formatierten Kommentaren im Quelltext und generiert daraus eine umfassende Sammlung an HTML-Seiten. Das Package \code{javadoc} bietet die Möglichkeit, mit denselben Attributen eine Dokumentation mit \LaTeX{} zu erstellen. Mächtig wird das Package vor allem im Zusammenspiel mit einem Doclet, das die Kommentare aus dem Quellcode in \TeX-Dateien mit den Befehlen dieses \code{javadoc}-Packages umwandelt. + +\section{Optionen und benötigte Packages} +Derzeit benötigt \code{javadoc} nur ein Paket, nämlich \code{longtable}. Ohne dieses kann die z.T. sehr umfangreiche Tabelle mit geerbten Feldern und Methoden nicht dargestellt werden. + +Das Paket bietet Optionen, um das Layout und die Struktur der Dokumentation anzupassen. Das Paket selbst belegt 3 Hierarchiestufen, durch die Optionen \code{chapter}, \code{section}, \code{subsection} lässt sich die oberste Stufe festlegen, die hinteren werden automatisch nach unten geschoben. Wird keine Option angegeben, wird \code{section} als oberste Stufe verwendet. Die zweite Möglichkeit über Optionen das Verhalten zu beeinflussen, liegt im Festlegen, welche Hierarchiestufe ins Inhaltsverzeichnis mit aufgenommen wird und welche nicht. Dies wird realisiert durch die *-Befehle von \code{chapter} usw. Die folgende Tabelle listet die möglichen Optionen auf. + +\begin{center} + \begin{tabular}{l|l} + Option & Aufnahme ins Inhaltsverzeichnis \\ \hline + \code{toc0} & keine Stufe \\ + \code{toc1} & oberste Stufe \code{Default}-Wert \\ + \code{toc2} & obersten zwei Stufen\\ + \code{toc3} & alle Stufen \\ + \code{toc} & entspricht \code{toc3} \\ + \code{notoc} & entspricht \code{toc0} + \end{tabular} +\end{center} + +Unabhängig davon, welche Option angegeben ist, können andere Einstellungen die Darstellung im Inhaltsverzeichnis verändern. + +Die \code{hyperref}-Option kann angegeben werden, wenn erwünscht ist, dass innerhalb der Ausgabedatei Verlinkungen erzeugt werden. So lassen sich von Parametertypen oder Rückgabewerten oder Vererberklassennamen mit Mausklick die entsprechenden Klassen aufrufen, wenn sie denn in derselben Datei liegen. Ansonsten springt Acrobat an den Anfang des Dokuments. Diese Option empfiehlt sich erst am Ende des Schreibvorgangs zu verwenden, da sie sehr viele Warnungen aufgrund nicht verfolgbarer Referenzen erzeugt. Wird diese Option gewählt wird das Package \code{hyperref} ohne eine Option eingebunden. Diese können mit \befehl{hypersetup} nachgeladen werden. + +Desweiteren bietet das \code{javadoc}-Package Möglichkeiten, die Ausgaben zwischen verschiedenen Sprachen umzustellen. Das betrifft aber nur Überschriften und Beschreibungen, natürlich nicht codespezifische Wörter. Außerdem werden keine sprachspezifischen Einstellungen durchgeführt, sondern nur Übersetzungen getätigt. Als derzeit einzige Option lässt sich \code{deutsch} auswählen, Standard ist Englisch. Um andere Sprachen zu implementieren brauchen nur die Befehle überschrieben werden. Alle Sprachbefehle beginnen mit \befehl{jd@lang@}, die jeweiligen Endungen sind in Tabelle \ref{tab:jd:lang} gelistet. + +\begin{table} + \begin{center} + \begin{tabular}[h]{l|l} + field & author \\ + method & category \\ + constr & deprecated \\ + & parameter \\ + fullname & see \\ + package & serial \\ + inherits & serialData \\ + implements & serialField \\ + outerclass & since \\ + & return \\ + elementname & throws \\ + inheritOf & version \\ + inheritancetable & + \end{tabular} + \end{center} + \label{tab:jd:lang} + \caption{Sprachbefehle} +\end{table} + +\section{Befehle zur Darstellung} +Bevor wir auf die Umgebungen und die Dokumentationsmöglichkeiten zu Sprechen kommen, sollten noch 2 Befehle genannt werden, die der Gestaltung dienen. +\befehl{jdinh} steht für \enquote{Inherits} und malt einen Vererbungspfeil von rechts nach links. \befehl{jdcode} benötigt einen Parameter und stellt diesen Text in TrueType-Schrift dar. + +\section{Verlinkung im PDF} +Um Verlinkungen innerhalb des PDFs zu erzeugen, muss beim Argument von \befehl{jdtype} und beim jeweils 1. Argument von \befehl{JDpara} und \befehl{jdInhEntry} die entsprechenden Wörter über die Befehle \befehl{jdtypesimple\{type\}} oder \befehl{jdtypearray\{name\}\{dimension\}} oder \befehl{jdtypegeneric\{name\}\{generisch\}} als Klassen gekennzeichnet werden. Im generischen Typ müssen die einzelnen Klassen wieder mit den oben genannten Befehlen gekennzeichnet werden. Die Ziele dieser Verlinkungen werden automatisch gesetzt. Wird die \code{hyperref}-Option nicht genutzt, können die Befehle trotzdem angegeben werden. Sie erzeugen dann keinen Fehler. + +\section{Known Issues} +\begin{itemize} + \item Probleme bereiten derzeit die nicht existierenden Verlinkungsziele von Datentypen, deren Klassen nicht beschrieben werden. Diese tauchen dann als Warnungen beim Kompilieren und als Verweise ins Nichts im PDF auf. + \item Auch werden außer Datentypen keine anderen Sachen (wie Methoden) verlinkt. + \item Beim Verlinken wird nur der Klassenname verwendet, nicht das Package, sodass zwei gleiche Klassen in unterschiedlichen Paketen das gleiche Ziel darstellen. Gelöst werden kann es dadurch, das der volle Name der Klasse angegeben wird. Das Doclet unterstützt derzeit keine generischen Typen und \enquote{doppelte} Klassennamen. Weitere Informationen zum Doclet finden sich in der dortigen Dokumentation. + \item Methoden- und Feldnamen erzeugen häufig zu volle Boxen in den Überschriften. +\end{itemize} + +\section{Gliederung einer Klasse} +Die Hierarchie-Stufen wurden schon mehrfach erwähnt, nun soll erläutert werden, was sie bedeuten. Um eine Klasse zu beschreiben wird der Klassenname als Hauptüberschrift verwendet (oberste Stufe). Danach folgen Unterteilungen für Felder, Konstruktoren oder Methoden. Und auf der untersten Ebene stehen die Namen der einzelnen Elemente einer Klasse. + +\section{Beschreiben einer Klasse} +Als äußere Umgebung für eine Klasse wird \code{jdclass} verwendet. \code{jdclass} hat ein Pflichtargument, dass den Namen der Klasse beschreibt. Als optionales Argument lässt sich \code{class} oder \code{interface} angeben, wobei standardmäßig ersteres verwendet wird. Auch \code{enum} wäre ein denkbarer Wert. Innerhalb der Klassendeklaration lassen sich die unterschiedlichen Elemente beschreiben. Dabei ist die folgende Reihenfolge notwendig. + +\begin{itemize} + \item \code{jdclassheader} + \item \code{jdinheritancetable} + \item \code{jdfield} + \item \code{jdconstructor} + \item \code{jdmethod} +\end{itemize} + +Die Umgebung \code{jdclassheader} darf nur einmal pro Klasse vorkommen, die Umgebungen \code{jdconstructor} und \code{jdinheritancetable} benötigen kein Pflichtargument mit dem Namen. + +\subsection{Die Umgebung \protect\code{jdinheritancetable}} +In dieser Tabelle werden mit \befehl{jdInhEntry} die Einträge für die Tabelle erzeugt. Der Befehl braucht 2 Argumente, das 1. für ein Element, das 2. für die Klasse, von der das Element geerbt wird. + +\subsection{Befehle für alle Umgebungen außer \protect\code{jdinheritancetable}} +Für jede dieser Umgebungen sind im Allgemeinen die gleichen Elemente gültig. Allerdings werden nicht alle Elemente überall verwendet. In Tabelle \ref{tab:befehleInUmgebung} ist aufgeführt, welche Befehle in welcher Umgebung verwendet werden. Die Verwendung von Befehlen, die nicht zur Umgebung gehören, erzeugt keinen Fehler, hat aber keine Auswirkung. Darüberhinaus unternimmt das \code{javadoc}-Package auch keine Java-Syntaxprüfung. So ist es durchaus möglich, sich widersprechende Modifier anzugeben, aber nicht sinnvoll. + +\subsubsection{Modifier} +Folgende Modifier lassen sich zu einem Element angeben, sie verlangen keine Argumente. +\begin{itemize} + \item \befehl{jdpublic} + \item \befehl{jdprotected} + \item \befehl{jdprivate} + \item \befehl{jdstatic} + \item \befehl{jdabstract} + \item \befehl{jdfinal} + \item \befehl{jdtransient} + \item \befehl{jdvolatile} +\end{itemize} + +\subsubsection{Codebasierte Attribute} +Folgende Befehle sind keine typischen Javadoc-Elemente, enthalten aber wertvolle Informationen zu einer Klasse. + +\begin{itemize} + \item \befehl{jdpackage\{packagename\}} Das Package, in dem die Klasse enthalten ist. + \item \befehl{jdinherits\{classname\}} Vererbte Klasse. Um eine Vererbungshierarchie darzustellen, kann der Pfeil \befehl{jdinh} verwendet werden. + \item \befehl{jdimplements\{interface\}} Ein Interface, dass implementiert wird. Kann mehrfach vorkommen. + \item \befehl{jdouterclass\{classname\}} Definiert für innere Klassen den Namen der äußeren. + \item \befehl{jdtype\{type\}} Datentyp, vor allem bei Rückgabewerten oder Feldnamen. Wird bei einer Methode kein Rückgabewert angegeben, gilt automatisch \code{void}. +\end{itemize} + +\subsubsection{Javadocbasierte Attribute} +Die meisten Javadoc-Attribute haben ein Pflichtargument, dass ihre Beschreibung enthält. Dazu zählen folgende Attribute: + +\begin{itemize} + \item \befehl{JDcategory\{beschreibung\}} + \item \befehl{JDdeprecated\{beschreibung\}} + \item \befehl{JDserial\{beschreibung\}} + \item \befehl{JDserialData\{beschreibung\}} + \item \befehl{JDserialField\{beschreibung\}} + \item \befehl{JDsince\{beschreibung\}} + \item \befehl{JDtext\{beschreibung\}} + \item \befehl{JDversion\{beschreibung\}} + \item \befehl{JDreturn\{beschreibung\}} +\end{itemize} + +Darüberhinaus gibt es drei weitere Javadoc-Attribute, die mehrfach auftreten dürfen und z.T. mehrere Argumente annehmen. +\begin{itemize} + \item \befehl{JDsee\{beschreibung\}} + \item \befehl{JDauthor\{autorname\}} + \item \befehl{JDpara\{datentyp\}\{name\}\{beschreibung\}} + \item \befehl{JDthrows\{exceptionname\}\{beschreibung\}} +\end{itemize} + +\subsection{Zuordnungstabelle Umgebung zu Befehl} +Die Tabelle \ref{tab:befehleInUmgebung} fasst zusammen, welche beschreibenden Befehle in welcher Umgebung auftauchen dürfen. + +\begin{table}[!ht] + \begin{center} + \begin{tabular}{l|c|c|c|c } + Befehl & \begin{sideways}jdclassheader\end{sideways} & \begin{sideways}jdfield\end{sideways} & \begin{sideways}jdconstructor\end{sideways} & \begin{sideways}jdmethod\end{sideways} \\ + \hline + \befehl{jdpublic} & X & X & X & X + \\ \hline + \befehl{jdprotected} & X & X & X & X + \\ \hline + \befehl{jdprivate} & X & X & X & X + \\ \hline + \befehl{jdstatic} & X & X & X & X + \\ \hline + \befehl{jdabstract} & X & X & X & X + \\ \hline + \befehl{jdfinal} & X & X & X & X + \\ \hline + \befehl{jdtransient} & & X & & + \\ \hline + \befehl{jdvolatile} & & X & & + \\ \hline + \befehl{jdpackage\{packagename\}} & X & & & + \\ \hline + \befehl{jdinherits\{classname\}} & X & & & + \\ \hline + \befehl{jdimplements\{interface\}} & X & & & + \\ \hline + \befehl{jdouterclass\{classname\}} & X & & & + \\ \hline + \befehl{jdtype\{type\}} & & X & & X + \\ \hline + \befehl{JDauthor\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDcategory\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDdeprecated\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDsee\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDserial\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDserialData\{beschreibung\}} & & & X & X + \\ \hline + \befehl{JDserialField\{beschreibung\}} & & X & & + \\ \hline + \befehl{JDsince\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDtext\{beschreibung\}} & X & X & X & X + \\ \hline + \befehl{JDversion\{beschreibung\}} & X & & & + \\ \hline + \befehl{JDreturn\{beschreibung\}} & & & X & X + \\ \hline + \befehl{JDpara\{datentyp\}\{name\}\{beschreibung\}} & & & X & X + \\ \hline + \befehl{JDthrows\{exceptionname\}\{beschreibung\}} & & & X & X + \end{tabular} + \caption{Verwendung von Befehlen in Umgebungen} + \label{tab:befehleInUmgebung} + \end{center} +\end{table} + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/javadoc/doc/javadoc_doc_en.pdf b/macros/latex/contrib/javadoc/doc/javadoc_doc_en.pdf new file mode 100644 index 0000000000..a0f79eceb3 Binary files /dev/null and b/macros/latex/contrib/javadoc/doc/javadoc_doc_en.pdf differ diff --git a/macros/latex/contrib/javadoc/doc/javadoc_doc_en.tex b/macros/latex/contrib/javadoc/doc/javadoc_doc_en.tex new file mode 100644 index 0000000000..d038fbe7cc --- /dev/null +++ b/macros/latex/contrib/javadoc/doc/javadoc_doc_en.tex @@ -0,0 +1,219 @@ +\documentclass[11pt,a4paper]{article} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage[ansinew]{inputenc} +\usepackage{csquotes} +\usepackage{rotating} + +\newcommand{\code}[1]{\protect\texttt{#1}} +\newcommand{\befehl}[1]{\code{$\backslash$#1}} + +\begin{document} +\title{The \code{javadoc} Package} +\author{Jolle\footnote{Comments, Help, Questions, Hints, Critics to \mbox{joerman.lieder@gmx.net}} } +\date{\today} +\maketitle + +\begin{abstract} +The \code{javadoc} package provides an easy way to document source code. It is related to the javadoc system for java source code and tries to provide the same descriptions. But, of course, source code of other languages can be documented using this package. The package is under GNU GENERAL PUBLIC LICENSE\footnote{www.gnu.org} +\end{abstract} + +\tableofcontents + +\section{Introduction} +Javadoc is a powerful tool for java developer to document their source code. It produces a comprehensive collection of HTML-pages out of special formattet comments in sourc code. The package \code{javadoc} uses the same attributes to describe the source code with \LaTeX{}. In combination with the TexGen doclet the \TeX-documentation can be generated with the javadoc out of the source code. + +\section{Options and Required Packages} +The \code{javadoc}-package requires one other package. The \code{longtable} is used to display the tables of inherited fields and methods. + +The package provides options to customize the layout and structure of the document. The package occupies 3 levels of hierarchy, with the options \code{chapter}, \code{section}, \code{subsection} the highest level can be set, the others will be adapt automatically. The default is \code{section}. The second possibility to customize the behaviour is to set the table of content. The two forms of \code{chapter} and \code{chapter*} and so on can be used. The following table lists the possible options. + +\begin{center} + \begin{tabular}{l|l} + Option & Table of Content \\ \hline + \code{toc0} & no level \\ + \code{toc1} & highest level, default \\ + \code{toc2} & the two highest levels\\ + \code{toc3} & all levels \\ + \code{toc} & like \code{toc3} \\ + \code{notoc} & like \code{toc0} + \end{tabular} +\end{center} + +The entries of the table of contents might be changed by other settings independent of this package options. + +The \code{hyperref}-option produces links inside of the document. This refers to the datatypes of parameters, classes, methodreturns, etc. It also produces many warnings during compilation process due to the missing targets. Using this option, the package \code{hyperref} is loaded. Options can be set with the \befehl{hypersetup} command. + +The package provides the possibility to use different languages. It belongs to the headinds and words, no options or packages are loaded. Codespecific words are not translated. An implemented option is \code{deutsch}, default is english. Other languages can be easily integrated by translating the following commands. All language-commands start with \befehl{jd@lang@}, the endings are listed in table \ref{tab:jd:lang}. + +\begin{table} + \begin{center} + \begin{tabular}[h]{l|l} + field & author \\ + method & category \\ + constr & deprecated \\ + & parameter \\ + fullname & see \\ + package & serial \\ + inherits & serialData \\ + implements & serialField \\ + outerclass & since \\ + & return \\ + elementname & throws \\ + inheritOf & version \\ + inheritancetable & + \end{tabular} + \end{center} + \label{tab:jd:lang} + \caption{Language commands} +\end{table} + +\section{Design-Commands} +2 additional commands are helpful. \befehl{jdinh} draws an arrow for inheritance from right to left. \befehl{jdcode} has one argument and changes the font to TrueType. + +\section{Linking in the Output-PDF} +For linkings the arguments of \befehl{jdtype} and the first arguments of \befehl{JDpara} and \befehl{jdInhEntry} must contain the link-information. These information are set with \befehl{jdtypesimple\{type\}} or \befehl{jdtypearray\{name\}\{dimension\}} or \befehl{jdtypegeneric\{name\}\{generic\}}. For generic types the single classes must be signed with the named commands. The targets are set automatically. You can use all these commands without worrying about the use of the \code{hyperref} option. Without the option, the links are ignored and produces no errors or warnings. + +\section{Known Issues} +\begin{itemize} + \item Problems comes about the linkings to not described classes. There are warnings during compilation process and missing links in the output. + \item Only class- and interfacenames are linked, not methods or else. + \item The label for linking contains the classname. Two equal named classes produces errors. + \item Method- und Fieldnames often produces overfull boxes in the headings. +\end{itemize} + +\section{Structure of a class} +The hierarchy levels are already mentioned, here comes the description. Describing a class starts with a classname. This name will be the highest hierarchy level. Then the headings for Fields, Methods, Constructors follow, the lowest level is for the elements of the class (methodnames, fieldnames...) + +\section{Description of a class} +The outer environment for a class is \code{jdclass}. \code{jdclass} has an argument with the classname. An option can be given with the type \code{class} or \code{interface} or \code{enum}. Default is \code{class}. Inside of the class environment, the following structure has to be kept. + +\begin{itemize} + \item \code{jdclassheader} + \item \code{jdinheritancetable} + \item \code{jdfield} + \item \code{jdconstructor} + \item \code{jdmethod} +\end{itemize} + +The environment \code{jdclassheader} can be written once per class, the environments \code{jdconstructor} and \code{jdinheritancetable} need no argument with the name. + +\subsection{The environment \protect\code{jdinheritancetable}} +The table entries can be produced with the \befehl{jdInhEntry} command. It has two arguments, the first one is the element the second the class, that inherited the element. + +\subsection{Commands for all environments except \protect\code{jdinheritancetable}} +For all environments the same elements are valid in general. But not all elements are used everywhere. The table \ref{tab:befehleInUmgebung} lists the usage of commands in environments. The usage of commands not belonging to an environment doesn't produces a failure, but it has no effect. The \code{javadoc}-package has no java-syntax-check, you can call contradictory modifier if you feel to. + +\subsubsection{Modifier} +The following modifier can be named. They have no arguments. +\begin{itemize} + \item \befehl{jdpublic} + \item \befehl{jdprotected} + \item \befehl{jdprivate} + \item \befehl{jdstatic} + \item \befehl{jdabstract} + \item \befehl{jdfinal} + \item \befehl{jdtransient} + \item \befehl{jdvolatile} +\end{itemize} + +\subsubsection{Codebased Attributs} +The following attributes are not javadoc-based but contains important information + +\begin{itemize} + \item \befehl{jdpackage\{packagename\}} The package containing the class. + \item \befehl{jdinherits\{classname\}} Inherited class. For a hierarchy, the arrow \befehl{jdinh} can be used. + \item \befehl{jdimplements\{interface\}} A Interface, that is implemented. Can be named more than once. + \item \befehl{jdouterclass\{classname\}} Defines an outer class for an inner one. + \item \befehl{jdtype\{type\}} Data type, especially for return values, and fiels. A method without type gets automatically \code{void}. +\end{itemize} + +\subsubsection{Javadocbased Attributs} +Most arguments have an argument containing their description. + +\begin{itemize} + \item \befehl{JDcategory\{description\}} + \item \befehl{JDdeprecated\{description\}} + \item \befehl{JDserial\{description\}} + \item \befehl{JDserialData\{description\}} + \item \befehl{JDserialField\{description\}} + \item \befehl{JDsince\{description\}} + \item \befehl{JDtext\{description\}} + \item \befehl{JDversion\{description\}} + \item \befehl{JDreturn\{description\}} +\end{itemize} + +There are three other attributs, that can be named more than once and/or contain more than one argument. +\begin{itemize} + \item \befehl{JDsee\{description\}} + \item \befehl{JDauthor\{authorname\}} + \item \befehl{JDpara\{datatype\}\{name\}\{description\}} + \item \befehl{JDthrows\{exceptionname\}\{description\}} +\end{itemize} + +\subsection{Table with commands and environments} +The table \ref{tab:befehleInUmgebung} sums up, which commands can be named in which environment. + +\begin{table}[!ht] + \begin{center} + \begin{tabular}{l|c|c|c|c } + Command & \begin{sideways}jdclassheader\end{sideways} & \begin{sideways}jdfield\end{sideways} & \begin{sideways}jdconstructor\end{sideways} & \begin{sideways}jdmethod\end{sideways} \\ + \hline + \befehl{jdpublic} & X & X & X & X + \\ \hline + \befehl{jdprotected} & X & X & X & X + \\ \hline + \befehl{jdprivate} & X & X & X & X + \\ \hline + \befehl{jdstatic} & X & X & X & X + \\ \hline + \befehl{jdabstract} & X & X & X & X + \\ \hline + \befehl{jdfinal} & X & X & X & X + \\ \hline + \befehl{jdtransient} & & X & & + \\ \hline + \befehl{jdvolatile} & & X & & + \\ \hline + \befehl{jdpackage\{packagename\}} & X & & & + \\ \hline + \befehl{jdinherits\{classname\}} & X & & & + \\ \hline + \befehl{jdimplements\{interface\}} & X & & & + \\ \hline + \befehl{jdouterclass\{classname\}} & X & & & + \\ \hline + \befehl{jdtype\{type\}} & & X & & X + \\ \hline + \befehl{JDauthor\{description\}} & X & X & X & X + \\ \hline + \befehl{JDcategory\{description\}} & X & X & X & X + \\ \hline + \befehl{JDdeprecated\{description\}} & X & X & X & X + \\ \hline + \befehl{JDsee\{description\}} & X & X & X & X + \\ \hline + \befehl{JDserial\{description\}} & X & X & X & X + \\ \hline + \befehl{JDserialData\{description\}} & & & X & X + \\ \hline + \befehl{JDserialField\{description\}} & & X & & + \\ \hline + \befehl{JDsince\{description\}} & X & X & X & X + \\ \hline + \befehl{JDtext\{description\}} & X & X & X & X + \\ \hline + \befehl{JDversion\{description\}} & X & & & + \\ \hline + \befehl{JDreturn\{description\}} & & & X & X + \\ \hline + \befehl{JDpara\{datatype\}\{name\}\{description\}} & & & X & X + \\ \hline + \befehl{JDthrows\{exceptionname\}\{description\}} & & & X & X + \end{tabular} + \caption{Usage of commands in environments} + \label{tab:befehleInUmgebung} + \end{center} +\end{table} + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/javadoc/doclet/doc/ClassWriter.tex b/macros/latex/contrib/javadoc/doclet/doc/ClassWriter.tex new file mode 100644 index 0000000000..a008c3e671 --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/doc/ClassWriter.tex @@ -0,0 +1,308 @@ +\begin{jdclass}[class]{ClassWriter} +\begin{jdclassheader} + +\jdpublic +\jdinherits{\jdtypesimple{Object}} +\JDtext{Class that collection the javadoc information for one class and writes them in to the destination file.} +\JDauthor{Jolle} +\JDsince{13.05.2008} +\JDversion{1.0} +\end{jdclassheader} +\begin{jdinheritancetable} \jdInhEntry{\jdtypesimple{Object} clone( )}{Object} + \jdInhEntry{\jdtypesimple{boolean} equals( \jdtypesimple{Object} )}{Object} + \jdInhEntry{\jdtypesimple{void} finalize( )}{Object} + \jdInhEntry{\jdtypesimple{Class} getClass( )}{Object} + \jdInhEntry{\jdtypesimple{int} hashCode( )}{Object} + \jdInhEntry{\jdtypesimple{void} notify( )}{Object} + \jdInhEntry{\jdtypesimple{void} notifyAll( )}{Object} + \jdInhEntry{\jdtypesimple{String} toString( )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long}, \jdtypesimple{int} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( )}{Object} +\end{jdinheritancetable} +\begin{jdfield}{JDclass} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDheader} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDmethod} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDconstructor} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDfield} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDinterfaceOpt} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDclassOpt} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCpublic} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCprivate} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCprotected} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCfinal} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCstatic} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCtransient} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCvolatile} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCabstract} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCpackage} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCinherits} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCinhArrow} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCimplements} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCouterclass} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDCtype} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDcategory} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDdeprecated} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDsee} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDserial} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDserialData} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDserialField} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDsince} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDtext} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDversion} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDreturn} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDauthor} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDpara} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDthrows} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDinhtable} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDClinksimple} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{JDClinkarray} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\end{jdfield} +\begin{jdfield}{ps\_dateiausgabe} +\jdprivate +\jdtype{\jdtypesimple{TexPrintStream}} +\JDtext{Stream, the output is written to.} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdconstructor} +\jdpublic +\JDpara{\jdtypesimple{String}}{s\_zielpath}{path with the destination file} +\JDthrows{IOException}{If the file cannot be created.} +\JDthrows{FileNotFoundException}{If the file isn't available after creation process} +\JDtext{Initializes the ClassWriter, creating a new file with a stream into} +\JDauthor{Jolle} +\JDsince{version 1.0 of 13.05.2008} +\end{jdconstructor} +\begin{jdmethod}{print} +\jdpublic +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{ClassDoc}}{cd}{class-object} +\JDtext{Writes the information of this file} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{print} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{FieldDoc}}{fd}{field-object} +\JDtext{Writes the information of a field} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{print} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{ConstructorDoc}}{cd}{constructor-object} +\JDtext{Writes the informationen of a constructor} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{print} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{MethodDoc}}{md}{method-object} +\JDtext{Writes the information of a method} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printTags} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{Doc}}{d}{Doc-Type with the javadoc-information} +\JDtext{Writes all primitv javadoc attributes} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printClassInfo} +\jdprivate +\jdtype{\jdtypesimple{InhTable}} +\JDpara{\jdtypesimple{ClassDoc}}{cd}{Class-object} +\JDtext{Writes the classheader} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\JDreturn{The tableOfInheritance is created in this method and returned for later use.} +\end{jdmethod} +\begin{jdmethod}{getLinks} +\jdpublic \jdstatic +\jdtype{\jdtypesimple{String}} +\JDpara{\jdtypesimple{Type}}{t}{Type-Object} +\JDtext{Returns the type (Array or Simple) of a type} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\JDreturn{string with the corresponding texcommand} +\end{jdmethod} +\begin{jdmethod}{printLinks} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{Type}}{t}{Type-Object} +\JDtext{Writes the linked type} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\begin{jdmethod}{printInhTable} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{InhTable}}{it}{the object with an (unsorted) table} +\JDtext{Writes the tableOfInheritance and all entries} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{print} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDtext{Writes an linebreak} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printCommand} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{befehl}{name of the command} +\JDtext{Writes a tex-command} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printOpt} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{option}{option name} +\JDtext{Writes a tex-option} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printArgument} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{arg}{argumentname} +\JDtext{Writes a tex-argument} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printBegin} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{umgebung}{environmentname} +\JDtext{Writes the beginning of an environment} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{printEnd} +\jdprivate +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{umgebung}{environmentname} +\JDtext{Writes the ending of an environment} +\JDsince{version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\end{jdclass} diff --git a/macros/latex/contrib/javadoc/doclet/doc/InhEntry.tex b/macros/latex/contrib/javadoc/doclet/doc/InhEntry.tex new file mode 100644 index 0000000000..0314ff05a7 --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/doc/InhEntry.tex @@ -0,0 +1,89 @@ +\begin{jdclass}[class]{InhEntry} +\begin{jdclassheader} + +\jdpublic +\jdimplements{Comparable} +\jdinherits{\jdtypesimple{Object}} +\JDtext{One Entry of the table.} +\JDauthor{Jolle} +\JDversion{1.0} +\JDsince{13.05.2008} +\end{jdclassheader} +\begin{jdinheritancetable} \jdInhEntry{\jdtypesimple{Object} clone( )}{Object} + \jdInhEntry{\jdtypesimple{boolean} equals( \jdtypesimple{Object} )}{Object} + \jdInhEntry{\jdtypesimple{void} finalize( )}{Object} + \jdInhEntry{\jdtypesimple{Class} getClass( )}{Object} + \jdInhEntry{\jdtypesimple{int} hashCode( )}{Object} + \jdInhEntry{\jdtypesimple{void} notify( )}{Object} + \jdInhEntry{\jdtypesimple{void} notifyAll( )}{Object} + \jdInhEntry{\jdtypesimple{String} toString( )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long}, \jdtypesimple{int} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( )}{Object} +\end{jdinheritancetable} +\begin{jdfield}{JDInhEntry} +\jdprivate \jdfinal \jdstatic +\jdtype{\jdtypesimple{String}} +\JDtext{Tex-command for an entry} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdfield}{eintrag} +\jdprivate +\jdtype{\jdtypesimple{Doc}} +\JDtext{the element of an entry} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdfield}{parent} +\jdprivate +\jdtype{\jdtypesimple{ClassDoc}} +\JDtext{The parent class of an entry} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdconstructor} +\jdpublic +\JDpara{\jdtypesimple{Doc}}{d}{element} +\JDpara{\jdtypesimple{ClassDoc}}{parent}{the inheriter} +\JDtext{Creates the entry with the element and the parentclass} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdconstructor} +\begin{jdmethod}{getTexTableEntry} +\jdpublic +\jdtype{\jdtypesimple{String}} +\JDtext{Creates an entry-line in tex-format} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\JDreturn{the formatted tex-line} +\end{jdmethod} +\begin{jdmethod}{compareTo} +\jdpublic +\jdtype{\jdtypesimple{int}} +\JDpara{\jdtypesimple{InhEntry}}{name}{the object to compare to} +\JDtext{Overrides the compartTo-Method of Comparable} +\JDauthor{Jolle} +\JDsince{Version 1.0 from 13.05.2008} +\JDreturn{0, when equal; 1, if the object is an field and the other one a method, or - when equal- , the parent is higher than the other parent or -when equal- the alphanumeric comparison of the names. + otherwise -1} +\end{jdmethod} +\begin{jdmethod}{compareInheritation} +\jdprivate +\jdtype{\jdtypesimple{int}} +\JDpara{\jdtypesimple{ClassDoc}}{cd}{the other parent} +\JDtext{Compares to parent to hierarchy} +\JDauthor{Jolle} +\JDsince{Version 1.0 from 13.05.2008} +\JDreturn{0, when equal, 1 when the own parent is higher, otherwise -1} +\end{jdmethod} +\begin{jdmethod}{compareType} +\jdprivate +\jdtype{\jdtypesimple{int}} +\JDpara{\jdtypesimple{Doc}}{externDoc}{the other element} +\JDtext{Compares two element to type} +\JDauthor{Jolle} +\JDsince{Version 1.0 from 13.05.2008} +\JDreturn{0, if both method or both field, 1 if the own one is field and the other method, otherwise -1} +\end{jdmethod} +\end{jdclass} diff --git a/macros/latex/contrib/javadoc/doclet/doc/InhTable.tex b/macros/latex/contrib/javadoc/doclet/doc/InhTable.tex new file mode 100644 index 0000000000..8f5c0c0d15 --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/doc/InhTable.tex @@ -0,0 +1,56 @@ +\begin{jdclass}[class]{InhTable} +\begin{jdclassheader} + +\jdpublic +\jdinherits{\jdtypesimple{Object}} +\JDtext{Table of Inheritance} +\JDauthor{Jolle} +\JDsince{13.05.2008} +\JDversion{1.0} +\end{jdclassheader} +\begin{jdinheritancetable} \jdInhEntry{\jdtypesimple{Object} clone( )}{Object} + \jdInhEntry{\jdtypesimple{boolean} equals( \jdtypesimple{Object} )}{Object} + \jdInhEntry{\jdtypesimple{void} finalize( )}{Object} + \jdInhEntry{\jdtypesimple{Class} getClass( )}{Object} + \jdInhEntry{\jdtypesimple{int} hashCode( )}{Object} + \jdInhEntry{\jdtypesimple{void} notify( )}{Object} + \jdInhEntry{\jdtypesimple{void} notifyAll( )}{Object} + \jdInhEntry{\jdtypesimple{String} toString( )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long}, \jdtypesimple{int} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( )}{Object} +\end{jdinheritancetable} +\begin{jdfield}{tabelle} +\jdprivate +\jdtype{\jdtypesimple{ArrayList}} +\JDtext{List containing all entries} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdconstructor} +\jdpublic +\end{jdconstructor} +\begin{jdmethod}{addEntries} +\jdpublic +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{ClassDoc}}{parent}{die übergeordenete Klasse} +\JDtext{Adds the fields and methods of the parent-class to the table} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\begin{jdmethod}{sortTable} +\jdpublic +\jdtype{\jdtypesimple{void}} +\JDtext{Sorts the table to field/methods, then inheriting class, than alphanumeric} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\begin{jdmethod}{getTexTableEntries} +\jdpublic +\jdtype{\jdtypesimple{String}} +\JDtext{Returns an string containing all entries in Tex-format} +\JDauthor{Jolle} +\JDsince{Version 1.0 from 13.05.2008} +\JDreturn{the hole table content as one string.} +\end{jdmethod} +\end{jdclass} diff --git a/macros/latex/contrib/javadoc/doclet/doc/TexGen.tex b/macros/latex/contrib/javadoc/doclet/doc/TexGen.tex new file mode 100644 index 0000000000..bad0577d8a --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/doc/TexGen.tex @@ -0,0 +1,71 @@ +\begin{jdclass}[class]{TexGen} +\begin{jdclassheader} + +\jdpublic +\jdinherits{\jdtypesimple{Object}\jdinh \jdtypesimple{Doclet}} +\JDtext{The Doclet writes the javadoc-content into Tex-files referring to the javadoc-Package. + + Mandatory CommandLineOption is: -dest destinationpath for the outputfile(s)} +\JDauthor{Jolle} +\JDsince{13.05.2008} +\JDversion{1.0} +\end{jdclassheader} +\begin{jdinheritancetable} \jdInhEntry{\jdtypesimple{LanguageVersion} languageVersion( )}{Doclet} + \jdInhEntry{\jdtypesimple{int} optionLength( \jdtypesimple{String} )}{Doclet} + \jdInhEntry{\jdtypesimple{boolean} start( \jdtypesimple{RootDoc} )}{Doclet} + \jdInhEntry{\jdtypesimple{boolean} validOptions( \jdtypearray{String}{\lbrack{}\rbrack{}\lbrack{}\rbrack{}}, \jdtypesimple{DocErrorReporter} )}{Doclet} + \jdInhEntry{\jdtypesimple{Object} clone( )}{Object} + \jdInhEntry{\jdtypesimple{boolean} equals( \jdtypesimple{Object} )}{Object} + \jdInhEntry{\jdtypesimple{void} finalize( )}{Object} + \jdInhEntry{\jdtypesimple{Class} getClass( )}{Object} + \jdInhEntry{\jdtypesimple{int} hashCode( )}{Object} + \jdInhEntry{\jdtypesimple{void} notify( )}{Object} + \jdInhEntry{\jdtypesimple{void} notifyAll( )}{Object} + \jdInhEntry{\jdtypesimple{String} toString( )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long}, \jdtypesimple{int} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( )}{Object} +\end{jdinheritancetable} +\begin{jdfield}{destpath} +\jdprivate \jdstatic +\jdtype{\jdtypesimple{String}} +\JDtext{In this variable the destinationpath is storaged + + The variable is set during validation of the commandlineparameter and read to write + the output files} +\JDauthor{Jolle} +\JDsince{version 1.0 from 13.05.2008} +\end{jdfield} +\begin{jdconstructor} +\jdpublic +\end{jdconstructor} +\begin{jdmethod}{start} +\jdpublic \jdstatic +\jdtype{\jdtypesimple{boolean}} +\JDpara{\jdtypesimple{RootDoc}}{root}{the parsed element with ALL information} +\JDtext{method that is called from the javadoc-programm after parsing the inputfiles} +\JDauthor{Jolle} +\JDreturn{true, if process successful; false if not} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\begin{jdmethod}{optionLength} +\jdpublic \jdstatic +\jdtype{\jdtypesimple{int}} +\JDpara{\jdtypesimple{String}}{option}{optionname (starting with "-")} +\JDtext{Method, with number of arguments to an commandlineparameter. + Returns 2 for -dest} +\JDauthor{Jolle} +\JDreturn{0, if option doesn't exist, otherwise a value > 1} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\begin{jdmethod}{validOptions} +\jdpublic \jdstatic +\jdtype{\jdtypesimple{boolean}} +\JDpara{\jdtypearray{String}{\lbrack{}\rbrack{}\lbrack{}\rbrack{}}}{options}{array with all options and their arguments} +\JDpara{\jdtypesimple{DocErrorReporter}}{reporter}{an object to report the process} +\JDtext{Method validating the commandline call.} +\JDauthor{Jolle} +\JDreturn{validation result} +\JDsince{version 1.0 from 13.05.2008} +\end{jdmethod} +\end{jdclass} diff --git a/macros/latex/contrib/javadoc/doclet/doc/TexPrintStream.tex b/macros/latex/contrib/javadoc/doclet/doc/TexPrintStream.tex new file mode 100644 index 0000000000..0f0e287f6d --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/doc/TexPrintStream.tex @@ -0,0 +1,97 @@ +\begin{jdclass}[class]{TexPrintStream} +\begin{jdclassheader} + +\jdpublic +\jdinherits{\jdtypesimple{Object}\jdinh \jdtypesimple{OutputStream}\jdinh \jdtypesimple{FilterOutputStream}\jdinh \jdtypesimple{PrintStream}} +\JDtext{Conversion of special characters into tex-format} +\JDauthor{Jolle} +\JDsince{13.05.2008} +\JDversion{1.0} +\end{jdclassheader} +\begin{jdinheritancetable} \jdInhEntry{\jdtypesimple{OutputStream} out}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{PrintStream} append( \jdtypesimple{CharSequence} )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} append( \jdtypesimple{CharSequence}, \jdtypesimple{int}, \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} append( \jdtypesimple{char} )}{PrintStream} + \jdInhEntry{\jdtypesimple{Appendable} append( \jdtypesimple{char} )}{PrintStream} + \jdInhEntry{\jdtypesimple{Appendable} append( \jdtypesimple{CharSequence}, \jdtypesimple{int}, \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{Appendable} append( \jdtypesimple{CharSequence} )}{PrintStream} + \jdInhEntry{\jdtypesimple{boolean} checkError( )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} clearError( )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} close( )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} flush( )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} format( \jdtypesimple{String}, \jdtypearray{Object}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} format( \jdtypesimple{Locale}, \jdtypesimple{String}, \jdtypearray{Object}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{boolean} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{char} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{long} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{float} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{double} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypearray{char}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{String} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} print( \jdtypesimple{Object} )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} printf( \jdtypesimple{String}, \jdtypearray{Object}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{PrintStream} printf( \jdtypesimple{Locale}, \jdtypesimple{String}, \jdtypearray{Object}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{boolean} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{char} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{long} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{float} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{double} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypearray{char}{\lbrack{}\rbrack{}} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{String} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} println( \jdtypesimple{Object} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} setError( )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypearray{byte}{\lbrack{}\rbrack{}}, \jdtypesimple{int}, \jdtypesimple{int} )}{PrintStream} + \jdInhEntry{\jdtypesimple{void} close( )}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{void} flush( )}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypesimple{int} )}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypearray{byte}{\lbrack{}\rbrack{}} )}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypearray{byte}{\lbrack{}\rbrack{}}, \jdtypesimple{int}, \jdtypesimple{int} )}{FilterOutputStream} + \jdInhEntry{\jdtypesimple{void} close( )}{OutputStream} + \jdInhEntry{\jdtypesimple{void} flush( )}{OutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypesimple{int} )}{OutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypearray{byte}{\lbrack{}\rbrack{}} )}{OutputStream} + \jdInhEntry{\jdtypesimple{void} write( \jdtypearray{byte}{\lbrack{}\rbrack{}}, \jdtypesimple{int}, \jdtypesimple{int} )}{OutputStream} + \jdInhEntry{\jdtypesimple{Object} clone( )}{Object} + \jdInhEntry{\jdtypesimple{boolean} equals( \jdtypesimple{Object} )}{Object} + \jdInhEntry{\jdtypesimple{void} finalize( )}{Object} + \jdInhEntry{\jdtypesimple{Class} getClass( )}{Object} + \jdInhEntry{\jdtypesimple{int} hashCode( )}{Object} + \jdInhEntry{\jdtypesimple{void} notify( )}{Object} + \jdInhEntry{\jdtypesimple{void} notifyAll( )}{Object} + \jdInhEntry{\jdtypesimple{String} toString( )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( \jdtypesimple{long}, \jdtypesimple{int} )}{Object} + \jdInhEntry{\jdtypesimple{void} wait( )}{Object} +\end{jdinheritancetable} +\begin{jdconstructor} +\jdpublic +\JDpara{\jdtypesimple{File}}{f}{File to write} +\JDthrows{FileNotFoundException}{if the file doesn't exist} +\JDtext{Construktor, initialising the stream into the given file} +\JDsince{Version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdconstructor} +\begin{jdmethod}{printTex} +\jdpublic +\jdtype{\jdtypesimple{void}} +\JDpara{\jdtypesimple{String}}{ausgabe}{unformatted string} +\JDtext{Converts an String and writes it to the stream} +\JDsince{Version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\begin{jdmethod}{umwandlung} +\jdpublic \jdstatic +\jdtype{\jdtypesimple{String}} +\JDpara{\jdtypesimple{String}}{unformatted}{unformatted string} +\JDtext{Converts the special characters to \TeX-format + + Characters, that are converted: \{ \} \_ \^{} \&{} \#{} \lbrack{} \rbrack{}} +\JDreturn{formatted string} +\JDsince{Version 1.0 from 13.05.2008} +\JDauthor{Jolle} +\end{jdmethod} +\end{jdclass} diff --git a/macros/latex/contrib/javadoc/doclet/texgen_doc_de.pdf b/macros/latex/contrib/javadoc/doclet/texgen_doc_de.pdf new file mode 100644 index 0000000000..911f00b58b Binary files /dev/null and b/macros/latex/contrib/javadoc/doclet/texgen_doc_de.pdf differ diff --git a/macros/latex/contrib/javadoc/doclet/texgen_doc_de.tex b/macros/latex/contrib/javadoc/doclet/texgen_doc_de.tex new file mode 100644 index 0000000000..8495691174 --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/texgen_doc_de.tex @@ -0,0 +1,56 @@ +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[ansinew]{inputenc} +\usepackage[ngerman]{babel} +\usepackage{csquotes} +\usepackage[section,toc1,deutsch,hyperref]{javadoc} + +\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black} + +\author{Jolle\footnote{Verbesserungsvorschläge, Kommentare, Korrekturen, Anregungen und Danksagungen an \mbox{joerman.lieder@gmx.net}} } +\date{\today} +\title{Dokumentation des TexGen-Doclets} + +\begin{document} +\maketitle + +\abstract{Diese Dokumentation beschreibt die Nutzung des TexGen-Doclets. Ein Doclet ist eine von com.sun.javadoc.Doclet abgeleitete Klasse, die verwendet werden kann, um mit dem Javadoc-Tool aus kommentierten Java-Quellcode-Dateien eine Dokumentation zu generieren. Standardmäßig werden HTML Dateien generiert, TexGen generiert \TeX-Dateien gemäß dem javadoc-Package. Das Doclet steht unter GNU GENERAL PUBLIC LICENSE\footnote{www.gnu.org}} + +\tableofcontents + +\section{Nutzung des Doclets} +\subsection{Aufruf von javadoc} +Um das Doclet zu nutzen muss es beim Aufruf von javadoc mit angegeben werden. Javadoc wird mit folgender Syntax aufgerufen: + +javadoc [options] [packagenames] [sourcefiles] [@files] + +Als mögliche Optionen existieren -doclet und -docletpath. Für das TexGen Doclet wird also hinter -doclet TexGen angegeben und hinter -docletpath der Pfad zum TexGen.jar Jararchiv. + +\subsection{TexGen-eigene Option} +Das TexGen Doclet bietet eine eigene Option an. Hinter -dest wird der Pfad zu einem Ordner angegeben, in dem die generierten Dateien landen. Wird kein Pfad angegeben, wird an der ausgeführten Stelle ein texgendoc Ordner erstellt und verwendet. + +Als Syntax ergibt sich somit: + +javadoc -doclet TexGen -docletpath <...texgen.jar> -dest ... + +\subsection{Aufruf mit dem Eclipse Javadoc-Plugin} +Unter Eclipse kann Javadoc mittels eines Plugins aufgerufen werden. Hier gibt es die Möglichkeit, ein eigenes Doclet zu wählen. Unter Docletname wird wieder TexGen angegeben, unter DocletPath der Pfad des Jararchives. Auf der nächsten Seite wird die Möglichkeit gegeben, \enquote{Extra Javadoc Options} anzugegeben. Hier kann -dest eingetragen werden. + +\section{Hinweise} +\begin{itemize} + \item Bestimmte Sonderzeichen im dokumentierenden Text werden umgewandelt, um sie nicht als Tex-Steuerzeichen zu interpretieren. Dazu gehören: +\verb+{ } _ ^ & # [ ]+. Es wird also schwer, Tex-Befehle in den Quelltext zu schreiben, um die Ausgabe zu formatieren. Es ist Aufgabe des Dokumentators zu prüfen, welche Zeichen in der Beschreibung vorkommen. + \item Bisher werden noch keine generischen Datentypen behandelt. + \item Doppelte Klassenamen (z.b. in verschiedenen Packages) werden zwar getrennt behandelt, aber bei der internen Verlinkung nicht unterschieden. +\end{itemize} + +\section{Dokumentation des Quellcodes} + +\input{doc/TexGen} +\input{doc/ClassWriter} +\input{doc/TexPrintStream} +\input{doc/InhTable} +\input{doc/InhEntry} + + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/javadoc/doclet/texgen_doc_en.pdf b/macros/latex/contrib/javadoc/doclet/texgen_doc_en.pdf new file mode 100644 index 0000000000..11bb1ab594 Binary files /dev/null and b/macros/latex/contrib/javadoc/doclet/texgen_doc_en.pdf differ diff --git a/macros/latex/contrib/javadoc/doclet/texgen_doc_en.tex b/macros/latex/contrib/javadoc/doclet/texgen_doc_en.tex new file mode 100644 index 0000000000..09c9eeb31b --- /dev/null +++ b/macros/latex/contrib/javadoc/doclet/texgen_doc_en.tex @@ -0,0 +1,56 @@ +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[ansinew]{inputenc} +\usepackage[english]{babel} +\usepackage{csquotes} +\usepackage[section,toc1,hyperref]{javadoc} + +\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black} + +\author{Jolle\footnote{Comments, Help, Questions, Critics to \mbox{joerman.lieder@gmx.net}} } +\date{\today} +\title{Documentation of TexGen-Doclet} + +\begin{document} +\maketitle + +\abstract{This documentation describes the use of the TexGen-Doclet. A doclet is a class derived from com.sun.javadoc.Doclet that can be used to generate a documentation with the javadoc-tool out of commented java-source-code. By default javadoc generates a HTML documentation, TexGen generates \TeX-files according to the javadoc-package. The doclet is under GNU GENERAL PUBLIC LICENSE\footnote{www.gnu.org}} + +\tableofcontents + +\section{Usage} +\subsection{Calling javadoc} +To use the doclet it has to be a parameter for the javadoc programm. The javadoc syntax is: + +javadoc [options] [packagenames] [sourcefiles] [@files] + +Possible Options are -doclet and -docletpath. For TexGen write \enquote{TeXGen} after -doclet and after -docletpath the Path to the TexGen.jar jararchive. + +\subsection{Option for TexGen} +TexGen provides an own option. You can use -dest and the path to the outputfolder, where the generated files will be located. If you don't use this option, an folder named \enquote{texgendoc} will be created. + +The final syntax is: + +javadoc -doclet TexGen -docletpath <...texgen.jar> -dest ... + +\subsection{Using Eclipse} +With Eclipse Javadoc can be called with an plugin. You have the possibility to choose a custom doclet. Use TexGen for the docletname and the path to the jararchive for the docletpath. The next dialog provides the inputfield for extra javadoc options. Here you can add -dest . + +\section{Known and Open Issues} +\begin{itemize} + \item Special character in the documented text are converted not to interprete them as Tex-control character. These are: +\verb+{ } _ ^ & # [ ]+. All other special characters, that might build a tex-control-character should be avoided. + \item Generic data types aren't supported. + \item Duplicate Classnames (e.g. in different packages) aren't supported in linking. +\end{itemize} + +\section{Source Code documentation} + +\input{doc/TexGen} +\input{doc/ClassWriter} +\input{doc/TexPrintStream} +\input{doc/InhTable} +\input{doc/InhEntry} + + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/javadoc/tex/javadoc.sty b/macros/latex/contrib/javadoc/tex/javadoc.sty new file mode 100644 index 0000000000..87ec110204 --- /dev/null +++ b/macros/latex/contrib/javadoc/tex/javadoc.sty @@ -0,0 +1,643 @@ +\ProvidesClass{javadoc}[2008/05/11 Package for documentation of Java source code. Package is under GNU GENERAL PUBLIC LICENSE]% + +% Uses the Package Longtable to print the Table of inheritance +\RequirePackage{longtable}% + +% Options for the hierarchy of the output structure +% Defines whether the chapter, the section or the subsection represents the highest structure level +\newif\ifjdbool@HierarchieChapter \jdbool@HierarchieChapterfalse% +\newif\ifjdbool@HierarchieSection \jdbool@HierarchieSectiontrue% +\newif\ifjdbool@HierarchieSubSection \jdbool@HierarchieSubSectionfalse% + +\DeclareOption{chapter}{\jdbool@HierarchieChaptertrue \jdbool@HierarchieSectionfalse \jdbool@HierarchieSubSectionfalse}% +\DeclareOption{section}{\jdbool@HierarchieSectiontrue \jdbool@HierarchieChapterfalse \jdbool@HierarchieSubSectionfalse} %Default +\DeclareOption{subsection}{\jdbool@HierarchieSubSectiontrue \jdbool@HierarchieChapterfalse \jdbool@HierarchieSectionfalse}% + +% Options for the output related to the toc +% Defines whether the chapter, the section or the elementnames will be part of the toc. +% Differences are realized with chapter and chapter* and their (sub)section variants +\newif\ifjdbool@TocChapter \jdbool@TocChaptertrue% +\newif\ifjdbool@TocSection \jdbool@TocSectionfalse% +\newif\ifjdbool@TocNames \jdbool@TocNamesfalse% + +\DeclareOption{toc}{\jd@TocDepth@drei}% +\DeclareOption{notoc}{\jd@TocDepth@null}% +\DeclareOption{toc0}{\jd@TocDepth@null}% +\DeclareOption{toc1}{\jd@TocDepth@eins} %Default +\DeclareOption{toc2}{\jd@TocDepth@zwei}% +\DeclareOption{toc3}{\jd@TocDepth@drei}% + +% Command that sets the level to which the toc will be generated. Sets the 3 variables above +\def\jd@TocDepth@null{ \jdbool@TocChapterfalse \jdbool@TocSectionfalse \jdbool@TocNamesfalse }% +\def\jd@TocDepth@eins{ \jdbool@TocChaptertrue \jdbool@TocSectionfalse \jdbool@TocNamesfalse }% +\def\jd@TocDepth@zwei{ \jdbool@TocChaptertrue \jdbool@TocSectiontrue \jdbool@TocNamesfalse }% +\def\jd@TocDepth@drei{ \jdbool@TocChaptertrue \jdbool@TocSectiontrue \jdbool@TocNamestrue }% + +%Options to choose the language (def is English) +%Only the words are translated, there is no further config like babel or encodings +\newif\ifjdbool@lang@GermanOption \jdbool@lang@GermanOptionfalse% +\DeclareOption{deutsch}{\jdbool@lang@GermanOptiontrue}% + +%Options to choose pdf-intern-links +\newif\ifjdbool@pdf \jdbool@pdffalse% +\DeclareOption{hyperref}{\jdbool@pdftrue}% + +\ProcessOptions% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Language-definitions + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ifjdbool@lang@GermanOption% +%Deutsch + \def\jd@lang@fullname{Vollständige Deklaration}% + \def\jd@lang@package{Paket}% + \def\jd@lang@inherits{Vererbt}% + \def\jd@lang@implements{Implementiert}% + \def\jd@lang@outerclass{Enthaltende Klasse}% + \def\jd@lang@author{Autor}% + \def\jd@lang@category{Kategory}% + \def\jd@lang@deprecated{Veraltet}% + \def\jd@lang@see{Siehe auch}% + \def\jd@lang@serial{Serial}% + \def\jd@lang@serialData{SerialData}% + \def\jd@lang@serialField{SerialField}% + \def\jd@lang@parameter{Parameter}% + \def\jd@lang@since{Seit}% + \def\jd@lang@return{Rückgabewert}% + \def\jd@lang@throws{Ausnahmen}% + \def\jd@lang@version{Version}% + \def\jd@lang@field{Felder}% + \def\jd@lang@method{Methoden}% + \def\jd@lang@constr{Konstruktoren}% + \def\jd@lang@elementname{Element}% + \def\jd@lang@inheritOf{Vererbt von}% + \def\jd@lang@inheritancetable{Tabelle mit geerbten Elementen}% +\else% +%English + \def\jd@lang@fullname{Full name}% + \def\jd@lang@package{Package}% + \def\jd@lang@inherits{Inherits}% + \def\jd@lang@implements{Implements}% + \def\jd@lang@outerclass{Outer class}% + \def\jd@lang@author{Author}% + \def\jd@lang@category{Category}% + \def\jd@lang@deprecated{Ddeprecated}% + \def\jd@lang@see{See also}% + \def\jd@lang@serial{Serial}% + \def\jd@lang@serialData{SerialData}% + \def\jd@lang@serialField{SerialField}% + \def\jd@lang@parameter{Parameter}% + \def\jd@lang@since{Since}% + \def\jd@lang@return{Return}% + \def\jd@lang@throws{Exceptions}% + \def\jd@lang@version{Version}% + \def\jd@lang@field{Fields}% + \def\jd@lang@method{Methods}% + \def\jd@lang@constr{Construktors}% + \def\jd@lang@elementname{Element}% + \def\jd@lang@inheritOf{Inherited from}% + \def\jd@lang@inheritancetable{Inheritancetable}% +\fi% + +% For internal links, the hyperref package is used +\ifjdbool@pdf% + \RequirePackage{hyperref}% +\fi% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Commands to write the headings and subheadings + +% First decision: the actual hierarchie level +% Second decision: which variant to use (with or without *) + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\jd@Heading#1{% + \ifjdbool@HierarchieChapter% + \ifjdbool@TocChapter% + \chapter[#1]{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi }% + \else% + \chapter*{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi}% + \fi% + \fi% + \ifjdbool@HierarchieSection% + \ifjdbool@TocChapter% + \section[#1]{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi}% + \else% + \section*{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi}% + \fi% + \fi% + \ifjdbool@HierarchieSubSection% + \ifjdbool@TocChapter% + \subsection[#1]{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi}% + \else% + \subsection*{\ifjdbool@pdf\protect\hypertarget{lab:jd:#1:}{#1}\else#1\fi}% + \fi% + \fi% +}% + +\def\jd@SubHeading#1{% + \ifjdbool@HierarchieChapter% + \ifjdbool@TocSection% + \section{#1}% + \else% + \section*{#1}% + \fi% + \fi% + \ifjdbool@HierarchieSection% + \ifjdbool@TocSection% + \subsection{#1}% + \else% + \subsection*{#1}% + \fi% + \fi% + \ifjdbool@HierarchieSubSection% + \ifjdbool@TocSection% + \subsubsection{#1}% + \else% + \subsubsection*{#1}% + \fi% + \fi% +}% + +\def\jd@SubSubHeading[#1]#2{% + \def\JDtemp@para{#1}% + \ifjdbool@HierarchieChapter% + \ifjdbool@TocNames% + \ifx\JDtemp@para\@empty \subsection{#2} \else \subsection[#1]{#2} \fi% + \else% + \subsection*{#2}% + \fi% + \fi% + \ifjdbool@HierarchieSection% + \ifjdbool@TocNames% + \ifx\JDtemp@para\@empty \subsubsection{#2} \else \subsubsection[#1]{#2} \fi% + \else% + \subsubsection*{#2}% + \fi% + \fi% + \ifjdbool@HierarchieSubSection% + \ifjdbool@TocNames% + \ifx\JDtemp@para\@empty \paragraph{#2} \else \paragraph[#1]{#2} \fi% + \else% + \paragraph*{#2}% + \fi% + \fi% +}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Commands to design the output +% Command for truetype font and for inheritarrow + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\jdcode#1{\texttt{#1}}% +\def\jdinh{$\leftarrow$}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% One class +% Possible obtions: class, interface + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newenvironment{jdclass}[2][class]{% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Resets all local variables + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \gdef\jd@letallempty{% + \global\jdbool@JDItemsfalse% + + \global\jdbool@ModifierPublicfalse% + \global\jdbool@ModifierPrivatefalse% + \global\jdbool@ModifierProtectedfalse% + \global\jdbool@ModifierStaticfalse% + \global\jdbool@ModifierAbstractfalse% + \global\jdbool@ModifierFinalfalse% + \global\jdbool@ModifierVolatilefalse% + \global\jdbool@ModifierTransientfalse% + + \global\let\jd@package\@empty% + \global\let\jd@implements\@empty% + \global\let\jd@inherits\@empty% + \global\let\jd@outerclass\@empty% + \global\let\jd@type\@empty% + + \global\let\JD@authors\@empty% + \global\let\JD@category\@empty% + \global\let\JD@serial\@empty% + \global\let\JD@sees\@empty% + \global\let\JD@since\@empty% + \global\let\JD@version\@empty% + \global\let\JD@deprecated\@empty% + \global\let\JD@text\@empty% + \global\let\JD@serialData\@empty% + \global\let\JD@serialField\@empty% + \global\let\JD@return\@empty% + \global\let\JD@params\@empty% + \global\let\JD@throws\@empty% + + \global\let\jd@exceplist\@empty% + \global\let\jd@paralist\@empty% + }% + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Decision, if the subheadings are already written + % Will be set after first method, field, ... + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newif\ifjdbool@HeadingInhTable \jdbool@HeadingInhTabletrue% + \newif\ifjdbool@HeadingFields \jdbool@HeadingFieldstrue% + \newif\ifjdbool@HeadingConstr \jdbool@HeadingConstrtrue% + \newif\ifjdbool@HeadingMethod \jdbool@HeadingMethodtrue% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Are there Entries of Javadocs? + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newif\ifjdbool@JDItems \jdbool@JDItemsfalse% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Linkpossibilities + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \def\jdtypesimple##1{\ifjdbool@pdf\protect\hyperlink{lab:jd:##1:}{##1}\else ##1\fi}% + \def\jdtypearray##1##2{\ifjdbool@pdf\protect\hyperlink{lab:jd:##1:}{##1}\else ##1\fi ##2}% + \def\jdtypegeneric##1##2{ \ifjdbool@pdf\protect\hyperlink{lab:jd:##1:}{##1}\else ##1\fi < ##2 > }% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Entries for the modifier if they were called + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newif\ifjdbool@ModifierPublic \jdbool@ModifierPublicfalse% + \newif\ifjdbool@ModifierPrivate \jdbool@ModifierPrivatefalse% + \newif\ifjdbool@ModifierProtected \jdbool@ModifierProtectedfalse% + \newif\ifjdbool@ModifierStatic \jdbool@ModifierStaticfalse% + \newif\ifjdbool@ModifierAbstract \jdbool@ModifierAbstractfalse% + \newif\ifjdbool@ModifierFinal \jdbool@ModifierFinalfalse% + \newif\ifjdbool@ModifierTransient \jdbool@ModifierTransientfalse% + \newif\ifjdbool@ModifierVolatile \jdbool@ModifierVolatilefalse% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Setter for the modifier + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \def\jdpublic{\jdbool@ModifierPublictrue}% + \def\jdstatic{ \jdbool@ModifierStatictrue }% + \def\jdabstract{ \jdbool@ModifierAbstracttrue }% + \def\jdfinal{ \jdbool@ModifierFinaltrue }% + \def\jdprivate{ \jdbool@ModifierPrivatetrue }% + \def\jdprotected{ \jdbool@ModifierProtectedtrue }% + \def\jdtransient{ \jdbool@ModifierTransienttrue }% + \def\jdvolatile{ \jdbool@ModifierVolatiletrue }% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Combination of all called modifier + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \gdef\jd@modifier{ \ifjdbool@ModifierPublic{} public\fi \ifjdbool@ModifierProtected{} protected\fi \ifjdbool@ModifierPrivate{} private\fi \ifjdbool@ModifierStatic{} static\fi \ifjdbool@ModifierAbstract{} abstract\fi \ifjdbool@ModifierFinal{} final\fi \ifjdbool@ModifierTransient{} transient\fi \ifjdbool@ModifierVolatile{} volatile\fi} + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Macros for code-based elements (package, inherits, interfaces, outerclasses, objecttype + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Klasseninfo + \def\jdpackage##1{\long\gdef\jd@package{##1}}% + \def\jdinherits##1{\long\gdef\jd@inherits{##1}}% + \def\jdouterclass##1{\long\gdef\jd@outerclass{##1}}% + % Methoden- und Feldinfo + \def\jdtype##1{ \long\gdef\jd@type{##1} }% + + % Mehrfachfeld für Interfaces + \def\jdimplements##1{\ifx\@empty\jd@implements \long\gdef\jd@implements{\jdtypesimple{##1}} \else \g@addto@macro\jd@implements{ \\ \jdtypesimple{##1} } \fi } + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Macros for the javadoc-based elements + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \def\JDcategory{\jdbool@JDItemstrue \long\gdef\JD@category}% + \def\JDdeprecated{ \jdbool@JDItemstrue \long\gdef\JD@deprecated}% + \def\JDserial{ \jdbool@JDItemstrue \long\gdef\JD@serial}% + \def\JDserialData{ \jdbool@JDItemstrue \long\gdef\JD@serialData}% + \def\JDserialField{ \jdbool@JDItemstrue \long\gdef\JD@serialField}% + \def\JDsince{ \jdbool@JDItemstrue \long\gdef\JD@since}% + \def\JDtext{\long\gdef\JD@text}% + \def\JDversion{\jdbool@JDItemstrue \long\gdef\JD@version}% + \def\JDreturn{\jdbool@JDItemstrue \long\gdef\JD@return}% + + \def\JDauthor##1{% + \ifx\@empty\JD@authors \gdef\JD@authors{ ##1 }% + \else \g@addto@macro\JD@authors{ \\ ##1}% + \fi \jdbool@JDItemstrue }% + \def\JDsee##1{% + \ifx\@empty\JD@sees \gdef\JD@sees{ ##1 }% + \else \g@addto@macro\JD@sees{ \\ ##1 }% + \fi \jdbool@JDItemstrue }% + + \def\JDpara##1##2##3{% + \ifx\@empty\JD@params \gdef\JD@params{ ##1 ##2 & ##3 }% + \else \g@addto@macro\JD@params{ \\ ##1 ##2 & ##3}% + \fi% + \ifx\@empty\jd@paralist \gdef\jd@paralist{ ##1 ##2}% + \else \g@addto@macro\jd@paralist{, ##1 ##2}% + \fi% + \jdbool@JDItemstrue }% + \def\JDthrows##1##2{% + \ifx\@empty\JD@throws \gdef\JD@throws{\jdtypesimple{##1} & ##2 }% + \else \g@addto@macro\JD@throws{ \\ \jdtypesimple{##1} & ##2 }% + \fi% + \ifx\@empty\jd@exceplist \gdef\jd@exceplist{\jdtypesimple{##1}}% + \else \g@addto@macro\jd@exceplist{, \jdtypesimple{##1}}% + \fi% + \jdbool@JDItemstrue }% + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % Start of the class-environment: Heading + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \jd@letallempty% + + \jd@Heading{#2}% + \gdef\jd@classtitle{#2}% + \gdef\jd@ClassOrInterface{#1}% +}% +{ \center% + \rule{14cm}{2pt}% + \endcenter% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % End of the class-environment: delete of all variable + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \jd@letallempty + + \global\jdbool@HeadingInhTabletrue + \global\jdbool@HeadingFieldstrue + \global\jdbool@HeadingConstrtrue + \global\jdbool@HeadingMethodtrue + \gdef\jd@classtitle{\@empty} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Environment for the class-information + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\jdclassheader{}% +\def\endjdclassheader{% +\ifjdbool@HeadingInhTable% + \else% + \errmessage{Headers mustn't follow to the inheritancetable.}% +\fi% +\ifjdbool@HeadingFields% + \else% + \errmessage{Headers mustn't follow to fields.}% +\fi% +\ifjdbool@HeadingConstr% + \else% + \errmessage{Headers mustn't follow to constructors.}% +\fi% +\ifjdbool@HeadingMethod% + \else% + \errmessage{Headers mustn't follow to methods.}% +\fi% + +% code-based elements +\begin{description}% + \item[\jd@lang@fullname:] \protect\jdcode{\jd@modifier{} \jd@ClassOrInterface{} \jd@classtitle }% + \ifx\@empty\jd@package \else \item[\jd@lang@package] \jd@package \fi% + \ifx\@empty\jd@inherits \else \item[\jd@lang@inherits] \jd@inherits \fi% + \ifx\@empty\jd@implements \else \item[\jd@lang@implements] \tabular[t]{p{11cm}} \jd@implements \endtabular \fi% + \ifx\@empty\jd@outerclass \else \item[\jd@lang@outerclass] \jd@outerclass \fi% +\end{description}% + +% javadoc-based elements +\par \JD@text% + +\ifjdbool@JDItems% +\description% + \ifx\JD@authors\@empty \else \item[\jd@lang@author] \tabular[t]{p{11cm}} \JD@authors \endtabular \fi% + \ifx\JD@category\@empty \else \item[\jd@lang@category] \JD@category \fi% + \ifx\JD@deprecated\@empty \else \item[\jd@lang@deprecated] \JD@deprecated \fi% + \ifx\JD@sees\@empty \else \item[\jd@lang@see] \tabular[t]{p{11cm}} \JD@sees \endtabular \fi% + \ifx\JD@serial\@empty \else \item[\jd@lang@serial] \JD@serial \fi% + \ifx\JD@since\@empty \else \item[\jd@lang@since] \JD@since \fi% + \ifx\JD@version\@empty \else \item[\jd@lang@version] \JD@version \fi% +\enddescription% +\fi% + +% reset +\jd@letallempty% +}% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Environment for one field + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\jdfield#1{% +\ifjdbool@HeadingConstr% + \else% + \errmessage{Fields mustn't follow to constructors.}% +\fi% +\ifjdbool@HeadingMethod% + \else% + \errmessage{Fields mustn't follow to methods.}% +\fi% +% Writing the Heading +\ifjdbool@HeadingFields% + \jd@SubHeading{\jd@lang@field}% + \global\jdbool@HeadingFieldsfalse% +\fi% + +\def\jd@localtitle{#1}% +} +\def\endjdfield{% +% Writing this field-heading +\jd@SubSubHeading[ \jd@type{} \jd@localtitle ]{\jd@modifier{} \jd@type{} \jd@localtitle}% + +% javadoc-based elements +\par \JD@text% +\ifjdbool@JDItems% +\begin{description}% + \ifx\JD@authors\@empty \else \item[\jd@lang@author] \tabular[t]{p{11cm}} \JD@authors \endtabular \fi% + \ifx\JD@category\@empty \else \item[\jd@lang@category] \JD@category \fi% + \ifx\JD@deprecated\@empty \else \item[\jd@lang@deprecated] \JD@deprecated \fi% + \ifx\JD@sees\@empty \else \item[\jd@lang@see] \tabular[t]{p{11cm}} \JD@sees \endtabular \fi% + \ifx\JD@serial\@empty \else \item[\jd@lang@serial] \JD@serial \fi% + \ifx\JD@serialField\@empty \else \item[\jd@lang@serialField] \JD@serialField \fi% + \ifx\JD@since\@empty \else \item[\jd@lang@since] \JD@since \fi% +\end{description}% +\fi% +% reset +\begin{center}% + \rule{12cm}{1pt}% +\end{center}% + +\jd@letallempty% +}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Environment for one constructor + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\jdconstructor{% +\ifjdbool@HeadingMethod% + \else% + \errmessage{Constructors mustn't follow to methods.}% +\fi% + +% Writing the heading +\ifjdbool@HeadingConstr% + \jd@SubHeading{\jd@lang@constr}% + \global\jdbool@HeadingConstrfalse% +\fi% +} +\def\endjdconstructor{% +% Writing this constructor-heading +\jd@SubSubHeading[\jd@classtitle{}( \ifx\@empty\jd@paralist \else \jd@paralist \fi{} )]{\jd@modifier{} \jd@classtitle{}( \ifx\@empty\jd@paralist \else \jd@paralist \fi{} ) \ifx\@empty\jd@exceplist \else throws \jd@exceplist \fi }% + +% javadoc-based elements +\par \JD@text% +\ifjdbool@JDItems% +\begin{description}% + \ifx\JD@authors\@empty \else \item[\jd@lang@author] \tabular[t]{p{11cm}} \JD@authors \endtabular \fi% + \ifx\JD@category\@empty \else \item[\jd@lang@category] \JD@category \fi% + \ifx\JD@deprecated\@empty \else \item[\jd@lang@deprecated] \JD@deprecated \fi% + \ifx\JD@sees\@empty \else \item[\jd@lang@see] \tabular[t]{p{11cm}} \JD@sees \endtabular \fi% + \ifx\JD@serial\@empty \else \item[\jd@lang@serial] \JD@serial \fi% + \ifx\JD@serialData\@empty \else \item[\jd@lang@serialData] \JD@serialData \fi% + \ifx\JD@since\@empty \else \item[\jd@lang@since] \JD@since \fi% + \ifx\JD@return\@empty \else \item[\jd@lang@return] \JD@return \fi% + \ifx\JD@params\@empty \else \item[\jd@lang@parameter] \tabular[t]{p{4.5cm}p{6.5cm}} \JD@params \endtabular \fi% + \ifx\JD@throws\@empty \else \item[\jd@lang@throws] \tabular[t]{p{4.5cm}p{6.5cm}} \JD@throws \endtabular \fi% +\end{description}% +\fi% + +\begin{center}% + \rule{12cm}{1pt}% +\end{center}% + +% reset +\jd@letallempty% +}% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Environment for one method + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\jdmethod#1{% +% Writing the heading +\ifjdbool@HeadingMethod% + \jd@SubHeading{\jd@lang@method}% + \global\jdbool@HeadingMethodfalse% +\fi% + +\def\jd@localtitle{#1}% +}% +\def\endjdmethod{% +% writing this method heading +\ifx\@empty\jd@type \gdef\jd@type{void} \fi%if no type is given, void is used + +\jd@SubSubHeading[ \jd@type{} \jd@localtitle{}( \ifx\@empty\jd@paralist \else \jd@paralist \fi{} )]{\jd@modifier{} \jd@type{} \jd@localtitle{}( \ifx\@empty\jd@paralist \else \jd@paralist \fi{} ) \ifx\@empty\jd@exceplist \else throws \jd@exceplist \fi }% + +% javadoc-based elements +\par \JD@text% +\ifjdbool@JDItems% +\begin{description}% + \ifx\JD@authors\@empty \else \item[\jd@lang@author] \tabular[t]{p{11cm}} \JD@authors \endtabular \fi% + \ifx\JD@category\@empty \else \item[\jd@lang@category] \JD@category \fi% + \ifx\JD@deprecated\@empty \else \item[\jd@lang@deprecated] \JD@deprecated \fi% + \ifx\JD@sees\@empty \else \item[\jd@lang@see] \begin{itemize} \JD@sees \end{itemize} \fi% + \ifx\JD@serial\@empty \else \item[\jd@lang@serial] \JD@serial \fi% + \ifx\JD@serialData\@empty \else \item[\jd@lang@serialData] \JD@serialData \fi% + \ifx\JD@since\@empty \else \item[\jd@lang@since] \JD@since \fi% + \ifx\JD@return\@empty \else \item[\jd@lang@return] \JD@return \fi% + \ifx\JD@params\@empty \else \item[\jd@lang@parameter] \tabular[t]{p{4.5cm}p{6.5cm}} \JD@params \endtabular \fi% + \ifx\JD@throws\@empty \else \item[\jd@lang@throws] \tabular[t]{p{4.5cm}p{6.5cm}} \JD@throws \endtabular \fi% +\end{description}% +\fi% + +\begin{center}% + \rule{12cm}{1pt}% +\end{center}% + +% reset +\jd@letallempty% +} + +\def\jdinheritancetable{% + \ifjdbool@HeadingFields% + \else% + \errmessage{The Inheritancetable mustn't follow to fields.}% + \fi% + \ifjdbool@HeadingConstr% + \else% + \errmessage{The Inheritancetable mustn't follow to constructors.}% + \fi% + \ifjdbool@HeadingMethod% + \else% + \errmessage{The Inheritancetable mustn't follow to methods.}% + \fi% + + \ifjdbool@HeadingMethod% + \jd@SubHeading{\jd@lang@inheritancetable}% + \global\jdbool@HeadingInhTablefalse% + \fi% + + % Definition einer Zeile der Tabelle + \def\jdInhEntry##1##2{ ##1 & \jdtypesimple{##2} \\ \hline }% + + \center% + \longtable{|l|l|}% + \hline% + \jd@lang@elementname & \jd@lang@inheritOf \\ \hline% +}% +\def\endjdinheritancetable{% + \endlongtable% + \endcenter% +}% -- cgit v1.2.3