Commit 1ea63ef8 by Tom Tromey

Imported Classpath 0.18.

	* sources.am, Makefile.in: Updated.
	* Makefile.am (nat_source_files): Removed natProxy.cc.
	* java/lang/reflect/natProxy.cc: Removed.
	* gnu/classpath/jdwp/VMFrame.java,
	gnu/classpath/jdwp/VMIdManager.java,
	gnu/classpath/jdwp/VMVirtualMachine.java,
	java/lang/reflect/VMProxy.java: New files.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC
	list.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/net/DefaultContentHandlerFactory.java (getContent):
	Remove ClasspathToolkit references.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/awt/xlib/XCanvasPeer.java: Add new peer methods.
	* gnu/awt/xlib/XFramePeer.java: Likewise.
	* gnu/awt/xlib/XGraphicsConfiguration.java: Likewise.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c.  Add
	classpath/native/jawt/jawt.c.
	* Makefile.in: Regenerate.
	* jawt.c: Remove file.
	* include/Makefile.am (tool_include__HEADERS): Remove jawt.h and
	jawt_md.h.  Add ../classpath/include/jawt.h and
	../classpath/include/jawt_md.h.
	* include/Makefile.in: Regenerate.
	* include/jawt.h: Regenerate.
	* include/jawt_md.h: Regenerate.

