diff options
author | Matthew Johnson <mjj29@illythia.matthew.ath.cx> | 2007-07-11 19:27:57 +0100 |
---|---|---|
committer | Matthew Johnson <mjj29@illythia.matthew.ath.cx> | 2007-07-11 19:27:57 +0100 |
commit | 04d72d4603ca53e0de53d9c2a7a2e6c3cd32c6c5 (patch) | |
tree | 04164c61f0321d1c0ad8c268ff70f303f3e99706 | |
parent | 0e749d6c0562bc59a9ee601bfaf063695558699c (diff) |
+++ b/changelog
+ * Update documentation for nested classes
+ * Documentation build fix
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | changelog | 2 | ||||
-rw-r--r-- | dbus-java.tex | 31 |
3 files changed, 34 insertions, 1 deletions
@@ -122,7 +122,7 @@ doc/dbus-java/index.html: dbus-java.tex .doc rm -f doc/dbus-java/*{4ct,4tc,aux,dvi,idv,lg,log,tmp,xref} cp doc/dbus-java/dbus-java.html doc/dbus-java/index.html doc/api/index.html: $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java .doc - $(JAVADOC) -quiet -author -link http://java.sun.com/j2se/1.5.0/docs/api/ -classpath $(JAVAUNIXJARDIR)/unix.jar:$(JAVAUNIXJARDIR)/hexdump.jar:$(JAVAUNIXJARDIR)/debug-$(DEBUG).jar -d doc/api $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java $(SRCDIR)/dbus/{types,exceptions}/*.java + $(JAVADOC) -quiet -author -link http://java.sun.com/j2se/1.5.0/docs/api/ -classpath $(JAVAUNIXJARDIR)/unix.jar:$(JAVAUNIXJARDIR)/hexdump.jar:$(JAVAUNIXJARDIR)/debug-$(DEBUG).jar -d doc/api $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java $(SRCDIR)/dbus/types/*.java $(SRCDIR)/dbus/exceptions/*.java %.1: %.sgml docbook-to-man $< > $@ @@ -3,6 +3,8 @@ Version 2.3: * Apply recursive-path patch for DBusViewer (written by Zsombor Gegesy <gzsombor -at- gmail -dot- com>) * Add Class-Path to jar manifests + * Update documentation for nested classes + * Documentation build fix Version 2.2: diff --git a/dbus-java.tex b/dbus-java.tex index 3e7d4d8..8900128 100644 --- a/dbus-java.tex +++ b/dbus-java.tex @@ -823,6 +823,37 @@ The Java source code interfaces will be written to the standard ouput. If the {\tt --create-files} option is specified the correct files in the correct directory structure will be created. +\subsection{Nested Interfaces} + +In some cases there are nested interfaces. In this case CreateInterface will +not correctly create the Java equivalent. This is because Java cannot have both +a class and a package with the same name. The solution to this is to create +nested classes in the same file. + +An example would be the Hal interface: + +\begin{verbatim} +<interface name="org.freedesktop.Hal.Device"> + ... +</interface> +<interface name="org.freedesktop.Hal.Device.Volume"> + ... +</interface> +\end{verbatim} + +When converted to Java you would just have one file {\tt +org/freedesktop/Hal/Device.java} in the package {\tt org.freedesktop.Hal}, +which would contain one class and one nested class: + +\begin{verbatim} +public interface Device extends DBusInterface { + public interface Volume extends DBusInterface { + ... methods in Volume ... + } + ... methods in Device ... +} +\end{verbatim} + \section{Debugging} It is possible to enable debugging in the library. This will be a lot slower, |