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
This commit is contained in:
Tom Tromey 2005-09-23 21:31:04 +00:00
parent 9b044d1951
commit 1ea63ef8be
544 changed files with 34724 additions and 14512 deletions

View file

@ -1,3 +1,43 @@
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>
* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Pass

View file

@ -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
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 \
$(PEDANTIC_CFLAGS) $(X_CFLAGS)
## See jv_convert_LDADD.
@ -809,7 +809,6 @@ java/lang/reflect/natArray.cc \
java/lang/reflect/natConstructor.cc \
java/lang/reflect/natField.cc \
java/lang/reflect/natMethod.cc \
java/lang/reflect/natProxy.cc \
java/net/natVMNetworkInterface.cc \
java/net/natInetAddress.cc \
java/nio/channels/natChannels.cc \

View file

@ -194,13 +194,13 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
javax/swing/colorchooser.lo javax/swing/event.lo \
javax/swing/filechooser.lo javax/swing/plaf.lo \
javax/swing/plaf/basic.lo javax/swing/plaf/metal.lo \
javax/swing/table.lo javax/swing/text.lo \
javax/swing/text/html.lo javax/swing/text/html/parser.lo \
javax/swing/text/rtf.lo javax/swing/tree.lo \
javax/swing/undo.lo javax/transaction.lo \
javax/swing/plaf/multi.lo javax/swing/table.lo \
javax/swing/text.lo javax/swing/text/html.lo \
javax/swing/text/html/parser.lo javax/swing/text/rtf.lo \
javax/swing/tree.lo javax/swing/undo.lo javax/transaction.lo \
javax/transaction/xa.lo org/ietf/jgss.lo
am__DEPENDENCIES_3 = gnu-java-beans.lo gnu-xml.lo javax-imageio.lo \
javax-xml.lo org-w3c.lo org-xml.lo
am__DEPENDENCIES_3 = gnu-java-awt-peer-qt.lo gnu-java-beans.lo \
gnu-xml.lo javax-imageio.lo javax-xml.lo org-w3c.lo org-xml.lo
am__DEPENDENCIES_4 = $(patsubst classpath/resource/%,%,$(addsuffix \
.lo,$(property_files)))
am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
@ -238,7 +238,6 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
java/lang/ref/natReference.cc java/lang/reflect/natArray.cc \
java/lang/reflect/natConstructor.cc \
java/lang/reflect/natField.cc java/lang/reflect/natMethod.cc \
java/lang/reflect/natProxy.cc \
java/net/natVMNetworkInterface.cc java/net/natInetAddress.cc \
java/nio/channels/natChannels.cc \
java/nio/natDirectByteBufferImpl.cc java/text/natCollator.cc \
@ -279,7 +278,6 @@ am__objects_2 = gnu/classpath/natSystemProperties.lo \
java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \
java/lang/reflect/natConstructor.lo \
java/lang/reflect/natField.lo java/lang/reflect/natMethod.lo \
java/lang/reflect/natProxy.lo \
java/net/natVMNetworkInterface.lo java/net/natInetAddress.lo \
java/nio/channels/natChannels.lo \
java/nio/natDirectByteBufferImpl.lo java/text/natCollator.lo \
@ -303,7 +301,7 @@ am_libgcj_la_OBJECTS = prims.lo jni.lo exception.lo stacktrace.lo \
$(am__objects_9) $(am__objects_10) $(am__objects_11)
libgcj_la_OBJECTS = $(am_libgcj_la_OBJECTS)
libgcjawt_la_DEPENDENCIES = lib-gnu-java-awt-peer-gtk.la
am_libgcjawt_la_OBJECTS = libgcjawt_la-jawt.lo
am_libgcjawt_la_OBJECTS = classpath/native/jawt/libgcjawt_la-jawt.lo
libgcjawt_la_OBJECTS = $(am_libgcjawt_la_OBJECTS)
@GTK_AWT_TRUE@am_libgcjawt_la_rpath = -rpath $(toolexeclibdir)
am_libgij_la_OBJECTS = gij.lo
@ -740,7 +738,7 @@ lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) $(X_LIBS) -lXtst
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 \
$(PEDANTIC_CFLAGS) $(X_CFLAGS)
@ -814,9 +812,9 @@ gnu/awt/xlib/XToolkit.java
gnu_awt_xlib_header_files = $(patsubst %.java,%.h,$(gnu_awt_xlib_source_files))
gnu_classpath_source_files = \
classpath/gnu/classpath/Configuration.java \
classpath/gnu/classpath/RawData.java \
classpath/gnu/classpath/RawData32.java \
classpath/gnu/classpath/RawData64.java \
classpath/gnu/classpath/Pointer.java \
classpath/gnu/classpath/Pointer32.java \
classpath/gnu/classpath/Pointer64.java \
classpath/gnu/classpath/ServiceFactory.java \
classpath/gnu/classpath/ServiceProviderLoadingAction.java \
gnu/classpath/SystemProperties.java
@ -971,6 +969,7 @@ classpath/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkChoicePeer.java \
classpath/gnu/java/awt/peer/gtk/GtkClipboard.java \
classpath/gnu/java/awt/peer/gtk/GtkClipboardNotifier.java \
classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkContainerPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkDialogPeer.java \
@ -991,12 +990,58 @@ classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java \
classpath/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkSelection.java \
classpath/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java \
classpath/gnu/java/awt/peer/gtk/GtkToolkit.java \
classpath/gnu/java/awt/peer/gtk/GtkVolatileImage.java \
classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java
gnu_java_awt_peer_qt_source_files = \
classpath/gnu/java/awt/peer/qt/MainQtThread.java \
classpath/gnu/java/awt/peer/qt/NativeWrapper.java \
classpath/gnu/java/awt/peer/qt/QMatrix.java \
classpath/gnu/java/awt/peer/qt/QPainterPath.java \
classpath/gnu/java/awt/peer/qt/QPen.java \
classpath/gnu/java/awt/peer/qt/QtAudioClip.java \
classpath/gnu/java/awt/peer/qt/QtButtonPeer.java \
classpath/gnu/java/awt/peer/qt/QtCanvasPeer.java \
classpath/gnu/java/awt/peer/qt/QtCheckboxPeer.java \
classpath/gnu/java/awt/peer/qt/QtChoicePeer.java \
classpath/gnu/java/awt/peer/qt/QtComponentGraphics.java \
classpath/gnu/java/awt/peer/qt/QtComponentPeer.java \
classpath/gnu/java/awt/peer/qt/QtContainerPeer.java \
classpath/gnu/java/awt/peer/qt/QtDialogPeer.java \
classpath/gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java \
classpath/gnu/java/awt/peer/qt/QtFileDialogPeer.java \
classpath/gnu/java/awt/peer/qt/QtFontMetrics.java \
classpath/gnu/java/awt/peer/qt/QtFontPeer.java \
classpath/gnu/java/awt/peer/qt/QtFramePeer.java \
classpath/gnu/java/awt/peer/qt/QtGraphics.java \
classpath/gnu/java/awt/peer/qt/QtGraphicsEnvironment.java \
classpath/gnu/java/awt/peer/qt/QtImage.java \
classpath/gnu/java/awt/peer/qt/QtImageConsumer.java \
classpath/gnu/java/awt/peer/qt/QtImageDirectGraphics.java \
classpath/gnu/java/awt/peer/qt/QtImageGraphics.java \
classpath/gnu/java/awt/peer/qt/QtLabelPeer.java \
classpath/gnu/java/awt/peer/qt/QtListPeer.java \
classpath/gnu/java/awt/peer/qt/QtMenuBarPeer.java \
classpath/gnu/java/awt/peer/qt/QtMenuComponentPeer.java \
classpath/gnu/java/awt/peer/qt/QtMenuItemPeer.java \
classpath/gnu/java/awt/peer/qt/QtMenuPeer.java \
classpath/gnu/java/awt/peer/qt/QtPanelPeer.java \
classpath/gnu/java/awt/peer/qt/QtPopupMenuPeer.java \
classpath/gnu/java/awt/peer/qt/QtRepaintThread.java \
classpath/gnu/java/awt/peer/qt/QtScreenDevice.java \
classpath/gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java \
classpath/gnu/java/awt/peer/qt/QtScrollPanePeer.java \
classpath/gnu/java/awt/peer/qt/QtScrollbarPeer.java \
classpath/gnu/java/awt/peer/qt/QtTextAreaPeer.java \
classpath/gnu/java/awt/peer/qt/QtTextFieldPeer.java \
classpath/gnu/java/awt/peer/qt/QtToolkit.java \
classpath/gnu/java/awt/peer/qt/QtVolatileImage.java \
classpath/gnu/java/awt/peer/qt/QtWindowPeer.java
gnu_java_beans_source_files = \
classpath/gnu/java/beans/BeanInfoEmbryo.java \
classpath/gnu/java/beans/DummyAppletContext.java \
@ -2017,6 +2062,8 @@ java_awt_datatransfer_source_files = \
classpath/java/awt/datatransfer/Clipboard.java \
classpath/java/awt/datatransfer/ClipboardOwner.java \
classpath/java/awt/datatransfer/DataFlavor.java \
classpath/java/awt/datatransfer/FlavorEvent.java \
classpath/java/awt/datatransfer/FlavorListener.java \
classpath/java/awt/datatransfer/FlavorMap.java \
classpath/java/awt/datatransfer/FlavorTable.java \
classpath/java/awt/datatransfer/MimeTypeParseException.java \
@ -2522,6 +2569,7 @@ classpath/java/lang/reflect/Proxy.java \
classpath/java/lang/reflect/ReflectPermission.java \
classpath/java/lang/reflect/Type.java \
classpath/java/lang/reflect/UndeclaredThrowableException.java \
java/lang/reflect/VMProxy.java \
classpath/java/lang/reflect/WildcardType.java
java_lang_reflect_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(java_lang_reflect_source_files)))
@ -3905,6 +3953,7 @@ classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java \
classpath/javax/swing/plaf/metal/MetalComboBoxUI.java \
classpath/javax/swing/plaf/metal/MetalDesktopIconUI.java \
classpath/javax/swing/plaf/metal/MetalIconFactory.java \
classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java \
classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java \
classpath/javax/swing/plaf/metal/MetalLabelUI.java \
classpath/javax/swing/plaf/metal/MetalLookAndFeel.java \
@ -3928,6 +3977,40 @@ classpath/javax/swing/plaf/metal/MetalTreeUI.java \
classpath/javax/swing/plaf/metal/MetalUtils.java
javax_swing_plaf_metal_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_plaf_metal_source_files)))
javax_swing_plaf_multi_source_files = \
classpath/javax/swing/plaf/multi/MultiButtonUI.java \
classpath/javax/swing/plaf/multi/MultiColorChooserUI.java \
classpath/javax/swing/plaf/multi/MultiComboBoxUI.java \
classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java \
classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java \
classpath/javax/swing/plaf/multi/MultiFileChooserUI.java \
classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java \
classpath/javax/swing/plaf/multi/MultiLabelUI.java \
classpath/javax/swing/plaf/multi/MultiListUI.java \
classpath/javax/swing/plaf/multi/MultiLookAndFeel.java \
classpath/javax/swing/plaf/multi/MultiMenuBarUI.java \
classpath/javax/swing/plaf/multi/MultiMenuItemUI.java \
classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java \
classpath/javax/swing/plaf/multi/MultiPanelUI.java \
classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java \
classpath/javax/swing/plaf/multi/MultiProgressBarUI.java \
classpath/javax/swing/plaf/multi/MultiRootPaneUI.java \
classpath/javax/swing/plaf/multi/MultiScrollBarUI.java \
classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java \
classpath/javax/swing/plaf/multi/MultiSeparatorUI.java \
classpath/javax/swing/plaf/multi/MultiSliderUI.java \
classpath/javax/swing/plaf/multi/MultiSpinnerUI.java \
classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java \
classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java \
classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java \
classpath/javax/swing/plaf/multi/MultiTableUI.java \
classpath/javax/swing/plaf/multi/MultiTextUI.java \
classpath/javax/swing/plaf/multi/MultiToolBarUI.java \
classpath/javax/swing/plaf/multi/MultiToolTipUI.java \
classpath/javax/swing/plaf/multi/MultiTreeUI.java \
classpath/javax/swing/plaf/multi/MultiViewportUI.java
javax_swing_plaf_multi_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_plaf_multi_source_files)))
javax_swing_table_source_files = \
classpath/javax/swing/table/AbstractTableModel.java \
classpath/javax/swing/table/DefaultTableCellRenderer.java \
@ -3943,11 +4026,14 @@ classpath/javax/swing/table/TableModel.java
javax_swing_table_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_table_source_files)))
javax_swing_text_source_files = \
classpath/javax/swing/text/AbstractDocument.java \
classpath/javax/swing/text/AbstractWriter.java \
classpath/javax/swing/text/AttributeSet.java \
classpath/javax/swing/text/BadLocationException.java \
classpath/javax/swing/text/BoxView.java \
classpath/javax/swing/text/Caret.java \
classpath/javax/swing/text/ChangedCharSetException.java \
classpath/javax/swing/text/ComponentView.java \
classpath/javax/swing/text/CompositeView.java \
classpath/javax/swing/text/DateFormatter.java \
classpath/javax/swing/text/DefaultCaret.java \
classpath/javax/swing/text/DefaultEditorKit.java \
@ -3958,15 +4044,22 @@ classpath/javax/swing/text/Document.java \
classpath/javax/swing/text/DocumentFilter.java \
classpath/javax/swing/text/EditorKit.java \
classpath/javax/swing/text/Element.java \
classpath/javax/swing/text/ElementIterator.java \
classpath/javax/swing/text/FieldView.java \
classpath/javax/swing/text/FlowView.java \
classpath/javax/swing/text/GapContent.java \
classpath/javax/swing/text/GlyphView.java \
classpath/javax/swing/text/Highlighter.java \
classpath/javax/swing/text/IconView.java \
classpath/javax/swing/text/InternationalFormatter.java \
classpath/javax/swing/text/JTextComponent.java \
classpath/javax/swing/text/Keymap.java \
classpath/javax/swing/text/LabelView.java \
classpath/javax/swing/text/LayeredHighlighter.java \
classpath/javax/swing/text/LayoutQueue.java \
classpath/javax/swing/text/MutableAttributeSet.java \
classpath/javax/swing/text/NavigationFilter.java \
classpath/javax/swing/text/ParagraphView.java \
classpath/javax/swing/text/PasswordView.java \
classpath/javax/swing/text/PlainDocument.java \
classpath/javax/swing/text/PlainView.java \
@ -4453,6 +4546,7 @@ all_packages_source_files = \
javax/swing/plaf.list \
javax/swing/plaf/basic.list \
javax/swing/plaf/metal.list \
javax/swing/plaf/multi.list \
javax/swing/table.list \
javax/swing/text.list \
javax/swing/text/html.list \
@ -4592,6 +4686,7 @@ ordinary_header_files = \
$(javax_swing_plaf_header_files) \
$(javax_swing_plaf_basic_header_files) \
$(javax_swing_plaf_metal_header_files) \
$(javax_swing_plaf_multi_header_files) \
$(javax_swing_table_header_files) \
$(javax_swing_text_header_files) \
$(javax_swing_text_html_header_files) \
@ -4604,6 +4699,7 @@ ordinary_header_files = \
$(org_ietf_jgss_header_files)
bc_objects = \
gnu-java-awt-peer-qt.lo \
gnu-java-beans.lo \
gnu-xml.lo \
javax-imageio.lo \
@ -4734,7 +4830,6 @@ java/lang/reflect/natArray.cc \
java/lang/reflect/natConstructor.cc \
java/lang/reflect/natField.cc \
java/lang/reflect/natMethod.cc \
java/lang/reflect/natProxy.cc \
java/net/natVMNetworkInterface.cc \
java/net/natInetAddress.cc \
java/nio/channels/natChannels.cc \
@ -5161,8 +5256,6 @@ java/lang/reflect/natField.lo: java/lang/reflect/$(am__dirstamp) \
java/lang/reflect/$(DEPDIR)/$(am__dirstamp)
java/lang/reflect/natMethod.lo: java/lang/reflect/$(am__dirstamp) \
java/lang/reflect/$(DEPDIR)/$(am__dirstamp)
java/lang/reflect/natProxy.lo: java/lang/reflect/$(am__dirstamp) \
java/lang/reflect/$(DEPDIR)/$(am__dirstamp)
java/net/$(am__dirstamp):
@$(mkdir_p) java/net
@: > java/net/$(am__dirstamp)
@ -5235,6 +5328,15 @@ sysdep/dwarf2-backtrace.lo: sysdep/$(am__dirstamp) \
sysdep/$(DEPDIR)/$(am__dirstamp)
libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
$(libgcj_la_LINK) -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(libgcj_la_OBJECTS) $(libgcj_la_LIBADD) $(LIBS)
classpath/native/jawt/$(am__dirstamp):
@$(mkdir_p) classpath/native/jawt
@: > classpath/native/jawt/$(am__dirstamp)
classpath/native/jawt/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) classpath/native/jawt/$(DEPDIR)
@: > classpath/native/jawt/$(DEPDIR)/$(am__dirstamp)
classpath/native/jawt/libgcjawt_la-jawt.lo: \
classpath/native/jawt/$(am__dirstamp) \
classpath/native/jawt/$(DEPDIR)/$(am__dirstamp)
libgcjawt.la: $(libgcjawt_la_OBJECTS) $(libgcjawt_la_DEPENDENCIES)
$(libgcjawt_la_LINK) $(am_libgcjawt_la_rpath) $(libgcjawt_la_LDFLAGS) $(libgcjawt_la_OBJECTS) $(libgcjawt_la_LIBADD) $(LIBS)
libgij.la: $(libgij_la_OBJECTS) $(libgij_la_DEPENDENCIES)
@ -5331,6 +5433,8 @@ uninstall-binSCRIPTS:
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f classpath/native/jawt/libgcjawt_la-jawt.$(OBJEXT)
-rm -f classpath/native/jawt/libgcjawt_la-jawt.lo
-rm -f gnu/classpath/natSystemProperties.$(OBJEXT)
-rm -f gnu/classpath/natSystemProperties.lo
-rm -f gnu/gcj/convert/JIS0208_to_Unicode.$(OBJEXT)
@ -5477,8 +5581,6 @@ mostlyclean-compile:
-rm -f java/lang/reflect/natField.lo
-rm -f java/lang/reflect/natMethod.$(OBJEXT)
-rm -f java/lang/reflect/natMethod.lo
-rm -f java/lang/reflect/natProxy.$(OBJEXT)
-rm -f java/lang/reflect/natProxy.lo
-rm -f java/net/natInetAddress.$(OBJEXT)
-rm -f java/net/natInetAddress.lo
-rm -f java/net/natVMNetworkInterface.$(OBJEXT)
@ -5512,7 +5614,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gij.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jni.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcjawt_la-jawt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no-threads.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nogc.Plo@am__quote@
@ -5523,6 +5624,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32-threads.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@classpath/native/jawt/$(DEPDIR)/libgcjawt_la-jawt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/$(DEPDIR)/natSystemProperties.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/$(DEPDIR)/natCore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/JIS0208_to_Unicode.Plo@am__quote@
@ -5598,7 +5700,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/reflect/$(DEPDIR)/natConstructor.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/reflect/$(DEPDIR)/natField.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/reflect/$(DEPDIR)/natMethod.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/reflect/$(DEPDIR)/natProxy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/net/$(DEPDIR)/natInetAddress.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/net/$(DEPDIR)/natVMNetworkInterface.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/nio/$(DEPDIR)/natDirectByteBufferImpl.Plo@am__quote@
@ -5635,12 +5736,12 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libgcjawt_la-jawt.lo: jawt.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcjawt_la_CFLAGS) $(CFLAGS) -MT libgcjawt_la-jawt.lo -MD -MP -MF "$(DEPDIR)/libgcjawt_la-jawt.Tpo" -c -o libgcjawt_la-jawt.lo `test -f 'jawt.c' || echo '$(srcdir)/'`jawt.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgcjawt_la-jawt.Tpo" "$(DEPDIR)/libgcjawt_la-jawt.Plo"; else rm -f "$(DEPDIR)/libgcjawt_la-jawt.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jawt.c' object='libgcjawt_la-jawt.lo' libtool=yes @AMDEPBACKSLASH@
classpath/native/jawt/libgcjawt_la-jawt.lo: classpath/native/jawt/jawt.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcjawt_la_CFLAGS) $(CFLAGS) -MT classpath/native/jawt/libgcjawt_la-jawt.lo -MD -MP -MF "classpath/native/jawt/$(DEPDIR)/libgcjawt_la-jawt.Tpo" -c -o classpath/native/jawt/libgcjawt_la-jawt.lo `test -f 'classpath/native/jawt/jawt.c' || echo '$(srcdir)/'`classpath/native/jawt/jawt.c; \
@am__fastdepCC_TRUE@ then mv -f "classpath/native/jawt/$(DEPDIR)/libgcjawt_la-jawt.Tpo" "classpath/native/jawt/$(DEPDIR)/libgcjawt_la-jawt.Plo"; else rm -f "classpath/native/jawt/$(DEPDIR)/libgcjawt_la-jawt.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='classpath/native/jawt/jawt.c' object='classpath/native/jawt/libgcjawt_la-jawt.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcjawt_la_CFLAGS) $(CFLAGS) -c -o libgcjawt_la-jawt.lo `test -f 'jawt.c' || echo '$(srcdir)/'`jawt.c
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcjawt_la_CFLAGS) $(CFLAGS) -c -o classpath/native/jawt/libgcjawt_la-jawt.lo `test -f 'classpath/native/jawt/jawt.c' || echo '$(srcdir)/'`classpath/native/jawt/jawt.c
.cc.o:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
@ -5835,6 +5936,7 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-rm -rf classpath/native/jawt/.libs classpath/native/jawt/_libs
-rm -rf gnu/classpath/.libs gnu/classpath/_libs
-rm -rf gnu/gcj/.libs gnu/gcj/_libs
-rm -rf gnu/gcj/convert/.libs gnu/gcj/convert/_libs
@ -6223,6 +6325,8 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-rm -f classpath/native/jawt/$(DEPDIR)/$(am__dirstamp)
-rm -f classpath/native/jawt/$(am__dirstamp)
-rm -f gnu/classpath/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/classpath/$(am__dirstamp)
-rm -f gnu/gcj/$(DEPDIR)/$(am__dirstamp)
@ -6286,7 +6390,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sysdep/$(DEPDIR)
-rm -rf ./$(DEPDIR) classpath/native/jawt/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sysdep/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-local distclean-tags
@ -6317,7 +6421,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sysdep/$(DEPDIR)
-rm -rf ./$(DEPDIR) classpath/native/jawt/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sysdep/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@ -6558,6 +6662,11 @@ gnu-java-awt-peer-gtk.lo: $(gnu_java_awt_peer_gtk_source_files)
$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-java-awt-peer-gtk.lo @gnu-java-awt-peer-gtk.list
@rm -f gnu-java-awt-peer-gtk.list
gnu-java-awt-peer-qt.lo: $(gnu_java_awt_peer_qt_source_files)
@find classpath/lib/gnu/java/awt/peer/qt -name '*.class' > gnu-java-awt-peer-qt.list
$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-java-awt-peer-qt.lo @gnu-java-awt-peer-qt.list
@rm -f gnu-java-awt-peer-qt.list
gnu-java-beans.lo: $(gnu_java_beans_source_files)
@find classpath/lib/gnu/java/beans -name '*.class' > gnu-java-beans.list
$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-java-beans.lo @gnu-java-beans.list
@ -7713,6 +7822,16 @@ javax/swing/plaf/metal.list: $(javax_swing_plaf_metal_source_files)
-include javax/swing/plaf/metal.deps
javax/swing/plaf/multi.list: $(javax_swing_plaf_multi_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_swing_plaf_multi_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > javax/swing/plaf/multi.list
-include javax/swing/plaf/multi.deps
javax/swing/table.list: $(javax_swing_table_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_swing_table_source_files); do \

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="compat/|examples/|external/|gnu/javax/swing/plaf/|test/|testsuite/|vm/reference/" kind="src" path="">
<attributes>
</attributes>
</classpathentry>
<classpathentry kind="src" path="vm/reference">
<attributes>
</attributes>
</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"/>
<classpathentry excluding="compat/|examples/|external/|gnu/classpath/jdwp/|gnu/javax/swing/plaf/|test/|testsuite/|vm/reference/|resource/" kind="src" path=""/>
<classpathentry kind="src" path="resource"/>
<classpathentry excluding="gnu/classpath/jdwp/" kind="src" path="vm/reference"/>
<classpathentry kind="src" path="external/sax"/>
<classpathentry kind="src" path="external/w3c_dom"/>
<classpathentry kind="src" path="examples"/>
<classpathentry kind="output" path="install/share/classpath"/>
</classpath>

View file

@ -9,3 +9,4 @@ Makefile
stamp-h
stamp-h.in
autom4te*.cache
install

View file

@ -1,10 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<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>
<?xml version='1.0'?>
<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>

View file

@ -25,6 +25,26 @@
</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/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>
<arguments>

View file

@ -20,6 +20,7 @@ Michael Koch (konqueror@gmx.de)
John Keiser (jkeiser@iname.com)
John Leuner (jewel@debian.org)
Warren Levy (warrenl@cygnus.com)
Sven de Marothy (sven@physto.se)
Bryce McKinlay (bryce@waitaki.otago.ac.nz)
Audrius Meskauskas (audriusa@Bioinformatics.org)
Aaron M. Renn (arenn@urbanophile.com)

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,7 @@
2005-09-23 Tom Tromey <tromey@redhat.com>
Imported Classpath 0.18.
2005-08-23 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.

View file

@ -1,4 +1,4 @@
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
active development and debugging, or just like running random alpha code,
@ -28,11 +28,12 @@ Suggested Software
For building the Java bytecode (.class files), one of these
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.
- GCJ 3.3+ (part of the GNU GCC package).
- IBM jikes 1.19+.
- Eclipse Compiler for Java 3.1+
- The kjc compiler is supported with configure but we have
been unable to successfully compile with it.
@ -48,7 +49,18 @@ Suggested Software
For building the Cairo GdkGraphics2D backend you need at least
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:
- The XML C library for Gnome (libxml2)
http://www.xmlsoft.org/
@ -74,6 +86,11 @@ gives a complete list.
--enable-jni compile JNI source default=yes
--enable-gtk-peer compile GTK native peers default=yes
--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
--with-jikes to compile the class library using jikes
the default is to use gcj
@ -83,7 +100,7 @@ gives a complete list.
any compiler warning into a compilation failure
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
path to the jay executable

View file

@ -4,6 +4,7 @@
SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
DIST_SUBDIRS = lib doc external include native resource scripts examples
## GCJ LOCAL: we need an extra -I here.
ACLOCAL_AMFLAGS = -I m4 -I ../..
native: lib

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -107,8 +107,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -170,6 +176,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -181,12 +188,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -208,10 +216,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -316,13 +327,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -334,7 +339,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -342,13 +347,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -369,7 +368,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -444,7 +443,7 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_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'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \

View file

@ -1,3 +1,86 @@
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)
* gnu.xml fix for nodes created outside a namespace context.

View file

@ -1,4 +1,4 @@
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
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:
* IKVM.NET (http://www.ikvm.net/)
* JC (http://jcvm.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
GNU Classpath website: http://www.gnu.org/software/classpath/stories.html

View file

@ -1,7 +1,7 @@
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -11,11 +11,23 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# -*- Autoconf -*-
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# Generated from amversion.in; do not edit by hand.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@ -28,15 +40,26 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.5])])
[AM_AUTOMAKE_VERSION([1.9.3])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# AM_AUX_DIR_EXPAND
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@ -83,16 +106,26 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# serial 7
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@ -116,15 +149,26 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# serial 7 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@ -133,6 +177,7 @@ fi])])
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
@ -272,16 +317,27 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#serial 3
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@ -340,20 +396,31 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Do all the work for Automake. -*- Autoconf -*-
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# This macro actually does too much. Some checks are only needed if
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 11
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@ -454,27 +521,51 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# -*- Autoconf -*-
# Copyright (C) 2003 Free Software Foundation, Inc.
# serial 2
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
@ -489,17 +580,28 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@ -518,15 +620,26 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# serial 3
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
@ -570,16 +683,27 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@ -605,16 +729,27 @@ else
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
@ -668,15 +803,26 @@ else
fi
AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*-
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# serial 3
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@ -701,11 +847,22 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -*- Autoconf -*-
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# AM_RUN_LOG(COMMAND)
# -------------------
@ -718,16 +875,28 @@ AC_DEFUN([AM_RUN_LOG],
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Check to make sure that the build environment is sane.
#
# serial 4
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_SANITY_CHECK
# ---------------
@ -770,14 +939,25 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@ -800,13 +980,25 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 2004 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------

View file

@ -12,16 +12,9 @@ FILE=java/lang/Object.java
DIE=0
case `uname -s` in
Darwin)
LIBTOOLIZE=glibtoolize
;;
*)
LIBTOOLIZE=libtoolize
;;
esac
LIBTOOLIZE=libtoolize
have_libtool=true
have_libtool=false
if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`${LIBTOOLIZE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in
@ -35,6 +28,9 @@ if $have_libtool ; then : ; else
echo "You must have libtool 1.5 installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
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
fi

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )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_CANONICAL_TARGET
@ -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 -----------------------------------------------------------
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_PREREQ(2.59)
@ -128,6 +137,19 @@ if test "x${GTK_CAIRO_ENABLED}" = xtrue; then
fi
AM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue)
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 -----------------------------------------------------------
@ -147,7 +169,7 @@ AC_PROG_INSTALL
dnl -----------------------------------------------------------
dnl Checks for programs.
dnl -----------------------------------------------------------
dnl AC_PROG_CXX
AC_PROG_CXX
dnl Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@ -175,7 +197,8 @@ if test "x${COMPILE_JNI}" = xyes; then
sys/time.h \
sys/select.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, 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
recvfrom send sendto setsockopt getsockopt time mktime \
localtime_r \
strerror_r \
fcntl])
fcntl \
mmap munmap mincore msync madvise getpagesize sysconf])
AC_HEADER_TIME
AC_STRUCT_TM
@ -271,6 +295,24 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_SUBST(GTK_LIBS)
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
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
@ -380,7 +422,6 @@ AC_SUBST(REMOVE)
dnl -----------------------------------------------------------
dnl This is probably useless.
dnl -----------------------------------------------------------
AC_PATH_PROG(SH, sh)
AC_PATH_PROG(MKDIR, mkdir)
AC_PATH_PROG(CP, cp)
AC_PATH_PROG(DATE, date)
@ -437,6 +478,7 @@ gnu/classpath/Configuration.java
include/Makefile
native/Makefile
native/fdlibm/Makefile
native/jawt/Makefile
native/jni/Makefile
native/jni/classpath/Makefile
native/jni/java-io/Makefile
@ -445,6 +487,7 @@ native/jni/java-net/Makefile
native/jni/java-nio/Makefile
native/jni/java-util/Makefile
native/jni/gtk-peer/Makefile
native/jni/qt-peer/Makefile
native/jni/xmlj/Makefile
native/target/Makefile
native/target/Linux/Makefile
@ -454,6 +497,7 @@ scripts/Makefile
scripts/classpath.spec
lib/Makefile
lib/gen-classlist.sh
examples/Makefile])
examples/Makefile
examples/Makefile.jawt])
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
AC_OUTPUT

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -287,13 +298,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -340,7 +339,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

View file

@ -17,6 +17,7 @@ PACKAGES
. gnu.xml.xpath.* ... JAXP XPath implementation
. gnu.xml.transform.* ... JAXP XSL transformer implementation
. gnu.xml.pipeline.* ... SAX2 event pipeline support
. gnu.xml.stream.* ... StAX pull parser implementation
. gnu.xml.util.* ... various XML utility classes
. gnu.xml.libxmlj.dom.* ... libxmlj DOM Level 3 Core and XPath
. gnu.xml.libxmlj.sax.* ... libxmlj SAX parser
@ -133,6 +134,11 @@ To enable the various GNU JAXP factories, set the following system properties
GNU XSL transformer:
-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:
-Djavax.xml.parsers.SAXParserFactory=gnu.xml.libxmlj.sax.GnomeSAXParserFactory

View file

@ -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))"
if CREATE_API_DOCS
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
@list='$(htmllist)'; for p in $$list; do \
@ -26,6 +27,7 @@ uninstall-local:
rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \
done
endif
html: create_html

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -84,8 +84,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -147,6 +153,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -158,12 +165,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -185,10 +193,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -335,6 +346,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@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-am: clean-generic clean-libtool clean-local mostlyclean-am
@ -391,26 +404,26 @@ uninstall-am: uninstall-info-am uninstall-local
uninstall-local
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
@list='$(htmllist)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
if test -f "$$p"; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f; \
elif test -d "$$p"; then \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \
done
@CREATE_API_DOCS_TRUE@install-data-local:
@CREATE_API_DOCS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
@CREATE_API_DOCS_TRUE@ @list='$(htmllist)'; for p in $$list; do \
@CREATE_API_DOCS_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \
@CREATE_API_DOCS_TRUE@ if test -f "$$p"; then \
@CREATE_API_DOCS_TRUE@ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f"; \
@CREATE_API_DOCS_TRUE@ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f; \
@CREATE_API_DOCS_TRUE@ elif test -d "$$p"; then \
@CREATE_API_DOCS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api/$$f; \
@CREATE_API_DOCS_TRUE@ fi; \
@CREATE_API_DOCS_TRUE@ done
uninstall-local:
@list='$(htmllist)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
if test -f "$$p"; then \
echo " rm -f $(DESTDIR)$(pkgdatadir)/api/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
fi; \
done
@CREATE_API_DOCS_TRUE@uninstall-local:
@CREATE_API_DOCS_TRUE@ @list='$(htmllist)'; for p in $$list; do \
@CREATE_API_DOCS_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \
@CREATE_API_DOCS_TRUE@ if test -f "$$p"; then \
@CREATE_API_DOCS_TRUE@ echo " rm -f $(DESTDIR)$(pkgdatadir)/api/$$f"; \
@CREATE_API_DOCS_TRUE@ rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
@CREATE_API_DOCS_TRUE@ fi; \
@CREATE_API_DOCS_TRUE@ done
html: create_html

View file

@ -9,17 +9,59 @@
<boxitem>
<strong>Upcoming Events:</strong><br>
<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>
</boxitem>
<boxitem>
<strong>Past Events:</strong><br>
<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">]
<p>
<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>
<br><br><br>
</boxitem>

View file

@ -304,6 +304,28 @@ be a bit picky about getting signatures from all contributors. Please do
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>
<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>

View file

@ -105,7 +105,7 @@
<menutitle>Savannah</menutitle>
<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="Patches" url="http://savannah.gnu.org/patch/?group=classpath"></menuitem>

View file

@ -1,3 +1,13 @@
<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">
<createlink name="GNU Classpath 0.17"
url="announce/20050715.html">

View file

@ -1,2 +1,3 @@
Makefile
examples.zip
Makefile.jawt

View file

@ -22,6 +22,9 @@ endif
# All our example java source files
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.
EXAMPLE_ZIP = examples.zip
@ -31,6 +34,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
# the png icons we use in some of the examples.
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.
example_DATA = $(EXAMPLE_ZIP) README
@ -41,7 +47,7 @@ exampledir = $(pkgdatadir)/examples
# (Be careful to strip off the srcdir part of the path when installing.)
install-data-local:
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-`; \
fdir=`dirname $$f`; \
if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \
@ -51,20 +57,24 @@ install-data-local:
echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done
echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/"
$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/
uninstall-local:
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-`; \
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt"
rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt
# Make sure everything is included in the distribution.
EXTRA_DIST = README
EXTRA_DIST = README Makefile.jawt.in
dist-hook:
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-`; \
fdir=`dirname $$f`; \
if test ! -d $(distdir)/$$fdir; then \
@ -87,4 +97,4 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
# Zip file be gone! (and make sure the classes are gone too)
clean-local:
rm -f $(EXAMPLE_ZIP) classes
rm -rf $(EXAMPLE_ZIP) classes

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -38,7 +38,8 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
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
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
@ -49,7 +50,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = Makefile.jawt
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@ -92,8 +93,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -155,6 +162,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -166,12 +174,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -193,10 +202,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -246,6 +258,9 @@ vm_classes = @vm_classes@
# All our example java source files
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.
EXAMPLE_ZIP = examples.zip
@ -255,6 +270,9 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
# the png icons we use in some of the examples.
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.
example_DATA = $(EXAMPLE_ZIP) README
@ -262,7 +280,7 @@ example_DATA = $(EXAMPLE_ZIP) README
exampledir = $(pkgdatadir)/examples
# Make sure everything is included in the distribution.
EXTRA_DIST = README
EXTRA_DIST = README Makefile.jawt.in
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -296,6 +314,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
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:
-rm -f *.lo
@ -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.)
install-data-local:
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-`; \
fdir=`dirname $$f`; \
if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \
@ -468,17 +488,21 @@ install-data-local:
echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done
echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/"
$(INSTALL_DATA) Makefile.jawt $(DESTDIR)/$(pkgdatadir)/examples/
uninstall-local:
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-`; \
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \
rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \
done
echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt"
rm -f $(DESTDIR)/$(pkgdatadir)/examples/Makefile.jawt
dist-hook:
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-`; \
fdir=`dirname $$f`; \
if test ! -d $(distdir)/$$fdir; then \
@ -501,7 +525,7 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
# Zip file be gone! (and make sure the classes are gone too)
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.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -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:
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
Or with a traditional byte code interpreter like:
@ -22,6 +23,29 @@ run as follows:
kaffe -classpath examples.zip gnu.classpath.examples.awt.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).
The example icons used in some of the examples come from gnome-icon-theme

View file

@ -141,6 +141,8 @@ public class Demo
preferences.add(new JCheckBoxMenuItem("Check Spelling",
stockIcon("spell-check")));
preferences.add(new JCheckBoxMenuItem("World Peace"));
preferences.add(new JSeparator());
preferences.add(new JRadioButtonMenuItem("Radio Button"));
edit.add(preferences);
JMenu examples = new JMenu("Examples");
@ -493,6 +495,7 @@ public class Demo
final JTree tree = new JTree(root);
tree.setLargeModel(true);
tree.setEditable(true);
DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
tree.setSelectionModel(dtsm);
@ -501,7 +504,6 @@ public class Demo
JButton add = mkButton("add element");
add.addActionListener(new ActionListener()
{
int i = 0;
public void actionPerformed(ActionEvent e)
{
for (int i = 0; i < tree.getRowCount(); i++)
@ -641,6 +643,29 @@ public class Demo
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()
{
JTabbedPane tabs = new JTabbedPane();
@ -649,6 +674,7 @@ public class Demo
tabs.add("List world!", mkListWorld());
tabs.add("Desktop world!", mkDesktopWorld());
tabs.add("Tree world!", mkTreeWorld());
tabs.add("Tab world!", mkTabWorld());
return tabs;
}
@ -658,6 +684,8 @@ public class Demo
slider.setPaintTrack(true);
slider.setPaintTicks(true);
slider.setMajorTickSpacing(30);
slider.setMinorTickSpacing(5);
slider.setPaintLabels(true);
slider.setInverted(false);
JProgressBar progress = new JProgressBar();
BoundedRangeModel model = new DefaultBoundedRangeModel(10, 1, 0, 100);
@ -1063,7 +1091,13 @@ public class Demo
JButton exitDisposer = mkDisposerButton(frame);
panel.add(exitDisposer);
exitDisposer.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.exit(1);
}
});
return panel;
}

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -91,8 +91,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -154,6 +160,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -165,12 +172,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -192,10 +200,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -287,13 +298,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -305,7 +310,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -313,13 +318,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -340,7 +339,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -82,8 +82,14 @@ CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
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_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
@ -145,6 +151,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -156,12 +163,13 @@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
PANGOFT2_LIBS = @PANGOFT2_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
REMOVE = @REMOVE@
SET_MAKE = @SET_MAKE@
SH = @SH@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
@ -183,10 +191,13 @@ X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZIP = @ZIP@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@

View file

@ -46,6 +46,7 @@ import org.omg.CORBA.DataOutputStream;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.StringSeqHelper;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
@ -55,6 +56,8 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Method;
/**
* A specialised class for reading and writing the value types.
*
@ -222,7 +225,7 @@ public abstract class Vio
throw new MARSHAL("Unable to instantiate the value type");
else
{
read_instance(input, ox, value_tag);
read_instance(input, ox, value_tag, null);
return (Serializable) ox;
}
}
@ -285,7 +288,7 @@ public abstract class Vio
}
}
read_instance(input, ox, value_tag);
read_instance(input, ox, value_tag, null);
return (Serializable) ox;
}
catch (Exception ex)
@ -301,17 +304,22 @@ public abstract class Vio
* an instance.
*
* @param input a stream to read from.
* @param value_instance an instance of the value.
*
* @param value_instance an pre-created instance of the value. If the
* helper is not null, this parameter is ignored an should be null.
*
* @param helper a helper to create an instance and read the object-
* specific part of the record. If the value_instance is used instead,
* this parameter should be null.
*
* @return the loaded value.
*
* @throws MARSHAL if the reading has failed due any reason.
*/
public static Serializable read(InputStream input, Serializable value_instance)
public static Object read(InputStream input, Object value_instance,
Object helper
)
{
// Explicitly prevent the stream from closing as we may need
// to read the subsequent bytes as well. Stream may be auto-closed
// in its finalizer.
try
{
int value_tag = input.read_long();
@ -345,8 +353,9 @@ public abstract class Vio
}
}
read_instance(input, value_instance, value_tag);
return (Serializable) value_instance;
value_instance =
read_instance(input, value_instance, value_tag, helper);
return value_instance;
}
catch (Exception ex)
{
@ -354,6 +363,23 @@ public abstract class Vio
}
}
/**
* Read using provided boxed value helper. This method expects
* the full value type header, followed by contents, that are
* delegated to the provided helper. It handles null.
*
* @param input the stream to read from.
* @param helper the helper that reads the type-specific part of
* the content.
*
* @return the value, created by the helper, or null if the
* header indicates that null was previously written.
*/
public static Serializable read(InputStream input, Object helper)
{
return (Serializable) read(input, null, helper);
}
/**
* Fill in the instance fields by the data from the input stream.
* The method assumes that the value header, if any, is already
@ -361,12 +387,20 @@ public abstract class Vio
* passed ox parameter.
*
* @param input an input stream to read from.
* @param value a value type object, must be either Streamable or
* CustomMarshal.
*
* @param value a pre-instantiated value type object, must be either
* Streamable or CustomMarshal. If the helper is used, this parameter
* is ignored and should be null.
*
* @param value_tag the tag that must be read previously.
* @param helper the helper for read object specific part; may be
* null to read in using other methods.
*
* @return the value that was read.
*/
public static void read_instance(InputStream input, Object value,
int value_tag
)
private static Object read_instance(InputStream input, Object value,
int value_tag, Object helper
)
{
try
{
@ -377,7 +411,7 @@ public abstract class Vio
// Read all chunks.
int chunk_size = input.read_long();
if (chunk_size <= 0)
if (chunk_size < 0)
throw new MARSHAL("Invalid first chunk size " + chunk_size);
byte[] r = new byte[ chunk_size ];
@ -412,12 +446,29 @@ public abstract class Vio
// More than one chunk was present.
// Add the last chunk.
bout.write(r, 0, n);
input = new cdrBufInput(bout.toByteArray());
input = new noHeaderInput(bout.toByteArray());
}
else
{
// Only one chunk was present.
input = new cdrBufInput(r);
input = new noHeaderInput(r);
}
}
else
{
if (input instanceof cdrBufInput)
{
// Highly probable case.
input =
new noHeaderInput(((cdrBufInput) input).buffer.getBuffer());
}
else
{
cdrBufOutput bout = new cdrBufOutput();
int c;
while ((c = input.read()) >= 0)
bout.write((byte) c);
input = new noHeaderInput(bout.buffer.toByteArray());
}
}
}
@ -447,12 +498,17 @@ public abstract class Vio
{
((Streamable) value)._read(input);
}
else if (helper instanceof BoxedValueHelper)
value = ((BoxedValueHelper) helper).read_value(input);
else if (helper instanceof ValueFactory)
value =
((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input);
else
// Stating the interfaces that the USER should use.
throw new MARSHAL("The " + value.getClass().getName() +
" must implement either StreamableValue or CustomValue."
);
" must implement either StreamableValue or CustomValue."
);
// The negative end of state marker is expected from OMG standard.
// If the chunking is used, this marker is already extracted.
@ -462,6 +518,8 @@ public abstract class Vio
if (eor >= 0)
throw new MARSHAL("End of state marker has an invalid value " + eor);
}
return value;
}
/**
@ -504,8 +562,8 @@ public abstract class Vio
* @throws MARSHAL if the writing failed due any reason.
*/
public static void write(OutputStream output, Serializable value,
Class substitute
)
Class substitute
)
{
// Write null if this is a null value.
if (value == null)
@ -527,7 +585,35 @@ public abstract class Vio
if (value == null)
output.write_long(vt_NULL);
else
write_instance(output, value, id);
write_instance(output, value, id, null);
}
/**
* Write standard value type header, followed by contents, produced
* by the boxed value helper.
*
* @param output the stream to write to.
* @param value the value to write, can be null.
* @param helper the helper that writes the value content if it is
* not null.
*/
public static void write(OutputStream output, Serializable value,
Object helper
)
{
if (value == null)
output.write_long(vt_NULL);
else
{
String id;
if (helper instanceof BoxedValueHelper)
id = ((BoxedValueHelper) helper).get_id();
else
id = "";
write_instance(output, value, id, helper);
}
}
/**
@ -537,10 +623,12 @@ public abstract class Vio
* @param output an output stream to write into.
* @param value a value to write.
* @param id a value repository id.
* @param helper a helper, writing object - specifica part. Can be null
* if the value should be written unsing other methods.
*/
private static void write_instance(OutputStream output, Serializable value,
String id
)
String id, Object helper
)
{
// This implementation always writes a single repository id.
// It never writes multiple repository ids and currently does not use
@ -563,6 +651,11 @@ public abstract class Vio
output.write_long(value_tag);
output.write_string(id);
if (helper instanceof BoxedValueHelper)
{
((BoxedValueHelper) helper).write_value(outObj, value);
}
else
// User defince write method is present.
if (value instanceof CustomMarshal)
{
@ -580,11 +673,36 @@ public abstract class Vio
((Streamable) value)._write(outObj);
}
else
{
// Try to find helper via class loader.
boolean ok = false;
try
{
Class helperClass = Class.forName(ObjectCreator.toHelperName(id));
// Stating the interfaces that the USER should use.
throw new MARSHAL("The " + value.getClass().getName() +
" must implement either StreamableValue or CustomValue."
);
// It will be the helper for the encapsulated boxed value, not the
// for the global boxed value type itself.
Method write =
helperClass.getMethod("write",
new Class[]
{
org.omg.CORBA.portable.OutputStream.class, value.getClass()
}
);
write.invoke(null, new Object[] { outObj, value });
ok = true;
}
catch (Exception ex)
{
ok = false;
}
// Stating the interfaces that the USER should use.
if (!ok)
throw new MARSHAL("The " + value.getClass().getName() +
" must implement either StreamableValue" + " or CustomValue."
);
}
if (USE_CHUNKING)
{
@ -611,8 +729,7 @@ public abstract class Vio
*
* @throws NO_IMPLEMENT, always.
*/
private static void incorrect_plug_in(Throwable ex)
throws NO_IMPLEMENT
static void incorrect_plug_in(Throwable ex) throws NO_IMPLEMENT
{
NO_IMPLEMENT no = new NO_IMPLEMENT("Incorrect CORBA plug-in");
no.initCause(ex);
@ -629,10 +746,11 @@ public abstract class Vio
private static final void checkTag(int value_tag)
{
if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) &&
value_tag != vt_NULL && value_tag != vt_INDIRECTION
)
value_tag != vt_NULL &&
value_tag != vt_INDIRECTION
)
throw new MARSHAL("Invalid value record, unsupported header tag: " +
value_tag
);
value_tag
);
}
}

View file

@ -1180,7 +1180,8 @@ public abstract class cdrInput
}
// 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)
{

View file

@ -41,6 +41,7 @@ package gnu.CORBA.CDR;
import gnu.CORBA.BigDecimalHelper;
import gnu.CORBA.GIOP.CharSets_OSF;
import gnu.CORBA.GIOP.cxCodeSet;
import gnu.CORBA.Poa.gnuServantObject;
import gnu.CORBA.IOR;
import gnu.CORBA.Simple_delegate;
import gnu.CORBA.TypeCodeHelper;
@ -99,7 +100,7 @@ public abstract class cdrOutput
/**
* The GIOP version.
*/
protected Version giop = new Version(1, 0);
protected Version giop = new Version(1, 2);
/**
* The code set information.
@ -327,6 +328,15 @@ public abstract class cdrOutput
IOR.write_null(this);
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)
{
Delegate d = ((ObjectImpl) x)._get_delegate();

View file

@ -60,11 +60,14 @@ public class Connected_objects
/**
* 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;
port = _port;
key = _key;
identity = an_identity;
}
/**
@ -82,6 +85,12 @@ public class Connected_objects
*/
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)
{
if (other instanceof cObject)
@ -118,17 +127,23 @@ public class Connected_objects
*/
public cObject getKey(org.omg.CORBA.Object stored_object)
{
Map.Entry item;
Iterator iter = objects.entrySet().iterator();
cObject ref;
while (iter.hasNext())
synchronized (objects)
{
item = (Map.Entry) iter.next();
ref = (cObject) item.getValue();
if (stored_object.equals(ref.object))
return ref;
Map.Entry item;
Iterator iter = objects.entrySet().iterator();
cObject 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;
}
@ -144,7 +159,7 @@ public class Connected_objects
*/
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
* @param port the port, on that the ORB will be listening on the
* 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);
objects.put(key, rec);
cObject rec = new cObject(object, port, key, identity);
synchronized (objects)
{
objects.put(key, rec);
}
return rec;
}
@ -171,12 +191,14 @@ public class Connected_objects
*/
public cObject get(byte[] key)
{
return (cObject) objects.get(key);
synchronized (objects)
{
return (cObject) objects.get(key);
}
}
/**
* Get the map entry set.
* @return
*/
public Set entrySet()
{
@ -190,9 +212,12 @@ public class Connected_objects
*/
public void remove(org.omg.CORBA.Object object)
{
cObject ref = getKey(object);
if (ref != null)
objects.remove(ref.key);
synchronized (objects)
{
cObject ref = getKey(object);
if (ref != null)
objects.remove(ref.key);
}
}
/**

View file

@ -46,9 +46,8 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
/**
* The name-value pair holder. The {@link NameValuePair} has no standard
* holder defined, but it is needed to store the {@link NameValuePair} into
* {@link Any}.
* The name-value pair holder. The {@link NameValuePair} has no standard holder
* defined, but it is needed to store the {@link NameValuePair} into {@link Any}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
@ -92,4 +91,4 @@ public class NameValuePairHolder
{
NameValuePairHelper.write(output, value);
}
}
}

View file

@ -145,14 +145,11 @@ public class ExceptionCreator
{
try
{
String holder = toHelperName(idl);
System.out.println("Helper " + holder);
Class holderClass = Class.forName(holder);
String helper = toHelperName(idl);
Class helperClass = Class.forName(helper);
Method read =
holderClass.getMethod("read",
helperClass.getMethod("read",
new Class[]
{
org.omg.CORBA.portable.InputStream.class

File diff suppressed because it is too large Load diff

View file

@ -41,13 +41,13 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput;
/**
* The header of the standard reply.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class ReplyHeader
extends contextSupportingHeader
{
/**
* Reply status, if no exception occured.
@ -65,9 +65,8 @@ public abstract class ReplyHeader
public static final int SYSTEM_EXCEPTION = 2;
/**
* Reply status, if the client ORB must re - send
* the request to another destination. The body
* contains IOR.
* Reply status, if the client ORB must re - send the request to another
* destination. The body contains IOR.
*/
public static final int LOCATION_FORWARD = 3;
@ -83,16 +82,6 @@ public abstract class ReplyHeader
*/
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.
*/
@ -110,19 +99,19 @@ public abstract class ReplyHeader
{
switch (reply_status)
{
case NO_EXCEPTION :
case NO_EXCEPTION:
return "ok";
case USER_EXCEPTION :
case USER_EXCEPTION:
return "user exception";
case SYSTEM_EXCEPTION :
case SYSTEM_EXCEPTION:
return "system exception";
case LOCATION_FORWARD :
case LOCATION_FORWARD:
return "moved";
default :
default:
return null;
}
}

View file

@ -41,7 +41,6 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput;
import org.omg.CORBA.portable.IDLEntity;
/**
@ -50,13 +49,13 @@ import org.omg.CORBA.portable.IDLEntity;
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class RequestHeader
extends contextSupportingHeader
implements IDLEntity
{
/**
* The currently free request id. This field is incremented
* each time the new request header is constructed. To facilitate
* error detection, the first free id is equal to 0x01234567
* (19088743).
* The currently free request id. This field is incremented each time the new
* request header is constructed. To facilitate error detection, the first
* free id is equal to 0x01234567 (19088743).
*/
private static int freeId = 0x01234567;
@ -71,23 +70,17 @@ public abstract class RequestHeader
public byte[] object_key;
/**
* A value identifying the requesting principal.
* Initialised into a single zero byte.
* A value identifying the requesting principal. Initialised into a single
* zero byte.
*
* @deprecated by CORBA 2.2.
*/
public byte[] requesting_principal;
/**
* Contains the ORB service data being passed. Initialised as the
* zero size array by default.
*/
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.
* 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();
@ -97,10 +90,9 @@ public abstract class RequestHeader
protected boolean response_expected = true;
/**
* Get next free request id. The value of the free request
* id starts from 0x02345678, it is incremented each time this
* function is called and is reset to 1 after reaching
* Integer.MAX_VALUE.
* Get next free request id. The value of the free request id starts from
* 0x02345678, it is incremented each time this function is called and is
* reset to 1 after reaching Integer.MAX_VALUE.
*
* @return the next free request id.
*/
@ -126,15 +118,15 @@ public abstract class RequestHeader
public abstract boolean isResponseExpected();
/**
* Converts an byte array into hexadecimal string values.
* Used in various toString() methods.
* Converts an byte array into hexadecimal string values. Used in various
* toString() methods.
*/
public String bytes(byte[] array)
{
StringBuffer b = new StringBuffer();
for (int i = 0; i < array.length; i++)
{
b.append(Integer.toHexString(array [ i ] & 0xFF));
b.append(Integer.toHexString(array[i] & 0xFF));
b.append(" ");
}
return b.toString();
@ -158,4 +150,5 @@ public abstract class RequestHeader
* @param out a stream to write into.
*/
public abstract void write(cdrOutput out);
}

View file

@ -41,7 +41,9 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.cdrInput;
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;
/**
@ -53,14 +55,38 @@ public class ServiceContext
implements IDLEntity
{
/**
* The context data.
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* 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;
/**
* The context_data.
*/
public byte[] context_data;
/**
* The context id.
* Crete unitialised instance.
*/
public int context_id;
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.
@ -73,13 +99,13 @@ public class ServiceContext
switch (id)
{
case cxCodeSet.ID :
case cxCodeSet.ID:
cxCodeSet codeset = new cxCodeSet();
codeset.readContext(istream);
return codeset;
default :
default:
ServiceContext ctx = new ServiceContext();
ctx.context_id = id;
@ -94,9 +120,9 @@ public class ServiceContext
public static ServiceContext[] readSequence(cdrInput istream)
{
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++)
value [ i ] = read(istream);
value[i] = read(istream);
return value;
}
@ -118,7 +144,99 @@ public class ServiceContext
{
ostream.write_long(value.length);
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
*/
public String toString()
{
return "ctx "+context_id+", size "+context_data.length;
return "ctx " + context_id + ", size " + context_data.length;
}
}

View file

@ -40,11 +40,11 @@ package gnu.CORBA.GIOP.v1_0;
import gnu.CORBA.CDR.cdrInput;
import gnu.CORBA.CDR.cdrOutput;
import org.omg.CORBA.portable.IDLEntity;
import gnu.CORBA.GIOP.ServiceContext;
import gnu.CORBA.GIOP.cxCodeSet;
import org.omg.CORBA.portable.IDLEntity;
/**
* The GIOP 1.0 request message.
*

View file

@ -47,22 +47,29 @@ import gnu.CORBA.GIOP.cxCodeSet;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.ULongSeqHelper;
import org.omg.IOP.TAG_INTERNET_IOP;
import org.omg.IOP.TAG_MULTIPLE_COMPONENTS;
import org.omg.IOP.TaggedComponent;
import org.omg.IOP.TaggedComponentHelper;
import org.omg.IOP.TaggedProfile;
import org.omg.IOP.TaggedProfileHelper;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
/**
* The implementaton of the Interoperable Object Reference (IOR).
* IOR can be compared with the Internet address for a web page,
* it provides means to locate the CORBA service on the web.
* IOR contains the host address, port number, the object identifier
* (key) inside the server, the communication protocol version,
* supported charsets and so on.
* The implementaton of the Interoperable Object Reference (IOR). IOR can be
* compared with the Internet address for a web page, it provides means to
* locate the CORBA service on the web. IOR contains the host address, port
* number, the object identifier (key) inside the server, the communication
* protocol version, supported charsets and so on.
*
* Ths class provides method for encoding and
* decoding the IOR information from/to the stringified references,
* usually returned by {@link org.omg.CORBA.ORB#String object_to_string()}.
* Ths class provides method for encoding and decoding the IOR information
* from/to the stringified references, usually returned by
* {@link org.omg.CORBA.ORB#String object_to_string()}.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*
@ -72,10 +79,22 @@ import java.io.IOException;
public class IOR
{
/**
* The code sets profile.
* The code sets tagged component, normally part of the Internet profile. This
* compone consists of the two componenets itself.
*/
public static class CodeSets_profile
{
public CodeSets_profile()
{
int[] supported = CharSets_OSF.getSupportedCharSets();
narrow.native_set = CharSets_OSF.NATIVE_CHARACTER;
narrow.conversion = supported;
wide.native_set = CharSets_OSF.NATIVE_WIDE_CHARACTER;
wide.conversion = supported;
}
/**
* The code set component.
*/
@ -112,7 +131,7 @@ public class IOR
b.append(" conversion ");
for (int i = 0; i < conversion.length; i++)
{
b.append(name(conversion [ i ]));
b.append(name(conversion[i]));
b.append(' ');
}
}
@ -131,8 +150,8 @@ public class IOR
private String name(int set)
{
return "0x" + Integer.toHexString(set) + " (" +
CharSets_OSF.getName(set) + ") ";
return "0x" + Integer.toHexString(set) + " ("
+ CharSets_OSF.getName(set) + ") ";
}
}
@ -201,7 +220,7 @@ public class IOR
/**
* The internet profile.
*/
public static class Internet_profile
public class Internet_profile
{
/**
* The agreed tag for the Internet profile.
@ -223,6 +242,18 @@ public class IOR
*/
public int port;
/**
* The code sets component in the internet profile of this IOR. This is not
* a separate profile.
*/
public CodeSets_profile CodeSets = new CodeSets_profile();
/**
* Reserved for all components of this profile, this array holds the
* components other than code set components.
*/
ArrayList components = new ArrayList();
/**
* Return the human readable representation.
*/
@ -235,21 +266,62 @@ public class IOR
b.append(" (v");
b.append(version);
b.append(")");
if (components.size() > 0)
b.append(" " + components.size() + " extra components.");
return b.toString();
}
/**
* Write the internet profile (except the heading tag.
*/
public void write(cdrOutput out)
{
try
{
// Need to write the Internet profile into the separate
// stream as we must know the size in advance.
cdrOutput b = out.createEncapsulation();
version.write(b);
b.write_string(host);
b.write_ushort((short) (port & 0xFFFF));
// Write the object key.
b.write_long(key.length);
b.write(key);
// Number of the tagged components.
b.write_long(1 + components.size());
b.write_long(CodeSets_profile.TAG_CODE_SETS);
CodeSets.write(b);
TaggedComponent t;
for (int i = 0; i < components.size(); i++)
{
t = (TaggedComponent) components.get(i);
TaggedComponentHelper.write(b, t);
}
b.close();
}
catch (Exception e)
{
MARSHAL m = new MARSHAL("Unable to write Internet profile.");
m.initCause(e);
throw m;
}
}
}
/**
* The standard minor code, indicating that the string to object
* converstio has failed due non specific reasons.
* The standard minor code, indicating that the string to object converstio
* has failed due non specific reasons.
*/
public static final int FAILED = 10;
/**
* The code sets profile of this IOR.
*/
public CodeSets_profile CodeSets = new CodeSets_profile();
/**
* The internet profile of this IOR.
*/
@ -260,46 +332,36 @@ public class IOR
*/
public String Id;
/**
* The additional tagged components, encapsulated in
* the byte arrays. They are only supported by the
* later versions, than currently implemented.
*/
public byte[][] extra;
/**
* The object key.
*/
public byte[] key;
/**
* True if the profile was encoded using the Big Endian or
* the encoding is not known.
* All tagged profiles of this IOR, except the separately defined Internet
* profile.
*/
ArrayList profiles = new ArrayList();
/**
* True if the profile was encoded using the Big Endian or the encoding is not
* known.
*
* false if it was encoded using the Little Endian.
*/
public boolean Big_Endian = true;
/**
* Create an empty instance, initialising the code sets to default
* values.
* Create an empty instance, initialising the code sets to default values.
*/
public IOR()
{
int[] supported = CharSets_OSF.getSupportedCharSets();
CodeSets.narrow.native_set = CharSets_OSF.NATIVE_CHARACTER;
CodeSets.narrow.conversion = supported;
CodeSets.wide.native_set = CharSets_OSF.NATIVE_WIDE_CHARACTER;
CodeSets.wide.conversion = supported;
}
/**
* Parse the provided stringifed reference.
*
* @param stringified_reference, in the form of
* IOR:nnnnnn.....
* @param stringified_reference, in the form of IOR:nnnnnn.....
*
* @return the parsed IOR
*
@ -308,14 +370,13 @@ public class IOR
* TODO corballoc and other alternative formats.
*/
public static IOR parse(String stringified_reference)
throws BAD_PARAM
throws BAD_PARAM
{
try
{
if (!stringified_reference.startsWith("IOR:"))
throw new BAD_PARAM("The string refernce must start with IOR:",
FAILED, CompletionStatus.COMPLETED_NO
);
FAILED, CompletionStatus.COMPLETED_NO);
IOR r = new IOR();
@ -340,8 +401,7 @@ public class IOR
{
ex.printStackTrace();
throw new BAD_PARAM(ex + " while parsing " + stringified_reference,
FAILED, CompletionStatus.COMPLETED_NO
);
FAILED, CompletionStatus.COMPLETED_NO);
}
}
@ -352,7 +412,7 @@ public class IOR
* @throws IOException if the stream throws it.
*/
public void _read(cdrInput c)
throws IOException, BAD_PARAM
throws IOException, BAD_PARAM
{
int endian;
@ -366,23 +426,21 @@ public class IOR
}
/**
* Read the IOR from the provided input stream, not reading
* the endian data at the beginning of the stream. The IOR is
* thansferred in this form in
* Read the IOR from the provided input stream, not reading the endian data at
* the beginning of the stream. The IOR is thansferred in this form in
* {@link write_Object(org.omg.CORBA.Object)}.
*
* If the stream contains a null value, the Id and Internet fields become
* equal to null. Otherwise Id contains some string (possibly
* empty).
* equal to null. Otherwise Id contains some string (possibly empty).
*
* Id is checked for null in cdrInput that then returns
* null instead of object.
* Id is checked for null in cdrInput that then returns null instead of
* object.
*
* @param c a stream to read from.
* @throws IOException if the stream throws it.
*/
public void _read_no_endian(cdrInput c)
throws IOException, BAD_PARAM
throws IOException, BAD_PARAM
{
Id = c.read_string();
@ -407,9 +465,7 @@ public class IOR
Internet.host = profile.read_string();
Internet.port = profile.gnu_read_ushort();
int lk = profile.read_long();
key = new byte[ lk ];
profile.read(key);
key = profile.read_sequence();
// Read tagged components.
int n_components = 0;
@ -425,7 +481,16 @@ public class IOR
if (ctag == CodeSets_profile.TAG_CODE_SETS)
{
CodeSets.read(profile);
Internet.CodeSets.read(profile);
}
else
{
// Construct a generic component for codesets
// profile.
TaggedComponent pc = new TaggedComponent();
pc.tag = ctag;
pc.component_data = profile.read_sequence();
Internet.components.add(pc);
}
}
}
@ -434,12 +499,21 @@ public class IOR
ex.printStackTrace();
}
}
else
{
// Construct a generic profile.
TaggedProfile p = new TaggedProfile();
p.tag = tag;
p.profile_data = profile.buffer.getBuffer();
profiles.add(p);
}
}
}
/**
* Write this IOR record to the provided CDR stream.
* This procedure writes the zero (Big Endian) marker first.
* Write this IOR record to the provided CDR stream. This procedure writes the
* zero (Big Endian) marker first.
*/
public void _write(cdrOutput out)
{
@ -451,8 +525,8 @@ public class IOR
/**
* Write a null value to the CDR output stream.
*
* The null value is written as defined in OMG specification
* (zero length string, followed by an empty set of profiles).
* The null value is written as defined in OMG specification (zero length
* string, followed by an empty set of profiles).
*/
public static void write_null(cdrOutput out)
{
@ -464,47 +538,27 @@ public class IOR
}
/**
* Write this IOR record to the provided CDR stream. The procedure
* writed data in Big Endian, but does NOT add any endian marker
* to the beginning.
* Write this IOR record to the provided CDR stream. The procedure writed data
* in Big Endian, but does NOT add any endian marker to the beginning.
*/
public void _write_no_endian(cdrOutput out)
{
try
// Write repository id.
out.write_string(Id);
out.write_long(1 + profiles.size());
// Write the Internet profile.
out.write_long(Internet_profile.TAG_INTERNET_IOP);
Internet.write(out);
// Write other profiles.
TaggedProfile tp;
for (int i = 0; i < profiles.size(); i++)
{
// Write repository id.
out.write_string(Id);
// Always one profile.
out.write_long(1);
// It is the Internet profile.
out.write_long(Internet_profile.TAG_INTERNET_IOP);
// Need to write the Internet profile into the separate
// stream as we must know the size in advance.
cdrOutput b = out.createEncapsulation();
Internet.version.write(b);
b.write_string(Internet.host);
b.write_ushort((short) (Internet.port & 0xFFFF));
// Write the object key.
b.write_long(key.length);
b.write(key);
// One tagged component.
b.write_long(1);
b.write_long(CodeSets_profile.TAG_CODE_SETS);
CodeSets.write(b);
b.close();
}
catch (IOException ex)
{
Unexpected.error(ex);
tp = (TaggedProfile) profiles.get(i);
TaggedProfileHelper.write(out, tp);
}
}
@ -525,11 +579,11 @@ public class IOR
for (int i = 0; i < key.length; i++)
{
b.append(Integer.toHexString(key [ i ] & 0xFF));
b.append(Integer.toHexString(key[i] & 0xFF));
}
b.append(" ");
b.append(CodeSets);
b.append(Internet.CodeSets);
return b.toString();
}
@ -552,7 +606,7 @@ public class IOR
for (int i = 0; i < binary.length; i++)
{
s = Integer.toHexString(binary [ i ] & 0xFF);
s = Integer.toHexString(binary[i] & 0xFF);
if (s.length() == 1)
b.append('0');
b.append(s);
@ -560,4 +614,105 @@ public class IOR
return b.toString();
}
/**
* Adds a service-specific component to the IOR profile. The specified
* component will be included in all profiles, present in the IOR.
*
* @param tagged_component a tagged component being added.
*/
public void add_ior_component(TaggedComponent tagged_component)
{
// Add to the Internet profile.
Internet.components.add(tagged_component);
// Add to others.
for (int i = 0; i < profiles.size(); i++)
{
TaggedProfile profile = (TaggedProfile) profiles.get(i);
addComponentTo(profile, tagged_component);
}
}
/**
* Adds a service-specific component to the IOR profile.
*
* @param tagged_component a tagged component being added.
*
* @param profile_id the IOR profile to that the component must be added. The
* 0 value ({@link org.omg.IOP.TAG_INTERNET_IOP#value}) adds to the Internet
* profile where host and port are stored by default.
*/
public void add_ior_component_to_profile(TaggedComponent tagged_component,
int profile_id)
{
if (profile_id == TAG_INTERNET_IOP.value)
// Add to the Internet profile
Internet.components.add(tagged_component);
else
{
// Add to others.
for (int i = 0; i < profiles.size(); i++)
{
TaggedProfile profile = (TaggedProfile) profiles.get(i);
if (profile.tag == profile_id)
addComponentTo(profile, tagged_component);
}
}
}
/**
* Add given component to the given profile that is NOT an Internet profile.
*
* @param profile the profile, where the component should be added.
* @param component the component to add.
*/
private static void addComponentTo(TaggedProfile profile,
TaggedComponent component)
{
if (profile.tag == TAG_MULTIPLE_COMPONENTS.value)
{
TaggedComponent[] present;
if (profile.profile_data.length > 0)
{
cdrBufInput in = new cdrBufInput(profile.profile_data);
present = new TaggedComponent[in.read_long()];
for (int i = 0; i < present.length; i++)
{
present[i] = TaggedComponentHelper.read(in);
}
}
else
present = new TaggedComponent[0];
cdrBufOutput out = new cdrBufOutput(profile.profile_data.length
+ component.component_data.length
+ 8);
// Write new amount of components.
out.write_long(present.length + 1);
// Write other components.
for (int i = 0; i < present.length; i++)
TaggedComponentHelper.write(out, present[i]);
// Write the passed component.
TaggedComponentHelper.write(out, component);
try
{
out.close();
}
catch (IOException e)
{
throw new Unexpected(e);
}
profile.profile_data = out.buffer.toByteArray();
}
else
// The future supported tagged profiles should be added here.
throw new BAD_PARAM("Unsupported profile type " + profile.tag);
}
}

View file

@ -40,7 +40,9 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.GIOP.ReplyHeader;
import gnu.CORBA.Poa.activeObjectMap;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.ExceptionList;
@ -53,6 +55,7 @@ import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.RemarshalException;
import org.omg.PortableInterceptor.ForwardRequest;
import java.io.IOException;
@ -67,9 +70,19 @@ import java.net.Socket;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class IOR_Delegate
extends Simple_delegate
public class IOR_Delegate extends Simple_delegate
{
/**
* True if the current IOR does not map into the local servant. If false, the
* IOR is either local or should be checked.
*/
boolean remote_ior;
/**
* If not null, this field contains data about the local servant.
*/
activeObjectMap.Obj local_ior;
/**
* Contructs an instance of object using the given IOR.
*/
@ -92,11 +105,10 @@ public class IOR_Delegate
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns
)
String operation, NVList parameters, NamedValue returns
)
{
gnuRequest request = new gnuRequest();
gnuRequest request = getRequestInstance(target);
request.setIor(getIor());
request.set_target(target);
@ -122,12 +134,11 @@ public class IOR_Delegate
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns, ExceptionList exceptions,
ContextList ctx_list
)
String operation, NVList parameters, NamedValue returns,
ExceptionList exceptions, ContextList ctx_list
)
{
gnuRequest request = new gnuRequest();
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@ -144,97 +155,216 @@ public class IOR_Delegate
}
/**
* Invoke operation on the given object, writing parameters to the given
* output stream.
* Get the instance of request.
*/
protected gnuRequest getRequestInstance(org.omg.CORBA.Object target)
{
return new gnuRequest();
}
/**
* Invoke operation on the given object, als handling temproray and permanent
* redirections. The ReplyHeader.LOCATION_FORWARD will cause to resend the
* request to the new direction. The ReplyHeader.LOCATION_FORWARD_PERM will
* cause additionally to remember the new location by this delegate, so
* subsequent calls will be immediately delivered to the new target.
*
* @param target the target object.
* @param output the output stream, previously returned by
* {@link #request(org.omg.CORBA.Object, String, boolean)}.
*
* @return the input stream, to read the response from or null for a
* one-way request.
* @return the input stream, to read the response from or null for a one-way
* request.
*
* @throws SystemException if the SystemException has been thrown on the
* remote side (the exact type and the minor code matches the data of
* the remote exception that has been thrown).
* remote side (the exact type and the minor code matches the data of the
* remote exception that has been thrown).
*
* @throws org.omg.CORBA.portable.ApplicationException as specified.
* @throws org.omg.CORBA.portable.RemarshalException as specified.
*/
public InputStream invoke(org.omg.CORBA.Object target, OutputStream output)
throws ApplicationException, RemarshalException
throws ApplicationException, RemarshalException
{
streamRequest request = (streamRequest) output;
if (request.response_expected)
Forwardings:
while (true)
{
binaryReply response = request.request.submit();
// Read reply header.
ReplyHeader rh = response.header.create_reply_header();
cdrBufInput input = response.getStream();
input.setOrb(orb);
rh.read(input);
boolean moved_permanently = false;
switch (rh.reply_status)
try
{
case ReplyHeader.NO_EXCEPTION :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
return input;
if (request.response_expected)
{
binaryReply response = request.request.submit();
case ReplyHeader.SYSTEM_EXCEPTION :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
throw ObjectCreator.readSystemException(input);
// Read reply header.
ReplyHeader rh = response.header.create_reply_header();
cdrBufInput input = response.getStream();
input.setOrb(orb);
rh.read(input);
request.request.m_rph = rh;
case ReplyHeader.USER_EXCEPTION :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
input.mark(2000);
boolean moved_permanently = false;
String uxId = input.read_string();
input.reset();
switch (rh.reply_status)
{
case ReplyHeader.NO_EXCEPTION :
if (request.request.m_interceptor != null)
request.request.m_interceptor.
receive_reply(request.request.m_info);
if (response.header.version.since_inclusive(1, 2))
input.align(8);
return input;
throw new ApplicationException(uxId, input);
case ReplyHeader.SYSTEM_EXCEPTION :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
showException(request, input);
case ReplyHeader.LOCATION_FORWARD_PERM :
moved_permanently = true;
throw ObjectCreator.readSystemException(input);
case ReplyHeader.LOCATION_FORWARD :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
case ReplyHeader.USER_EXCEPTION :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
showException(request, input);
IOR forwarded = new IOR();
try
{
forwarded._read_no_endian(input);
}
catch (IOException ex)
{
MARSHAL t = new MARSHAL("Cant read forwarding info");
t.initCause(ex);
throw t;
}
throw new ApplicationException(request.
request.m_exception_id, input
);
request.request.setIor(forwarded);
case ReplyHeader.LOCATION_FORWARD_PERM :
moved_permanently = true;
// If the object has moved permanently, its IOR is replaced.
if (moved_permanently)
setIor(forwarded);
case ReplyHeader.LOCATION_FORWARD :
if (response.header.version.since_inclusive(1, 2))
input.align(8);
return invoke(target, request);
IOR forwarded = new IOR();
try
{
forwarded._read_no_endian(input);
}
catch (IOException ex)
{
MARSHAL t =
new MARSHAL("Cant read forwarding info", 5102,
CompletionStatus.COMPLETED_NO
);
t.initCause(ex);
throw t;
}
default :
throw new MARSHAL("Unknow reply status: " + rh.reply_status);
gnuRequest prev = request.request;
gnuRequest r = getRequestInstance(target);
r.m_interceptor = prev.m_interceptor;
r.m_slots = prev.m_slots;
r.m_args = prev.m_args;
r.m_context = prev.m_context;
r.m_context_list = prev.m_context_list;
r.m_environment = prev.m_environment;
r.m_exceptions = prev.m_exceptions;
r.m_operation = prev.m_operation;
r.m_parameter_buffer = prev.m_parameter_buffer;
r.m_parameter_buffer.request = r;
r.m_result = prev.m_result;
r.m_target = prev.m_target;
r.oneWay = prev.oneWay;
r.m_forward_ior = forwarded;
if (r.m_interceptor != null)
r.m_interceptor.receive_other(r.m_info);
r.setIor(forwarded);
IOR_contructed_object it =
new IOR_contructed_object(orb, forwarded);
r.m_target = it;
request.request = r;
IOR prev_ior = getIor();
setIor(forwarded);
try
{
return invoke(it, request);
}
finally
{
if (!moved_permanently)
setIor(prev_ior);
}
default :
throw new MARSHAL("Unknow reply status: " +
rh.reply_status, 8000 + rh.reply_status,
CompletionStatus.COMPLETED_NO
);
}
}
else
{
request.request.send_oneway();
return null;
}
}
catch (ForwardRequest forwarded)
{
ForwardRequest fw = forwarded;
Forwarding2:
while (true)
{
try
{
gnuRequest prev = request.request;
gnuRequest r = getRequestInstance(target);
r.m_interceptor = prev.m_interceptor;
r.m_args = prev.m_args;
r.m_context = prev.m_context;
r.m_context_list = prev.m_context_list;
r.m_environment = prev.m_environment;
r.m_exceptions = prev.m_exceptions;
r.m_operation = prev.m_operation;
r.m_parameter_buffer = prev.m_parameter_buffer;
r.m_parameter_buffer.request = r;
r.m_result = prev.m_result;
r.m_target = prev.m_target;
r.oneWay = prev.oneWay;
r.m_forwarding_target = fw.forward;
if (r.m_interceptor != null)
r.m_interceptor.receive_other(r.m_info);
r.m_target = fw.forward;
request.request = r;
break Forwarding2;
}
catch (ForwardRequest e)
{
forwarded = e;
}
}
}
}
else
{
request.request.send_oneway();
return null;
}
}
/**
* Show exception to interceptor.
*/
void showException(streamRequest request, cdrBufInput input)
throws ForwardRequest
{
input.mark(2048);
request.request.m_exception_id = input.read_string();
input.reset();
if (request.request.m_interceptor != null)
request.request.m_interceptor.receive_exception(request.request.m_info);
}
/**
@ -247,7 +377,7 @@ public class IOR_Delegate
*/
public Request request(org.omg.CORBA.Object target, String operation)
{
gnuRequest request = new gnuRequest();
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@ -269,27 +399,28 @@ public class IOR_Delegate
* @return the stream where the method arguments should be written.
*/
public OutputStream request(org.omg.CORBA.Object target, String operation,
boolean response_expected
)
boolean response_expected
)
{
gnuRequest request = new gnuRequest();
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
request.setOperation(operation);
request.getParameterStream().response_expected = response_expected;
streamRequest out = request.getParameterStream();
out.response_expected = response_expected;
request.setORB(orb);
return request.getParameterStream();
return out;
}
/**
* If there is an opened cache socket to access this object, close
* that socket.
* If there is an opened cache socket to access this object, close that
* socket.
*
* @param target The target is not used, this delegate requires a
* single instance per object.
* @param target The target is not used, this delegate requires a single
* instance per object.
*/
public void release(org.omg.CORBA.Object target)
{
@ -308,4 +439,28 @@ public class IOR_Delegate
// do nothing, then.
}
}
/**
* Reset the remote_ior flag, forcing to check if the object is local on the
* next getRequestInstance call.
*/
public void setIor(IOR an_ior)
{
super.setIor(an_ior);
remote_ior = false;
local_ior = null;
}
/**
* Checks if the ior is local so far it is easy.
*/
public boolean is_local(org.omg.CORBA.Object self)
{
if (remote_ior)
return false;
else if (local_ior != null)
return true;
else
return super.is_local(self);
}
}

View file

@ -39,6 +39,7 @@ exception statement from your version. */
package gnu.CORBA.NamingService;
import gnu.CORBA.Functional_ORB;
import gnu.CORBA.IOR;
import org.omg.CosNaming.NamingContextExt;
@ -47,15 +48,14 @@ import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
/**
* The server for the gnu classpath naming service. This is an executable
* class that must be started to launch the GNU Classpath CORBA
* transient naming service.
*
* The server for the gnu classpath naming service. This is an executable class
* that must be started to launch the GNU Classpath CORBA transient naming
* service.
*
* GNU Classpath currently works with this naming service and is also
* interoperable with the Sun Microsystems naming services from
* releases 1.3 and 1.4, both transient <i>tnameserv</i> and persistent
* <i>orbd</i>.
*
* interoperable with the Sun Microsystems naming services from releases 1.3 and
* 1.4, both transient <i>tnameserv</i> and persistent <i>orbd</i>.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class NamingServiceTransient
@ -67,9 +67,9 @@ public class NamingServiceTransient
public static final int PORT = 900;
/**
* Get the object key for the naming service. The default
* key is the string "NameService" in ASCII.
*
* Get the object key for the naming service. The default key is the string
* "NameService" in ASCII.
*
* @return the byte array.
*/
public static byte[] getDefaultKey()
@ -85,15 +85,14 @@ public class NamingServiceTransient
}
/**
* Start the naming service on the current host at the given port.
* The parameter -org.omg.CORBA.ORBInitialPort NNN or
* -ORBInitialPort NNN, if present, specifies the port, on that
* the service must be started. If this key is not specified,
* the service starts at the port 900.
*
* The parameter -ior FILE_NAME, if present, forces to store the ior string
* of this naming service to the specified file.
*
* Start the naming service on the current host at the given port. The
* parameter -org.omg.CORBA.ORBInitialPort NNN or -ORBInitialPort NNN, if
* present, specifies the port, on that the service must be started. If this
* key is not specified, the service starts at the port 900.
*
* The parameter -ior FILE_NAME, if present, forces to store the ior string of
* this naming service to the specified file.
*
* @param args the parameter string.
*/
public static void main(String[] args)
@ -108,21 +107,24 @@ public class NamingServiceTransient
if (args.length > 1)
for (int i = 0; i < args.length - 1; i++)
{
if (args [ i ].endsWith("ORBInitialPort"))
port = Integer.parseInt(args [ i + 1 ]);
if (args[i].endsWith("ORBInitialPort"))
port = Integer.parseInt(args[i + 1]);
if (args [ i ].equals("-ior"))
iorf = args [ i + 1 ];
if (args[i].equals("-ior"))
iorf = args[i + 1];
}
Functional_ORB.setPort(port);
// Create the servant and register it with the ORB
NamingContextExt namer = new Ext(new TransientContext());
orb.connect(namer, getDefaultKey());
// Case with the key "NameService".
orb.connect(namer, "NameService".getBytes());
// Storing the IOR reference.
String ior = orb.object_to_string(namer);
IOR iorr = IOR.parse(ior);
if (iorf != null)
{
FileOutputStream f = new FileOutputStream(iorf);
@ -131,22 +133,23 @@ public class NamingServiceTransient
p.close();
}
System.out.println("GNU Classpath, transient naming service. " +
"Copyright (C) 2005 Free Software Foundation\n" +
"This tool comes with ABSOLUTELY NO WARRANTY. " +
"This is free software, and you are\nwelcome to " +
"redistribute it under conditions, defined in " +
"GNU Classpath license.\n\n" + ior
);
System.out.println("GNU Classpath transient naming service "
+ "started at " + iorr.Internet.host + ":" + iorr.Internet.port
+ " key 'NameService'.\n\n"
+ "Copyright (C) 2005 Free Software Foundation\n"
+ "This tool comes with ABSOLUTELY NO WARRANTY. "
+ "This is free software, and you are\nwelcome to "
+ "redistribute it under conditions, defined in "
+ "GNU Classpath license.\n\n" + ior);
new Thread()
{
public void run()
{
public void run()
{
// Wait for invocations from clients.
orb.run();
}
}.start();
// Wait for invocations from clients.
orb.run();
}
}.start();
}
catch (Exception e)
{
@ -154,7 +157,8 @@ public class NamingServiceTransient
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);
}
}

View file

@ -1,4 +1,4 @@
/* ExceptionCreator.java --
/* ObjectCreator.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,10 +38,15 @@ exception statement from your version. */
package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufOutput;
import org.omg.CORBA.Any;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.CompletionStatusHelper;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.UNKNOWN;
import org.omg.CORBA.UserException;
import org.omg.CORBA.portable.InputStream;
@ -51,9 +56,8 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/**
* Creates java objects from the agreed IDL names for the simple
* case when the CORBA object is directly mapped into the locally
* defined java class.
* Creates java objects from the agreed IDL names for the simple case when the
* CORBA object is directly mapped into the locally defined java class.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
@ -70,20 +74,17 @@ public class ObjectCreator
public static final String JAVA_PREFIX = "org.omg.";
/**
* The prefix for classes that are placed instide the
* gnu.CORBA namespace.
* The prefix for classes that are placed instide the gnu.CORBA namespace.
*/
public static final String CLASSPATH_PREFIX = "gnu.CORBA.";
/**
* Try to instantiate an object with the given IDL name.
* The object must be mapped to the local java class.
* The omg.org domain must be mapped into the object in either
* org/omg or gnu/CORBA namespace.
* Try to instantiate an object with the given IDL name. The object must be
* mapped to the local java class. The omg.org domain must be mapped into the
* object in either org/omg or gnu/CORBA namespace.
*
* @param IDL name
* @return instantiated object instance or null if no such
* available.
* @return instantiated object instance or null if no such available.
*/
public static java.lang.Object createObject(String idl, String suffix)
{
@ -109,16 +110,15 @@ public class ObjectCreator
/**
* Create the system exception with the given idl name.
*
* @param idl the exception IDL name, must match the syntax
* "IDL:<class/name>:1.0".
* @param idl the exception IDL name, must match the syntax "IDL:<class/name>:1.0".
* @param minor the exception minor code.
* @param completed the exception completion status.
*
* @return the created exception.
*/
public static SystemException createSystemException(String idl, int minor,
CompletionStatus completed
)
CompletionStatus completed
)
{
try
{
@ -127,20 +127,18 @@ public class ObjectCreator
Constructor constructor =
exClass.getConstructor(new Class[]
{
String.class, int.class,
CompletionStatus.class
}
);
{
String.class, int.class, CompletionStatus.class
}
);
Object exception =
constructor.newInstance(new Object[]
{
" Remote exception " + idl + ", minor " +
minor + ", " + completed + ".",
new Integer(minor), completed
}
);
{
" Remote exception " + idl + ", minor " + minor + ", " +
completed + ".", new Integer(minor), completed
}
);
return (SystemException) exception;
}
@ -153,9 +151,10 @@ public class ObjectCreator
/**
* Read the system exception from the given stream.
*
* @param input the CDR stream to read from.
* @return the exception that has been stored in the stream
* (IDL name, minor code and completion status).
* @return the exception that has been stored in the stream (IDL name, minor
* code and completion status).
*/
public static SystemException readSystemException(InputStream input)
{
@ -170,8 +169,8 @@ public class ObjectCreator
}
/**
* Reads the user exception, having the given Id, from the
* input stream. The id is expected to be in the form like
* Reads the user exception, having the given Id, from the input stream. The
* id is expected to be in the form like
* 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
*
* @param idl the exception idl name.
@ -189,11 +188,8 @@ public class ObjectCreator
Method read =
helperClass.getMethod("read",
new Class[]
{
org.omg.CORBA.portable.InputStream.class
}
);
new Class[] { org.omg.CORBA.portable.InputStream.class }
);
return (UserException) read.invoke(null, new Object[] { input });
}
@ -236,8 +232,8 @@ public class ObjectCreator
* @param ex an exception to write.
*/
public static void writeSystemException(OutputStream output,
SystemException ex
)
SystemException ex
)
{
String exIDL = toIDL(ex.getClass().getName());
output.write_string(exIDL);
@ -266,14 +262,14 @@ public class ObjectCreator
}
/**
* Converts the given IDL name to class name and tries to load the
* matching class. The OMG prefix (omg.org) is replaced by
* the java prefix org.omg. No other prefixes are added.
* Converts the given IDL name to class name and tries to load the matching
* class. The OMG prefix (omg.org) is replaced by the java prefix org.omg. No
* other prefixes are added.
*
* @param IDL the idl name.
*
* TODO Cache the returned classes, avoiding these string manipulations
* each time the conversion is required.
* TODO Cache the returned classes, avoiding these string manipulations each
* time the conversion is required.
*
* @return the matching class or null if no such is available.
*/
@ -301,10 +297,10 @@ public class ObjectCreator
}
/**
* Converts the given IDL name to class name, tries to load the
* matching class and create an object instance with parameterless
* constructor. The OMG prefix (omg.org) is replaced by
* the java prefix org.omg. No other prefixes are added.
* Converts the given IDL name to class name, tries to load the matching class
* and create an object instance with parameterless constructor. The OMG
* prefix (omg.org) is replaced by the java prefix org.omg. No other prefixes
* are added.
*
* @param IDL the idl name.
*
@ -341,8 +337,111 @@ public class ObjectCreator
cn = OMG_PREFIX + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
else if (cn.startsWith(CLASSPATH_PREFIX))
cn =
OMG_PREFIX + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
OMG_PREFIX +
cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
return "IDL:" + cn + ":1.0";
}
/**
* Insert the passed parameter into the given Any, assuming that the helper
* class is available. The helper class must have the "Helper" suffix and be
* in the same package as the class of the object being inserted.
*
* @param into the target to insert.
*
* @param object the object to insert. It can be any object as far as the
* corresponding helper is provided.
*
* @return true on success, false otherwise.
*/
public static boolean insertWithHelper(Any into, Object object)
{
try
{
String helperClassName = object.getClass().getName() + "Helper";
Class helperClass = Class.forName(helperClassName);
Method insert =
helperClass.getMethod("insert",
new Class[] { Any.class, object.getClass() }
);
insert.invoke(null, new Object[] { into, object });
return true;
}
catch (Exception exc)
{
// Failed due some reason.
return false;
}
}
/**
* Insert the system exception into the given Any.
*/
public static boolean insertSysException(Any into, SystemException exception)
{
try
{
cdrBufOutput output = new cdrBufOutput();
String m_exception_id = toIDL(exception.getClass().getName());
output.write_string(m_exception_id);
output.write_ulong(exception.minor);
CompletionStatusHelper.write(output, exception.completed);
String name = getDefaultName(m_exception_id);
universalHolder h = new universalHolder(output);
into.insert_Streamable(h);
recordTypeCode r = new recordTypeCode(TCKind.tk_except);
r.setId(m_exception_id);
r.setName(name);
into.type(r);
return true;
}
catch (Exception ex)
{
ex.printStackTrace();
return false;
}
}
/**
* Get the type name from the IDL string.
*/
public static String getDefaultName(String idl)
{
int f1 = idl.lastIndexOf("/");
int p1 = (f1 < 0) ? 0 : f1;
int p2 = idl.indexOf(":", p1);
if (p2 < 0)
p2 = idl.length();
String name = idl.substring(f1 + 1, p2);
return name;
}
/**
* Insert this exception into the given Any. On failure, insert the UNKNOWN
* exception.
*/
public static void insertException(Any into, Throwable exception)
{
boolean ok = false;
if (exception instanceof SystemException)
ok = insertSysException(into, (SystemException) exception);
else if (exception instanceof UserException)
ok = insertWithHelper(into, exception);
if (!ok)
ok = insertSysException(into, new UNKNOWN());
if (!ok)
throw new InternalError("Exception wrapping broken");
}
}

View file

@ -58,6 +58,9 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.UnionMember;
import org.omg.CORBA.portable.OutputStream;
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;
@ -66,36 +69,62 @@ import java.util.Properties;
/**
* This class implements so-called Singleton ORB, a highly restricted version
* that cannot communicate over network. This ORB is provided
* for the potentially malicious applets with heavy security restrictions.
* It, however, supports some basic features that might be needed even
* when the network access is not granted.
* that cannot communicate over network. This ORB is provided for the
* potentially malicious applets with heavy security restrictions. It, however,
* supports some basic features that might be needed even when the network
* access is not granted.
*
* This ORB can only create typecodes,
* {@link Any}, {@link ContextList}, {@link NVList} and
* {@link org.omg.CORBA.portable.OutputStream} that writes to an
* internal buffer.
* This ORB can only create typecodes, {@link Any}, {@link ContextList},
* {@link NVList} and {@link org.omg.CORBA.portable.OutputStream} that writes to
* an internal buffer.
*
* All other methods throw the {@link NO_IMPLEMENT} exception.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class Restricted_ORB
extends org.omg.CORBA_2_3.ORB
public class Restricted_ORB extends org.omg.CORBA_2_3.ORB
{
/**
* The singleton instance of this 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.
*/
protected Hashtable factories = new Hashtable();
/**
* Create a new instance of the RestrictedORB. This is used
* in derived classes only.
* The policy factories.
*/
protected Hashtable policyFactories = new Hashtable();
/**
* Create a new instance of the RestrictedORB. This is used in derived classes
* only.
*/
protected Restricted_ORB()
{
@ -159,8 +188,8 @@ public class Restricted_ORB
/** {@inheritDoc} */
public TypeCode create_exception_tc(String id, String name,
StructMember[] members
)
StructMember[] members
)
{
recordTypeCode r = new recordTypeCode(TCKind.tk_except);
r.setId(id);
@ -224,8 +253,8 @@ public class Restricted_ORB
/** {@inheritDoc} */
public TypeCode create_struct_tc(String id, String name,
StructMember[] members
)
StructMember[] members
)
{
recordTypeCode r = new recordTypeCode(TCKind.tk_struct);
r.setId(id);
@ -240,13 +269,15 @@ public class Restricted_ORB
}
/** {@inheritDoc} */
public TypeCode create_union_tc(String id, String name, TypeCode type,
UnionMember[] members
)
public TypeCode create_union_tc(String id, String name,
TypeCode discriminator_type, UnionMember[] members
)
{
recordTypeCode r = new recordTypeCode(TCKind.tk_union);
r.setId(id);
r.setName(name);
r.setDiscriminator_type(discriminator_type);
r.setDefaultIndex(0);
for (int i = 0; i < members.length; i++)
{
@ -274,8 +305,8 @@ public class Restricted_ORB
catch (BadKind ex)
{
throw new BAD_PARAM("This is not a primitive type code: " +
tcKind.value()
);
tcKind.value()
);
}
}
@ -304,13 +335,13 @@ public class Restricted_ORB
/**
* This method is not allowed for a RestrictedORB.
*
* @throws InvalidName never in this class, but it is thrown
* in the derived classes.
* @throws InvalidName never in this class, but it is thrown in the derived
* classes.
*
* @throws NO_IMPLEMENT, always.
*/
public org.omg.CORBA.Object resolve_initial_references(String name)
throws InvalidName
throws InvalidName
{
no();
throw new InternalError();
@ -366,8 +397,8 @@ public class Restricted_ORB
}
/**
* Throws an exception, stating that the given method is not supported
* by the Restricted ORB.
* Throws an exception, stating that the given method is not supported by the
* Restricted ORB.
*/
private final void no()
{
@ -381,8 +412,7 @@ public class Restricted_ORB
*
* @throws NO_IMPLEMENT, always.
*/
public Request get_next_response()
throws org.omg.CORBA.WrongTransaction
public Request get_next_response() throws org.omg.CORBA.WrongTransaction
{
no();
throw new InternalError();
@ -423,8 +453,8 @@ public class Restricted_ORB
* Register the value factory under the given repository id.
*/
public ValueFactory register_value_factory(String repository_id,
ValueFactory factory
)
ValueFactory factory
)
{
factories.put(repository_id, factory);
return factory;
@ -440,9 +470,9 @@ public class Restricted_ORB
/**
* Look for the value factory for the value, having the given repository id.
* The implementation checks for the registered value factories first.
* If none found, it tries to load and instantiate the class, mathing the
* given naming convention. If this faild, null is returned.
* The implementation checks for the registered value factories first. If none
* found, it tries to load and instantiate the class, mathing the given naming
* convention. If this faild, null is returned.
*
* @param repository_id a repository id.
*
@ -452,12 +482,43 @@ public class Restricted_ORB
{
ValueFactory f = (ValueFactory) factories.get(repository_id);
if (f != null)
return f;
{
return f;
}
f = (ValueFactory) ObjectCreator.createObject(repository_id, "DefaultFactory");
f = (ValueFactory) ObjectCreator.createObject(repository_id,
"DefaultFactory"
);
if (f != null)
factories.put(repository_id, f);
{
factories.put(repository_id, 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();
}
}

View file

@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.Streamable;
/**
* This class exists to handle obsolete invocation style using
* ServerRequest.
*
* @deprecated The method {@link ObjectImpl#_invoke} is much faster.
* This class supports invocation using ServerRequest. When possible,
* it is better to use the {@link ObjectImpl#_invoke} rather than
* working via ServerRequest. However since 1.4 the ServerRequest is
* involved into POA machinery making this type of call is sometimes
* inavoidable.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
@ -86,13 +87,13 @@ public class ServiceRequestAdapter
}
/**
* The old style invocation using the currently deprecated server
* request class.
* Make an invocation.
*
* @param request a server request, containg the invocation information.
* @param target the invocation target
* @param result the result holder with the set suitable streamable to read
* the result or null for void.
* @param result the result holder with the set suitable streamable.
* 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,
Streamable result
@ -133,12 +134,20 @@ public class ServiceRequestAdapter
else
{
if (result != null)
{
result._read(in);
gnuAny r = new gnuAny();
r.insert_Streamable(result);
request.set_result(r);
};
{
// Use the holder for the return value, if provided.
result._read(in);
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
for (int i = 0; i < args.count(); i++)

View file

@ -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,
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
{
throw new InternalError();
}
}
}

View file

@ -39,6 +39,7 @@ exception statement from your version. */
package gnu.CORBA;
import java.net.Socket;
import java.net.SocketException;
import java.util.HashMap;
@ -70,16 +71,18 @@ public class SocketRepository
/**
* Get a socket.
*
*
* @param key a socket key.
*
* @return an opened socket for reuse, null if no such
* available or it is closed.
*
* @return an opened socket for reuse, null if no such available or it is
* closed.
*/
public static Socket get_socket(Object key)
{
Socket s = (Socket) sockets.get(key);
if (s != null && s.isClosed())
if (s == null)
return null;
else if (s.isClosed())
{
sockets.remove(key);
return null;
@ -87,6 +90,15 @@ public class SocketRepository
else
{
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;
}
}

View file

@ -41,6 +41,7 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufOutput;
import gnu.CORBA.GIOP.MessageHeader;
import gnu.CORBA.GIOP.ReplyHeader;
import gnu.CORBA.GIOP.RequestHeader;
import gnu.CORBA.GIOP.cxCodeSet;
import org.omg.CORBA.ORB;
@ -48,31 +49,33 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler;
/**
* Provides the CDR output streams for writing the response to the given
* buffer.
* Provides the CDR output streams for writing the response to the given buffer.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
class bufferedResponseHandler
public class bufferedResponseHandler
implements ResponseHandler
{
/**
* The message header.
* This field is used to compute the size and alignments.
* The message header. This field is used to compute the size and alignments.
* It is, however, never directly written to the buffer stream.
*/
final MessageHeader message_header;
public final MessageHeader message_header;
/**
* The associated orb.
*/
final ORB orb;
public final ORB orb;
/**
* The reply header. This field is used to compute the size and alignments.
* It is, however, never directly written to the buffer stream.
* The reply header.
*/
final ReplyHeader reply_header;
public final ReplyHeader reply_header;
/**
* The request header.
*/
public final RequestHeader request_header;
/**
* True if the stream was obtained by invoking {@link #createExceptionReply()},
@ -86,28 +89,27 @@ class bufferedResponseHandler
private cdrBufOutput buffer;
/**
* Create a new buffered response handler that uses the given message
* headers. The headers are used to compute sizes and check the versions.
* They are not written into a stream inside this class.
* Create a new buffered response handler that uses the given message headers.
* The headers are used to compute sizes and check the versions. They are not
* written into a stream inside this class.
*
* @param m_header a message header.
* @param r_header a reply header.
*/
bufferedResponseHandler(ORB an_orb, MessageHeader m_header,
ReplyHeader r_header
)
ReplyHeader r_header, RequestHeader rq_header)
{
message_header = m_header;
reply_header = r_header;
request_header = rq_header;
orb = an_orb;
prepareStream();
}
/**
* Get an output stream for providing details about the exception.
* Before returning the stream, the handler automatically writes
* the message header and the reply about exception header,
* but not the message header.
* Get an output stream for providing details about the exception. Before
* returning the stream, the handler automatically writes the message header
* and the reply about exception header, but not the message header.
*
* @return the stream to write exception details into.
*/
@ -121,8 +123,8 @@ class bufferedResponseHandler
/**
* Get an output stream for writing a regular reply (not an exception).
*
* Before returning the stream, the handler automatically writes
* the regular reply header, but not the message header.
* Before returning the stream, the handler automatically writes the regular
* reply header, but not the message header.
*
* @return the output stream for writing a regular reply.
*/
@ -135,27 +137,26 @@ class bufferedResponseHandler
}
/**
* Get the buffer, normally containing the written reply.
* The reply includes the reply header (or the exception header)
* but does not include the message header.
* Get the buffer, normally containing the written reply. The reply includes
* the reply header (or the exception header) but does not include the message
* header.
*
* The stream buffer can also be empty if no data have been written
* into streams, returned by {@link #createReply()} or
* The stream buffer can also be empty if no data have been written into
* streams, returned by {@link #createReply()} or
* {@link #createExceptionReply()}.
*
* @return the CDR output stream, containing the written output.
*/
cdrBufOutput getBuffer()
public cdrBufOutput getBuffer()
{
return buffer;
}
/**
* True if the stream was obtained by invoking
* {@link #createExceptionReply()}, false otherwise
* (usually no-exception reply).
* True if the stream was obtained by invoking {@link #createExceptionReply()},
* false otherwise (usually no-exception reply).
*/
boolean isExceptionReply()
public boolean isExceptionReply()
{
return exceptionReply;
}
@ -167,21 +168,22 @@ class bufferedResponseHandler
{
buffer = new cdrBufOutput();
buffer.setOrb(orb);
buffer.setOffset(message_header.getHeaderSize());
// Get the position after the reply header would be written.
reply_header.write(buffer);
int new_offset = message_header.getHeaderSize() + buffer.buffer.size();
buffer.buffer.reset();
buffer.setOffset(new_offset);
if (message_header.version.since_inclusive(1, 2))
buffer.align(8);
buffer.setVersion(message_header.version);
buffer.setCodeSet(cxCodeSet.find(reply_header.service_context));
// 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());
// Get the position after the reply header would be written.
reply_header.write(buffer);
int new_offset = message_header.getHeaderSize() + buffer.buffer.size();
buffer.buffer.reset();
buffer.setOffset(new_offset);
}
}
}

View file

@ -109,16 +109,12 @@ public class fixedTypeCode
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)
{
return true;
}
if (!(other instanceof TypeCode))
{
return false;
}
if (other == this) return true;
try
{
TypeCode that = (TypeCode) other;

View file

@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.CORBA;
import gnu.CORBA.CDR.Vio;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput;
@ -63,6 +64,7 @@ import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodeHolder;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.ValueBaseHolder;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.Streamable;
import java.io.IOException;
@ -499,20 +501,33 @@ public class gnuAny
}
/** {@inheritDoc} */
public void insert_Value(Serializable x, TypeCode typecode)
public void insert_Value(Serializable x, TypeCode c_typecode)
{
type(typecode);
insert_Value(x);
if (typecode != null && typecode.kind() == TCKind.tk_value_box)
{
has = new gnuValueHolder(x, typecode);
}
else
{
type(typecode);
insert_Value(x);
}
}
/** {@inheritDoc} */
public void insert_Value(Serializable x)
{
resetTypes();
if (has instanceof ValueBaseHolder)
((ValueBaseHolder) has).value = x;
if (typecode != null && typecode.kind() == TCKind.tk_value_box)
{
has = new gnuValueHolder(x, typecode);
}
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
}
}
type(a_type);
has._read(input);
if (!(has instanceof universalHolder) &&
(kind == TCKind._tk_value_box))
{
// 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 (BadKind ex)
catch (Exception ex)
{
throw new MARSHAL("Bad kind: " + ex.getMessage());
}
catch (IOException ex)
{
throw new MARSHAL("IO exception: " + ex.getMessage());
MARSHAL m = new MARSHAL();
m.initCause(ex);
throw m;
}
}
@ -790,6 +828,12 @@ public class gnuAny
{
if (has != null)
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
if (xKind >= 0)
{
if (xKind != kind)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" when stored " + typeNamer.nameIt(xKind)
);
if (!(
xKind == TCKind._tk_alias &&
has._type().kind().value() == kind
)
)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" when stored " + typeNamer.nameIt(xKind)
);
}
else
{
if (type().kind().value() != kind)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" stored " + typeNamer.nameIt(type())
);
if (!(
type().kind().value() == TCKind._tk_alias &&
has._type().kind().value() == kind
)
)
throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) +
" stored " + typeNamer.nameIt(type())
);
}
}

View file

@ -38,12 +38,12 @@ exception statement from your version. */
package gnu.CORBA;
import org.omg.CORBA.*;
import org.omg.CORBA.LocalObject;
import org.omg.IOP.*;
import org.omg.CORBA.ORB;
import org.omg.IOP.Codec;
import org.omg.IOP.CodecFactory;
import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
import org.omg.IOP.ENCODING_CDR_ENCAPS;
import org.omg.IOP.Encoding;
/**
@ -52,9 +52,7 @@ import org.omg.IOP.Encoding;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuCodecFactory
extends LocalObject
implements CodecFactory
public class gnuCodecFactory extends LocalObject implements CodecFactory
{
/**
* The associated ORB.
@ -78,18 +76,15 @@ public class gnuCodecFactory
*
* @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.
*/
public Codec create_codec(Encoding for_encoding)
throws UnknownEncoding
public Codec create_codec(Encoding for_encoding) throws UnknownEncoding
{
if (for_encoding.format != ENCODING_CDR_ENCAPS.value)
throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +
"supported by this factory."
);
"supported by this factory."
);
return new cdrEncapsCodec(orb,
new Version(for_encoding.major_version,
for_encoding.minor_version
)
);
new Version(for_encoding.major_version, for_encoding.minor_version)
);
}
}

File diff suppressed because it is too large Load diff

View file

@ -68,74 +68,76 @@ import org.omg.CORBA.UShortSeqHolder;
import org.omg.CORBA.WCharSeqHolder;
import org.omg.CORBA.WStringSeqHolder;
import org.omg.CORBA.portable.Streamable;
import org.omg.CORBA.ObjectHolder;
/**
* Creates the suitable holder for storing the value of the given
* type.
* Creates the suitable holder for storing the value of the given final_type.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class holderFactory
{
/**
* The array, sufficiently large to use any {@link TCKind}._tk* constant
* as an index.
* The array, sufficiently large to use any {@link TCKind}._tk* constant as
* an index.
*/
private static final Class[] holders;
private static final Class[] seqHolders;
static
{
holders = new Class[ 32 ];
holders [ TCKind._tk_Principal ] = PrincipalHolder.class;
holders [ TCKind._tk_TypeCode ] = TypeCodeHolder.class;
holders [ TCKind._tk_any ] = AnyHolder.class;
holders [ TCKind._tk_boolean ] = BooleanHolder.class;
holders [ TCKind._tk_char ] = CharHolder.class;
holders [ TCKind._tk_double ] = DoubleHolder.class;
holders [ TCKind._tk_float ] = FloatHolder.class;
holders [ TCKind._tk_fixed ] = FixedHolder.class;
holders [ TCKind._tk_long ] = IntHolder.class;
holders [ TCKind._tk_longdouble ] = DoubleHolder.class;
holders [ TCKind._tk_longlong ] = LongHolder.class;
holders [ TCKind._tk_octet ] = OctetHolder.class;
holders [ TCKind._tk_short ] = ShortHolder.class;
holders [ TCKind._tk_string ] = StringHolder.class;
holders [ TCKind._tk_ulong ] = IntHolder.class;
holders [ TCKind._tk_ulonglong ] = LongHolder.class;
holders [ TCKind._tk_ushort ] = ShortHolder.class;
holders [ TCKind._tk_wchar ] = WCharHolder.class;
holders [ TCKind._tk_wstring ] = WStringHolder.class;
{
holders = new Class[32];
holders[TCKind._tk_Principal] = PrincipalHolder.class;
holders[TCKind._tk_TypeCode] = TypeCodeHolder.class;
holders[TCKind._tk_any] = AnyHolder.class;
holders[TCKind._tk_boolean] = BooleanHolder.class;
holders[TCKind._tk_char] = CharHolder.class;
holders[TCKind._tk_double] = DoubleHolder.class;
holders[TCKind._tk_float] = FloatHolder.class;
holders[TCKind._tk_fixed] = FixedHolder.class;
holders[TCKind._tk_long] = IntHolder.class;
holders[TCKind._tk_longdouble] = DoubleHolder.class;
holders[TCKind._tk_longlong] = LongHolder.class;
holders[TCKind._tk_octet] = OctetHolder.class;
holders[TCKind._tk_short] = ShortHolder.class;
holders[TCKind._tk_string] = StringHolder.class;
holders[TCKind._tk_ulong] = IntHolder.class;
holders[TCKind._tk_ulonglong] = LongHolder.class;
holders[TCKind._tk_ushort] = ShortHolder.class;
holders[TCKind._tk_wchar] = WCharHolder.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_octet ] = OctetSeqHolder.class;
seqHolders [ TCKind._tk_any ] = AnySeqHolder.class;
seqHolders [ TCKind._tk_long ] = LongSeqHolder.class;
seqHolders [ TCKind._tk_longlong ] = LongLongSeqHolder.class;
seqHolders [ TCKind._tk_float ] = FloatSeqHolder.class;
seqHolders [ TCKind._tk_double ] = DoubleSeqHolder.class;
seqHolders [ TCKind._tk_char ] = CharSeqHolder.class;
seqHolders [ TCKind._tk_boolean ] = BooleanSeqHolder.class;
seqHolders [ TCKind._tk_wchar ] = WCharSeqHolder.class;
seqHolders [ TCKind._tk_ushort ] = UShortSeqHolder.class;
seqHolders [ TCKind._tk_ulong ] = ULongSeqHolder.class;
seqHolders [ TCKind._tk_string ] = StringSeqHolder.class;
seqHolders [ TCKind._tk_wstring ] = WStringSeqHolder.class;
}
seqHolders[TCKind._tk_ulonglong] = ULongLongSeqHolder.class;
seqHolders[TCKind._tk_short] = ShortSeqHolder.class;
seqHolders[TCKind._tk_octet] = OctetSeqHolder.class;
seqHolders[TCKind._tk_any] = AnySeqHolder.class;
seqHolders[TCKind._tk_long] = LongSeqHolder.class;
seqHolders[TCKind._tk_longlong] = LongLongSeqHolder.class;
seqHolders[TCKind._tk_float] = FloatSeqHolder.class;
seqHolders[TCKind._tk_double] = DoubleSeqHolder.class;
seqHolders[TCKind._tk_char] = CharSeqHolder.class;
seqHolders[TCKind._tk_boolean] = BooleanSeqHolder.class;
seqHolders[TCKind._tk_wchar] = WCharSeqHolder.class;
seqHolders[TCKind._tk_ushort] = UShortSeqHolder.class;
seqHolders[TCKind._tk_ulong] = ULongSeqHolder.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.
* This function returns the defined holders for the built-in primitive
* types and they sequences.
* Create a holder for storing the value of the given built-in final_type. This
* function returns the defined holders for the built-in primitive types and
* they sequences.
*
* @param t the typecode
*
* @return an instance of the corresponding built-in holder of null
* if no such is defined for this type. The holder is created with a
* parameterless constructor.
* @return an instance of the corresponding built-in holder of null if no such
* is defined for this final_type. The holder is created with a parameterless
* constructor.
*/
public static Streamable createHolder(TypeCode t)
{
@ -145,24 +147,23 @@ public class holderFactory
int componentKind;
Streamable holder = null;
Streamable component;
if (kind < holders.length && holders [ kind ] != null)
holder = (Streamable) holders [ kind ].newInstance();
if (kind < holders.length && holders[kind] != null)
holder = (Streamable) holders[kind].newInstance();
if (holder != null)
return holder;
switch (kind)
{
case TCKind._tk_sequence :
componentKind = t.content_type().kind().value();
if (componentKind < seqHolders.length)
return (Streamable) seqHolders [ componentKind ].newInstance();
break;
case TCKind._tk_sequence:
componentKind = t.content_type().kind().value();
if (componentKind < seqHolders.length)
return (Streamable) seqHolders[componentKind].newInstance();
break;
default :
break;
default:
break;
}
}
catch (Exception ex)

View file

@ -1,39 +1,39 @@
/* 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
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 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.
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.
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.
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. */
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.CORBA;
@ -61,10 +61,10 @@ public class primitiveArrayTypeCode
private int length;
/**
* Create a primitive array type code, defining the sequence
* {@link TCKind.tk_sequence)} with
* Create a primitive array type code, defining the sequence
* {@link TCKind.tk_sequence)} with
* the given member type.
*
*
* @param array_of the sequence member type.
*/
public primitiveArrayTypeCode(TCKind array_of)
@ -76,7 +76,7 @@ public class primitiveArrayTypeCode
/**
* Create a primitive array type code, defining the array, sequence
* or other type with the given member type.
*
*
* @param this_type the type of this type (normally either
* sequence of array).
* @param array_of the sequence member type.

View file

@ -1,40 +1,41 @@
/* primitiveTypeCode.java --
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
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.
This file is part of GNU Classpath.
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.
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.
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.
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.
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.
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.
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. */
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.CORBA;

View file

@ -83,7 +83,7 @@ public class typeNamer
new primitiveTypeCode(TCKind.tk_any),
new primitiveTypeCode(TCKind.tk_TypeCode),
new primitiveTypeCode(TCKind.tk_Principal),
new primitiveTypeCode(TCKind.tk_objref),
new recordTypeCode(TCKind.tk_objref),
new primitiveTypeCode(TCKind.tk_struct),
new primitiveTypeCode(TCKind.tk_union),
new primitiveTypeCode(TCKind.tk_enum),
@ -104,6 +104,15 @@ public class typeNamer
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.
*
@ -168,4 +177,4 @@ public class typeNamer
return "type of kind '" + type.kind().value() + "'";
}
}
}
}

View file

@ -60,7 +60,7 @@ import java.io.IOException;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
class universalHolder
public class universalHolder
implements Streamable
{
/**
@ -71,7 +71,7 @@ class universalHolder
/**
* Create the universal holder that uses the given buffer to store the data.
*/
universalHolder(cdrBufOutput buffer)
public universalHolder(cdrBufOutput buffer)
{
value = buffer;
}
@ -154,4 +154,21 @@ class universalHolder
{
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);
}
}
}

View file

@ -79,33 +79,6 @@ public interface Configuration
*/
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.
*/

View file

@ -1,47 +0,0 @@
/* 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
{
}

View file

@ -1,52 +0,0 @@
/* RawData32.java -- 32 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 RawData32 extends RawData
{
final int data;
public RawData32(int data)
{
this.data = data;
}
}

View file

@ -1,52 +0,0 @@
/* 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;
}
}

View file

@ -110,6 +110,12 @@ public final class Component extends Level
*/
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 endIndex;

View file

@ -53,11 +53,11 @@ public class InvalidThreadGroupException
public InvalidThreadGroupException (long id)
{
super (JdwpConstants.Error.INVALID_THREAD_GROUP,
"invalid thread id (" + id + ")");
"invalid thread group id (" + id + ")");
}
public InvalidThreadGroupException (Throwable t)
{
super (JdwpConstants.Error.INVALID_THREAD, t);
super (JdwpConstants.Error.INVALID_THREAD_GROUP, t);
}
}

View file

@ -50,8 +50,13 @@ import gnu.classpath.jdwp.JdwpConstants;
public class JdwpInternalErrorException
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);
}
}

View file

@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidClassLoaderException;
/**
* A class which represents a JDWP thread id
@ -61,4 +62,21 @@ public class ClassLoaderId
{
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;
}
}

View file

@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidClassException;
/**
* A class which represents a JDWP class object id
@ -61,4 +62,21 @@ public class ClassObjectId
{
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;
}
}

View file

@ -41,6 +41,7 @@ package gnu.classpath.jdwp.id;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.ref.SoftReference;
/**
* A baseclass for all object types reported to the debugger
@ -61,6 +62,11 @@ public abstract class JdwpId
*/
private byte _tag;
/**
* The object/class represented by this Id
*/
protected SoftReference _reference;
/**
* Constructs an empty <code>JdwpId</code>
*/
@ -72,7 +78,7 @@ public abstract class JdwpId
/**
* Sets the id for this object reference
*/
void setId (long id)
public void setId (long id)
{
_id = id;
}
@ -85,16 +91,34 @@ public abstract class JdwpId
return _id;
}
/**
* 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
* are equal if they point to the same type and contain to
* the same id number. (NOTE: This is a much stricter check
* than is necessary: all <code>JdwpId</code>s have unique
* ids.)
* the same id number.
*/
public boolean equals (JdwpId id)
{
return ((id.getClass () == getClass ()) && (id.getId () == getId ()));
return (id.getId () == getId ());
}
/**

View file

@ -1,165 +0,0 @@
/* 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;
}
}
}

View file

@ -40,12 +40,15 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidObjectException;
import java.io.DataOutputStream;
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>
*/
@ -57,6 +60,9 @@ public class ObjectId
*/
public static final Class typeClass = Object.class;
// Handle to disable garbage collection
private Object _handle;
/**
* Constructs a new <code>ObjectId</code>
*/
@ -84,6 +90,23 @@ public class ObjectId
return 8;
}
/**
* 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
*
@ -96,4 +119,21 @@ public class ObjectId
// All we need to do is write out our id as an 8-byte integer
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;
}
}

View file

@ -39,6 +39,8 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.exception.InvalidClassException;
import java.io.DataOutputStream;
import java.io.IOException;
@ -67,6 +69,22 @@ public class ReferenceTypeId
return 8;
}
/**
* 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
*

View file

@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidStringException;
/**
* A class which represents a JDWP string id
@ -61,4 +62,21 @@ public class StringId
{
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;
}
}

View file

@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidThreadGroupException;
/**
* A class which represents a JDWP thread group id
@ -61,4 +62,21 @@ public class ThreadGroupId
{
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;
}
}

View file

@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.id;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidThreadException;
/**
* A class which represents a JDWP thread id
@ -61,4 +62,24 @@ public class ThreadId
{
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;
}
}

View file

@ -15,8 +15,8 @@ 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., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
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
@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.VMIdManager;
import java.io.DataOutputStream;
import java.nio.ByteBuffer;
@ -50,8 +51,13 @@ import java.nio.ByteBuffer;
*
* @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
* reply packet to ostr.
@ -62,7 +68,7 @@ public interface CommandSet
* @return true if the JDWP layer should shut down in response to this packet
* @throws JdwpException command wasn't carried out successfully
*/
public boolean runCommand(ByteBuffer bb, DataOutputStream os,
byte command)
public abstract boolean runCommand(ByteBuffer bb, DataOutputStream os,
byte command)
throws JdwpException;
}

View file

@ -49,7 +49,8 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class FieldCommandSet implements CommandSet
public class FieldCommandSet
extends CommandSet
{
/**
* There are no commands for this CommandSet at this time so we just throw a

View file

@ -50,7 +50,8 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class InterfaceTypeCommandSet implements CommandSet
public class InterfaceTypeCommandSet
extends CommandSet
{
/**
* There are no commands for this CommandSet at this time so we just throw a

View file

@ -1,4 +1,4 @@
/* ObjectReferenceCommandSet.java -- lass to implement the ObjectReference
/* ObjectReferenceCommandSet.java -- class to implement the ObjectReference
Command Set
Copyright (C) 2005 Free Software Foundation
@ -36,20 +36,19 @@ 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.processor;
import gnu.classpath.jdwp.IVirtualMachine;
import gnu.classpath.jdwp.Jdwp;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.VMVirtualMachine;
import gnu.classpath.jdwp.exception.InvalidFieldException;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
import gnu.classpath.jdwp.exception.NotImplementedException;
import gnu.classpath.jdwp.id.IdManager;
import gnu.classpath.jdwp.id.ObjectId;
import gnu.classpath.jdwp.id.ReferenceTypeId;
import gnu.classpath.jdwp.util.Value;
import gnu.classpath.jdwp.util.MethodInvoker;
import gnu.classpath.jdwp.util.MethodResult;
import java.io.DataOutputStream;
import java.io.IOException;
@ -62,14 +61,9 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ObjectReferenceCommandSet implements CommandSet
public class ObjectReferenceCommandSet
extends CommandSet
{
// Our hook into the jvm
private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
// Manages all the different ids that are assigned by jdwp
private final IdManager idMan = Jdwp.getIdManager();
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
throws JdwpException
{
@ -103,7 +97,7 @@ public class ObjectReferenceCommandSet implements CommandSet
break;
default:
throw new NotImplementedException("Command " + command +
" not found in String Reference Command Set.");
" not found in ObjectReference Command Set.");
}
}
catch (IOException ex)
@ -118,7 +112,7 @@ public class ObjectReferenceCommandSet implements CommandSet
private void executeReferenceType(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
Object obj = oid.getObject();
Class clazz = obj.getClass();
ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
@ -128,7 +122,7 @@ public class ObjectReferenceCommandSet implements CommandSet
private void executeGetValues(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
Object obj = oid.getObject();
int numFields = bb.getInt();
@ -137,25 +131,41 @@ public class ObjectReferenceCommandSet implements CommandSet
for (int i = 0; i < numFields; i++)
{
Field field = (Field) idMan.readId(bb).getObject();
Value.writeValueFromField(os, field, obj);
Field field = (Field) idMan.readObjectId(bb).getObject();
try
{
field.setAccessible(true); // Might be a private field
Object value = field.get(obj);
Value.writeTaggedValue(os, value);
}
catch (IllegalArgumentException ex)
{
// I suppose this would best qualify as an invalid field then
throw new InvalidFieldException(ex);
}
catch (IllegalAccessException ex)
{
// Since we set it as accessible this really shouldn't happen
throw new JdwpInternalErrorException(ex);
}
}
}
private void executeSetValues(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
Object obj = oid.getObject();
int numFields = bb.getInt();
for (int i = 0; i < numFields; i++)
{
Field field = (Field) idMan.readId(bb).getObject();
Object value = Value.getObj(bb, field);
Field field = (Field) idMan.readObjectId(bb).getObject();
Object value = Value.getUntaggedObj(bb, field.getType());
try
{
field.setAccessible(true); // Might be a private field
field.set(obj, value);
}
catch (IllegalArgumentException ex)
@ -165,7 +175,7 @@ public class ObjectReferenceCommandSet implements CommandSet
}
catch (IllegalAccessException ex)
{
// We should be able to access any field
// Since we set it as accessible this really shouldn't happen
throw new JdwpInternalErrorException(ex);
}
}
@ -184,16 +194,16 @@ public class ObjectReferenceCommandSet implements CommandSet
private void executeInvokeMethod(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
Object obj = oid.getObject();
ObjectId tid = idMan.readId(bb);
ObjectId tid = idMan.readObjectId(bb);
Thread thread = (Thread) tid.getObject();
ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
Class clazz = rid.getType();
ObjectId mid = idMan.readId(bb);
ObjectId mid = idMan.readObjectId(bb);
Method method = (Method) mid.getObject();
int args = bb.getInt();
@ -205,45 +215,49 @@ public class ObjectReferenceCommandSet implements CommandSet
}
int invokeOptions = bb.getInt();
if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED) != 0)
{ // We must suspend all other running threads first
vm.suspendAllThreads();
boolean suspend = ((invokeOptions
& JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED)
!= 0);
if (suspend)
{
// We must suspend all other running threads first
VMVirtualMachine.suspendAllThreads ();
}
boolean nonVirtual;
if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_NONVIRTUAL) != 0)
nonVirtual = true;
else
nonVirtual = false;
MethodInvoker vmi = new MethodInvoker(vm);
vmi.executeMethod(obj, thread, clazz, method, values, nonVirtual);
Object value = vmi.getReturnedValue();
ObjectId exceptionId = vmi.getExceptionId();
Value.writeValue(os, value);
exceptionId.writeTagged(os);
boolean nonVirtual = ((invokeOptions
& JdwpConstants.InvokeOptions.INVOKE_NONVIRTUAL)
!= 0);
MethodResult mr = VMVirtualMachine.executeMethod(obj, thread,
clazz, method,
values, nonVirtual);
Object value = mr.getReturnedValue();
Exception exception = mr.getThrownException();
ObjectId eId = idMan.getObjectId(exception);
Value.writeTaggedValue(os, value);
eId.writeTagged(os);
}
private void executeDisableCollection(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
oid.disableCollection();
}
private void executeEnableCollection(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
ObjectId oid = idMan.readObjectId(bb);
oid.enableCollection();
}
private void executeIsCollected(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = idMan.readId(bb);
boolean collected = oid.isCollected();
ObjectId oid = idMan.readObjectId(bb);
boolean collected = (oid.getReference().get () == null);
os.writeBoolean(collected);
}
}

View file

@ -52,6 +52,7 @@ import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.security.PrivilegedAction;
/**
* This class is responsible for processing packets from the
@ -62,7 +63,7 @@ import java.nio.ByteBuffer;
* @author Keith Seitz (keiths@redhat.com)
*/
public class PacketProcessor
extends Thread
implements PrivilegedAction
{
// The connection to the debugger
private JdwpConnection _connection;
@ -134,7 +135,7 @@ public class PacketProcessor
* Main run routine for this thread. Will loop getting packets
* from the connection and processing them.
*/
public void run ()
public Object run ()
{
try
{
@ -149,6 +150,7 @@ public class PacketProcessor
}
// Time to shutdown, tell Jdwp to shutdown
Jdwp.getDefault().shutdown();
return null;
}
/**
@ -157,7 +159,6 @@ public class PacketProcessor
public void shutdown ()
{
_shutdown = true;
interrupt ();
}
// Helper function which actually does all the work of waiting

View file

@ -1,4 +1,4 @@
/* ReferenceTypeCommandSet.java -- lass to implement the ReferenceType
/* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
Command Set
Copyright (C) 2005 Free Software Foundation
@ -36,16 +36,15 @@ 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.processor;
import gnu.classpath.jdwp.IVirtualMachine;
import gnu.classpath.jdwp.Jdwp;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.VMVirtualMachine;
import gnu.classpath.jdwp.exception.InvalidFieldException;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
import gnu.classpath.jdwp.exception.NotImplementedException;
import gnu.classpath.jdwp.id.IdManager;
import gnu.classpath.jdwp.id.ObjectId;
import gnu.classpath.jdwp.id.ReferenceTypeId;
import gnu.classpath.jdwp.util.JdwpString;
@ -63,14 +62,9 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ReferenceTypeCommandSet implements CommandSet
public class ReferenceTypeCommandSet
extends CommandSet
{
// Our hook into the jvm
private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
// Manages all the different ids that are assigned by jdwp
private final IdManager idMan = Jdwp.getIdManager();
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
throws JdwpException
{
@ -125,7 +119,7 @@ public class ReferenceTypeCommandSet implements CommandSet
break;
default:
throw new NotImplementedException("Command " + command +
" not found in String Reference Command Set.");
" not found in ReferenceType Command Set.");
}
}
catch (IOException ex)
@ -152,7 +146,7 @@ public class ReferenceTypeCommandSet implements CommandSet
Class clazz = refId.getType();
ClassLoader loader = clazz.getClassLoader();
ObjectId oid = idMan.getId(loader);
ObjectId oid = idMan.getObjectId(loader);
oid.write(os);
}
@ -176,7 +170,7 @@ public class ReferenceTypeCommandSet implements CommandSet
for (int i = 0; i < fields.length; i++)
{
Field field = fields[i];
idMan.getId(field).write(os);
idMan.getObjectId(field).write(os);
JdwpString.writeString(os, field.getName());
JdwpString.writeString(os, Signature.computeFieldSignature(field));
os.writeInt(field.getModifiers());
@ -194,7 +188,7 @@ public class ReferenceTypeCommandSet implements CommandSet
for (int i = 0; i < methods.length; i++)
{
Method method = methods[i];
idMan.getId(method).write(os);
idMan.getObjectId(method).write(os);
JdwpString.writeString(os, method.getName());
JdwpString.writeString(os, Signature.computeMethodSignature(method));
os.writeInt(method.getModifiers());
@ -211,14 +205,31 @@ public class ReferenceTypeCommandSet implements CommandSet
os.writeInt(numFields); // Looks pointless but this is the protocol
for (int i = 0; i < numFields; i++)
{
ObjectId fieldId = idMan.readId(bb);
ObjectId fieldId = idMan.readObjectId(bb);
Field field = (Field) (fieldId.getObject());
Class fieldClazz = field.getDeclaringClass();
// We don't actually need the clazz to get the field but we might as
// well check that the debugger got it right
if (fieldClazz.isAssignableFrom(clazz))
Value.writeStaticValueFromField(os, field);
{
try
{
field.setAccessible(true); // Might be a private field
Object value = field.get(null);
Value.writeTaggedValue(os, value);
}
catch (IllegalArgumentException ex)
{
// I suppose this would best qualify as an invalid field then
throw new InvalidFieldException(ex);
}
catch (IllegalAccessException ex)
{
// Since we set it as accessible this really shouldn't happen
throw new JdwpInternalErrorException(ex);
}
}
else
throw new InvalidFieldException(fieldId.getId());
}
@ -231,7 +242,7 @@ public class ReferenceTypeCommandSet implements CommandSet
Class clazz = refId.getType();
// We'll need to go into the jvm for this unless there's an easier way
String sourceFileName = vm.getSourceFile(clazz);
String sourceFileName = VMVirtualMachine.getSourceFile(clazz);
JdwpString.writeString(os, sourceFileName);
// clazz.getProtectionDomain().getCodeSource().getLocation();
}
@ -258,7 +269,7 @@ public class ReferenceTypeCommandSet implements CommandSet
Class clazz = refId.getType();
// I don't think there's any other way to get this
int status = vm.getStatus(clazz);
int status = VMVirtualMachine.getClassStatus(clazz);
os.writeInt(status);
}
@ -282,7 +293,7 @@ public class ReferenceTypeCommandSet implements CommandSet
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
Class clazz = refId.getType();
ObjectId clazzObjectId = idMan.getId(clazz);
ObjectId clazzObjectId = idMan.getObjectId(clazz);
clazzObjectId.write(os);
}

View file

@ -16,8 +16,8 @@ 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., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
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
@ -40,7 +40,6 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor;
import gnu.classpath.jdwp.Jdwp;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
@ -57,7 +56,8 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class StringReferenceCommandSet implements CommandSet
public class StringReferenceCommandSet
extends CommandSet
{
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
@ -90,7 +90,7 @@ public class StringReferenceCommandSet implements CommandSet
private void executeValue(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ObjectId oid = Jdwp.getIdManager().readId(bb);
ObjectId oid = idMan.readObjectId(bb);
String str = (String) oid.getObject();
JdwpString.writeString(os, str);

View file

@ -39,13 +39,11 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor;
import gnu.classpath.jdwp.IVirtualMachine;
import gnu.classpath.jdwp.Jdwp;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.VMVirtualMachine;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
import gnu.classpath.jdwp.exception.NotImplementedException;
import gnu.classpath.jdwp.id.IdManager;
import gnu.classpath.jdwp.id.ObjectId;
import gnu.classpath.jdwp.id.ReferenceTypeId;
import gnu.classpath.jdwp.util.JdwpString;
@ -63,17 +61,9 @@ import java.util.Properties;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class VirtualMachineCommandSet implements CommandSet
public class VirtualMachineCommandSet
extends CommandSet
{
// Our hook into the jvm
private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
// Manages all the different ids that are assigned by jdwp
private final IdManager idMan = Jdwp.getIdManager();
// The Jdwp object
private final Jdwp jdwp = Jdwp.getDefault();
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
throws JdwpException
{
@ -144,9 +134,9 @@ public class VirtualMachineCommandSet implements CommandSet
case JdwpConstants.CommandSet.VirtualMachine.ALL_CLASSES_WITH_GENERIC:
executeAllClassesWithGeneric(bb, os);
break;
default:
break;
throw new NotImplementedException("Command " + command +
" not found in VirtualMachine Command Set.");
}
}
catch (IOException ex)
@ -187,7 +177,7 @@ public class VirtualMachineCommandSet implements CommandSet
ArrayList allMatchingClasses = new ArrayList();
// This will be an Iterator over all loaded Classes
Iterator iter = vm.getAllLoadedClasses();
Iterator iter = VMVirtualMachine.getAllLoadedClasses();
while (iter.hasNext())
{
@ -203,7 +193,7 @@ public class VirtualMachineCommandSet implements CommandSet
Class clazz = (Class) allMatchingClasses.get(i);
ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
id.writeTagged(os);
int status = vm.getStatus(clazz);
int status = VMVirtualMachine.getClassStatus(clazz);
os.writeInt(status);
}
}
@ -214,14 +204,14 @@ public class VirtualMachineCommandSet implements CommandSet
// Disable garbage collection while we're collecting the info on loaded
// classes so we some classes don't get collected between the time we get
// the count and the time we get the list
vm.disableGarbageCollection();
//VMVirtualMachine.disableGarbageCollection();
int classCount = vm.getAllLoadedClassesCount();
int classCount = VMVirtualMachine.getAllLoadedClassesCount();
os.writeInt(classCount);
// This will be an Iterator over all loaded Classes
Iterator iter = vm.getAllLoadedClasses();
vm.enableGarbageCollection();
Iterator iter = VMVirtualMachine.getAllLoadedClasses();
//VMVirtualMachine.enableGarbageCollection();
int count = 0;
// Note it's possible classes were created since out classCount so make
@ -233,7 +223,7 @@ public class VirtualMachineCommandSet implements CommandSet
id.writeTagged(os);
String sig = Signature.computeClassSignature(clazz);
JdwpString.writeString(os, sig);
int status = vm.getStatus(clazz);
int status = VMVirtualMachine.getClassStatus(clazz);
os.writeInt(status);
}
}
@ -246,7 +236,7 @@ public class VirtualMachineCommandSet implements CommandSet
int numThreads = root.activeCount();
Thread allThreads[] = new Thread[numThreads];
root.enumerate(allThreads, true);
root.enumerate(allThreads);
// We need to loop through for the true count since some threads may have
// been destroyed since we got
@ -270,18 +260,18 @@ public class VirtualMachineCommandSet implements CommandSet
if (thread == null)
break; // No threads after this point
if (!thread.getThreadGroup().equals(jdwpGroup))
idMan.getId(thread).write(os);
idMan.getObjectId(thread).write(os);
}
}
private void executeTopLevelThreadGroups(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
ThreadGroup jdwpGroup = jdwp.getJdwpThreadGroup();
ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup ();
ThreadGroup root = getRootThreadGroup(jdwpGroup);
os.writeInt(1); // Just one top level group allowed?
idMan.getId(root);
idMan.getObjectId(root);
}
private void executeDispose(ByteBuffer bb, DataOutputStream os)
@ -291,11 +281,11 @@ public class VirtualMachineCommandSet implements CommandSet
// suspended multiple times, we likely need a way to keep track of how many
// times a thread has been suspended or else a stronger resume method for
// this purpose
// vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
// VMVirtualMachine.resumeAllThreads ();
// Simply shutting down the jdwp layer will take care of the rest of the
// shutdown other than disabling debugging in the VM
// vm.disableDebugging();
// VMVirtualMachine.disableDebugging();
// Don't implement this until we're sure how to remove all the debugging
// effects from the VM.
@ -318,27 +308,27 @@ public class VirtualMachineCommandSet implements CommandSet
private void executeSuspend(ByteBuffer bb, DataOutputStream os)
throws JdwpException
{
vm.suspendAllThreadsExcept(jdwp.getJdwpThreadGroup());
VMVirtualMachine.suspendAllThreads ();
}
private void executeResume(ByteBuffer bb, DataOutputStream os)
throws JdwpException
{
vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
VMVirtualMachine.resumeAllThreads ();
}
private void executeExit(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
int exitCode = bb.getInt();
jdwp.setExit(exitCode);
System.exit (exitCode);
}
private void executeCreateString(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
String string = JdwpString.readString(bb);
ObjectId stringId = Jdwp.getIdManager().getId(string);
ObjectId stringId = idMan.getObjectId(string);
// Since this string isn't referenced anywhere we'll disable garbage
// collection on it so it's still around when the debugger gets back to it.
@ -386,7 +376,7 @@ public class VirtualMachineCommandSet implements CommandSet
{
// Instead of going through the list of objects they give us it's probably
// better just to find the garbage collected objects ourselves
idMan.update();
//idMan.update();
}
private void executeHoldEvents(ByteBuffer bb, DataOutputStream os)

View file

@ -49,7 +49,7 @@ import java.util.HashMap;
* A class representing a transport layer. This class serves as a generic
* interface for all transport types used in the JDWP back-end.
*
* @author Keith Seitz <keiths@redhat.com>
* @author Keith Seitz (keiths@redhat.com)
*/
public interface ITransport
{
@ -70,6 +70,11 @@ public interface ITransport
public void initialize ()
throws TransportException;
/**
* Shutdown the transport
*/
public void shutdown ();
/**
* Get the input stream for the transport
*/

View file

@ -96,8 +96,9 @@ public class JdwpConnection
*
* @param transport the transport to use for communications
*/
public JdwpConnection (ITransport transport)
public JdwpConnection (ThreadGroup group, ITransport transport)
{
super (group, "JDWP connection thread");
_transport = transport;
_commandQueue = new ArrayList ();
_shutdown = false;
@ -177,7 +178,7 @@ public class JdwpConnection
2. Transport was shutdown
In either case, we make sure that all of the
back-end gets shutdown. */
Jdwp.getInstance().shutdown ();
Jdwp.getDefault().shutdown ();
}
catch (Throwable t)
{

View file

@ -57,7 +57,7 @@ import javax.net.SocketFactory;
* configury string that looks like "name=dt_socket,
* address=localhost:1234,server=y".
*
* @author Keith Seitz <keiths@redhat.com>
* @author Keith Seitz (keiths@redhat.com)
*/
class SocketTransport
implements ITransport
@ -145,6 +145,22 @@ class SocketTransport
}
}
/**
* Shutdown the socket. This could cause SocketExceptions
* for anyone blocked on socket i/o
*/
public void shutdown ()
{
try
{
_socket.close ();
}
catch (Throwable t)
{
// We don't really care about errors at this point
}
}
/**
* Returns an <code>InputStream</code> for the transport
*

View file

@ -37,17 +37,28 @@ exception statement from your version. */
package gnu.java.awt;
import java.applet.Applet;
import java.awt.Component;
import java.awt.Container;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.MouseEvent;
import java.util.AbstractSequentialList;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.WeakHashMap;
import java.lang.reflect.InvocationTargetException;
/**
* This class provides utility methods that are commonly used in AWT
* (and Swing).
* This class mirrors the javax.swing.SwingUtilities class. It
* provides commonly needed functionalities for AWT classes without
* the need to reference classes in the javax.swing package.
*/
public class AWTUtilities
{
@ -318,4 +329,366 @@ public class AWTUtilities
return visibleChildren;
}
/**
* Calculates the portion of the base rectangle which is inside the
* insets.
*
* @param base The rectangle to apply the insets to
* @param insets The insets to apply to the base rectangle
* @param ret A rectangle to use for storing the return value, or
* <code>null</code>
*
* @return The calculated area inside the base rectangle and its insets,
* either stored in ret or a new Rectangle if ret is <code>null</code>
*
* @see #calculateInnerArea
*/
public static Rectangle calculateInsetArea(Rectangle base, Insets insets,
Rectangle ret)
{
if (ret == null)
ret = new Rectangle();
ret.setBounds(base.x + insets.left, base.y + insets.top,
base.width - (insets.left + insets.right),
base.height - (insets.top + insets.bottom));
return ret;
}
/**
* Calculates the bounds of a component in the component's own coordinate
* space. The result has the same height and width as the component's
* bounds, but its location is set to (0,0).
*
* @param aComponent The component to measure
*
* @return The component's bounds in its local coordinate space
*/
public static Rectangle getLocalBounds(Component aComponent)
{
Rectangle bounds = aComponent.getBounds();
return new Rectangle(0, 0, bounds.width, bounds.height);
}
/**
* Returns the font metrics object for a given font. The metrics can be
* used to calculate crude bounding boxes and positioning information,
* for laying out components with textual elements.
*
* @param font The font to get metrics for
*
* @return The font's metrics
*
* @see java.awt.font.GlyphMetrics
*/
public static FontMetrics getFontMetrics(Font font)
{
return Toolkit.getDefaultToolkit().getFontMetrics(font);
}
/**
* Returns the least ancestor of <code>comp</code> which has the
* specified name.
*
* @param name The name to search for
* @param comp The component to search the ancestors of
*
* @return The nearest ancestor of <code>comp</code> with the given
* name, or <code>null</code> if no such ancestor exists
*
* @see java.awt.Component#getName
* @see #getAncestorOfClass
*/
public static Container getAncestorNamed(String name, Component comp)
{
while (comp != null && (comp.getName() != name))
comp = comp.getParent();
return (Container) comp;
}
/**
* Returns the least ancestor of <code>comp</code> which is an instance
* of the specified class.
*
* @param c The class to search for
* @param comp The component to search the ancestors of
*
* @return The nearest ancestor of <code>comp</code> which is an instance
* of the given class, or <code>null</code> if no such ancestor exists
*
* @see #getAncestorOfClass
* @see #windowForComponent
* @see
*
*/
public static Container getAncestorOfClass(Class c, Component comp)
{
while (comp != null && (! c.isInstance(comp)))
comp = comp.getParent();
return (Container) comp;
}
/**
* Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
*
* @param comp The component to search for an ancestor window
*
* @return An ancestral window, or <code>null</code> if none exists
*/
public static Window windowForComponent(Component comp)
{
return (Window) getAncestorOfClass(Window.class, comp);
}
/**
* Returns the "root" of the component tree containint <code>comp</code>
* The root is defined as either the <em>least</em> ancestor of
* <code>comp</code> which is a {@link Window}, or the <em>greatest</em>
* ancestor of <code>comp</code> which is a {@link Applet} if no {@link
* Window} ancestors are found.
*
* @param comp The component to search for a root
*
* @return The root of the component's tree, or <code>null</code>
*/
public static Component getRoot(Component comp)
{
Applet app = null;
Window win = null;
while (comp != null)
{
if (win == null && comp instanceof Window)
win = (Window) comp;
else if (comp instanceof Applet)
app = (Applet) comp;
comp = comp.getParent();
}
if (win != null)
return win;
else
return app;
}
/**
* Return true if a descends from b, in other words if b is an
* ancestor of a.
*
* @param a The child to search the ancestry of
* @param b The potential ancestor to search for
*
* @return true if a is a descendent of b, false otherwise
*/
public static boolean isDescendingFrom(Component a, Component b)
{
while (true)
{
if (a == null || b == null)
return false;
if (a == b)
return true;
a = a.getParent();
}
}
/**
* Returns the deepest descendent of parent which is both visible and
* contains the point <code>(x,y)</code>. Returns parent when either
* parent is not a container, or has no children which contain
* <code>(x,y)</code>. Returns <code>null</code> when either
* <code>(x,y)</code> is outside the bounds of parent, or parent is
* <code>null</code>.
*
* @param parent The component to search the descendents of
* @param x Horizontal coordinate to search for
* @param y Vertical coordinate to search for
*
* @return A component containing <code>(x,y)</code>, or
* <code>null</code>
*
* @see java.awt.Container#findComponentAt
*/
public static Component getDeepestComponentAt(Component parent, int x, int y)
{
if (parent == null || (! parent.contains(x, y)))
return null;
if (! (parent instanceof Container))
return parent;
Container c = (Container) parent;
return c.findComponentAt(x, y);
}
/**
* Converts a point from a component's local coordinate space to "screen"
* coordinates (such as the coordinate space mouse events are delivered
* in). This operation is equivalent to translating the point by the
* location of the component (which is the origin of its coordinate
* space).
*
* @param p The point to convert
* @param c The component which the point is expressed in terms of
*
* @see convertPointFromScreen
*/
public static void convertPointToScreen(Point p, Component c)
{
Point c0 = c.getLocationOnScreen();
p.translate(c0.x, c0.y);
}
/**
* Converts a point from "screen" coordinates (such as the coordinate
* space mouse events are delivered in) to a component's local coordinate
* space. This operation is equivalent to translating the point by the
* negation of the component's location (which is the origin of its
* coordinate space).
*
* @param p The point to convert
* @param c The component which the point should be expressed in terms of
*/
public static void convertPointFromScreen(Point p, Component c)
{
Point c0 = c.getLocationOnScreen();
p.translate(-c0.x, -c0.y);
}
/**
* Converts a point <code>(x,y)</code> from the coordinate space of one
* component to another. This is equivalent to converting the point from
* <code>source</code> space to screen space, then back from screen space
* to <code>destination</code> space. If exactly one of the two
* Components is <code>null</code>, it is taken to refer to the root
* ancestor of the other component. If both are <code>null</code>, no
* transformation is done.
*
* @param source The component which the point is expressed in terms of
* @param x Horizontal coordinate of point to transform
* @param y Vertical coordinate of point to transform
* @param destination The component which the return value will be
* expressed in terms of
*
* @return The point <code>(x,y)</code> converted from the coordinate
* space of the
* source component to the coordinate space of the destination component
*
* @see #convertPointToScreen
* @see #convertPointFromScreen
* @see #convertRectangle
* @see #getRoot
*/
public static Point convertPoint(Component source, int x, int y,
Component destination)
{
Point pt = new Point(x, y);
if (source == null && destination == null)
return pt;
if (source == null)
source = getRoot(destination);
if (destination == null)
destination = getRoot(source);
convertPointToScreen(pt, source);
convertPointFromScreen(pt, destination);
return pt;
}
/**
* Converts a rectangle from the coordinate space of one component to
* another. This is equivalent to converting the rectangle from
* <code>source</code> space to screen space, then back from screen space
* to <code>destination</code> space. If exactly one of the two
* Components is <code>null</code>, it is taken to refer to the root
* ancestor of the other component. If both are <code>null</code>, no
* transformation is done.
*
* @param source The component which the rectangle is expressed in terms of
* @param rect The rectangle to convert
* @param destination The component which the return value will be
* expressed in terms of
*
* @return A new rectangle, equal in size to the input rectangle, but
* with its position converted from the coordinate space of the source
* component to the coordinate space of the destination component
*
* @see #convertPointToScreen
* @see #convertPointFromScreen
* @see #convertPoint
* @see #getRoot
*/
public static Rectangle convertRectangle(Component source, Rectangle rect,
Component destination)
{
Point pt = convertPoint(source, rect.x, rect.y, destination);
return new Rectangle(pt.x, pt.y, rect.width, rect.height);
}
/**
* Convert a mouse event which refrers to one component to another. This
* includes changing the mouse event's coordinate space, as well as the
* source property of the event. If <code>source</code> is
* <code>null</code>, it is taken to refer to <code>destination</code>'s
* root component. If <code>destination</code> is <code>null</code>, the
* new event will remain expressed in <code>source</code>'s coordinate
* system.
*
* @param source The component the mouse event currently refers to
* @param sourceEvent The mouse event to convert
* @param destination The component the new mouse event should refer to
*
* @return A new mouse event expressed in terms of the destination
* component's coordinate space, and with the destination component as
* its source
*
* @see #convertPoint
*/
public static MouseEvent convertMouseEvent(Component source,
MouseEvent sourceEvent,
Component destination)
{
Point newpt = convertPoint(source, sourceEvent.getX(), sourceEvent.getY(),
destination);
return new MouseEvent(destination, sourceEvent.getID(),
sourceEvent.getWhen(), sourceEvent.getModifiers(),
newpt.x, newpt.y, sourceEvent.getClickCount(),
sourceEvent.isPopupTrigger(),
sourceEvent.getButton());
}
/**
* Calls {@link java.awt.EventQueue.invokeLater} with the
* specified {@link Runnable}.
*/
public static void invokeLater(Runnable doRun)
{
java.awt.EventQueue.invokeLater(doRun);
}
/**
* Calls {@link java.awt.EventQueue.invokeAndWait} with the
* specified {@link Runnable}.
*/
public static void invokeAndWait(Runnable doRun)
throws InterruptedException,
InvocationTargetException
{
java.awt.EventQueue.invokeAndWait(doRun);
}
/**
* Calls {@link java.awt.EventQueue.isEventDispatchThread}.
*/
public static boolean isEventDispatchThread()
{
return java.awt.EventQueue.isDispatchThread();
}
}

View file

@ -1,5 +1,5 @@
/* ClasspathToolkit.java -- Abstract superclass for Classpath toolkits.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -42,11 +42,12 @@ import gnu.java.awt.EmbeddedWindow;
import gnu.java.awt.peer.ClasspathFontPeer;
import gnu.java.awt.peer.EmbeddedWindowPeer;
import gnu.java.awt.peer.ClasspathTextLayoutPeer;
import gnu.java.security.action.SetAccessibleAction;
import java.awt.AWTException;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.DisplayMode;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.GraphicsDevice;
@ -59,11 +60,14 @@ import java.awt.image.ImageProducer;
import java.awt.peer.RobotPeer;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.AttributedString;
import java.util.HashMap;
import java.util.Map;
import java.security.AccessController;
import javax.imageio.spi.IIORegistry;
@ -91,14 +95,6 @@ import javax.imageio.spi.IIORegistry;
public abstract class ClasspathToolkit
extends Toolkit
{
/**
* A map from URLs to previously loaded images, used by {@link
* #getImage(java.net.URL)}. For images that were loaded via a path
* to an image file, the map contains a key with a file URL.
*/
private HashMap imageCache;
/**
* Returns a shared instance of the local, platform-specific
* graphics environment.
@ -109,59 +105,6 @@ public abstract class ClasspathToolkit
*/
public abstract GraphicsEnvironment getLocalGraphicsEnvironment();
/**
* Determines the current size of the default, primary screen.
*
* @throws HeadlessException if the local graphics environment is
* headless, which means that no screen is attached and no user
* interaction is allowed.
*/
public Dimension getScreenSize()
{
DisplayMode mode;
// getDefaultScreenDevice throws HeadlessException if the
// local graphics environment is headless.
mode = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDisplayMode();
return new Dimension(mode.getWidth(), mode.getHeight());
}
/**
* Determines the current color model of the default, primary
* screen.
*
* @see GraphicsEnvironment#getDefaultScreenDevice()
* @see java.awt.GraphicsDevice#getDefaultConfiguration()
* @see java.awt.GraphicsConfiguration#getColorModel()
*
* @throws HeadlessException if the local graphics environment is
* headless, which means that no screen is attached and no user
* interaction is allowed.
*/
public ColorModel getColorModel()
{
// getDefaultScreenDevice throws HeadlessException if the
// local graphics environment is headless.
return GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration()
.getColorModel();
}
/**
* Retrieves the metrics for rendering a font on the screen.
*
* @param font the font whose metrics are requested.
*/
public FontMetrics getFontMetrics(Font font)
{
return ((ClasspathFontPeer) font.getPeer ()).getFontMetrics (font);
}
/**
* Acquires an appropriate {@link ClasspathFontPeer}, for use in
* classpath's implementation of {@link java.awt.Font}.
@ -185,15 +128,42 @@ public abstract class ClasspathToolkit
* Creates a {@link Font}, in a platform-specific manner.
*
* The default implementation simply constructs a {@link Font}, but some
* toolkits may wish to override this, to return {@link Font} subclasses which
* implement {@link java.awt.font.OpenType} or
* toolkits may wish to override this, to return {@link Font} subclasses
* which implement {@link java.awt.font.OpenType} or
* {@link java.awt.font.MultipleMaster}.
*/
public Font getFont (String name, Map attrs)
{
return new Font (name, attrs);
}
Font f = null;
// Circumvent the package-privateness of the
// java.awt.Font.Font(String,Map) constructor.
try
{
Constructor fontConstructor = Font.class.getDeclaredConstructor
(new Class[] { String.class, Map.class });
AccessController.doPrivileged
(new SetAccessibleAction(fontConstructor));
f = (Font) fontConstructor.newInstance(new Object[] { name, attrs });
}
catch (IllegalAccessException e)
{
throw new AssertionError(e);
}
catch (NoSuchMethodException e)
{
throw new AssertionError(e);
}
catch (InstantiationException e)
{
throw new AssertionError(e);
}
catch (InvocationTargetException e)
{
throw new AssertionError(e);
}
return f;
}
/**
* Creates a font, reading the glyph definitions from a stream.
@ -223,137 +193,6 @@ public abstract class ClasspathToolkit
*/
public abstract Font createFont(int format, InputStream stream);
/**
* Returns an image from the specified file, which must be in a
* recognized format. The set of recognized image formats may vary
* from toolkit to toolkit.
*
* <p>This method maintains a cache for images. If an image has been
* loaded from the same path before, the cached copy will be
* returned. The implementation may hold cached copies for an
* indefinite time, which can consume substantial resources with
* large images. Users are therefore advised to use {@link
* #createImage(java.lang.String)} instead.
*
* <p>The default implementation creates a file URL for the
* specified path and invokes {@link #getImage(URL)}.
*
* @param path A path to the image file.
*
* @return IllegalArgumentException if <code>path</code> does not
* designate a valid path.
*/
public Image getImage(String path)
{
try
{
return getImage(new File(path).toURL());
}
catch (MalformedURLException muex)
{
throw (IllegalArgumentException) new IllegalArgumentException(path)
.initCause(muex);
}
}
/**
* Loads an image from the specified URL. The image data must be in
* a recognized format. The set of recognized image formats may vary
* from toolkit to toolkit.
*
* <p>This method maintains a cache for images. If an image has been
* loaded from the same URL before, the cached copy will be
* returned. The implementation may hold cached copies for an
* indefinite time, which can consume substantial resources with
* large images. Users are therefore advised to use {@link
* #createImage(java.net.URL)} instead.
*
* @param url the URL from where the image is read.
*/
public Image getImage(URL url)
{
Image result;
synchronized (this)
{
// Many applications never call getImage. Therefore, we lazily
// create the image cache when it is actually needed.
if (imageCache == null)
imageCache = new HashMap();
else
{
result = (Image) imageCache.get(url);
if (result != null)
return result;
}
// The createImage(URL) method, which is specified by
// java.awt.Toolkit, is not implemented by this abstract class
// because it is platform-dependent. Once Classpath has support
// for the javax.imageio package, it might be worth considering
// that toolkits provide native stream readers. Then, the class
// ClasspathToolkit could provide a general implementation that
// delegates the image format parsing to javax.imageio.
result = createImage(url);
// It is not clear whether it would be a good idea to use weak
// references here. The advantage would be reduced memory
// consumption, since loaded images would not be kept
// forever. But on VMs that frequently perform garbage
// collection (which includes VMs with a parallel or incremental
// collector), the image might frequently need to be re-loaded,
// possibly over a slow network connection.
imageCache.put(url, result);
return result;
}
}
/**
* Returns an image from the specified file, which must be in a
* recognized format. The set of recognized image formats may vary
* from toolkit to toolkit.
*
* <p>A new image is created every time this method gets called,
* even if the same path has been passed before.
*
* <p>The default implementation creates a file URL for the
* specified path and invokes {@link #createImage(URL)}.
*
* @param path A path to the file to be read in.
*/
public Image createImage(String path)
{
try
{
// The abstract method createImage(URL) is defined by
// java.awt.Toolkit, but intentionally not implemented by
// ClasspathToolkit because it is platform specific.
return createImage(new File(path).toURL());
}
catch (MalformedURLException muex)
{
throw (IllegalArgumentException) new IllegalArgumentException(path)
.initCause(muex);
}
}
/**
* Creates an ImageProducer from the specified URL. The image is assumed
* to be in a recognised format. If the toolkit does not implement the
* image format or the image format is not recognised, null is returned.
* This default implementation is overriden by the Toolkit implementations.
*
* @param url URL to read image data from.
*/
public ImageProducer createImageProducer(URL url)
{
return null;
}
public abstract RobotPeer createRobot (GraphicsDevice screen)
throws AWTException;
@ -365,15 +204,10 @@ public abstract class ClasspathToolkit
*/
public abstract EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
/**
/**
* Used to register ImageIO SPIs provided by the toolkit.
*/
public void registerImageIOSpis(IIORegistry reg)
{
}
public abstract boolean nativeQueueEmpty();
public abstract void wakeNativeQueue();
public abstract void iterateNativeQueue(EventQueue locked, boolean block);
public void registerImageIOSpis(IIORegistry reg)
{
}
}

View file

@ -98,11 +98,13 @@ public class EmbeddedWindow extends Frame
}
catch (IllegalAccessException e)
{
// This should never happen.
throw new RuntimeException
("couldn't set java.awt.Component.peer field");
}
catch (NoSuchFieldException e)
{
// This should never happen.
throw new RuntimeException
("couldn't set java.awt.Component.peer field");
}
super.addNotify();

View file

@ -52,6 +52,7 @@ import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.PaintEvent;
import java.awt.image.ColorModel;
@ -295,4 +296,44 @@ public class GLightweightPeer
public void flip(BufferCapabilities.FlipContents contents) { }
public void destroyBuffers() { }
public boolean isRestackSupported()
{
return false;
}
public void cancelPendingPaint(int x, int y, int width, int height)
{
}
public void restack()
{
}
public Rectangle getBounds()
{
return null;
}
public void reparent(ContainerPeer parent)
{
}
public void setBounds(int x, int y, int z, int width, int height)
{
}
public boolean isReparentSupported()
{
return false;
}
public void layout()
{
}
}

View file

@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
import gnu.classpath.Configuration;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@ -52,7 +54,17 @@ import java.text.AttributedCharacterIterator;
public class GdkGraphics extends Graphics
{
private final int native_state = GtkGenericPeer.getUniqueInteger();
static
{
if (Configuration.INIT_LOAD_LIBRARY)
{
System.loadLibrary("gtkpeer");
}
initStaticState ();
}
static native void initStaticState();
private final int native_state = GtkGenericPeer.getUniqueInteger ();
Color color, xorColor;
GtkComponentPeer component;
@ -66,6 +78,7 @@ public class GdkGraphics extends Graphics
static final int GDK_COPY = 0, GDK_XOR = 2;
native void initState (GtkComponentPeer component);
native void initStateUnlocked (GtkComponentPeer component);
native void initState (int width, int height);
native void initFromImage (GtkImage image);
native void copyState (GdkGraphics g);
@ -119,6 +132,15 @@ public class GdkGraphics extends Graphics
clip = new Rectangle (0, 0, d.width, d.height);
}
// called back by native side: realize_cb
void initComponentGraphicsUnlocked ()
{
initStateUnlocked (component);
color = component.awtComponent.getForeground ();
Dimension d = component.awtComponent.getSize ();
clip = new Rectangle (0, 0, d.width, d.height);
}
native void connectSignals (GtkComponentPeer component);
public native void clearRect(int x, int y, int width, int height);
@ -327,7 +349,13 @@ public class GdkGraphics extends Graphics
public void setClip (Shape clip)
{
if (clip != null)
if (clip == null)
{
// Reset clipping.
Dimension d = component.awtComponent.getSize();
setClip(new Rectangle (0, 0, d.width, d.height));
}
else
setClip(clip.getBounds());
}

View file

@ -45,6 +45,7 @@ import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.GradientPaint;
@ -106,8 +107,7 @@ public class GdkGraphics2D extends Graphics2D
if (Configuration.INIT_LOAD_LIBRARY)
System.loadLibrary("gtkpeer");
if (GtkToolkit.useGraphics2D())
initStaticState();
initStaticState();
}
static native void initStaticState();
@ -132,12 +132,14 @@ public class GdkGraphics2D extends Graphics2D
Composite comp;
private Stack stateStack;
private native void initStateUnlocked(GtkComponentPeer component);
private native void initState(GtkComponentPeer component);
private native void initState(int width, int height);
private native void initState(int[] pixes, int width, int height);
private native void copyState(GdkGraphics2D g);
public native void dispose();
private native void cairoSurfaceSetFilter(int filter);
private native void cairoSurfaceSetFilterUnlocked(int filter);
native void connectSignals(GtkComponentPeer component);
public void finalize()
@ -236,6 +238,21 @@ public class GdkGraphics2D extends Graphics2D
stateStack = new Stack();
}
void initComponentGraphics2DUnlocked()
{
initStateUnlocked(component);
setColorUnlocked(component.awtComponent.getForeground());
setBackgroundUnlocked(component.awtComponent.getBackground());
setPaintUnlocked(getColorUnlocked());
setTransformUnlocked(new AffineTransform());
setStrokeUnlocked(new BasicStroke());
setRenderingHintsUnlocked(getDefaultHints());
setFontUnlocked(new Font("SansSerif", Font.PLAIN, 12));
stateStack = new Stack();
}
GdkGraphics2D(BufferedImage bimage)
{
this.bimage = bimage;
@ -280,25 +297,37 @@ public class GdkGraphics2D extends Graphics2D
// drawing utility methods
private native void drawPixels(int[] pixels, int w, int h, int stride,
double[] i2u);
private native void setTexturePixelsUnlocked(int[] pixels, int w, int h, int stride);
private native void setTexturePixels(int[] pixels, int w, int h, int stride);
private native void setGradient(double x1, double y1, double x2, double y2,
int r1, int g1, int b1, int a1, int r2,
int g2, int b2, int a2, boolean cyclic);
private native void setGradientUnlocked(double x1, double y1, double x2, double y2,
int r1, int g1, int b1, int a1, int r2,
int g2, int b2, int a2, boolean cyclic);
// simple passthroughs to cairo
private native void cairoSave();
private native void cairoRestore();
private native void cairoSetMatrix(double[] m);
private native void cairoSetMatrixUnlocked(double[] m);
private native void cairoSetOperator(int cairoOperator);
private native void cairoSetRGBAColor(double red, double green,
double blue, double alpha);
private native void cairoSetRGBAColorUnlocked(double red, double green,
double blue, double alpha);
private native void cairoSetFillRule(int cairoFillRule);
private native void cairoSetLineWidth(double width);
private native void cairoSetLineWidthUnlocked(double width);
private native void cairoSetLineCap(int cairoLineCap);
private native void cairoSetLineCapUnlocked(int cairoLineCap);
private native void cairoSetLineJoin(int cairoLineJoin);
private native void cairoSetLineJoinUnlocked(int cairoLineJoin);
private native void cairoSetDash(double[] dashes, int ndash, double offset);
private native void cairoSetDashUnlocked(double[] dashes, int ndash, double offset);
private native void cairoSetMiterLimit(double limit);
private native void cairoSetMiterLimitUnlocked(double limit);
private native void cairoNewPath();
private native void cairoMoveTo(double x, double y);
private native void cairoLineTo(double x, double y);
@ -689,6 +718,49 @@ public class GdkGraphics2D extends Graphics2D
throw new java.lang.UnsupportedOperationException();
}
public void setPaintUnlocked(Paint p)
{
if (paint == null)
return;
paint = p;
if (paint instanceof Color)
{
setColorUnlocked((Color) paint);
}
else if (paint instanceof TexturePaint)
{
TexturePaint tp = (TexturePaint) paint;
BufferedImage img = tp.getImage();
// map the image to the anchor rectangle
int width = (int) tp.getAnchorRect().getWidth();
int height = (int) tp.getAnchorRect().getHeight();
double scaleX = width / (double) img.getWidth();
double scaleY = width / (double) img.getHeight();
AffineTransform at = new AffineTransform(scaleX, 0, 0, scaleY, 0, 0);
AffineTransformOp op = new AffineTransformOp(at, getRenderingHints());
BufferedImage texture = op.filter(img, null);
int[] pixels = texture.getRGB(0, 0, width, height, null, 0, width);
setTexturePixelsUnlocked(pixels, width, height, width);
}
else if (paint instanceof GradientPaint)
{
GradientPaint gp = (GradientPaint) paint;
Point2D p1 = gp.getPoint1();
Point2D p2 = gp.getPoint2();
Color c1 = gp.getColor1();
Color c2 = gp.getColor2();
setGradientUnlocked(p1.getX(), p1.getY(), p2.getX(), p2.getY(), c1.getRed(),
c1.getGreen(), c1.getBlue(), c1.getAlpha(), c2.getRed(),
c2.getGreen(), c2.getBlue(), c2.getAlpha(), gp.isCyclic());
}
else
throw new java.lang.UnsupportedOperationException();
}
public void setTransform(AffineTransform tx)
{
transform = tx;
@ -700,6 +772,17 @@ public class GdkGraphics2D extends Graphics2D
}
}
public void setTransformUnlocked(AffineTransform tx)
{
transform = tx;
if (transform != null)
{
double[] m = new double[6];
transform.getMatrix(m);
cairoSetMatrixUnlocked(m);
}
}
public void transform(AffineTransform tx)
{
if (transform == null)
@ -784,6 +867,32 @@ public class GdkGraphics2D extends Graphics2D
cairoSetDash(double_dashes, double_dashes.length,
(double) bs.getDashPhase());
}
else
cairoSetDash(new double[0], 0, 0.0);
}
}
public void setStrokeUnlocked(Stroke st)
{
stroke = st;
if (stroke instanceof BasicStroke)
{
BasicStroke bs = (BasicStroke) stroke;
cairoSetLineCapUnlocked(bs.getEndCap());
cairoSetLineWidthUnlocked(bs.getLineWidth());
cairoSetLineJoinUnlocked(bs.getLineJoin());
cairoSetMiterLimitUnlocked(bs.getMiterLimit());
float[] dashes = bs.getDashArray();
if (dashes != null)
{
double[] double_dashes = new double[dashes.length];
for (int i = 0; i < dashes.length; i++)
double_dashes[i] = dashes[i];
cairoSetDashUnlocked(double_dashes, double_dashes.length,
(double) bs.getDashPhase());
}
else
cairoSetDashUnlocked(new double[0], 0, 0.0);
}
}
@ -812,11 +921,27 @@ public class GdkGraphics2D extends Graphics2D
fg.getBlue() / 255.0, fg.getAlpha() / 255.0);
}
public void setColorUnlocked(Color c)
{
if (c == null)
c = Color.BLACK;
fg = c;
paint = c;
cairoSetRGBAColorUnlocked(fg.getRed() / 255.0, fg.getGreen() / 255.0,
fg.getBlue() / 255.0, fg.getAlpha() / 255.0);
}
public Color getColor()
{
return fg;
}
public Color getColorUnlocked()
{
return getColor();
}
public void clipRect(int x, int y, int width, int height)
{
clip(new Rectangle(x, y, width, height));
@ -864,7 +989,13 @@ public class GdkGraphics2D extends Graphics2D
public void setClip(Shape s)
{
clip = s;
if (s != null)
if (clip == null)
{
// Reset clipping.
Dimension d = component.awtComponent.getSize();
setClip(0, 0, d.width, d.height);
}
else
{
cairoNewPath();
if (s instanceof Rectangle2D)
@ -929,6 +1060,11 @@ public class GdkGraphics2D extends Graphics2D
bg = c;
}
public void setBackgroundUnlocked(Color c)
{
setBackground(c);
}
public Color getBackground()
{
return bg;
@ -1180,6 +1316,36 @@ public class GdkGraphics2D extends Graphics2D
|| hints.containsValue(RenderingHints.VALUE_STROKE_DEFAULT);
}
public void setRenderingHintsUnlocked(Map hints)
{
this.hints = new RenderingHints(getDefaultHints());
this.hints.add(new RenderingHints(hints));
if (hints.containsKey(RenderingHints.KEY_INTERPOLATION))
{
if (hints.containsValue(RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR))
cairoSurfaceSetFilterUnlocked(0);
else if (hints.containsValue(RenderingHints.VALUE_INTERPOLATION_BILINEAR))
cairoSurfaceSetFilterUnlocked(1);
}
if (hints.containsKey(RenderingHints.KEY_ALPHA_INTERPOLATION))
{
if (hints.containsValue(RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED))
cairoSurfaceSetFilterUnlocked(2);
else if (hints.containsValue(RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY))
cairoSurfaceSetFilterUnlocked(3);
else if (hints.containsValue(RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT))
cairoSurfaceSetFilterUnlocked(4);
}
shiftDrawCalls = hints.containsValue(RenderingHints.VALUE_STROKE_NORMALIZE)
|| hints.containsValue(RenderingHints.VALUE_STROKE_DEFAULT);
}
public void addRenderingHints(Map hints)
{
this.hints.add(new RenderingHints(hints));
@ -1344,6 +1510,9 @@ public class GdkGraphics2D extends Graphics2D
public void drawString(String str, float x, float y)
{
if (str == null || str.length() == 0)
return;
drawGlyphVector(getFont().createGlyphVector(null, str), x, y);
updateBufferedImage ();
}
@ -1443,6 +1612,11 @@ public class GdkGraphics2D extends Graphics2D
.getFont(f.getName(), f.getAttributes());
}
public void setFontUnlocked(Font f)
{
setFont (f);
}
public String toString()
{
return (getClass().getName()

View file

@ -42,6 +42,7 @@ import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.ImageCapabilities;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.geom.AffineTransform;
@ -56,16 +57,11 @@ public class GdkGraphicsConfiguration
ColorModel cm;
Rectangle bounds;
public GtkToolkit getToolkit()
{
return gdkScreenGraphicsDevice.getToolkit();
}
public GdkGraphicsConfiguration(GdkScreenGraphicsDevice dev)
{
this.gdkScreenGraphicsDevice = dev;
cm = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB).getColorModel();
bounds = getToolkit().getBounds();
bounds = ((GtkToolkit) Toolkit.getDefaultToolkit()).getBounds();
}
public GraphicsDevice getDevice()
@ -135,4 +131,10 @@ public class GdkGraphicsConfiguration
return new ImageCapabilities(false);
}
public VolatileImage createCompatibleVolatileImage(int width, int height, int transparency)
{
// FIXME: implement
return null;
}
}

View file

@ -43,22 +43,14 @@ import java.awt.Graphics2D;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.util.Locale;
public class GdkGraphicsEnvironment extends GraphicsEnvironment
{
GtkToolkit gtkToolkit;
public GtkToolkit getToolkit()
public GdkGraphicsEnvironment ()
{
return gtkToolkit;
}
public GdkGraphicsEnvironment (GtkToolkit tk)
{
super();
gtkToolkit = tk;
}
public GraphicsDevice[] getScreenDevices ()

View file

@ -122,7 +122,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
super (imagedata, imageoffset, imagelength);
}
// called back by native side
// called back by native side: area_prepared_cb
void areaPrepared (int width, int height)
{
@ -138,7 +138,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
}
}
// called back by native side
// called back by native side: area_updated_cb
void areaUpdated (int x, int y, int width, int height,
int pixels[], int scansize)
{
@ -306,7 +306,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static String findFormatName(Object ext, boolean needWritable)
{
if (ext == null)
throw new IllegalArgumentException("extension is null");
return null;
if (!(ext instanceof String))
throw new IllegalArgumentException("extension is not a string");

Some files were not shown because too many files have changed in this diff Show more