From-SVN: r104586
parent 9b044d19
2005-09-23 Tom Tromey <tromey@redhat.com>
Imported Classpath 0.18.
* sources.am, Makefile.in: Updated.
* Makefile.am (nat_source_files): Removed natProxy.cc.
* java/lang/reflect/natProxy.cc: Removed.
* gnu/classpath/jdwp/VMFrame.java,
gnu/classpath/jdwp/VMIdManager.java,
gnu/classpath/jdwp/VMVirtualMachine.java,
java/lang/reflect/VMProxy.java: New files.
2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC
list.
2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/net/DefaultContentHandlerFactory.java (getContent):
Remove ClasspathToolkit references.
2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/awt/xlib/XCanvasPeer.java: Add new peer methods.
* gnu/awt/xlib/XFramePeer.java: Likewise.
* gnu/awt/xlib/XGraphicsConfiguration.java: Likewise.
2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add
classpath/native/jawt/jawt.c.
* Makefile.in: Regenerate.
* jawt.c: Remove file.
* include/Makefile.am (tool_include__HEADERS): Remove jawt.h and
jawt_md.h. Add ../classpath/include/jawt.h and
../classpath/include/jawt_md.h.
* include/Makefile.in: Regenerate.
* include/jawt.h: Regenerate.
* include/jawt_md.h: Regenerate.
2005-09-21 Bryce McKinlay <mckinlay@redhat.com> 2005-09-21 Bryce McKinlay <mckinlay@redhat.com>
* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Pass * gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Pass
......
...@@ -263,7 +263,7 @@ lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \ ...@@ -263,7 +263,7 @@ lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) $(X_LIBS) -lXtst -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) $(X_LIBS) -lXtst
lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK) lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
libgcjawt_la_SOURCES = jawt.c libgcjawt_la_SOURCES = classpath/native/jawt/jawt.c
libgcjawt_la_CFLAGS = -I$(srcdir)/classpath/native/jni/classpath \ libgcjawt_la_CFLAGS = -I$(srcdir)/classpath/native/jni/classpath \
$(PEDANTIC_CFLAGS) $(X_CFLAGS) $(PEDANTIC_CFLAGS) $(X_CFLAGS)
## See jv_convert_LDADD. ## See jv_convert_LDADD.
...@@ -809,7 +809,6 @@ java/lang/reflect/natArray.cc \ ...@@ -809,7 +809,6 @@ java/lang/reflect/natArray.cc \
java/lang/reflect/natConstructor.cc \ java/lang/reflect/natConstructor.cc \
java/lang/reflect/natField.cc \ java/lang/reflect/natField.cc \
java/lang/reflect/natMethod.cc \ java/lang/reflect/natMethod.cc \
java/lang/reflect/natProxy.cc \
java/net/natVMNetworkInterface.cc \ java/net/natVMNetworkInterface.cc \
java/net/natInetAddress.cc \ java/net/natInetAddress.cc \
java/nio/channels/natChannels.cc \ java/nio/channels/natChannels.cc \
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry excluding="compat/|examples/|external/|gnu/javax/swing/plaf/|test/|testsuite/|vm/reference/" kind="src" path=""> <classpathentry excluding="compat/|examples/|external/|gnu/classpath/jdwp/|gnu/javax/swing/plaf/|test/|testsuite/|vm/reference/|resource/" kind="src" path=""/>
<attributes> <classpathentry kind="src" path="resource"/>
</attributes> <classpathentry excluding="gnu/classpath/jdwp/" kind="src" path="vm/reference"/>
</classpathentry> <classpathentry kind="src" path="external/sax"/>
<classpathentry kind="src" path="vm/reference"> <classpathentry kind="src" path="external/w3c_dom"/>
<attributes> <classpathentry kind="src" path="examples"/>
</attributes> <classpathentry kind="output" path="install/share/classpath"/>
</classpathentry>
<classpathentry kind="src" path="external/sax">
<attributes>
</attributes>
</classpathentry>
<classpathentry kind="src" path="external/w3c_dom">
<attributes>
</attributes>
</classpathentry>
<classpathentry kind="src" path="examples">
<attributes>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -9,3 +9,4 @@ Makefile ...@@ -9,3 +9,4 @@ Makefile
stamp-h stamp-h
stamp-h.in stamp-h.in
autom4te*.cache autom4te*.cache
install
<?xml version="1.0" encoding="UTF-8"?> <?xml version='1.0'?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> <launchConfiguration type='org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'><stringAttribute key='org.eclipse.debug.core.ATTR_REFRESH_SCOPE' value='${project}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS' value='full,incremental,'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_LOCATION' value='${build_project}/configure'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY' value='${build_project}'/><booleanAttribute key='org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED' value='true'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS' value='--prefix=${build_project}/install'/><booleanAttribute key='org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND' value='false'/><booleanAttribute key='org.eclipse.debug.core.appendEnvironmentVariables' value='true'/></launchConfiguration>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> \ No newline at end of file
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${build_project}/configure"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
</launchConfiguration>
...@@ -26,6 +26,26 @@ ...@@ -26,6 +26,26 @@
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/CreateLocaleData.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/CompileNative.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
......
...@@ -20,6 +20,7 @@ Michael Koch (konqueror@gmx.de) ...@@ -20,6 +20,7 @@ Michael Koch (konqueror@gmx.de)
John Keiser (jkeiser@iname.com) John Keiser (jkeiser@iname.com)
John Leuner (jewel@debian.org) John Leuner (jewel@debian.org)
Warren Levy (warrenl@cygnus.com) Warren Levy (warrenl@cygnus.com)
Sven de Marothy (sven@physto.se)
Bryce McKinlay (bryce@waitaki.otago.ac.nz) Bryce McKinlay (bryce@waitaki.otago.ac.nz)
Audrius Meskauskas (audriusa@Bioinformatics.org) Audrius Meskauskas (audriusa@Bioinformatics.org)
Aaron M. Renn (arenn@urbanophile.com) Aaron M. Renn (arenn@urbanophile.com)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
2005-09-23 Tom Tromey <tromey@redhat.com>
Imported Classpath 0.18.
2005-08-23 Tom Tromey <tromey@redhat.com> 2005-08-23 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt. * configure: Rebuilt.
......
Installing GNU Classpath - Last updated: January 6, 2005 Installing GNU Classpath - Last updated: August 31, 2005
First, this is a development release only! Unless you are interested in First, this is a development release only! Unless you are interested in
active development and debugging, or just like running random alpha code, active development and debugging, or just like running random alpha code,
...@@ -28,11 +28,12 @@ Suggested Software ...@@ -28,11 +28,12 @@ Suggested Software
For building the Java bytecode (.class files), one of these For building the Java bytecode (.class files), one of these
compilers are required. You can select which compiler using compilers are required. You can select which compiler using
--with-jikes, --with-gcj or --with-kjc as argument to --with-jikes, --with-gcj, --with-ecj or --with-kjc as argument to
configure; the present default is gcj. configure; the present default is gcj.
- GCJ 3.3+ (part of the GNU GCC package). - GCJ 3.3+ (part of the GNU GCC package).
- IBM jikes 1.19+. - IBM jikes 1.19+.
- Eclipse Compiler for Java 3.1+
- The kjc compiler is supported with configure but we have - The kjc compiler is supported with configure but we have
been unable to successfully compile with it. been unable to successfully compile with it.
...@@ -48,7 +49,18 @@ Suggested Software ...@@ -48,7 +49,18 @@ Suggested Software
For building the Cairo GdkGraphics2D backend you need at least For building the Cairo GdkGraphics2D backend you need at least
Cairo 0.5.0. Cairo 0.5.0.
For building the xmlj JAXP implementation (dsabled by default, use For building the Qt AWT peer JNI native libraries you have to
specify --enable-qt-peer and need the following library:
- Qt 4.0.1
Please note that at the moment most operating systems do not
ship Qt4 by default. We recommend using GNU Classpath' Qt4
support only for its developers and bug reporters. See
http://developer.classpath.org/mediation/ClasspathShowcase
for details on how to get it to work.
For building the xmlj JAXP implementation (disabled by default, use
configure --enable-xmlj) you need the following installed: configure --enable-xmlj) you need the following installed:
- The XML C library for Gnome (libxml2) - The XML C library for Gnome (libxml2)
http://www.xmlsoft.org/ http://www.xmlsoft.org/
...@@ -74,6 +86,11 @@ gives a complete list. ...@@ -74,6 +86,11 @@ gives a complete list.
--enable-jni compile JNI source default=yes --enable-jni compile JNI source default=yes
--enable-gtk-peer compile GTK native peers default=yes --enable-gtk-peer compile GTK native peers default=yes
--enable-gtk-cairo compile cairo based Graphics2D default=no --enable-gtk-cairo compile cairo based Graphics2D default=no
--enable-qt-peer compile Qt4 native peers default=no
--enable-default-toolkit
fully qualified class name of default AWT toolkit
default=no
--enable-xmlj compile native libxml/xslt library default=no
--enable-load-library enable to use JNI native methods default=yes --enable-load-library enable to use JNI native methods default=yes
--with-jikes to compile the class library using jikes --with-jikes to compile the class library using jikes
the default is to use gcj the default is to use gcj
...@@ -83,7 +100,7 @@ gives a complete list. ...@@ -83,7 +100,7 @@ gives a complete list.
any compiler warning into a compilation failure any compiler warning into a compilation failure
default=no default=no
--enable-xmlj compile native libxml/xslt library default=no --enable-xmlj compile native libxml/xslt library default=no
--with-gjdoc generate documentation using gjdoc default=no --with-gjdoc generate documentation using gjdoc default=no
--with-jay Regenerate the parsers with jay must be given the --with-jay Regenerate the parsers with jay must be given the
path to the jay executable path to the jay executable
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR) SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
DIST_SUBDIRS = lib doc external include native resource scripts examples DIST_SUBDIRS = lib doc external include native resource scripts examples
## GCJ LOCAL: we need an extra -I here.
ACLOCAL_AMFLAGS = -I m4 -I ../.. ACLOCAL_AMFLAGS = -I m4 -I ../..
native: lib native: lib
......
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -107,8 +107,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -107,8 +107,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -170,6 +176,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -170,6 +176,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -181,12 +188,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -181,12 +188,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -208,10 +216,13 @@ X_LIBS = @X_LIBS@ ...@@ -208,10 +216,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
...@@ -316,13 +327,7 @@ uninstall-info-am: ...@@ -316,13 +327,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
...@@ -334,7 +339,7 @@ $(RECURSIVE_TARGETS): ...@@ -334,7 +339,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
...@@ -342,13 +347,7 @@ $(RECURSIVE_TARGETS): ...@@ -342,13 +347,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
...@@ -369,7 +368,7 @@ maintainer-clean-recursive: ...@@ -369,7 +368,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
...@@ -444,7 +443,7 @@ distclean-tags: ...@@ -444,7 +443,7 @@ distclean-tags:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
mkdir $(distdir) mkdir $(distdir)
$(mkdir_p) $(distdir)/../.. $(distdir)/gnu/classpath $(distdir)/lib $(distdir)/m4 $(distdir)/scripts $(mkdir_p) $(distdir)/../.. $(distdir)/examples $(distdir)/gnu/classpath $(distdir)/lib $(distdir)/m4 $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; for file in $$list; do \
......
New in release 0.18 (Sep 6, 2005)
* GNU JAWT implementation, the AWT Native Interface, which allows direct
access to native screen resources from within a Canvas's paint method.
GNU Classpath Examples comes with a Demo, see examples/README.
* awt.datatransfer updated to 1.5 with supports for FlavorEvents.
The gtk+ awt peers now allow copy/paste of text, images, uris/files
and serialized objects with other applications and tracking
clipboard change events with gtk+ 2.6 (for gtk+ 2.4 only text and
serialized objects are supported). A GNU Classpath Examples
datatransfer Demo was added to show the new functionality.
* org.omg.PortableInterceptor and related functionality in other packages
is now implemented:
- The sever and client interceptors work as required since 1.4.
- The IOR interceptor works as needed for 1.5.
* The org.omg.DynamicAny package is completed and passes the prepared tests.
* The Portable Object Adapter should now support the output of the
recent IDL to java compilers. These compilers now generate servants and
not CORBA objects as before, making the output depended on the existing
POA implementation. Completing POA means that such code can already be
tried to run on Classpath. Our POA is tested for the following usager
scenarios:
- POA converts servant to the CORBA object.
- Servant provides to the CORBA object.
- POA activates new CORBA object with the given Object Id (byte array)
that is later accessible for the servant.
- During the first call, the ServantActivator provides servant for this
and all subsequent calls on the current object.
- During each call, the ServantLocator provides servant for this call
only.
- ServantLocator or ServantActivator forwards call to another server.
- POA has a single servant, responsible for all objects.
- POA has a default servant, but some objects are explicitly connected
to they specific servants.
The POA is verified using tests from the former cost.omg.org.
* The javax.swing.plaf.multi.* package is now implemented.
* Editing and several key actions for JTree and JTable were implemented.
* Lots of icons and look and feel improvements for Free Swing basic and
metal themes were added. Try running the GNU Classpath Swing Demo in
examples (gnu.classpath.examples.swing.Demo) with:
-Dswing.defaultlaf=javax.swing.plaf.basic.BasicLookAndFeel
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
* Start of styled text capabilites for java.swing.text.
* NIO FileChannel.map implementation, fast bulk put implementation for
DirectByteBuffer (speeds up this method 10x).
* Split gtk+ awt peers event handling in two threads and improve gdk lock
handling (solves several AWT lock ups).
* Speed up awt Image loading.
* Updated TimeZone data against Olson tzdata2005l.
* Make zip and jar UTF-8 "clean".
* "native" code builds and compiles (warning free) on Darwin and Solaris.
Runtime interface changes:
* All native resource "pointers" in the VM interface classes are now exposed
as gnu.classpath.Pointer objects. This might impact runtimes that
optimize and support java.nio.DirectByteBuffers. Creating these classes
and accessing the contents as void * pointers for the native reference JNI
implementation is done through the JCL_NewRawDataObject and JCL_GetRawData
functions.
* Simplified the Class/VMClass interface.
* Removed loadedClasses map from ClassLoader. It's now the VMs responsibility
to manage the list of defined and loaded classes for each class loader.
* Moved native methods from java.lang.reflect.Proxy to VMProxy.
* Added hook to VMClassLoader to allow VM to do class caching.
New Untested/Disabled Features:
The following new features are included, but not ready for production
yet. They are explicitly disabled and not supported. But if you want
to help with the development of these new features we are interested
in feedback. You will have to explicitly enable them to try them out
(and they will most likely contain bugs). If you are interested in any
of these then please join the mailing-list and follow development in
CVS.
* QT4 AWT peers, enable by giving configure --enable-qt-peer.
* JDWP framework, enable by deleting the jdwp references from
lib/standard.omit and vm/reference/standard.omit. No default
implementation is provided. Work is being done on gcj/gij integration.
* StAX java.xml.stream, enable by deleting the gnu.xml.stream and
java.xml.stream references in lib/standard.omit.
New in release 0.17 (Jul 15, 2005) New in release 0.17 (Jul 15, 2005)
* gnu.xml fix for nodes created outside a namespace context. * gnu.xml fix for nodes created outside a namespace context.
......
GNU Classpath README - Last updated: Jul 9, 2004 GNU Classpath README - Last updated: August 31, 2005
GNU Classpath, Essential Libraries for Java is a project to create a GNU Classpath, Essential Libraries for Java is a project to create a
free software implementation of the core class libraries for the java free software implementation of the core class libraries for the java
...@@ -55,7 +55,8 @@ some of which synchronizes with the Classpath CVS head every couple of weeks: ...@@ -55,7 +55,8 @@ some of which synchronizes with the Classpath CVS head every couple of weeks:
* IKVM.NET (http://www.ikvm.net/) * IKVM.NET (http://www.ikvm.net/)
* JC (http://jcvm.sourceforge.net/) * JC (http://jcvm.sourceforge.net/)
* JNode (http://jnode.sourceforge.net/) * JNode (http://jnode.sourceforge.net/)
* SableVM (http://www.sablevm.org) * MysaifuVM (http://www2s.biglobe.ne.jp/~dat/java/project/jvm/)
* SableVM (http://www.sablevm.org)
See for a more complete list of GNU Classpath based projects the See for a more complete list of GNU Classpath based projects the
GNU Classpath website: http://www.gnu.org/software/classpath/stories.html GNU Classpath website: http://www.gnu.org/software/classpath/stories.html
......
...@@ -12,16 +12,9 @@ FILE=java/lang/Object.java ...@@ -12,16 +12,9 @@ FILE=java/lang/Object.java
DIE=0 DIE=0
case `uname -s` in LIBTOOLIZE=libtoolize
Darwin)
LIBTOOLIZE=glibtoolize have_libtool=false
;;
*)
LIBTOOLIZE=libtoolize
;;
esac
have_libtool=true
if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`${LIBTOOLIZE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` libtool_version=`${LIBTOOLIZE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in case $libtool_version in
...@@ -35,6 +28,9 @@ if $have_libtool ; then : ; else ...@@ -35,6 +28,9 @@ if $have_libtool ; then : ; else
echo "You must have libtool 1.5 installed to compile $PROJECT." echo "You must have libtool 1.5 installed to compile $PROJECT."
echo "Install the appropriate package for your distribution," echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/" echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
echo "For Darwin you need the latest stable (1.5.18) to support"
echo "Frameworks linking. Also, you have to point ACLOCAL_FLAGS"
echo "to this libtool/share/aclocal."
DIE=1 DIE=1
fi fi
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,7 +6,7 @@ dnl ----------------------------------------------------------- ...@@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl dnl define([AC_CACHE_SAVE], )dnl
AC_INIT([GNU Classpath],[0.17+cvs],[classpath@gnu.org],[classpath]) AC_INIT([GNU Classpath],[0.18],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java) AC_CONFIG_SRCDIR(java/lang/System.java)
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
...@@ -21,7 +21,16 @@ dnl We will not track/change lib version until we reach version 1.0 ...@@ -21,7 +21,16 @@ dnl We will not track/change lib version until we reach version 1.0
dnl at which time we'll have to be more anal about such things dnl at which time we'll have to be more anal about such things
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
AC_SUBST(LIBVERSION, "0:0:0") AC_SUBST(LIBVERSION, "0:0:0")
CLASSPATH_MODULE="-module -version-info ${LIBVERSION} -no-undefined" case "$host_os" in
darwin*)
cp_module=""
;;
*)
cp_module="-module"
;;
esac
CLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"
AC_SUBST(CLASSPATH_MODULE) AC_SUBST(CLASSPATH_MODULE)
AC_PREREQ(2.59) AC_PREREQ(2.59)
...@@ -129,6 +138,19 @@ fi ...@@ -129,6 +138,19 @@ fi
AM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue) AM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue)
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
dnl Qt native peer (disabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([qt-peer],
[AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
[case "${enableval}" in
yes) COMPILE_QT_PEER=yes ;;
no) COMPILE_QT_PEER=no ;;
*) COMPILE_QT_PEER=yes ;;
esac],
[COMPILE_QT_PEER=no])
AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
dnl -----------------------------------------------------------
dnl Regenerate headers at build time (disabled by default) dnl Regenerate headers at build time (disabled by default)
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
AC_ARG_ENABLE([regen-headers], AC_ARG_ENABLE([regen-headers],
...@@ -147,7 +169,7 @@ AC_PROG_INSTALL ...@@ -147,7 +169,7 @@ AC_PROG_INSTALL
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
dnl Checks for programs. dnl Checks for programs.
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
dnl AC_PROG_CXX AC_PROG_CXX
dnl Initialize libtool dnl Initialize libtool
AC_DISABLE_STATIC AC_DISABLE_STATIC
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
...@@ -175,7 +197,8 @@ if test "x${COMPILE_JNI}" = xyes; then ...@@ -175,7 +197,8 @@ if test "x${COMPILE_JNI}" = xyes; then
sys/time.h \ sys/time.h \
sys/select.h \ sys/select.h \
crt_externs.h \ crt_externs.h \
fcntl.h]) fcntl.h \
sys/mman.h])
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
...@@ -189,7 +212,8 @@ if test "x${COMPILE_JNI}" = xyes; then ...@@ -189,7 +212,8 @@ if test "x${COMPILE_JNI}" = xyes; then
recvfrom send sendto setsockopt getsockopt time mktime \ recvfrom send sendto setsockopt getsockopt time mktime \
localtime_r \ localtime_r \
strerror_r \ strerror_r \
fcntl]) fcntl \
mmap munmap mincore msync madvise getpagesize sysconf])
AC_HEADER_TIME AC_HEADER_TIME
AC_STRUCT_TM AC_STRUCT_TM
...@@ -271,6 +295,24 @@ if test "x${COMPILE_JNI}" = xyes; then ...@@ -271,6 +295,24 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_SUBST(GTK_LIBS) AC_SUBST(GTK_LIBS)
fi fi
dnl Check for AWT related Qt4
if test "x${COMPILE_QT_PEER}" = xyes; then
PKG_CHECK_MODULES(QT, QtGui >= 4.0.1)
dnl Check needed because in some cases the QtGui includedir
dnl doesn't contain the subsystem dir.
QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])))
AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
AC_CHECK_PROG(MOC, [moc], [moc])
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
fi
if test "x${enable_gtk_cairo}" = xyes; then if test "x${enable_gtk_cairo}" = xyes; then
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0) PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
PKG_CHECK_MODULES(PANGOFT2, pangoft2) PKG_CHECK_MODULES(PANGOFT2, pangoft2)
...@@ -380,7 +422,6 @@ AC_SUBST(REMOVE) ...@@ -380,7 +422,6 @@ AC_SUBST(REMOVE)
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
dnl This is probably useless. dnl This is probably useless.
dnl ----------------------------------------------------------- dnl -----------------------------------------------------------
AC_PATH_PROG(SH, sh)
AC_PATH_PROG(MKDIR, mkdir) AC_PATH_PROG(MKDIR, mkdir)
AC_PATH_PROG(CP, cp) AC_PATH_PROG(CP, cp)
AC_PATH_PROG(DATE, date) AC_PATH_PROG(DATE, date)
...@@ -437,6 +478,7 @@ gnu/classpath/Configuration.java ...@@ -437,6 +478,7 @@ gnu/classpath/Configuration.java
include/Makefile include/Makefile
native/Makefile native/Makefile
native/fdlibm/Makefile native/fdlibm/Makefile
native/jawt/Makefile
native/jni/Makefile native/jni/Makefile
native/jni/classpath/Makefile native/jni/classpath/Makefile
native/jni/java-io/Makefile native/jni/java-io/Makefile
...@@ -445,6 +487,7 @@ native/jni/java-net/Makefile ...@@ -445,6 +487,7 @@ native/jni/java-net/Makefile
native/jni/java-nio/Makefile native/jni/java-nio/Makefile
native/jni/java-util/Makefile native/jni/java-util/Makefile
native/jni/gtk-peer/Makefile native/jni/gtk-peer/Makefile
native/jni/qt-peer/Makefile
native/jni/xmlj/Makefile native/jni/xmlj/Makefile
native/target/Makefile native/target/Makefile
native/target/Linux/Makefile native/target/Linux/Makefile
...@@ -454,6 +497,7 @@ scripts/Makefile ...@@ -454,6 +497,7 @@ scripts/Makefile
scripts/classpath.spec scripts/classpath.spec
lib/Makefile lib/Makefile
lib/gen-classlist.sh lib/gen-classlist.sh
examples/Makefile]) examples/Makefile
examples/Makefile.jawt])
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh]) AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
AC_OUTPUT AC_OUTPUT
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@ ...@@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
...@@ -287,13 +298,7 @@ uninstall-info-am: ...@@ -287,13 +298,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
...@@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS): ...@@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
...@@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS): ...@@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
...@@ -340,7 +339,7 @@ maintainer-clean-recursive: ...@@ -340,7 +339,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
......
...@@ -17,6 +17,7 @@ PACKAGES ...@@ -17,6 +17,7 @@ PACKAGES
. gnu.xml.xpath.* ... JAXP XPath implementation . gnu.xml.xpath.* ... JAXP XPath implementation
. gnu.xml.transform.* ... JAXP XSL transformer implementation . gnu.xml.transform.* ... JAXP XSL transformer implementation
. gnu.xml.pipeline.* ... SAX2 event pipeline support . gnu.xml.pipeline.* ... SAX2 event pipeline support
. gnu.xml.stream.* ... StAX pull parser implementation
. gnu.xml.util.* ... various XML utility classes . gnu.xml.util.* ... various XML utility classes
. gnu.xml.libxmlj.dom.* ... libxmlj DOM Level 3 Core and XPath . gnu.xml.libxmlj.dom.* ... libxmlj DOM Level 3 Core and XPath
. gnu.xml.libxmlj.sax.* ... libxmlj SAX parser . gnu.xml.libxmlj.sax.* ... libxmlj SAX parser
...@@ -133,6 +134,11 @@ To enable the various GNU JAXP factories, set the following system properties ...@@ -133,6 +134,11 @@ To enable the various GNU JAXP factories, set the following system properties
GNU XSL transformer: GNU XSL transformer:
-Djavax.xml.transform.TransformerFactory=gnu.xml.transform.TransformerFactoryImpl -Djavax.xml.transform.TransformerFactory=gnu.xml.transform.TransformerFactoryImpl
GNU StAX:
-Djavax.xml.stream.XMLEventFactory=gnu.xml.stream.XMLEventFactoryImpl
-Djavax.xml.stream.XMLInputFactory=gnu.xml.stream.XMLInputFactoryImpl
-Djavax.xml.stream.XMLOutputFactory=gnu.xml.stream.XMLOutputFactoryImpl
libxmlj SAX: libxmlj SAX:
-Djavax.xml.parsers.SAXParserFactory=gnu.xml.libxmlj.sax.GnomeSAXParserFactory -Djavax.xml.parsers.SAXParserFactory=gnu.xml.libxmlj.sax.GnomeSAXParserFactory
......
...@@ -6,6 +6,7 @@ sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcd ...@@ -6,6 +6,7 @@ sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcd
classpathbox = "<span class='logo'><a href='http://www.gnu.org/software/classpath' target='_top'>GNU Classpath</a> ($(VERSION))" classpathbox = "<span class='logo'><a href='http://www.gnu.org/software/classpath' target='_top'>GNU Classpath</a> ($(VERSION))"
if CREATE_API_DOCS
install-data-local: install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
@list='$(htmllist)'; for p in $$list; do \ @list='$(htmllist)'; for p in $$list; do \
...@@ -26,6 +27,7 @@ uninstall-local: ...@@ -26,6 +27,7 @@ uninstall-local:
rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \ rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \ fi; \
done done
endif
html: create_html html: create_html
......
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -84,8 +84,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -84,8 +84,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -147,6 +153,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -147,6 +153,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -158,12 +165,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -158,12 +165,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -185,10 +193,13 @@ X_LIBS = @X_LIBS@ ...@@ -185,10 +193,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
...@@ -335,6 +346,8 @@ distclean-generic: ...@@ -335,6 +346,8 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
@CREATE_API_DOCS_FALSE@uninstall-local:
@CREATE_API_DOCS_FALSE@install-data-local:
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am
...@@ -391,26 +404,26 @@ uninstall-am: uninstall-info-am uninstall-local ...@@ -391,26 +404,26 @@ uninstall-am: uninstall-info-am uninstall-local
uninstall-local uninstall-local
install-data-local: @CREATE_API_DOCS_TRUE@install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api @CREATE_API_DOCS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
@list='$(htmllist)'; for p in $$list; do \ @CREATE_API_DOCS_TRUE@ @list='$(htmllist)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \ @CREATE_API_DOCS_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \
if test -f "$$p"; then \ @CREATE_API_DOCS_TRUE@ if test -f "$$p"; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f"; \ @CREATE_API_DOCS_TRUE@ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f; \ @CREATE_API_DOCS_TRUE@ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f; \
elif test -d "$$p"; then \ @CREATE_API_DOCS_TRUE@ elif test -d "$$p"; then \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api/$$f; \ @CREATE_API_DOCS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \ @CREATE_API_DOCS_TRUE@ fi; \
done @CREATE_API_DOCS_TRUE@ done
uninstall-local: @CREATE_API_DOCS_TRUE@uninstall-local:
@list='$(htmllist)'; for p in $$list; do \ @CREATE_API_DOCS_TRUE@ @list='$(htmllist)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \ @CREATE_API_DOCS_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \
if test -f "$$p"; then \ @CREATE_API_DOCS_TRUE@ if test -f "$$p"; then \
echo " rm -f $(DESTDIR)$(pkgdatadir)/api/$$f"; \ @CREATE_API_DOCS_TRUE@ echo " rm -f $(DESTDIR)$(pkgdatadir)/api/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \ @CREATE_API_DOCS_TRUE@ rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \ @CREATE_API_DOCS_TRUE@ fi; \
done @CREATE_API_DOCS_TRUE@ done
html: create_html html: create_html
......
...@@ -9,17 +9,59 @@ ...@@ -9,17 +9,59 @@
<boxitem> <boxitem>
<strong>Upcoming Events:</strong><br> <strong>Upcoming Events:</strong><br>
<ul> <ul>
none <li>[1-5 Aug 2005] <a href="http://conferences.oreillynet.com/os2005/">OSCON</a>, Portland, Oregon - USA
<ul>
<li><a href="http://conferences.oreillynet.com/cs/os2005/view/e_sess/6730">The State of Free JVMs</a>
Tom Tromey</li>
</ul>
</ul> </ul>
</boxitem> </boxitem>
<boxitem> <boxitem>
<strong>Past Events:</strong><br> <strong>Past Events:</strong><br>
<ul> <ul>
<li>[26+27 Feb. 2004] FOSDEM'05 in Brussels, Belgium. [<createlink name="Escape The Java Trap!" url="events/escape_fosdem05.html">]
<li>[14+15 Oct. 2003] Linux Kongress '03 in Saarbr&uuml;cken, Germany. <li>
[29-31 May 2005] <a href="http://2005.guadec.org/">Guadec</a>, Stuttgart - Germany
<ul>
<li><a href="http://2005.guadec.org/schedule/gnometalks.html#eclipseyou">The Eclipse IDE and you</a>
Ben Konrath and Andrew Overholt
(<a href="http://overholt.ca/eclipse/GUADEC2005-EclipseIDE.pdf">slides</a>)</li>
<li><a href="http://2005.guadec.org/schedule/gnometalks.html#javagnome">Eclipse, Java-GNOME, and GCJ</a>
Andrew Cowie and Ben Konrath</li>
</ul>
<p>
<li>
[1-4 Jun. 2005] <a href="http://fisl.softwarelivre.org/6.0/">6th International Free Software Forum</a> (fisl), Porto Alegre/RS, Brazil
<ul>
<li><a href="http://fisl.softwarelivre.org/papers/pub/programacao/360">Encontro Javali: Escape the Java Trap: GNU Classpath and Kaffe</a>
Dalibor Topic and Mark Wielaard
(<a href="http://www.klomp.org/mark/classpath/GNUClasspathKaffe/">slides</a>)</li>
</ul>
<p>
<li>
[22-25 Jun 2005] <a href="http://www.linuxtag.org/">LinuxTag</a>, Karlsruhe - Germany
<ul>
<li><a href="http://www.linuxtag.org/vcc/details.pl?id=162">GNU Classpath</a>
Robert Schuster (in German)
(<a href="http://www.inf.fu-berlin.de/%7Erschuste/GNUClasspath-LinuxTag2005-English.pdf">slides</a>)</li>
<li><a href="http://www.linuxtag.org/vcc/details.pl?id=166">GCJ and Classpath: A Free Implementation of the Java programming language</a>
Andrew Haley (in English)
(<a href="http://people.redhat.com/~aph/linuxtag.tar.gz">slides</a>)</li>
</ul>
<p>
<li>[26+27 Feb. 2005] FOSDEM'05 in Brussels, Belgium. [<createlink name="Escape The Java Trap!" url="events/escape_fosdem05.html">]
<p>
<li>[21+22 Feb. 2004] FOSDEM'04 in Brussels, Belgium. [<createlink name="report" url="events/fosdem04.html">] <li>[21+22 Feb. 2004] FOSDEM'04 in Brussels, Belgium. [<createlink name="report" url="events/fosdem04.html">]
<p>
<li>[14+15 Oct. 2003] Linux Kongress '03 in Saarbr&uuml;cken, Germany. <li>[14+15 Oct. 2003] Linux Kongress '03 in Saarbr&uuml;cken, Germany.
<ul>
<li>Hacking on the VM Interface: GNU Classpath workshop, Mark Wielaard
(<a href="http://www.klomp.org/mark/classpath/slides/gnu_classpath_workshop.html">slides</a>).
<li>Agile2D: implementing Graphics2D over OpenGL, Jean-Daniel Fekete
(<a href="http://www.klomp.org/mark/classpath/Agile2D.pdf">slides</a>).
</ul>
</ul> </ul>
<br><br><br> <br><br><br>
</boxitem> </boxitem>
......
...@@ -304,6 +304,28 @@ be a bit picky about getting signatures from all contributors. Please do ...@@ -304,6 +304,28 @@ be a bit picky about getting signatures from all contributors. Please do
not see this as a personal offence. not see this as a personal offence.
<p>Giving the copyright to the FSF also gives us a clear paper trail where changes come from, which confirms our clean-room status. <p>Giving the copyright to the FSF also gives us a clear paper trail where changes come from, which confirms our clean-room status.
</p>
<p>
The assignment contract commits the foundation to setting distribution terms
that permit free redistribution.
</p>
<p>
The assignment contract we normally use has a clause that permits you to
use your code in proprietary programs, on 30 days' notice.
(The 30 days' notice is there because, through a legal technicality,
it would improve our position in a suit against a hoarder.)
Although we believe that proprietary software is wrong, we include this
clause because it would serve no purpose to ask you to promise not to do
it. You're giving us a gift in the first place.
</p>
<p>
You don't need to invoke this clause in order to distribute
copies as free software under the GNU GPL, since everyone is
allowed to do that.
</p>
<p>See also <a href="http://www.gnu.org/licenses/why-assign.html">http://www.gnu.org/licenses/why-assign.html</a>. <p>See also <a href="http://www.gnu.org/licenses/why-assign.html">http://www.gnu.org/licenses/why-assign.html</a>.
</p> </p>
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<menutitle>Savannah</menutitle> <menutitle>Savannah</menutitle>
<menuitem><createlink name="Project Home" url="http://savannah.gnu.org/projects/classpath/"></menuitem> <menuitem><createlink name="Project Home" url="http://savannah.gnu.org/projects/classpath/"></menuitem>
<menuitem><createlink name="Bug Reports" url="http://savannah.gnu.org/bugs/?group=classpath"></menuitem> <menuitem><createlink name="Bug Reports" url="bugs.html"></menuitem>
<!-- <!--
<menuitem><createlink name="Support" url="http://savannah.gnu.org/support/?group=classpath"></menuitem> <menuitem><createlink name="Support" url="http://savannah.gnu.org/support/?group=classpath"></menuitem>
<menuitem><createlink name="Patches" url="http://savannah.gnu.org/patch/?group=classpath"></menuitem> <menuitem><createlink name="Patches" url="http://savannah.gnu.org/patch/?group=classpath"></menuitem>
......
<newsitem date="03 Aug 2005">
<createlink name="Generics Branch Merge Announcement"
url="http://lists.gnu.org/archive/html/classpath/2005-08/msg00002.html">
</newsitem>
<newsitem date="01 Aug 2005">
<createlink name="Bugs moved to bugzilla"
url="bugs.html">
</newsitem>
<newsitem date="15 Jul 2005"> <newsitem date="15 Jul 2005">
<createlink name="GNU Classpath 0.17" <createlink name="GNU Classpath 0.17"
url="announce/20050715.html"> url="announce/20050715.html">
......
Makefile Makefile
examples.zip examples.zip
Makefile.jawt
...@@ -22,6 +22,9 @@ endif ...@@ -22,6 +22,9 @@ endif
# All our example java source files # All our example java source files
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java
# The example C source files
EXAMPLE_C_FILES = $(srcdir)/gnu/classpath/examples/*/*.c
# The zip files with classes we want to produce. # The zip files with classes we want to produce.
EXAMPLE_ZIP = examples.zip EXAMPLE_ZIP = examples.zip
...@@ -31,6 +34,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP) ...@@ -31,6 +34,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
# the png icons we use in some of the examples. # the png icons we use in some of the examples.
EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
# All the files we find "interesting"
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_ICONS)
# Some architecture independent data to be installed. # Some architecture independent data to be installed.
example_DATA = $(EXAMPLE_ZIP) README example_DATA = $(EXAMPLE_ZIP) README
...@@ -41,7 +47,7 @@ exampledir = $(pkgdatadir)/examples ...@@ -41,7 +47,7 @@ exampledir = $(pkgdatadir)/examples
# (Be careful to strip off the srcdir part of the path when installing.) # (Be careful to strip off the srcdir part of the path when installing.)
install-data-local: install-data-local:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
fdir=`dirname $$f`; \ fdir=`dirname $$f`; \
if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \ if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \
...@@ -51,20 +57,24 @@ install-data-local: ...@@ -51,20 +57,24 @@ install-data-local:
echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ $(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done done
echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/"
$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/
uninstall-local: uninstall-local:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done done
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt"
rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt
# Make sure everything is included in the distribution. # Make sure everything is included in the distribution.
EXTRA_DIST = README EXTRA_DIST = README Makefile.jawt.in
dist-hook: dist-hook:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
fdir=`dirname $$f`; \ fdir=`dirname $$f`; \
if test ! -d $(distdir)/$$fdir; then \ if test ! -d $(distdir)/$$fdir; then \
...@@ -87,4 +97,4 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) ...@@ -87,4 +97,4 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
# Zip file be gone! (and make sure the classes are gone too) # Zip file be gone! (and make sure the classes are gone too)
clean-local: clean-local:
rm -f $(EXAMPLE_ZIP) classes rm -rf $(EXAMPLE_ZIP) classes
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -38,7 +38,8 @@ build_triplet = @build@ ...@@ -38,7 +38,8 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
subdir = examples subdir = examples
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.jawt.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
...@@ -49,7 +50,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ...@@ -49,7 +50,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES = Makefile.jawt
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
...@@ -92,8 +93,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -92,8 +93,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -155,6 +162,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -155,6 +162,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -166,12 +174,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -166,12 +174,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -193,10 +202,13 @@ X_LIBS = @X_LIBS@ ...@@ -193,10 +202,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
...@@ -246,6 +258,9 @@ vm_classes = @vm_classes@ ...@@ -246,6 +258,9 @@ vm_classes = @vm_classes@
# All our example java source files # All our example java source files
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java
# The example C source files
EXAMPLE_C_FILES = $(srcdir)/gnu/classpath/examples/*/*.c
# The zip files with classes we want to produce. # The zip files with classes we want to produce.
EXAMPLE_ZIP = examples.zip EXAMPLE_ZIP = examples.zip
...@@ -255,6 +270,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP) ...@@ -255,6 +270,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
# the png icons we use in some of the examples. # the png icons we use in some of the examples.
EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
# All the files we find "interesting"
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_ICONS)
# Some architecture independent data to be installed. # Some architecture independent data to be installed.
example_DATA = $(EXAMPLE_ZIP) README example_DATA = $(EXAMPLE_ZIP) README
...@@ -262,7 +280,7 @@ example_DATA = $(EXAMPLE_ZIP) README ...@@ -262,7 +280,7 @@ example_DATA = $(EXAMPLE_ZIP) README
exampledir = $(pkgdatadir)/examples exampledir = $(pkgdatadir)/examples
# Make sure everything is included in the distribution. # Make sure everything is included in the distribution.
EXTRA_DIST = README EXTRA_DIST = README Makefile.jawt.in
all: $(BUILT_SOURCES) all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am $(MAKE) $(AM_MAKEFLAGS) all-am
...@@ -296,6 +314,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ...@@ -296,6 +314,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
Makefile.jawt: $(top_builddir)/config.status $(srcdir)/Makefile.jawt.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
...@@ -458,7 +478,7 @@ uninstall-am: uninstall-exampleDATA uninstall-info-am uninstall-local ...@@ -458,7 +478,7 @@ uninstall-am: uninstall-exampleDATA uninstall-info-am uninstall-local
# (Be careful to strip off the srcdir part of the path when installing.) # (Be careful to strip off the srcdir part of the path when installing.)
install-data-local: install-data-local:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
fdir=`dirname $$f`; \ fdir=`dirname $$f`; \
if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \ if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \
...@@ -468,17 +488,21 @@ install-data-local: ...@@ -468,17 +488,21 @@ install-data-local:
echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ $(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done done
echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/"
$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/
uninstall-local: uninstall-local:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done done
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt"
rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt
dist-hook: dist-hook:
srcdir_cnt=`echo $(srcdir) | wc -c`; \ srcdir_cnt=`echo $(srcdir) | wc -c`; \
for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ for file in $(ALL_EXAMPLE_FILES); do \
f=`echo $$file | cut -c$$srcdir_cnt-`; \ f=`echo $$file | cut -c$$srcdir_cnt-`; \
fdir=`dirname $$f`; \ fdir=`dirname $$f`; \
if test ! -d $(distdir)/$$fdir; then \ if test ! -d $(distdir)/$$fdir; then \
...@@ -501,7 +525,7 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) ...@@ -501,7 +525,7 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
# Zip file be gone! (and make sure the classes are gone too) # Zip file be gone! (and make sure the classes are gone too)
clean-local: clean-local:
rm -f $(EXAMPLE_ZIP) classes rm -rf $(EXAMPLE_ZIP) classes
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:
...@@ -7,7 +7,8 @@ class Demo which contains a main() method to run that particular example. ...@@ -7,7 +7,8 @@ class Demo which contains a main() method to run that particular example.
The examples can be compiled and run with gcj as follows: The examples can be compiled and run with gcj as follows:
gcj -o swingdemo --main=gnu.classpath.examples.swing.Demo \ gcj -o swingdemo --main=gnu.classpath.examples.swing.Demo \
gnu/classpath/examples/swing/Demo.java gnu/classpath/examples/swing/Demo.java \
gnu/classpath/examples/swing/GNULookAndFeel.java
./swingdemo ./swingdemo
Or with a traditional byte code interpreter like: Or with a traditional byte code interpreter like:
...@@ -22,6 +23,29 @@ run as follows: ...@@ -22,6 +23,29 @@ run as follows:
kaffe -classpath examples.zip gnu.classpath.examples.awt.Demo kaffe -classpath examples.zip gnu.classpath.examples.awt.Demo
kaffe -classpath examples.zip gnu.classpath.examples.swing.Demo kaffe -classpath examples.zip gnu.classpath.examples.swing.Demo
The jawt Demo needs some extra support library that currently needs to be
build by hand. The following assumes GNU Classpath was installed in
/usr/local/classpath, if you installed it somewhere else then adjust the
-I and -L paths accordingly. The included Makefile.jawt is setup this way.
You can invoke it with:
make -f Makefile.jawt
Or you can compile by hand as follows:
gcj -C gnu/classpath/examples/jawt/DemoJAWT.java
gcjh -jni gnu.classpath.examples.jawt.DemoJAWT -o DemoJAWT.h
gcc -g -O0 -Wall -I. -I/usr/X11R6/include -L. -L/usr/X11R6/lib \
-I/usr/local/classpath/include -L/usr/local/classpath/lib/classpath \
-lX11 -ljawtgnu -shared -o libDemoJAWT.so \
gnu/classpath/examples/jawt/DemoJAWT.c
You can then run the example as follows:
export LD_LIBRARY_PATH=.:/usr/local/classpath/lib/classpath
jamvm gnu.classpath.examples.jawt.DemoJAWT
All example code is distributed under the GNU General Public License (GPL). All example code is distributed under the GNU General Public License (GPL).
The example icons used in some of the examples come from gnome-icon-theme The example icons used in some of the examples come from gnome-icon-theme
......
...@@ -141,6 +141,8 @@ public class Demo ...@@ -141,6 +141,8 @@ public class Demo
preferences.add(new JCheckBoxMenuItem("Check Spelling", preferences.add(new JCheckBoxMenuItem("Check Spelling",
stockIcon("spell-check"))); stockIcon("spell-check")));
preferences.add(new JCheckBoxMenuItem("World Peace")); preferences.add(new JCheckBoxMenuItem("World Peace"));
preferences.add(new JSeparator());
preferences.add(new JRadioButtonMenuItem("Radio Button"));
edit.add(preferences); edit.add(preferences);
JMenu examples = new JMenu("Examples"); JMenu examples = new JMenu("Examples");
...@@ -493,6 +495,7 @@ public class Demo ...@@ -493,6 +495,7 @@ public class Demo
final JTree tree = new JTree(root); final JTree tree = new JTree(root);
tree.setLargeModel(true); tree.setLargeModel(true);
tree.setEditable(true);
DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel(); DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION); dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
tree.setSelectionModel(dtsm); tree.setSelectionModel(dtsm);
...@@ -501,7 +504,6 @@ public class Demo ...@@ -501,7 +504,6 @@ public class Demo
JButton add = mkButton("add element"); JButton add = mkButton("add element");
add.addActionListener(new ActionListener() add.addActionListener(new ActionListener()
{ {
int i = 0;
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
for (int i = 0; i < tree.getRowCount(); i++) for (int i = 0; i < tree.getRowCount(); i++)
...@@ -641,6 +643,29 @@ public class Demo ...@@ -641,6 +643,29 @@ public class Demo
return panel; return panel;
} }
static JPanel mkTabWorld()
{
JPanel panel = new JPanel(new GridLayout(2, 2));
panel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
JTabbedPane tabs1 = new JTabbedPane(SwingConstants.TOP);
tabs1.add("Top Item 1", new JButton("Button"));
tabs1.add("Top Item 2", new JButton("Button"));
JTabbedPane tabs2 = new JTabbedPane(SwingConstants.LEFT);
tabs2.add("Left Item 1", new JButton("Button"));
tabs2.add("Left Item 2", new JButton("Button"));
JTabbedPane tabs3 = new JTabbedPane(SwingConstants.BOTTOM);
tabs3.add("Bottom Item 1", new JButton("Button"));
tabs3.add("Bottom Item 2", new JButton("Button"));
JTabbedPane tabs4 = new JTabbedPane(SwingConstants.RIGHT);
tabs4.add("Right Item 1", new JButton("Button"));
tabs4.add("Right Item 2", new JButton("Button"));
panel.add(tabs1);
panel.add(tabs2);
panel.add(tabs3);
panel.add(tabs4);
return panel;
}
static JTabbedPane mkTabbedPane() static JTabbedPane mkTabbedPane()
{ {
JTabbedPane tabs = new JTabbedPane(); JTabbedPane tabs = new JTabbedPane();
...@@ -649,6 +674,7 @@ public class Demo ...@@ -649,6 +674,7 @@ public class Demo
tabs.add("List world!", mkListWorld()); tabs.add("List world!", mkListWorld());
tabs.add("Desktop world!", mkDesktopWorld()); tabs.add("Desktop world!", mkDesktopWorld());
tabs.add("Tree world!", mkTreeWorld()); tabs.add("Tree world!", mkTreeWorld());
tabs.add("Tab world!", mkTabWorld());
return tabs; return tabs;
} }
...@@ -658,6 +684,8 @@ public class Demo ...@@ -658,6 +684,8 @@ public class Demo
slider.setPaintTrack(true); slider.setPaintTrack(true);
slider.setPaintTicks(true); slider.setPaintTicks(true);
slider.setMajorTickSpacing(30); slider.setMajorTickSpacing(30);
slider.setMinorTickSpacing(5);
slider.setPaintLabels(true);
slider.setInverted(false); slider.setInverted(false);
JProgressBar progress = new JProgressBar(); JProgressBar progress = new JProgressBar();
BoundedRangeModel model = new DefaultBoundedRangeModel(10, 1, 0, 100); BoundedRangeModel model = new DefaultBoundedRangeModel(10, 1, 0, 100);
...@@ -1063,7 +1091,13 @@ public class Demo ...@@ -1063,7 +1091,13 @@ public class Demo
JButton exitDisposer = mkDisposerButton(frame); JButton exitDisposer = mkDisposerButton(frame);
panel.add(exitDisposer); panel.add(exitDisposer);
exitDisposer.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.exit(1);
}
});
return panel; return panel;
} }
......
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@ ...@@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
...@@ -287,13 +298,7 @@ uninstall-info-am: ...@@ -287,13 +298,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
...@@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS): ...@@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
...@@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS): ...@@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@failcom='exit 1'; \ @set fnord $$MAKEFLAGS; amf=$$2; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
...@@ -340,7 +339,7 @@ maintainer-clean-recursive: ...@@ -340,7 +339,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
......
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@ ...@@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
......
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@ ...@@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@ CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@ CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@ CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@ CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@ CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DATE = @DATE@ DATE = @DATE@
DEFS = @DEFS@ DEFS = @DEFS@
...@@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ...@@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@ MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
...@@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ ...@@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@ REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@ REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@ REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@ STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
...@@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@ ...@@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@ ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
......
...@@ -1180,7 +1180,8 @@ public abstract class cdrInput ...@@ -1180,7 +1180,8 @@ public abstract class cdrInput
} }
// Discard the null terminator and, if needed, the endian marker. // Discard the null terminator and, if needed, the endian marker.
return new String(s, p, n - nt - p); String r = new String(s, p, n - nt - p);
return r;
} }
catch (EOFException ex) catch (EOFException ex)
{ {
......
...@@ -41,6 +41,7 @@ package gnu.CORBA.CDR; ...@@ -41,6 +41,7 @@ package gnu.CORBA.CDR;
import gnu.CORBA.BigDecimalHelper; import gnu.CORBA.BigDecimalHelper;
import gnu.CORBA.GIOP.CharSets_OSF; import gnu.CORBA.GIOP.CharSets_OSF;
import gnu.CORBA.GIOP.cxCodeSet; import gnu.CORBA.GIOP.cxCodeSet;
import gnu.CORBA.Poa.gnuServantObject;
import gnu.CORBA.IOR; import gnu.CORBA.IOR;
import gnu.CORBA.Simple_delegate; import gnu.CORBA.Simple_delegate;
import gnu.CORBA.TypeCodeHelper; import gnu.CORBA.TypeCodeHelper;
...@@ -99,7 +100,7 @@ public abstract class cdrOutput ...@@ -99,7 +100,7 @@ public abstract class cdrOutput
/** /**
* The GIOP version. * The GIOP version.
*/ */
protected Version giop = new Version(1, 0); protected Version giop = new Version(1, 2);
/** /**
* The code set information. * The code set information.
...@@ -327,6 +328,15 @@ public abstract class cdrOutput ...@@ -327,6 +328,15 @@ public abstract class cdrOutput
IOR.write_null(this); IOR.write_null(this);
return; return;
} }
else if (x instanceof gnuServantObject)
{
// The ORB may be different if several ORBs coexist
// in the same machine.
gnuServantObject g = (gnuServantObject) x;
IOR ior = g.orb.getLocalIor(x);
ior._write_no_endian(this);
return;
}
else if (x instanceof ObjectImpl) else if (x instanceof ObjectImpl)
{ {
Delegate d = ((ObjectImpl) x)._get_delegate(); Delegate d = ((ObjectImpl) x)._get_delegate();
......
...@@ -60,11 +60,14 @@ public class Connected_objects ...@@ -60,11 +60,14 @@ public class Connected_objects
/** /**
* Create an initialised instance. * Create an initialised instance.
*/ */
cObject(org.omg.CORBA.Object _object, int _port, byte[] _key) cObject(org.omg.CORBA.Object _object, int _port, byte[] _key,
java.lang.Object an_identity
)
{ {
object = _object; object = _object;
port = _port; port = _port;
key = _key; key = _key;
identity = an_identity;
} }
/** /**
...@@ -82,6 +85,12 @@ public class Connected_objects ...@@ -82,6 +85,12 @@ public class Connected_objects
*/ */
public final byte[] key; public final byte[] key;
/**
* The shared serving identity (usually POA) or null if no such
* applicable.
*/
public final java.lang.Object identity;
public boolean equals(java.lang.Object other) public boolean equals(java.lang.Object other)
{ {
if (other instanceof cObject) if (other instanceof cObject)
...@@ -118,17 +127,23 @@ public class Connected_objects ...@@ -118,17 +127,23 @@ public class Connected_objects
*/ */
public cObject getKey(org.omg.CORBA.Object stored_object) public cObject getKey(org.omg.CORBA.Object stored_object)
{ {
Map.Entry item; synchronized (objects)
Iterator iter = objects.entrySet().iterator();
cObject ref;
while (iter.hasNext())
{ {
item = (Map.Entry) iter.next(); Map.Entry item;
ref = (cObject) item.getValue(); Iterator iter = objects.entrySet().iterator();
if (stored_object.equals(ref.object)) cObject ref;
return ref;
while (iter.hasNext())
{
item = (Map.Entry) iter.next();
ref = (cObject) item.getValue();
if (stored_object.equals(ref.object) ||
stored_object._is_equivalent(ref.object)
)
return ref;
}
} }
return null; return null;
} }
...@@ -144,7 +159,7 @@ public class Connected_objects ...@@ -144,7 +159,7 @@ public class Connected_objects
*/ */
public cObject add(org.omg.CORBA.Object object, int port) public cObject add(org.omg.CORBA.Object object, int port)
{ {
return add(generateObjectKey(object), object, port); return add(generateObjectKey(object), object, port, null);
} }
/** /**
...@@ -155,10 +170,15 @@ public class Connected_objects ...@@ -155,10 +170,15 @@ public class Connected_objects
* @param port the port, on that the ORB will be listening on the * @param port the port, on that the ORB will be listening on the
* remote invocations. * remote invocations.
*/ */
public cObject add(byte[] key, org.omg.CORBA.Object object, int port) public cObject add(byte[] key, org.omg.CORBA.Object object, int port,
java.lang.Object identity
)
{ {
cObject rec = new cObject(object, port, key); cObject rec = new cObject(object, port, key, identity);
objects.put(key, rec); synchronized (objects)
{
objects.put(key, rec);
}
return rec; return rec;
} }
...@@ -171,12 +191,14 @@ public class Connected_objects ...@@ -171,12 +191,14 @@ public class Connected_objects
*/ */
public cObject get(byte[] key) public cObject get(byte[] key)
{ {
return (cObject) objects.get(key); synchronized (objects)
{
return (cObject) objects.get(key);
}
} }
/** /**
* Get the map entry set. * Get the map entry set.
* @return
*/ */
public Set entrySet() public Set entrySet()
{ {
...@@ -190,9 +212,12 @@ public class Connected_objects ...@@ -190,9 +212,12 @@ public class Connected_objects
*/ */
public void remove(org.omg.CORBA.Object object) public void remove(org.omg.CORBA.Object object)
{ {
cObject ref = getKey(object); synchronized (objects)
if (ref != null) {
objects.remove(ref.key); cObject ref = getKey(object);
if (ref != null)
objects.remove(ref.key);
}
} }
/** /**
......
...@@ -46,9 +46,8 @@ import org.omg.CORBA.portable.OutputStream; ...@@ -46,9 +46,8 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable; import org.omg.CORBA.portable.Streamable;
/** /**
* The name-value pair holder. The {@link NameValuePair} has no standard * The name-value pair holder. The {@link NameValuePair} has no standard holder
* holder defined, but it is needed to store the {@link NameValuePair} into * defined, but it is needed to store the {@link NameValuePair} into {@link Any}.
* {@link Any}.
* *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/ */
...@@ -92,4 +91,4 @@ public class NameValuePairHolder ...@@ -92,4 +91,4 @@ public class NameValuePairHolder
{ {
NameValuePairHelper.write(output, value); NameValuePairHelper.write(output, value);
} }
} }
\ No newline at end of file
...@@ -145,14 +145,11 @@ public class ExceptionCreator ...@@ -145,14 +145,11 @@ public class ExceptionCreator
{ {
try try
{ {
String holder = toHelperName(idl); String helper = toHelperName(idl);
Class helperClass = Class.forName(helper);
System.out.println("Helper " + holder);
Class holderClass = Class.forName(holder);
Method read = Method read =
holderClass.getMethod("read", helperClass.getMethod("read",
new Class[] new Class[]
{ {
org.omg.CORBA.portable.InputStream.class org.omg.CORBA.portable.InputStream.class
......
...@@ -41,13 +41,13 @@ package gnu.CORBA.GIOP; ...@@ -41,13 +41,13 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput; import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput; import gnu.CORBA.CDR.cdrOutput;
/** /**
* The header of the standard reply. * The header of the standard reply.
* *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/ */
public abstract class ReplyHeader public abstract class ReplyHeader
extends contextSupportingHeader
{ {
/** /**
* Reply status, if no exception occured. * Reply status, if no exception occured.
...@@ -65,9 +65,8 @@ public abstract class ReplyHeader ...@@ -65,9 +65,8 @@ public abstract class ReplyHeader
public static final int SYSTEM_EXCEPTION = 2; public static final int SYSTEM_EXCEPTION = 2;
/** /**
* Reply status, if the client ORB must re - send * Reply status, if the client ORB must re - send the request to another
* the request to another destination. The body * destination. The body contains IOR.
* contains IOR.
*/ */
public static final int LOCATION_FORWARD = 3; public static final int LOCATION_FORWARD = 3;
...@@ -84,16 +83,6 @@ public abstract class ReplyHeader ...@@ -84,16 +83,6 @@ public abstract class ReplyHeader
public static final int NEEDS_ADDRESSING_MODE = 5; public static final int NEEDS_ADDRESSING_MODE = 5;
/** /**
* Empty array, indicating that no service context is available.
*/
protected static final ServiceContext[] NO_CONTEXT = new ServiceContext[ 0 ];
/**
* The ORB service data.
*/
public ServiceContext[] service_context = NO_CONTEXT;
/**
* The status of this reply, holds one of the reply status constants. * The status of this reply, holds one of the reply status constants.
*/ */
public int reply_status; public int reply_status;
...@@ -110,19 +99,19 @@ public abstract class ReplyHeader ...@@ -110,19 +99,19 @@ public abstract class ReplyHeader
{ {
switch (reply_status) switch (reply_status)
{ {
case NO_EXCEPTION : case NO_EXCEPTION:
return "ok"; return "ok";
case USER_EXCEPTION : case USER_EXCEPTION:
return "user exception"; return "user exception";
case SYSTEM_EXCEPTION : case SYSTEM_EXCEPTION:
return "system exception"; return "system exception";
case LOCATION_FORWARD : case LOCATION_FORWARD:
return "moved"; return "moved";
default : default:
return null; return null;
} }
} }
......
...@@ -41,7 +41,6 @@ package gnu.CORBA.GIOP; ...@@ -41,7 +41,6 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput; import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput; import gnu.CORBA.CDR.cdrOutput;
import org.omg.CORBA.portable.IDLEntity; import org.omg.CORBA.portable.IDLEntity;
/** /**
...@@ -50,13 +49,13 @@ import org.omg.CORBA.portable.IDLEntity; ...@@ -50,13 +49,13 @@ import org.omg.CORBA.portable.IDLEntity;
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/ */
public abstract class RequestHeader public abstract class RequestHeader
extends contextSupportingHeader
implements IDLEntity implements IDLEntity
{ {
/** /**
* The currently free request id. This field is incremented * The currently free request id. This field is incremented each time the new
* each time the new request header is constructed. To facilitate * request header is constructed. To facilitate error detection, the first
* error detection, the first free id is equal to 0x01234567 * free id is equal to 0x01234567 (19088743).
* (19088743).
*/ */
private static int freeId = 0x01234567; private static int freeId = 0x01234567;
...@@ -71,23 +70,17 @@ public abstract class RequestHeader ...@@ -71,23 +70,17 @@ public abstract class RequestHeader
public byte[] object_key; public byte[] object_key;
/** /**
* A value identifying the requesting principal. * A value identifying the requesting principal. Initialised into a single
* Initialised into a single zero byte. * zero byte.
* *
* @deprecated by CORBA 2.2. * @deprecated by CORBA 2.2.
*/ */
public byte[] requesting_principal; public byte[] requesting_principal;
/** /**
* Contains the ORB service data being passed. Initialised as the * This is used to associate the reply message with the previous request
* zero size array by default. * message. Initialised each time by the different value, increasing form 1 to
*/ * Integer.MAX_VALUE.
public ServiceContext[] service_context = new ServiceContext[ 0 ];
/**
* This is used to associate the reply message with the
* previous request message. Initialised each time by the
* different value, increasing form 1 to Integer.MAX_VALUE.
*/ */
public int request_id = getNextId(); public int request_id = getNextId();
...@@ -97,10 +90,9 @@ public abstract class RequestHeader ...@@ -97,10 +90,9 @@ public abstract class RequestHeader
protected boolean response_expected = true; protected boolean response_expected = true;
/** /**
* Get next free request id. The value of the free request * Get next free request id. The value of the free request id starts from
* id starts from 0x02345678, it is incremented each time this * 0x02345678, it is incremented each time this function is called and is
* function is called and is reset to 1 after reaching * reset to 1 after reaching Integer.MAX_VALUE.
* Integer.MAX_VALUE.
* *
* @return the next free request id. * @return the next free request id.
*/ */
...@@ -126,15 +118,15 @@ public abstract class RequestHeader ...@@ -126,15 +118,15 @@ public abstract class RequestHeader
public abstract boolean isResponseExpected(); public abstract boolean isResponseExpected();
/** /**
* Converts an byte array into hexadecimal string values. * Converts an byte array into hexadecimal string values. Used in various
* Used in various toString() methods. * toString() methods.
*/ */
public String bytes(byte[] array) public String bytes(byte[] array)
{ {
StringBuffer b = new StringBuffer(); StringBuffer b = new StringBuffer();
for (int i = 0; i < array.length; i++) for (int i = 0; i < array.length; i++)
{ {
b.append(Integer.toHexString(array [ i ] & 0xFF)); b.append(Integer.toHexString(array[i] & 0xFF));
b.append(" "); b.append(" ");
} }
return b.toString(); return b.toString();
...@@ -158,4 +150,5 @@ public abstract class RequestHeader ...@@ -158,4 +150,5 @@ public abstract class RequestHeader
* @param out a stream to write into. * @param out a stream to write into.
*/ */
public abstract void write(cdrOutput out); public abstract void write(cdrOutput out);
} }
...@@ -41,7 +41,9 @@ package gnu.CORBA.GIOP; ...@@ -41,7 +41,9 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput; import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput; import gnu.CORBA.CDR.cdrOutput;
import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.portable.IDLEntity; import org.omg.CORBA.portable.IDLEntity;
/** /**
...@@ -53,16 +55,40 @@ public class ServiceContext ...@@ -53,16 +55,40 @@ public class ServiceContext
implements IDLEntity implements IDLEntity
{ {
/** /**
* The context data. * Use serialVersionUID for interoperability.
*/ */
public byte[] context_data; private static final long serialVersionUID = 1;
/** /**
* The context id. * The context id (for instance, 0x1 for code sets context). At the moment of
* writing, the OMG defines 16 standard values and provides rules to register
* the vendor specific context ids. The range 0-4095 is reserved for the
* future standard OMG contexts.
*/ */
public int context_id; public int context_id;
/** /**
* The context_data.
*/
public byte[] context_data;
/**
* Crete unitialised instance.
*/
public ServiceContext()
{
}
/**
* Create from omg context.
*/
public ServiceContext(org.omg.IOP.ServiceContext from)
{
context_id = from.context_id;
context_data = from.context_data;
}
/**
* Read the context values from the stream. * Read the context values from the stream.
* *
* @param istream a stream to read from. * @param istream a stream to read from.
...@@ -73,13 +99,13 @@ public class ServiceContext ...@@ -73,13 +99,13 @@ public class ServiceContext
switch (id) switch (id)
{ {
case cxCodeSet.ID : case cxCodeSet.ID:
cxCodeSet codeset = new cxCodeSet(); cxCodeSet codeset = new cxCodeSet();
codeset.readContext(istream); codeset.readContext(istream);
return codeset; return codeset;
default : default:
ServiceContext ctx = new ServiceContext(); ServiceContext ctx = new ServiceContext();
ctx.context_id = id; ctx.context_id = id;
...@@ -94,9 +120,9 @@ public class ServiceContext ...@@ -94,9 +120,9 @@ public class ServiceContext
public static ServiceContext[] readSequence(cdrInput istream) public static ServiceContext[] readSequence(cdrInput istream)
{ {
int size = istream.read_long(); int size = istream.read_long();
ServiceContext[] value = new gnu.CORBA.GIOP.ServiceContext[ size ]; ServiceContext[] value = new gnu.CORBA.GIOP.ServiceContext[size];
for (int i = 0; i < value.length; i++) for (int i = 0; i < value.length; i++)
value [ i ] = read(istream); value[i] = read(istream);
return value; return value;
} }
...@@ -118,7 +144,99 @@ public class ServiceContext ...@@ -118,7 +144,99 @@ public class ServiceContext
{ {
ostream.write_long(value.length); ostream.write_long(value.length);
for (int i = 0; i < value.length; i++) for (int i = 0; i < value.length; i++)
value [ i ].write(ostream); value[i].write(ostream);
}
/**
* Add context to the given array of contexts.
*/
public static void add(org.omg.IOP.ServiceContext[] cx,
org.omg.IOP.ServiceContext service_context, boolean replace)
{
int exists = -1;
for (int i = 0; i < cx.length; i++)
if (cx[i].context_id == service_context.context_id)
exists = i;
if (exists < 0)
{
// Add context.
org.omg.IOP.ServiceContext[] n = new org.omg.IOP.ServiceContext[cx.length + 1];
for (int i = 0; i < cx.length; i++)
n[i] = cx[i];
n[cx.length] = service_context;
}
else
{
// Replace context.
if (!replace)
throw new BAD_INV_ORDER("Repetetive setting of the context "
+ service_context.context_id, 15,
CompletionStatus.COMPLETED_NO);
else
cx[exists] = service_context;
}
}
/**
* Add context to the given array of contexts.
*/
public static ServiceContext[] add(ServiceContext[] cx,
org.omg.IOP.ServiceContext service_context, boolean replace)
{
int exists = -1;
for (int i = 0; i < cx.length; i++)
if (cx[i].context_id == service_context.context_id)
exists = i;
if (exists < 0)
{
// Add context.
ServiceContext[] n = new ServiceContext[cx.length + 1];
for (int i = 0; i < cx.length; i++)
n[i] = cx[i];
n[cx.length] = new ServiceContext(service_context);
return n;
}
else
{
// Replace context.
if (!replace)
throw new BAD_INV_ORDER("Repetetive setting of the context "
+ service_context.context_id, 15,
CompletionStatus.COMPLETED_NO);
else
cx[exists] = new ServiceContext(service_context);
return cx;
}
}
/**
* Find context with the given name in the context array.
*/
public static org.omg.IOP.ServiceContext findContext(int ctx_name,
org.omg.IOP.ServiceContext[] cx)
{
for (int i = 0; i < cx.length; i++)
if (cx[i].context_id == ctx_name)
return cx[i];
throw new BAD_PARAM("No context with id " + ctx_name);
}
/**
* Find context with the given name in the context array,
* converting into org.omg.IOP.ServiceContext.
*/
public static org.omg.IOP.ServiceContext findContext(int ctx_name,
ServiceContext[] cx)
{
for (int i = 0; i < cx.length; i++)
if (cx[i].context_id == ctx_name)
return new org.omg.IOP.ServiceContext(ctx_name, cx[i].context_data);
throw new BAD_PARAM("No context with id " + ctx_name);
} }
/** /**
...@@ -126,6 +244,6 @@ public class ServiceContext ...@@ -126,6 +244,6 @@ public class ServiceContext
*/ */
public String toString() public String toString()
{ {
return "ctx "+context_id+", size "+context_data.length; return "ctx " + context_id + ", size " + context_data.length;
} }
} }
...@@ -40,11 +40,11 @@ package gnu.CORBA.GIOP.v1_0; ...@@ -40,11 +40,11 @@ package gnu.CORBA.GIOP.v1_0;
import gnu.CORBA.CDR.cdrInput; import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput; import gnu.CORBA.CDR.cdrOutput;
import org.omg.CORBA.portable.IDLEntity;
import gnu.CORBA.GIOP.ServiceContext; import gnu.CORBA.GIOP.ServiceContext;
import gnu.CORBA.GIOP.cxCodeSet; import gnu.CORBA.GIOP.cxCodeSet;
import org.omg.CORBA.portable.IDLEntity;
/** /**
* The GIOP 1.0 request message. * The GIOP 1.0 request message.
* *
......
...@@ -39,6 +39,7 @@ exception statement from your version. */ ...@@ -39,6 +39,7 @@ exception statement from your version. */
package gnu.CORBA.NamingService; package gnu.CORBA.NamingService;
import gnu.CORBA.Functional_ORB; import gnu.CORBA.Functional_ORB;
import gnu.CORBA.IOR;
import org.omg.CosNaming.NamingContextExt; import org.omg.CosNaming.NamingContextExt;
...@@ -47,15 +48,14 @@ import java.io.PrintStream; ...@@ -47,15 +48,14 @@ import java.io.PrintStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
/** /**
* The server for the gnu classpath naming service. This is an executable * The server for the gnu classpath naming service. This is an executable class
* class that must be started to launch the GNU Classpath CORBA * that must be started to launch the GNU Classpath CORBA transient naming
* transient naming service. * service.
* *
* GNU Classpath currently works with this naming service and is also * GNU Classpath currently works with this naming service and is also
* interoperable with the Sun Microsystems naming services from * interoperable with the Sun Microsystems naming services from releases 1.3 and
* releases 1.3 and 1.4, both transient <i>tnameserv</i> and persistent * 1.4, both transient <i>tnameserv</i> and persistent <i>orbd</i>.
* <i>orbd</i>. *
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/ */
public class NamingServiceTransient public class NamingServiceTransient
...@@ -67,9 +67,9 @@ public class NamingServiceTransient ...@@ -67,9 +67,9 @@ public class NamingServiceTransient
public static final int PORT = 900; public static final int PORT = 900;
/** /**
* Get the object key for the naming service. The default * Get the object key for the naming service. The default key is the string
* key is the string "NameService" in ASCII. * "NameService" in ASCII.
* *
* @return the byte array. * @return the byte array.
*/ */
public static byte[] getDefaultKey() public static byte[] getDefaultKey()
...@@ -85,15 +85,14 @@ public class NamingServiceTransient ...@@ -85,15 +85,14 @@ public class NamingServiceTransient
} }
/** /**
* Start the naming service on the current host at the given port. * Start the naming service on the current host at the given port. The
* The parameter -org.omg.CORBA.ORBInitialPort NNN or * parameter -org.omg.CORBA.ORBInitialPort NNN or -ORBInitialPort NNN, if
* -ORBInitialPort NNN, if present, specifies the port, on that * present, specifies the port, on that the service must be started. If this
* the service must be started. If this key is not specified, * key is not specified, the service starts at the port 900.
* the service starts at the port 900. *
* * The parameter -ior FILE_NAME, if present, forces to store the ior string of
* The parameter -ior FILE_NAME, if present, forces to store the ior string * this naming service to the specified file.
* of this naming service to the specified file. *
*
* @param args the parameter string. * @param args the parameter string.
*/ */
public static void main(String[] args) public static void main(String[] args)
...@@ -108,21 +107,24 @@ public class NamingServiceTransient ...@@ -108,21 +107,24 @@ public class NamingServiceTransient
if (args.length > 1) if (args.length > 1)
for (int i = 0; i < args.length - 1; i++) for (int i = 0; i < args.length - 1; i++)
{ {
if (args [ i ].endsWith("ORBInitialPort")) if (args[i].endsWith("ORBInitialPort"))
port = Integer.parseInt(args [ i + 1 ]); port = Integer.parseInt(args[i + 1]);
if (args [ i ].equals("-ior")) if (args[i].equals("-ior"))
iorf = args [ i + 1 ]; iorf = args[i + 1];
} }
Functional_ORB.setPort(port); Functional_ORB.setPort(port);
// Create the servant and register it with the ORB // Create the servant and register it with the ORB
NamingContextExt namer = new Ext(new TransientContext()); NamingContextExt namer = new Ext(new TransientContext());
orb.connect(namer, getDefaultKey());
// Case with the key "NameService".
orb.connect(namer, "NameService".getBytes());
// Storing the IOR reference. // Storing the IOR reference.
String ior = orb.object_to_string(namer); String ior = orb.object_to_string(namer);
IOR iorr = IOR.parse(ior);
if (iorf != null) if (iorf != null)
{ {
FileOutputStream f = new FileOutputStream(iorf); FileOutputStream f = new FileOutputStream(iorf);
...@@ -131,22 +133,23 @@ public class NamingServiceTransient ...@@ -131,22 +133,23 @@ public class NamingServiceTransient
p.close(); p.close();
} }
System.out.println("GNU Classpath, transient naming service. " + System.out.println("GNU Classpath transient naming service "
"Copyright (C) 2005 Free Software Foundation\n" + + "started at " + iorr.Internet.host + ":" + iorr.Internet.port
"This tool comes with ABSOLUTELY NO WARRANTY. " + + " key 'NameService'.\n\n"
"This is free software, and you are\nwelcome to " + + "Copyright (C) 2005 Free Software Foundation\n"
"redistribute it under conditions, defined in " + + "This tool comes with ABSOLUTELY NO WARRANTY. "
"GNU Classpath license.\n\n" + ior + "This is free software, and you are\nwelcome to "
); + "redistribute it under conditions, defined in "
+ "GNU Classpath license.\n\n" + ior);
new Thread() new Thread()
{
public void run()
{ {
public void run() // Wait for invocations from clients.
{ orb.run();
// Wait for invocations from clients. }
orb.run(); }.start();
}
}.start();
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -154,7 +157,8 @@ public class NamingServiceTransient ...@@ -154,7 +157,8 @@ public class NamingServiceTransient
e.printStackTrace(System.out); e.printStackTrace(System.out);
} }
// Restore the default value for allocating ports for the subsequent objects. // Restore the default value for allocating ports for the subsequent
// objects.
Functional_ORB.setPort(Functional_ORB.DEFAULT_INITIAL_PORT); Functional_ORB.setPort(Functional_ORB.DEFAULT_INITIAL_PORT);
} }
} }
...@@ -58,6 +58,9 @@ import org.omg.CORBA.TypeCodePackage.BadKind; ...@@ -58,6 +58,9 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.UnionMember; import org.omg.CORBA.UnionMember;
import org.omg.CORBA.portable.OutputStream; import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ValueFactory; import org.omg.CORBA.portable.ValueFactory;
import org.omg.PortableInterceptor.ClientRequestInterceptorOperations;
import org.omg.PortableInterceptor.IORInterceptorOperations;
import org.omg.PortableInterceptor.ServerRequestInterceptorOperations;
import java.applet.Applet; import java.applet.Applet;
...@@ -66,22 +69,20 @@ import java.util.Properties; ...@@ -66,22 +69,20 @@ import java.util.Properties;
/** /**
* This class implements so-called Singleton ORB, a highly restricted version * This class implements so-called Singleton ORB, a highly restricted version
* that cannot communicate over network. This ORB is provided * that cannot communicate over network. This ORB is provided for the
* for the potentially malicious applets with heavy security restrictions. * potentially malicious applets with heavy security restrictions. It, however,
* It, however, supports some basic features that might be needed even * supports some basic features that might be needed even when the network
* when the network access is not granted. * access is not granted.
* *
* This ORB can only create typecodes, * This ORB can only create typecodes, {@link Any}, {@link ContextList},
* {@link Any}, {@link ContextList}, {@link NVList} and * {@link NVList} and {@link org.omg.CORBA.portable.OutputStream} that writes to
* {@link org.omg.CORBA.portable.OutputStream} that writes to an * an internal buffer.
* internal buffer.
* *
* All other methods throw the {@link NO_IMPLEMENT} exception. * All other methods throw the {@link NO_IMPLEMENT} exception.
* *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/ */
public class Restricted_ORB public class Restricted_ORB extends org.omg.CORBA_2_3.ORB
extends org.omg.CORBA_2_3.ORB
{ {
/** /**
* The singleton instance of this ORB. * The singleton instance of this ORB.
...@@ -89,13 +90,41 @@ public class Restricted_ORB ...@@ -89,13 +90,41 @@ public class Restricted_ORB
public static final ORB Singleton = new Restricted_ORB(); public static final ORB Singleton = new Restricted_ORB();
/** /**
* The cumulated listener for all IOR interceptors. Interceptors are used by
* {@link gnu.CORBA.Poa.ORB_1_4}.
*/
public IORInterceptorOperations iIor;
/**
* The cumulated listener for all server request interceptors. Interceptors
* are used by {@link gnu.CORBA.Poa.ORB_1_4}.
*/
public ServerRequestInterceptorOperations iServer;
/**
* The cumulated listener for all client request interceptros. Interceptors
* are used by {@link gnu.CORBA.Poa.ORB_1_4}.
*/
public ClientRequestInterceptorOperations iClient;
/**
* The required size of the interceptor slot array.
*/
public int icSlotSize = 0;
/**
* The value factories. * The value factories.
*/ */
protected Hashtable factories = new Hashtable(); protected Hashtable factories = new Hashtable();
/** /**
* Create a new instance of the RestrictedORB. This is used * The policy factories.
* in derived classes only. */
protected Hashtable policyFactories = new Hashtable();
/**
* Create a new instance of the RestrictedORB. This is used in derived classes
* only.
*/ */
protected Restricted_ORB() protected Restricted_ORB()
{ {
...@@ -159,8 +188,8 @@ public class Restricted_ORB ...@@ -159,8 +188,8 @@ public class Restricted_ORB
/** {@inheritDoc} */ /** {@inheritDoc} */
public TypeCode create_exception_tc(String id, String name, public TypeCode create_exception_tc(String id, String name,
StructMember[] members StructMember[] members
) )
{ {
recordTypeCode r = new recordTypeCode(TCKind.tk_except); recordTypeCode r = new recordTypeCode(TCKind.tk_except);
r.setId(id); r.setId(id);
...@@ -224,8 +253,8 @@ public class Restricted_ORB ...@@ -224,8 +253,8 @@ public class Restricted_ORB
/** {@inheritDoc} */ /** {@inheritDoc} */
public TypeCode create_struct_tc(String id, String name, public TypeCode create_struct_tc(String id, String name,
StructMember[] members StructMember[] members
) )
{ {
recordTypeCode r = new recordTypeCode(TCKind.tk_struct); recordTypeCode r = new recordTypeCode(TCKind.tk_struct);
r.setId(id); r.setId(id);
...@@ -240,13 +269,15 @@ public class Restricted_ORB ...@@ -240,13 +269,15 @@ public class Restricted_ORB
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
public TypeCode create_union_tc(String id, String name, TypeCode type, public TypeCode create_union_tc(String id, String name,
UnionMember[] members TypeCode discriminator_type, UnionMember[] members
) )
{ {
recordTypeCode r = new recordTypeCode(TCKind.tk_union); recordTypeCode r = new recordTypeCode(TCKind.tk_union);
r.setId(id); r.setId(id);
r.setName(name); r.setName(name);
r.setDiscriminator_type(discriminator_type);
r.setDefaultIndex(0);
for (int i = 0; i < members.length; i++) for (int i = 0; i < members.length; i++)
{ {
...@@ -274,8 +305,8 @@ public class Restricted_ORB ...@@ -274,8 +305,8 @@ public class Restricted_ORB
catch (BadKind ex) catch (BadKind ex)
{ {
throw new BAD_PARAM("This is not a primitive type code: " + throw new BAD_PARAM("This is not a primitive type code: " +
tcKind.value() tcKind.value()
); );
} }
} }
...@@ -304,13 +335,13 @@ public class Restricted_ORB ...@@ -304,13 +335,13 @@ public class Restricted_ORB
/** /**
* This method is not allowed for a RestrictedORB. * This method is not allowed for a RestrictedORB.
* *
* @throws InvalidName never in this class, but it is thrown * @throws InvalidName never in this class, but it is thrown in the derived
* in the derived classes. * classes.
* *
* @throws NO_IMPLEMENT, always. * @throws NO_IMPLEMENT, always.
*/ */
public org.omg.CORBA.Object resolve_initial_references(String name) public org.omg.CORBA.Object resolve_initial_references(String name)
throws InvalidName throws InvalidName
{ {
no(); no();
throw new InternalError(); throw new InternalError();
...@@ -366,8 +397,8 @@ public class Restricted_ORB ...@@ -366,8 +397,8 @@ public class Restricted_ORB
} }
/** /**
* Throws an exception, stating that the given method is not supported * Throws an exception, stating that the given method is not supported by the
* by the Restricted ORB. * Restricted ORB.
*/ */
private final void no() private final void no()
{ {
...@@ -381,8 +412,7 @@ public class Restricted_ORB ...@@ -381,8 +412,7 @@ public class Restricted_ORB
* *
* @throws NO_IMPLEMENT, always. * @throws NO_IMPLEMENT, always.
*/ */
public Request get_next_response() public Request get_next_response() throws org.omg.CORBA.WrongTransaction
throws org.omg.CORBA.WrongTransaction
{ {
no(); no();
throw new InternalError(); throw new InternalError();
...@@ -423,8 +453,8 @@ public class Restricted_ORB ...@@ -423,8 +453,8 @@ public class Restricted_ORB
* Register the value factory under the given repository id. * Register the value factory under the given repository id.
*/ */
public ValueFactory register_value_factory(String repository_id, public ValueFactory register_value_factory(String repository_id,
ValueFactory factory ValueFactory factory
) )
{ {
factories.put(repository_id, factory); factories.put(repository_id, factory);
return factory; return factory;
...@@ -440,9 +470,9 @@ public class Restricted_ORB ...@@ -440,9 +470,9 @@ public class Restricted_ORB
/** /**
* Look for the value factory for the value, having the given repository id. * Look for the value factory for the value, having the given repository id.
* The implementation checks for the registered value factories first. * The implementation checks for the registered value factories first. If none
* If none found, it tries to load and instantiate the class, mathing the * found, it tries to load and instantiate the class, mathing the given naming
* given naming convention. If this faild, null is returned. * convention. If this faild, null is returned.
* *
* @param repository_id a repository id. * @param repository_id a repository id.
* *
...@@ -452,12 +482,43 @@ public class Restricted_ORB ...@@ -452,12 +482,43 @@ public class Restricted_ORB
{ {
ValueFactory f = (ValueFactory) factories.get(repository_id); ValueFactory f = (ValueFactory) factories.get(repository_id);
if (f != null) if (f != null)
return f; {
return f;
}
f = (ValueFactory) ObjectCreator.createObject(repository_id, "DefaultFactory"); f = (ValueFactory) ObjectCreator.createObject(repository_id,
"DefaultFactory"
);
if (f != null) if (f != null)
factories.put(repository_id, f); {
factories.put(repository_id, f);
}
return f; return f;
} }
/**
* Destroy the interceptors, if they are present.
*/
public void destroy()
{
if (iIor != null)
{
iIor.destroy();
iIor = null;
}
if (iServer != null)
{
iServer.destroy();
iServer = null;
}
if (iClient != null)
{
iClient.destroy();
iClient = null;
}
super.destroy();
}
} }
\ No newline at end of file
...@@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler; ...@@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.Streamable; import org.omg.CORBA.portable.Streamable;
/** /**
* This class exists to handle obsolete invocation style using * This class supports invocation using ServerRequest. When possible,
* ServerRequest. * it is better to use the {@link ObjectImpl#_invoke} rather than
* * working via ServerRequest. However since 1.4 the ServerRequest is
* @deprecated The method {@link ObjectImpl#_invoke} is much faster. * involved into POA machinery making this type of call is sometimes
* inavoidable.
* *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/ */
...@@ -86,13 +87,13 @@ public class ServiceRequestAdapter ...@@ -86,13 +87,13 @@ public class ServiceRequestAdapter
} }
/** /**
* The old style invocation using the currently deprecated server * Make an invocation.
* request class.
* *
* @param request a server request, containg the invocation information. * @param request a server request, containg the invocation information.
* @param target the invocation target * @param target the invocation target
* @param result the result holder with the set suitable streamable to read * @param result the result holder with the set suitable streamable.
* the result or null for void. * Using this parameter only increase the performance. It can be
* null if the return type is void or unknown.
*/ */
public static void invoke(ServerRequest request, InvokeHandler target, public static void invoke(ServerRequest request, InvokeHandler target,
Streamable result Streamable result
...@@ -133,12 +134,20 @@ public class ServiceRequestAdapter ...@@ -133,12 +134,20 @@ public class ServiceRequestAdapter
else else
{ {
if (result != null) if (result != null)
{ {
result._read(in); // Use the holder for the return value, if provided.
gnuAny r = new gnuAny(); result._read(in);
r.insert_Streamable(result);
request.set_result(r); gnuAny r = new gnuAny();
}; r.insert_Streamable(result);
request.set_result(r);
}
else
{
// Use the universal holder otherwise.
gnuAny r = new gnuAny();
r.insert_Streamable(new streamReadyHolder(in));
}
// Unpack the arguments // Unpack the arguments
for (int i = 0; i < args.count(); i++) for (int i = 0; i < args.count(); i++)
......
...@@ -195,13 +195,40 @@ public class Simple_delegate ...@@ -195,13 +195,40 @@ public class Simple_delegate
} }
/** /**
* Only returns true if the objects are equal ('=='). * Returns true if the objects are the same of have
* the same delegate set. All objects in this implementation
* have a separate delegate.
*/ */
public boolean is_equivalent(org.omg.CORBA.Object target, public boolean is_equivalent(org.omg.CORBA.Object target,
org.omg.CORBA.Object other org.omg.CORBA.Object other
) )
{ {
return target == other; if (target == other)
return true;
if ((target instanceof ObjectImpl) && other instanceof ObjectImpl)
{
try
{
org.omg.CORBA.portable.Delegate a =
((ObjectImpl) target)._get_delegate();
org.omg.CORBA.portable.Delegate b =
((ObjectImpl) other)._get_delegate();
if (a == b)
{
return true;
}
if (a != null && b != null)
{
return a.equals(b);
}
}
catch (Exception ex)
{
// Unable to get one of the delegates.
return false;
}
}
return false;
} }
/** /**
...@@ -246,4 +273,4 @@ public class Simple_delegate ...@@ -246,4 +273,4 @@ public class Simple_delegate
{ {
throw new InternalError(); throw new InternalError();
} }
} }
\ No newline at end of file
...@@ -39,6 +39,7 @@ exception statement from your version. */ ...@@ -39,6 +39,7 @@ exception statement from your version. */
package gnu.CORBA; package gnu.CORBA;
import java.net.Socket; import java.net.Socket;
import java.net.SocketException;
import java.util.HashMap; import java.util.HashMap;
...@@ -70,16 +71,18 @@ public class SocketRepository ...@@ -70,16 +71,18 @@ public class SocketRepository
/** /**
* Get a socket. * Get a socket.
* *
* @param key a socket key. * @param key a socket key.
* *
* @return an opened socket for reuse, null if no such * @return an opened socket for reuse, null if no such available or it is
* available or it is closed. * closed.
*/ */
public static Socket get_socket(Object key) public static Socket get_socket(Object key)
{ {
Socket s = (Socket) sockets.get(key); Socket s = (Socket) sockets.get(key);
if (s != null && s.isClosed()) if (s == null)
return null;
else if (s.isClosed())
{ {
sockets.remove(key); sockets.remove(key);
return null; return null;
...@@ -87,6 +90,15 @@ public class SocketRepository ...@@ -87,6 +90,15 @@ public class SocketRepository
else else
{ {
sockets.remove(key); sockets.remove(key);
try
{
// Set one minute time out that will be changed later.
s.setSoTimeout(60*1000);
}
catch (SocketException e)
{
s = null;
}
return s; return s;
} }
} }
......
...@@ -41,6 +41,7 @@ package gnu.CORBA; ...@@ -41,6 +41,7 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufOutput; import gnu.CORBA.CDR.cdrBufOutput;
import gnu.CORBA.GIOP.MessageHeader; import gnu.CORBA.GIOP.MessageHeader;
import gnu.CORBA.GIOP.ReplyHeader; import gnu.CORBA.GIOP.ReplyHeader;
import gnu.CORBA.GIOP.RequestHeader;
import gnu.CORBA.GIOP.cxCodeSet; import gnu.CORBA.GIOP.cxCodeSet;
import org.omg.CORBA.ORB; import org.omg.CORBA.ORB;
...@@ -48,31 +49,33 @@ import org.omg.CORBA.portable.OutputStream; ...@@ -48,31 +49,33 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler; import org.omg.CORBA.portable.ResponseHandler;
/** /**
* Provides the CDR output streams for writing the response to the given * Provides the CDR output streams for writing the response to the given buffer.
* buffer.
* *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/ */
class bufferedResponseHandler public class bufferedResponseHandler
implements ResponseHandler implements ResponseHandler
{ {
/** /**
* The message header. * The message header. This field is used to compute the size and alignments.
* This field is used to compute the size and alignments.
* It is, however, never directly written to the buffer stream. * It is, however, never directly written to the buffer stream.
*/ */
final MessageHeader message_header; public final MessageHeader message_header;
/** /**
* The associated orb. * The associated orb.
*/ */
final ORB orb; public final ORB orb;
/** /**
* The reply header. This field is used to compute the size and alignments. * The reply header.
* It is, however, never directly written to the buffer stream. */
public final ReplyHeader reply_header;
/**
* The request header.
*/ */
final ReplyHeader reply_header; public final RequestHeader request_header;
/** /**
* True if the stream was obtained by invoking {@link #createExceptionReply()}, * True if the stream was obtained by invoking {@link #createExceptionReply()},
...@@ -86,28 +89,27 @@ class bufferedResponseHandler ...@@ -86,28 +89,27 @@ class bufferedResponseHandler
private cdrBufOutput buffer; private cdrBufOutput buffer;
/** /**
* Create a new buffered response handler that uses the given message * Create a new buffered response handler that uses the given message headers.
* headers. The headers are used to compute sizes and check the versions. * The headers are used to compute sizes and check the versions. They are not
* They are not written into a stream inside this class. * written into a stream inside this class.
* *
* @param m_header a message header. * @param m_header a message header.
* @param r_header a reply header. * @param r_header a reply header.
*/ */
bufferedResponseHandler(ORB an_orb, MessageHeader m_header, bufferedResponseHandler(ORB an_orb, MessageHeader m_header,
ReplyHeader r_header ReplyHeader r_header, RequestHeader rq_header)
)
{ {
message_header = m_header; message_header = m_header;
reply_header = r_header; reply_header = r_header;
request_header = rq_header;
orb = an_orb; orb = an_orb;
prepareStream(); prepareStream();
} }
/** /**
* Get an output stream for providing details about the exception. * Get an output stream for providing details about the exception. Before
* Before returning the stream, the handler automatically writes * returning the stream, the handler automatically writes the message header
* the message header and the reply about exception header, * and the reply about exception header, but not the message header.
* but not the message header.
* *
* @return the stream to write exception details into. * @return the stream to write exception details into.
*/ */
...@@ -121,8 +123,8 @@ class bufferedResponseHandler ...@@ -121,8 +123,8 @@ class bufferedResponseHandler
/** /**
* Get an output stream for writing a regular reply (not an exception). * Get an output stream for writing a regular reply (not an exception).
* *
* Before returning the stream, the handler automatically writes * Before returning the stream, the handler automatically writes the regular
* the regular reply header, but not the message header. * reply header, but not the message header.
* *
* @return the output stream for writing a regular reply. * @return the output stream for writing a regular reply.
*/ */
...@@ -135,27 +137,26 @@ class bufferedResponseHandler ...@@ -135,27 +137,26 @@ class bufferedResponseHandler
} }
/** /**
* Get the buffer, normally containing the written reply. * Get the buffer, normally containing the written reply. The reply includes
* The reply includes the reply header (or the exception header) * the reply header (or the exception header) but does not include the message
* but does not include the message header. * header.
* *
* The stream buffer can also be empty if no data have been written * The stream buffer can also be empty if no data have been written into
* into streams, returned by {@link #createReply()} or * streams, returned by {@link #createReply()} or
* {@link #createExceptionReply()}. * {@link #createExceptionReply()}.
* *
* @return the CDR output stream, containing the written output. * @return the CDR output stream, containing the written output.
*/ */
cdrBufOutput getBuffer() public cdrBufOutput getBuffer()
{ {
return buffer; return buffer;
} }
/** /**
* True if the stream was obtained by invoking * True if the stream was obtained by invoking {@link #createExceptionReply()},
* {@link #createExceptionReply()}, false otherwise * false otherwise (usually no-exception reply).
* (usually no-exception reply).
*/ */
boolean isExceptionReply() public boolean isExceptionReply()
{ {
return exceptionReply; return exceptionReply;
} }
...@@ -167,21 +168,22 @@ class bufferedResponseHandler ...@@ -167,21 +168,22 @@ class bufferedResponseHandler
{ {
buffer = new cdrBufOutput(); buffer = new cdrBufOutput();
buffer.setOrb(orb); buffer.setOrb(orb);
buffer.setOffset(message_header.getHeaderSize()); buffer.setVersion(message_header.version);
buffer.setCodeSet(cxCodeSet.find(reply_header.service_context));
// Get the position after the reply header would be written.
reply_header.write(buffer);
int new_offset = message_header.getHeaderSize() + buffer.buffer.size(); // Since 1.2, the data section is always aligned on the 8 byte boundary.
// In older versions, it is necessary to set the offset correctly.
if (message_header.version.until_inclusive(1, 1))
{
buffer.setOffset(message_header.getHeaderSize());
buffer.buffer.reset(); // Get the position after the reply header would be written.
buffer.setOffset(new_offset); reply_header.write(buffer);
if (message_header.version.since_inclusive(1, 2)) int new_offset = message_header.getHeaderSize() + buffer.buffer.size();
buffer.align(8);
buffer.setVersion(message_header.version); buffer.buffer.reset();
buffer.setOffset(new_offset);
buffer.setCodeSet(cxCodeSet.find(reply_header.service_context)); }
} }
} }
...@@ -109,16 +109,12 @@ public class fixedTypeCode ...@@ -109,16 +109,12 @@ public class fixedTypeCode
return number.unscaledValue().abs().toString().length(); return number.unscaledValue().abs().toString().length();
} }
public boolean equals(Object other) /**
* Compare with other type code for equality.
*/
public boolean equal(TypeCode other)
{ {
if (other == this) if (other == this) return true;
{
return true;
}
if (!(other instanceof TypeCode))
{
return false;
}
try try
{ {
TypeCode that = (TypeCode) other; TypeCode that = (TypeCode) other;
......
...@@ -38,6 +38,7 @@ exception statement from your version. */ ...@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.CORBA; package gnu.CORBA;
import gnu.CORBA.CDR.Vio;
import gnu.CORBA.CDR.cdrBufInput; import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput; import gnu.CORBA.CDR.cdrBufOutput;
...@@ -63,6 +64,7 @@ import org.omg.CORBA.TypeCode; ...@@ -63,6 +64,7 @@ import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodeHolder; import org.omg.CORBA.TypeCodeHolder;
import org.omg.CORBA.TypeCodePackage.BadKind; import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.ValueBaseHolder; import org.omg.CORBA.ValueBaseHolder;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.Streamable; import org.omg.CORBA.portable.Streamable;
import java.io.IOException; import java.io.IOException;
...@@ -499,20 +501,33 @@ public class gnuAny ...@@ -499,20 +501,33 @@ public class gnuAny
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
public void insert_Value(Serializable x, TypeCode typecode) public void insert_Value(Serializable x, TypeCode c_typecode)
{ {
type(typecode); if (typecode != null && typecode.kind() == TCKind.tk_value_box)
insert_Value(x); {
has = new gnuValueHolder(x, typecode);
}
else
{
type(typecode);
insert_Value(x);
}
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
public void insert_Value(Serializable x) public void insert_Value(Serializable x)
{ {
resetTypes(); if (typecode != null && typecode.kind() == TCKind.tk_value_box)
if (has instanceof ValueBaseHolder) {
((ValueBaseHolder) has).value = x; has = new gnuValueHolder(x, typecode);
}
else else
has = new ValueBaseHolder(x); {
if (has instanceof ValueBaseHolder)
((ValueBaseHolder) has).value = x;
else
has = new ValueBaseHolder(x);
}
} }
/** /**
...@@ -748,15 +763,38 @@ public class gnuAny ...@@ -748,15 +763,38 @@ public class gnuAny
} }
} }
type(a_type); type(a_type);
has._read(input);
} if (!(has instanceof universalHolder) &&
catch (BadKind ex) (kind == TCKind._tk_value_box))
{ {
throw new MARSHAL("Bad kind: " + ex.getMessage()); // The streamable only contains operations for
// reading the value, not the value header.
Field vField = has.getClass().getField("value");
BoxedValueHelper helper;
try
{
Class helperClass =
Class.forName(ObjectCreator.toHelperName(a_type.id()));
helper = (BoxedValueHelper) helperClass.newInstance();
}
catch (Exception ex)
{
helper = null;
}
Object content = Vio.read(input, helper);
vField.set(has, content);
}
else
has._read(input);
} }
catch (IOException ex) catch (Exception ex)
{ {
throw new MARSHAL("IO exception: " + ex.getMessage()); MARSHAL m = new MARSHAL();
m.initCause(ex);
throw m;
} }
} }
...@@ -790,6 +828,12 @@ public class gnuAny ...@@ -790,6 +828,12 @@ public class gnuAny
{ {
if (has != null) if (has != null)
has._write(output); has._write(output);
else
// These kinds support null.
if (xKind == TCKind._tk_null || xKind == TCKind._tk_objref ||
xKind == TCKind._tk_value || xKind == TCKind._tk_value_box
)
output.write_long(0);
} }
/** /**
...@@ -806,16 +850,26 @@ public class gnuAny ...@@ -806,16 +850,26 @@ public class gnuAny
if (xKind >= 0) if (xKind >= 0)
{ {
if (xKind != kind) if (xKind != kind)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) + if (!(
" when stored " + typeNamer.nameIt(xKind) xKind == TCKind._tk_alias &&
); has._type().kind().value() == kind
)
)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" when stored " + typeNamer.nameIt(xKind)
);
} }
else else
{ {
if (type().kind().value() != kind) if (type().kind().value() != kind)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) + if (!(
" stored " + typeNamer.nameIt(type()) type().kind().value() == TCKind._tk_alias &&
); has._type().kind().value() == kind
)
)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" stored " + typeNamer.nameIt(type())
);
} }
} }
......
...@@ -38,12 +38,12 @@ exception statement from your version. */ ...@@ -38,12 +38,12 @@ exception statement from your version. */
package gnu.CORBA; package gnu.CORBA;
import org.omg.CORBA.*;
import org.omg.CORBA.LocalObject; import org.omg.CORBA.LocalObject;
import org.omg.IOP.*; import org.omg.CORBA.ORB;
import org.omg.IOP.Codec; import org.omg.IOP.Codec;
import org.omg.IOP.CodecFactory; import org.omg.IOP.CodecFactory;
import org.omg.IOP.CodecFactoryPackage.UnknownEncoding; import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
import org.omg.IOP.ENCODING_CDR_ENCAPS;
import org.omg.IOP.Encoding; import org.omg.IOP.Encoding;
/** /**
...@@ -52,9 +52,7 @@ import org.omg.IOP.Encoding; ...@@ -52,9 +52,7 @@ import org.omg.IOP.Encoding;
* *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/ */
public class gnuCodecFactory public class gnuCodecFactory extends LocalObject implements CodecFactory
extends LocalObject
implements CodecFactory
{ {
/** /**
* The associated ORB. * The associated ORB.
...@@ -78,18 +76,15 @@ public class gnuCodecFactory ...@@ -78,18 +76,15 @@ public class gnuCodecFactory
* *
* @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS. * @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.
*/ */
public Codec create_codec(Encoding for_encoding) public Codec create_codec(Encoding for_encoding) throws UnknownEncoding
throws UnknownEncoding
{ {
if (for_encoding.format != ENCODING_CDR_ENCAPS.value) if (for_encoding.format != ENCODING_CDR_ENCAPS.value)
throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " + throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +
"supported by this factory." "supported by this factory."
); );
return new cdrEncapsCodec(orb, return new cdrEncapsCodec(orb,
new Version(for_encoding.major_version, new Version(for_encoding.major_version, for_encoding.minor_version)
for_encoding.minor_version );
)
);
} }
} }
\ No newline at end of file
...@@ -68,74 +68,76 @@ import org.omg.CORBA.UShortSeqHolder; ...@@ -68,74 +68,76 @@ import org.omg.CORBA.UShortSeqHolder;
import org.omg.CORBA.WCharSeqHolder; import org.omg.CORBA.WCharSeqHolder;
import org.omg.CORBA.WStringSeqHolder; import org.omg.CORBA.WStringSeqHolder;
import org.omg.CORBA.portable.Streamable; import org.omg.CORBA.portable.Streamable;
import org.omg.CORBA.ObjectHolder;
/** /**
* Creates the suitable holder for storing the value of the given * Creates the suitable holder for storing the value of the given final_type.
* type.
* *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/ */
public class holderFactory public class holderFactory
{ {
/** /**
* The array, sufficiently large to use any {@link TCKind}._tk* constant * The array, sufficiently large to use any {@link TCKind}._tk* constant as
* as an index. * an index.
*/ */
private static final Class[] holders; private static final Class[] holders;
private static final Class[] seqHolders; private static final Class[] seqHolders;
static static
{ {
holders = new Class[ 32 ]; holders = new Class[32];
holders [ TCKind._tk_Principal ] = PrincipalHolder.class; holders[TCKind._tk_Principal] = PrincipalHolder.class;
holders [ TCKind._tk_TypeCode ] = TypeCodeHolder.class; holders[TCKind._tk_TypeCode] = TypeCodeHolder.class;
holders [ TCKind._tk_any ] = AnyHolder.class; holders[TCKind._tk_any] = AnyHolder.class;
holders [ TCKind._tk_boolean ] = BooleanHolder.class; holders[TCKind._tk_boolean] = BooleanHolder.class;
holders [ TCKind._tk_char ] = CharHolder.class; holders[TCKind._tk_char] = CharHolder.class;
holders [ TCKind._tk_double ] = DoubleHolder.class; holders[TCKind._tk_double] = DoubleHolder.class;
holders [ TCKind._tk_float ] = FloatHolder.class; holders[TCKind._tk_float] = FloatHolder.class;
holders [ TCKind._tk_fixed ] = FixedHolder.class; holders[TCKind._tk_fixed] = FixedHolder.class;
holders [ TCKind._tk_long ] = IntHolder.class; holders[TCKind._tk_long] = IntHolder.class;
holders [ TCKind._tk_longdouble ] = DoubleHolder.class; holders[TCKind._tk_longdouble] = DoubleHolder.class;
holders [ TCKind._tk_longlong ] = LongHolder.class; holders[TCKind._tk_longlong] = LongHolder.class;
holders [ TCKind._tk_octet ] = OctetHolder.class; holders[TCKind._tk_octet] = OctetHolder.class;
holders [ TCKind._tk_short ] = ShortHolder.class; holders[TCKind._tk_short] = ShortHolder.class;
holders [ TCKind._tk_string ] = StringHolder.class; holders[TCKind._tk_string] = StringHolder.class;
holders [ TCKind._tk_ulong ] = IntHolder.class; holders[TCKind._tk_ulong] = IntHolder.class;
holders [ TCKind._tk_ulonglong ] = LongHolder.class; holders[TCKind._tk_ulonglong] = LongHolder.class;
holders [ TCKind._tk_ushort ] = ShortHolder.class; holders[TCKind._tk_ushort] = ShortHolder.class;
holders [ TCKind._tk_wchar ] = WCharHolder.class; holders[TCKind._tk_wchar] = WCharHolder.class;
holders [ TCKind._tk_wstring ] = WStringHolder.class; holders[TCKind._tk_wstring] = WStringHolder.class;
holders[TCKind._tk_objref] = ObjectHolder.class;
seqHolders = new Class[ 32 ];
seqHolders = new Class[32];
seqHolders [ TCKind._tk_ulonglong ] = ULongLongSeqHolder.class;
seqHolders [ TCKind._tk_short ] = ShortSeqHolder.class; seqHolders[TCKind._tk_ulonglong] = ULongLongSeqHolder.class;
seqHolders [ TCKind._tk_octet ] = OctetSeqHolder.class; seqHolders[TCKind._tk_short] = ShortSeqHolder.class;
seqHolders [ TCKind._tk_any ] = AnySeqHolder.class; seqHolders[TCKind._tk_octet] = OctetSeqHolder.class;
seqHolders [ TCKind._tk_long ] = LongSeqHolder.class; seqHolders[TCKind._tk_any] = AnySeqHolder.class;
seqHolders [ TCKind._tk_longlong ] = LongLongSeqHolder.class; seqHolders[TCKind._tk_long] = LongSeqHolder.class;
seqHolders [ TCKind._tk_float ] = FloatSeqHolder.class; seqHolders[TCKind._tk_longlong] = LongLongSeqHolder.class;
seqHolders [ TCKind._tk_double ] = DoubleSeqHolder.class; seqHolders[TCKind._tk_float] = FloatSeqHolder.class;
seqHolders [ TCKind._tk_char ] = CharSeqHolder.class; seqHolders[TCKind._tk_double] = DoubleSeqHolder.class;
seqHolders [ TCKind._tk_boolean ] = BooleanSeqHolder.class; seqHolders[TCKind._tk_char] = CharSeqHolder.class;
seqHolders [ TCKind._tk_wchar ] = WCharSeqHolder.class; seqHolders[TCKind._tk_boolean] = BooleanSeqHolder.class;
seqHolders [ TCKind._tk_ushort ] = UShortSeqHolder.class; seqHolders[TCKind._tk_wchar] = WCharSeqHolder.class;
seqHolders [ TCKind._tk_ulong ] = ULongSeqHolder.class; seqHolders[TCKind._tk_ushort] = UShortSeqHolder.class;
seqHolders [ TCKind._tk_string ] = StringSeqHolder.class; seqHolders[TCKind._tk_ulong] = ULongSeqHolder.class;
seqHolders [ TCKind._tk_wstring ] = WStringSeqHolder.class; seqHolders[TCKind._tk_string] = StringSeqHolder.class;
} seqHolders[TCKind._tk_wstring] = WStringSeqHolder.class;
}
/** /**
* Create a holder for storing the value of the given built-in type. * Create a holder for storing the value of the given built-in final_type. This
* This function returns the defined holders for the built-in primitive * function returns the defined holders for the built-in primitive types and
* types and they sequences. * they sequences.
* *
* @param t the typecode * @param t the typecode
* *
* @return an instance of the corresponding built-in holder of null * @return an instance of the corresponding built-in holder of null if no such
* if no such is defined for this type. The holder is created with a * is defined for this final_type. The holder is created with a parameterless
* parameterless constructor. * constructor.
*/ */
public static Streamable createHolder(TypeCode t) public static Streamable createHolder(TypeCode t)
{ {
...@@ -145,24 +147,23 @@ public class holderFactory ...@@ -145,24 +147,23 @@ public class holderFactory
int componentKind; int componentKind;
Streamable holder = null; Streamable holder = null;
Streamable component;
if (kind < holders.length && holders [ kind ] != null) if (kind < holders.length && holders[kind] != null)
holder = (Streamable) holders [ kind ].newInstance(); holder = (Streamable) holders[kind].newInstance();
if (holder != null) if (holder != null)
return holder; return holder;
switch (kind) switch (kind)
{ {
case TCKind._tk_sequence : case TCKind._tk_sequence:
componentKind = t.content_type().kind().value(); componentKind = t.content_type().kind().value();
if (componentKind < seqHolders.length) if (componentKind < seqHolders.length)
return (Streamable) seqHolders [ componentKind ].newInstance(); return (Streamable) seqHolders[componentKind].newInstance();
break; break;
default : default:
break; break;
} }
} }
catch (Exception ex) catch (Exception ex)
......
/* primitiveArrayTypeCode.java -- /* primitiveArrayTypeCode.java --
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. 02110-1301 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole conditions of the GNU General Public License cover the whole
combination. combination.
As a special exception, the copyright holders of this library give you As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package gnu.CORBA; package gnu.CORBA;
...@@ -61,10 +61,10 @@ public class primitiveArrayTypeCode ...@@ -61,10 +61,10 @@ public class primitiveArrayTypeCode
private int length; private int length;
/** /**
* Create a primitive array type code, defining the sequence * Create a primitive array type code, defining the sequence
* {@link TCKind.tk_sequence)} with * {@link TCKind.tk_sequence)} with
* the given member type. * the given member type.
* *
* @param array_of the sequence member type. * @param array_of the sequence member type.
*/ */
public primitiveArrayTypeCode(TCKind array_of) public primitiveArrayTypeCode(TCKind array_of)
...@@ -76,7 +76,7 @@ public class primitiveArrayTypeCode ...@@ -76,7 +76,7 @@ public class primitiveArrayTypeCode
/** /**
* Create a primitive array type code, defining the array, sequence * Create a primitive array type code, defining the array, sequence
* or other type with the given member type. * or other type with the given member type.
* *
* @param this_type the type of this type (normally either * @param this_type the type of this type (normally either
* sequence of array). * sequence of array).
* @param array_of the sequence member type. * @param array_of the sequence member type.
......
/* primitiveTypeCode.java -- /* primitiveTypeCode.java --
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath. Copyright (C) 2005 Free Software Foundation, Inc.
GNU Classpath is free software; you can redistribute it and/or modify This file is part of GNU Classpath.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) GNU Classpath is free software; you can redistribute it and/or modify
any later version. it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
GNU Classpath is distributed in the hope that it will be useful, but any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GNU Classpath is distributed in the hope that it will be useful, but
General Public License for more details. WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
You should have received a copy of the GNU General Public License General Public License for more details.
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA You should have received a copy of the GNU General Public License
02110-1301 USA. along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Linking this library statically or dynamically with other modules is 02110-1301 USA.
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole Linking this library statically or dynamically with other modules is
combination. making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
As a special exception, the copyright holders of this library give you combination.
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent As a special exception, the copyright holders of this library give you
modules, and to copy and distribute the resulting executable under permission to link this library with independent modules to produce an
terms of your choice, provided that you also meet, for each linked executable, regardless of the license terms of these independent
independent module, the terms and conditions of the license of that modules, and to copy and distribute the resulting executable under
module. An independent module is a module which is not derived from terms of your choice, provided that you also meet, for each linked
or based on this library. If you modify this library, you may extend independent module, the terms and conditions of the license of that
this exception to your version of the library, but you are not module. An independent module is a module which is not derived from
obligated to do so. If you do not wish to do so, delete this or based on this library. If you modify this library, you may extend
exception statement from your version. */ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.CORBA; package gnu.CORBA;
......
...@@ -83,7 +83,7 @@ public class typeNamer ...@@ -83,7 +83,7 @@ public class typeNamer
new primitiveTypeCode(TCKind.tk_any), new primitiveTypeCode(TCKind.tk_any),
new primitiveTypeCode(TCKind.tk_TypeCode), new primitiveTypeCode(TCKind.tk_TypeCode),
new primitiveTypeCode(TCKind.tk_Principal), new primitiveTypeCode(TCKind.tk_Principal),
new primitiveTypeCode(TCKind.tk_objref), new recordTypeCode(TCKind.tk_objref),
new primitiveTypeCode(TCKind.tk_struct), new primitiveTypeCode(TCKind.tk_struct),
new primitiveTypeCode(TCKind.tk_union), new primitiveTypeCode(TCKind.tk_union),
new primitiveTypeCode(TCKind.tk_enum), new primitiveTypeCode(TCKind.tk_enum),
...@@ -104,6 +104,15 @@ public class typeNamer ...@@ -104,6 +104,15 @@ public class typeNamer
new primitiveTypeCode(TCKind.tk_abstract_interface) new primitiveTypeCode(TCKind.tk_abstract_interface)
}; };
static
{
// The Id of the "abstract object" is defined as empty string.
recordTypeCode object =
(recordTypeCode) primitveCodes [ TCKind._tk_objref ];
object.setId("");
object.setName("Object");
}
/** /**
* Get the primitive type code. * Get the primitive type code.
* *
...@@ -168,4 +177,4 @@ public class typeNamer ...@@ -168,4 +177,4 @@ public class typeNamer
return "type of kind '" + type.kind().value() + "'"; return "type of kind '" + type.kind().value() + "'";
} }
} }
} }
\ No newline at end of file
...@@ -60,7 +60,7 @@ import java.io.IOException; ...@@ -60,7 +60,7 @@ import java.io.IOException;
* *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/ */
class universalHolder public class universalHolder
implements Streamable implements Streamable
{ {
/** /**
...@@ -71,7 +71,7 @@ class universalHolder ...@@ -71,7 +71,7 @@ class universalHolder
/** /**
* Create the universal holder that uses the given buffer to store the data. * Create the universal holder that uses the given buffer to store the data.
*/ */
universalHolder(cdrBufOutput buffer) public universalHolder(cdrBufOutput buffer)
{ {
value = buffer; value = buffer;
} }
...@@ -154,4 +154,21 @@ class universalHolder ...@@ -154,4 +154,21 @@ class universalHolder
{ {
return value.create_input_stream(); return value.create_input_stream();
} }
}
/**
* Clone.
*/
public universalHolder Clone()
{
try
{
cdrBufOutput nb = new cdrBufOutput(value.buffer.size());
value.buffer.writeTo(nb);
return new universalHolder(nb);
}
catch (IOException ex)
{
throw new Unexpected(ex);
}
}
}
\ No newline at end of file
...@@ -80,33 +80,6 @@ public interface Configuration ...@@ -80,33 +80,6 @@ public interface Configuration
boolean INIT_LOAD_LIBRARY = @INIT_LOAD_LIBRARY@; boolean INIT_LOAD_LIBRARY = @INIT_LOAD_LIBRARY@;
/** /**
* Set to true if the VM provides a native method to implement
* Proxy.getProxyClass completely, including argument verification.
* If this is true, HAVE_NATIVE_GET_PROXY_DATA and
* HAVE_NATIVE_GENERATE_PROXY_CLASS should be false.
* @see java.lang.reflect.Proxy
*/
boolean HAVE_NATIVE_GET_PROXY_CLASS = false;
/**
* Set to true if the VM provides a native method to implement
* the first part of Proxy.getProxyClass: generation of the array
* of methods to convert, and verification of the arguments.
* If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
* @see java.lang.reflect.Proxy
*/
boolean HAVE_NATIVE_GET_PROXY_DATA = false;
/**
* Set to true if the VM provides a native method to implement
* the second part of Proxy.getProxyClass: conversion of an array of
* methods into an actual proxy class.
* If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
* @see java.lang.reflect.Proxy
*/
boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false;
/**
* Name of default AWT peer library. * Name of default AWT peer library.
*/ */
String default_awt_peer_toolkit = "@default_toolkit@"; String default_awt_peer_toolkit = "@default_toolkit@";
......
/* RawData.java -- Pointer to VM specific data
Copyright (C) 1999, 2000, 2004 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
/* This file is originally part of libgcj. */
package gnu.classpath;
/** A type used to indicate special data used by native code that should not
be marked by the garbage collector. */
public abstract class RawData
{
}
/* RawData64.java -- 64 bit Pointer
Copyright (C) 2004 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.classpath;
/**
* A type used to indicate special data used by native code that should not
* be marked by the garbage collector.
*/
public final class RawData64 extends RawData
{
final long data;
public RawData64(long data)
{
this.data = data;
}
}
...@@ -110,6 +110,12 @@ public final class Component extends Level ...@@ -110,6 +110,12 @@ public final class Component extends Level
*/ */
public static final Component X509 = new Component ("X.509", 6); public static final Component X509 = new Component ("X.509", 6);
/**
* Trace access control policies, including the parsing of
* java.policy files.
*/
public static final Component POLICY = new Component ("POLICY", 7);
private final int startIndex; private final int startIndex;
private final int endIndex; private final int endIndex;
......
...@@ -53,11 +53,11 @@ public class InvalidThreadGroupException ...@@ -53,11 +53,11 @@ public class InvalidThreadGroupException
public InvalidThreadGroupException (long id) public InvalidThreadGroupException (long id)
{ {
super (JdwpConstants.Error.INVALID_THREAD_GROUP, super (JdwpConstants.Error.INVALID_THREAD_GROUP,
"invalid thread id (" + id + ")"); "invalid thread group id (" + id + ")");
} }
public InvalidThreadGroupException (Throwable t) public InvalidThreadGroupException (Throwable t)
{ {
super (JdwpConstants.Error.INVALID_THREAD, t); super (JdwpConstants.Error.INVALID_THREAD_GROUP, t);
} }
} }
...@@ -50,8 +50,13 @@ import gnu.classpath.jdwp.JdwpConstants; ...@@ -50,8 +50,13 @@ import gnu.classpath.jdwp.JdwpConstants;
public class JdwpInternalErrorException public class JdwpInternalErrorException
extends JdwpException extends JdwpException
{ {
public JdwpInternalErrorException (Throwable cause) public JdwpInternalErrorException(Throwable cause)
{ {
super (JdwpConstants.Error.INTERNAL, cause); super(JdwpConstants.Error.INTERNAL, cause);
}
public JdwpInternalErrorException(String msg)
{
super(JdwpConstants.Error.INTERNAL, msg);
} }
} }
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidClassLoaderException;
/** /**
* A class which represents a JDWP thread id * A class which represents a JDWP thread id
...@@ -61,4 +62,21 @@ public class ClassLoaderId ...@@ -61,4 +62,21 @@ public class ClassLoaderId
{ {
super (JdwpConstants.Tag.CLASS_LOADER); super (JdwpConstants.Tag.CLASS_LOADER);
} }
/**
* Gets the ClassLoader represented by this ID
*
* @throws InvalidClassLoaderException if ClassLoader is garbage collected,
* or otherwise invalid
*/
public ClassLoader getClassLoader ()
throws InvalidClassLoaderException
{
ClassLoader cl = (ClassLoader) _reference.get ();
if (cl == null)
throw new InvalidClassLoaderException (getId ());
return cl;
}
} }
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidClassException;
/** /**
* A class which represents a JDWP class object id * A class which represents a JDWP class object id
...@@ -61,4 +62,21 @@ public class ClassObjectId ...@@ -61,4 +62,21 @@ public class ClassObjectId
{ {
super (JdwpConstants.Tag.CLASS_OBJECT); super (JdwpConstants.Tag.CLASS_OBJECT);
} }
/**
* Gets the Class object represented by this ID
*
* @throws InvalidClassException if Class is garbage collected,
* or otherwise invalid
*/
public Class getClassObject ()
throws InvalidClassException
{
Class cl = (Class) _reference.get ();
if (cl == null)
throw new InvalidClassException (getId ());
return cl;
}
} }
...@@ -41,6 +41,7 @@ package gnu.classpath.jdwp.id; ...@@ -41,6 +41,7 @@ package gnu.classpath.jdwp.id;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.ref.SoftReference;
/** /**
* A baseclass for all object types reported to the debugger * A baseclass for all object types reported to the debugger
...@@ -62,6 +63,11 @@ public abstract class JdwpId ...@@ -62,6 +63,11 @@ public abstract class JdwpId
private byte _tag; private byte _tag;
/** /**
* The object/class represented by this Id
*/
protected SoftReference _reference;
/**
* Constructs an empty <code>JdwpId</code> * Constructs an empty <code>JdwpId</code>
*/ */
public JdwpId (byte tag) public JdwpId (byte tag)
...@@ -72,7 +78,7 @@ public abstract class JdwpId ...@@ -72,7 +78,7 @@ public abstract class JdwpId
/** /**
* Sets the id for this object reference * Sets the id for this object reference
*/ */
void setId (long id) public void setId (long id)
{ {
_id = id; _id = id;
} }
...@@ -86,15 +92,33 @@ public abstract class JdwpId ...@@ -86,15 +92,33 @@ public abstract class JdwpId
} }
/** /**
* Gets the object/class reference for this ID
*
* @returns a refernce to the object or class
*/
public SoftReference getReference ()
{
return _reference;
}
/**
* Sets the object/class reference for this ID
*
* @param ref a refernce to the object or class
*/
public void setReference (SoftReference ref)
{
_reference = ref;
}
/**
* Compares two object ids for equality. Two object ids * Compares two object ids for equality. Two object ids
* are equal if they point to the same type and contain to * are equal if they point to the same type and contain to
* the same id number. (NOTE: This is a much stricter check * the same id number.
* than is necessary: all <code>JdwpId</code>s have unique
* ids.)
*/ */
public boolean equals (JdwpId id) public boolean equals (JdwpId id)
{ {
return ((id.getClass () == getClass ()) && (id.getId () == getId ())); return (id.getId () == getId ());
} }
/** /**
......
/* JdwpIdFactory.java -- factory for generating type and object IDs
Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.classpath.jdwp.id;
import java.util.HashMap;
/**
* This factory generates ids for objects and types that may
* be sent to a debugger.
*
* @author Keith Seitz (keiths@redhat.com)
*/
public class JdwpIdFactory
{
// ID of last object / referencetype
private static Object _idLock = new Object ();
private static Object _ridLock = new Object ();
private static long _lastId = 0;
private static long _lastRid = 0;
// A list of all ID types
private static HashMap _idList = new HashMap ();
// Initialize the id list with known types
static
{
// ObjectId and ArrayId are special cases. See newId.
_idList.put (ClassLoaderId.typeClass, ClassLoaderId.class);
_idList.put (ClassObjectId.typeClass, ClassObjectId.class);
//_idList.put (FieldId.typeClass, FieldId.class);
//_idList.put (FrameId.typeClass, FrameId.class);
//_idList.put (MethodId.typeClass, MethodId.class);
_idList.put (StringId.typeClass, StringId.class);
_idList.put (ThreadId.typeClass, ThreadId.class);
_idList.put (ThreadGroupId.typeClass, ThreadGroupId.class);
}
/**
* Returns a new id for the given object
*
* @param object the object for which an id is desired
* @returns a suitable object id
*/
public static JdwpId newId (Object object)
{
JdwpId id = null;
// Special case: arrays
if (object.getClass ().isArray ())
id = new ArrayId ();
else
{
// Loop through all classes until we hit baseclass
Class myClass;
for (myClass = object.getClass (); myClass != null;
myClass = myClass.getSuperclass ())
{
Class clz = (Class) _idList.get (myClass);
if (clz != null)
{
try
{
id = (JdwpId) clz.newInstance ();
synchronized (_idLock)
{
id.setId (++_lastId);
}
return id;
}
catch (InstantiationException ie)
{
// This really should not happen
throw new RuntimeException ("cannot create new ID", ie);
}
catch (IllegalAccessException iae)
{
// This really should not happen
throw new RuntimeException ("illegal access of ID", iae);
}
}
}
/* getSuperclass returned null and no matching ID type found.
So it must derive from Object. */
id = new ObjectId ();
}
synchronized (_idLock)
{
id.setId (++_lastId);
}
return id;
}
/**
* Returns a new reference type id for the given class
*
* @param clazz the <code>Class</code> for which an id is desired
* @returns a suitable reference type id or <code>null</code>
*/
public static ReferenceTypeId newReferenceTypeId (Class clazz)
{
ReferenceTypeId id = null;
try
{
if (clazz.isArray ())
id = new ArrayReferenceTypeId ();
else if (clazz.isInterface ())
id = new InterfaceReferenceTypeId ();
else
id = new ClassReferenceTypeId ();
synchronized (_ridLock)
{
id.setId (++_lastRid);
}
return id;
}
catch (InstantiationException ie)
{
return null;
}
catch (IllegalAccessException iae)
{
return null;
}
}
}
...@@ -40,12 +40,15 @@ exception statement from your version. */ ...@@ -40,12 +40,15 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidObjectException;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
/** /**
* A class which represents a JDWP object id for an object * This is a base class for all ObjectID-like entities in JDWP,
* inculding Objects, ClassObject, ClassLoader, Thread, ThreadGroup,
* etc.
* *
* @author Keith Seitz <keiths@redhat.com> * @author Keith Seitz <keiths@redhat.com>
*/ */
...@@ -57,6 +60,9 @@ public class ObjectId ...@@ -57,6 +60,9 @@ public class ObjectId
*/ */
public static final Class typeClass = Object.class; public static final Class typeClass = Object.class;
// Handle to disable garbage collection
private Object _handle;
/** /**
* Constructs a new <code>ObjectId</code> * Constructs a new <code>ObjectId</code>
*/ */
...@@ -85,6 +91,23 @@ public class ObjectId ...@@ -85,6 +91,23 @@ public class ObjectId
} }
/** /**
* Returns the object referred to by this ID
*
* @returns the object
* @throws InvalidObjectException if the object was garbage collected
* or is invalid
*/
public Object getObject ()
throws InvalidObjectException
{
Object obj = _reference.get ();
if (obj == null)
throw new InvalidObjectException (_id);
return obj;
}
/**
* Writes the id to the stream * Writes the id to the stream
* *
* @param outStream the stream to which to write * @param outStream the stream to which to write
...@@ -96,4 +119,21 @@ public class ObjectId ...@@ -96,4 +119,21 @@ public class ObjectId
// All we need to do is write out our id as an 8-byte integer // All we need to do is write out our id as an 8-byte integer
outStream.writeLong (_id); outStream.writeLong (_id);
} }
/**
* Disable garbage collection on object
*/
public void disableCollection ()
throws InvalidObjectException
{
_handle = getObject ();
}
/**
* Enable garbage collection on object
*/
public void enableCollection ()
{
_handle = null;
}
} }
...@@ -39,6 +39,8 @@ exception statement from your version. */ ...@@ -39,6 +39,8 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.exception.InvalidClassException;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
...@@ -68,6 +70,22 @@ public class ReferenceTypeId ...@@ -68,6 +70,22 @@ public class ReferenceTypeId
} }
/** /**
* Gets the class associated with this ID
*
* @returns the class
* @throws InvalidClassException if the class is not valid
*/
public Class getType ()
throws InvalidClassException
{
Class clazz = (Class) _reference.get ();
if (clazz == null)
throw new InvalidClassException (_id);
return clazz;
}
/**
* Outputs the reference type ID to the given output stream * Outputs the reference type ID to the given output stream
* *
* @param outStream the stream to which to write the data * @param outStream the stream to which to write the data
......
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidStringException;
/** /**
* A class which represents a JDWP string id * A class which represents a JDWP string id
...@@ -61,4 +62,21 @@ public class StringId ...@@ -61,4 +62,21 @@ public class StringId
{ {
super (JdwpConstants.Tag.STRING); super (JdwpConstants.Tag.STRING);
} }
/**
* Gets the String represented by this ID
*
* @throws InvalidStringException if String is garbage collected,
* or otherwise invalid
*/
public String getString ()
throws InvalidStringException
{
String string = (String) _reference.get ();
if (string == null)
throw new InvalidStringException (getId ());
return string;
}
} }
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidThreadGroupException;
/** /**
* A class which represents a JDWP thread group id * A class which represents a JDWP thread group id
...@@ -61,4 +62,21 @@ public class ThreadGroupId ...@@ -61,4 +62,21 @@ public class ThreadGroupId
{ {
super (JdwpConstants.Tag.THREAD_GROUP); super (JdwpConstants.Tag.THREAD_GROUP);
} }
/**
* Gets the thread group represented by this ID
*
* @throws InvalidThreadGroupException if the group is invalid
* or garbage collected
*/
public ThreadGroup getThreadGroup ()
throws InvalidThreadGroupException
{
ThreadGroup group = (ThreadGroup) _reference.get ();
if (group == null)
throw new InvalidThreadGroupException (getId ());
return group;
}
} }
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id; package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants; import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidThreadException;
/** /**
* A class which represents a JDWP thread id * A class which represents a JDWP thread id
...@@ -61,4 +62,24 @@ public class ThreadId ...@@ -61,4 +62,24 @@ public class ThreadId
{ {
super (JdwpConstants.Tag.THREAD); super (JdwpConstants.Tag.THREAD);
} }
/**
* Gets the Thread represented by this ID
*
* @throws InvalidThreadException if thread is garbage collected,
* exited, or otherwise invalid
*/
public Thread getThread ()
throws InvalidThreadException
{
Thread thread = (Thread) _reference.get ();
/* Spec says if thread is null, not valid, or exited,
throw invalid thread */
// FIXME: not valid? exited? Is this check valid?
if (thread == null || !thread.isAlive ())
throw new InvalidThreadException (getId ());
return thread;
}
} }
...@@ -15,8 +15,8 @@ General Public License for more details. ...@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02111-1307 USA. 02110-1301 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
...@@ -40,6 +40,7 @@ exception statement from your version. */ ...@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor; package gnu.classpath.jdwp.processor;
import gnu.classpath.jdwp.exception.JdwpException; import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.VMIdManager;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
...@@ -50,9 +51,14 @@ import java.nio.ByteBuffer; ...@@ -50,9 +51,14 @@ import java.nio.ByteBuffer;
* *
* @author Aaron Luchko <aluchko@redhat.com> * @author Aaron Luchko <aluchko@redhat.com>
*/ */
public interface CommandSet public abstract class CommandSet
{ {
/** /**
* The VM's ID manager
*/
protected final VMIdManager idMan = VMIdManager.getDefault ();
/**
* Runs the given command with the data in distr and writes the data for the * Runs the given command with the data in distr and writes the data for the
* reply packet to ostr. * reply packet to ostr.
* *
...@@ -62,7 +68,7 @@ public interface CommandSet ...@@ -62,7 +68,7 @@ public interface CommandSet
* @return true if the JDWP layer should shut down in response to this packet * @return true if the JDWP layer should shut down in response to this packet
* @throws JdwpException command wasn't carried out successfully * @throws JdwpException command wasn't carried out successfully
*/ */
public boolean runCommand(ByteBuffer bb, DataOutputStream os, public abstract boolean runCommand(ByteBuffer bb, DataOutputStream os,
byte command) byte command)
throws JdwpException; throws JdwpException;
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment